Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1983426 Details for
Bug 2231762
Segmentation fault during compilation
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh89 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Preprocessor output for the same project encountering the same crash on version 13.0.1
ccmxtUGd.out (text/x-csrc), 6.52 MB, created by
Byron Hawkins
on 2023-08-15 17:56:26 UTC
(
hide
)
Description:
Preprocessor output for the same project encountering the same crash on version 13.0.1
Filename:
MIME Type:
Creator:
Byron Hawkins
Created:
2023-08-15 17:56:26 UTC
Size:
6.52 MB
patch
obsolete
>// Cible : x86_64-redhat-linux >// Configuré avec: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-13.0.1-20230401/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-offload-defaulted --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 >// Modèle de thread: posix >// Algorithmes de compression LTO supportés: zlib zstd >// gcc version 13.0.1 20230401 (Red Hat 13.0.1-0) (GCC) >// >// Dans le fichier inclus depuis [01m[K../../src/model/ExcavationModel.hpp:3[m[K, >// depuis [01m[K../../src/assembly/InflatedModule.hpp:4[m[K, >// depuis [01m[K../../src/assembly/InflationComponents.hpp:4[m[K, >// depuis [01m[K../../src/assembly/ModuleTables.hpp:6[m[K, >// depuis [01m[K../../src/PiiFramework.hpp:62[m[K, >// depuis [01m[K../../test/PiiTestFramework.hpp:6[m[K, >// depuis [01m[K../../test/assembly/CodeletScribeTest.cpp:1[m[K: >// ../../src/assembly/InflationModel.hpp: Dans l'instanciation de « [01m[Kstruct pii::InflationModelBase<pii::NullGraphObserver>[m[K » : >// [01m[K../../src/assembly/InflationModel.hpp:152:9:[m[K requis depuis ici >// [01m[K../../src/assembly/InflationModel.hpp:120:11:[m[K [01;31m[Kerreur interne du compilateur: [m[KErreur de segmentation >// 120 | using [01;31m[KTreeComposition[m[K = ModuleGraphComposition<ObservedModuleGraphPlugin, BlockBase>; >// | [01;31m[K^~~~~~~~~~~~~~~[m[K >// Veuillez soumettre un rapport dâanomalies complet, avec la sortie du préprocesseur. >// Voir <http://bugzilla.redhat.com/bugzilla> pour les instructions. > >// /usr/libexec/gcc/x86_64-redhat-linux/13/cc1plus -quiet -I test/CodeletScribeTest.p -I test -I ../../test -I test/assembly -I ../../test/assembly -I test/elf -I ../../test/elf -I test/model -I ../../test/model -I src -I ../../src -I src/dynamorio -I ../../src/dynamorio -I src/io -I ../../src/io -I src/assembly -I ../../src/assembly -I src/model -I ../../src/model -I src/elf -I ../../src/elf -I src/compile -I ../../src/compile -I 3pty -I ../../3pty -I ../../3pty/dynamorio/include -I subprojects/edfst/subprojects/facile/src -I ../../subprojects/edfst/subprojects/facile/src -I subprojects/edfst/subprojects/facile/src/fail -I ../../subprojects/edfst/subprojects/facile/src/fail -I subprojects/edfst/subprojects/facile/src/io -I ../../subprojects/edfst/subprojects/facile/src/io -I subprojects/edfst/subprojects/facile/src/iterator -I ../../subprojects/edfst/subprojects/facile/src/iterator -I subprojects/edfst/subprojects/facile/src/math -I ../../subprojects/edfst/subprojects/facile/src/math -I subprojects/edfst/subprojects/facile/src/relation -I ../../subprojects/edfst/subprojects/facile/src/relation -I subprojects/edfst/subprojects/facile/src/scope -I ../../subprojects/edfst/subprojects/facile/src/scope -I subprojects/edfst/subprojects/facile/src/test -I ../../subprojects/edfst/subprojects/facile/src/test -I ../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include -I subprojects/edfst/subprojects/point-util/src -I ../../subprojects/edfst/subprojects/point-util/src -I subprojects/edfst/subprojects/point-util/src/bit -I ../../subprojects/edfst/subprojects/point-util/src/bit -I subprojects/edfst/subprojects/point-util/src/block -I ../../subprojects/edfst/subprojects/point-util/src/block -I subprojects/edfst/subprojects/point-util/src/fail -I ../../subprojects/edfst/subprojects/point-util/src/fail -I subprojects/edfst/subprojects/point-util/src/index -I ../../subprojects/edfst/subprojects/point-util/src/index -I subprojects/edfst/subprojects/point-util/src/point -I ../../subprojects/edfst/subprojects/point-util/src/point -I subprojects/edfst/test -I ../../subprojects/edfst/test -I subprojects/edfst/test/graph -I ../../subprojects/edfst/test/graph -I subprojects/edfst/test/tree -I ../../subprojects/edfst/test/tree -I subprojects/edfst/test/forest -I ../../subprojects/edfst/test/forest -I subprojects/edfst/test/sim -I ../../subprojects/edfst/test/sim -I subprojects/edfst/test/sim/io -I ../../subprojects/edfst/test/sim/io -I subprojects/edfst/test/sim/tree -I ../../subprojects/edfst/test/sim/tree -I subprojects/edfst/src/edfst -I ../../subprojects/edfst/src/edfst -I subprojects/edfst/src/edfst/graph -I ../../subprojects/edfst/src/edfst/graph -I subprojects/edfst/src/edfst/tree -I ../../subprojects/edfst/src/edfst/tree -I subprojects/edfst/src/edfst/sim -I ../../subprojects/edfst/src/edfst/sim -I subprojects/edfst/src/edfst/log -I ../../subprojects/edfst/src/edfst/log -I subprojects/edfst/src/icd -I ../../subprojects/edfst/src/icd -I subprojects/edfst/src/icd/forest -I ../../subprojects/edfst/src/icd/forest -I subprojects/edfst/src/util -I ../../subprojects/edfst/src/util -I ../../subprojects/edfst/3pty/networkit/src/include -I ../../subprojects/edfst/3pty/networkit/src/extlibs/tlx -MD test/CodeletScribeTest.p/assembly_CodeletScribeTest.cpp.d -MF test/CodeletScribeTest.p/assembly_CodeletScribeTest.cpp.o.d -MQ test/CodeletScribeTest.p/assembly_CodeletScribeTest.cpp.o -D_GNU_SOURCE -D_REENTRANT -D _FILE_OFFSET_BITS=64 -D TEST=1 -D DSTREAM -D PII_LOG=1 ../../test/assembly/CodeletScribeTest.cpp -quiet -dumpdir test/CodeletScribeTest.p/ -dumpbase assembly_CodeletScribeTest.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -g -O0 -Wall -Winvalid-pch -Wextra -Wpedantic -Wno-maybe-uninitialized -std=c++17 -fdiagnostics-color=always -fopenmp -ftemplate-backtrace-limit=100 -o - -frandom-seed=0 -fdump-noaddr > ># 0 "../../test/assembly/CodeletScribeTest.cpp" ># 1 "/home/volet/lab/inria/trace/pii/bin/debug//" ># 0 "<interne>" ># 0 "<ligne-de-commande>" ># 1 "/usr/include/stdc-predef.h" 1 3 4 ># 0 "<ligne-de-commande>" 2 ># 1 "../../test/assembly/CodeletScribeTest.cpp" ># 1 "../../test/PiiTestFramework.hpp" 1 > > ># 1 "../../subprojects/edfst/test/ElasticTestFramework.hpp" 1 > > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 1 > > ># 1 "/usr/include/c++/13/iostream" 1 3 ># 36 "/usr/include/c++/13/iostream" 3 > ># 37 "/usr/include/c++/13/iostream" 3 > ># 1 "/usr/include/c++/13/bits/requires_hosted.h" 1 3 ># 31 "/usr/include/c++/13/bits/requires_hosted.h" 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 1 3 > > ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 4 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 2 3 ># 2574 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 3 > ># 2574 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 3 >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 >} ># 2607 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 3 >namespace std >{ > inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } >} >namespace __gnu_cxx >{ > inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } >} ># 2793 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 3 >namespace std >{ >#pragma GCC visibility push(default) > > > > > constexpr inline bool > __is_constant_evaluated() noexcept > { > > > > > > return __builtin_is_constant_evaluated(); > > > > } >#pragma GCC visibility pop >} ># 2940 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/os_defines.h" 1 3 ># 39 "/usr/include/c++/13/x86_64-redhat-linux/bits/os_defines.h" 3 ># 1 "/usr/include/features.h" 1 3 4 ># 393 "/usr/include/features.h" 3 4 ># 1 "/usr/include/features-time64.h" 1 3 4 ># 20 "/usr/include/features-time64.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 21 "/usr/include/features-time64.h" 2 3 4 ># 1 "/usr/include/bits/timesize.h" 1 3 4 ># 19 "/usr/include/bits/timesize.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 20 "/usr/include/bits/timesize.h" 2 3 4 ># 22 "/usr/include/features-time64.h" 2 3 4 ># 394 "/usr/include/features.h" 2 3 4 ># 491 "/usr/include/features.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 ># 561 "/usr/include/sys/cdefs.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 562 "/usr/include/sys/cdefs.h" 2 3 4 ># 1 "/usr/include/bits/long-double.h" 1 3 4 ># 563 "/usr/include/sys/cdefs.h" 2 3 4 ># 492 "/usr/include/features.h" 2 3 4 ># 515 "/usr/include/features.h" 3 4 ># 1 "/usr/include/gnu/stubs.h" 1 3 4 ># 10 "/usr/include/gnu/stubs.h" 3 4 ># 1 "/usr/include/gnu/stubs-64.h" 1 3 4 ># 11 "/usr/include/gnu/stubs.h" 2 3 4 ># 516 "/usr/include/features.h" 2 3 4 ># 40 "/usr/include/c++/13/x86_64-redhat-linux/bits/os_defines.h" 2 3 ># 2941 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 2 3 > > ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/cpu_defines.h" 1 3 ># 2944 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 2 3 ># 3143 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 3 ># 1 "/usr/include/c++/13/pstl/pstl_config.h" 1 3 ># 3144 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++config.h" 2 3 ># 32 "/usr/include/c++/13/bits/requires_hosted.h" 2 3 ># 39 "/usr/include/c++/13/iostream" 2 3 > > ># 1 "/usr/include/c++/13/ostream" 1 3 ># 36 "/usr/include/c++/13/ostream" 3 > ># 37 "/usr/include/c++/13/ostream" 3 > > > ># 1 "/usr/include/c++/13/ios" 1 3 ># 36 "/usr/include/c++/13/ios" 3 > ># 37 "/usr/include/c++/13/ios" 3 > > > ># 1 "/usr/include/c++/13/iosfwd" 1 3 ># 36 "/usr/include/c++/13/iosfwd" 3 > ># 37 "/usr/include/c++/13/iosfwd" 3 > > > > ># 1 "/usr/include/c++/13/bits/stringfwd.h" 1 3 ># 37 "/usr/include/c++/13/bits/stringfwd.h" 3 > ># 38 "/usr/include/c++/13/bits/stringfwd.h" 3 > > ># 1 "/usr/include/c++/13/bits/memoryfwd.h" 1 3 ># 46 "/usr/include/c++/13/bits/memoryfwd.h" 3 > ># 47 "/usr/include/c++/13/bits/memoryfwd.h" 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 64 "/usr/include/c++/13/bits/memoryfwd.h" 3 > template<typename> > class allocator; > > template<> > class allocator<void>; > > > > > template<typename, typename> > struct uses_allocator; > > template<typename> > struct allocator_traits; > > > > > >} ># 41 "/usr/include/c++/13/bits/stringfwd.h" 2 3 > >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<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; ># 89 "/usr/include/c++/13/bits/stringfwd.h" 3 > typedef basic_string<char16_t> u16string; > > > typedef basic_string<char32_t> u32string; > > > > > >} ># 42 "/usr/include/c++/13/iosfwd" 2 3 ># 1 "/usr/include/c++/13/bits/postypes.h" 1 3 ># 38 "/usr/include/c++/13/bits/postypes.h" 3 > ># 39 "/usr/include/c++/13/bits/postypes.h" 3 > ># 1 "/usr/include/c++/13/cwchar" 1 3 ># 39 "/usr/include/c++/13/cwchar" 3 > ># 40 "/usr/include/c++/13/cwchar" 3 > > > > ># 1 "/usr/include/wchar.h" 1 3 4 ># 27 "/usr/include/wchar.h" 3 4 ># 1 "/usr/include/bits/libc-header-start.h" 1 3 4 ># 28 "/usr/include/wchar.h" 2 3 4 > > ># 1 "/usr/include/bits/floatn.h" 1 3 4 ># 119 "/usr/include/bits/floatn.h" 3 4 ># 1 "/usr/include/bits/floatn-common.h" 1 3 4 ># 24 "/usr/include/bits/floatn-common.h" 3 4 ># 1 "/usr/include/bits/long-double.h" 1 3 4 ># 25 "/usr/include/bits/floatn-common.h" 2 3 4 ># 120 "/usr/include/bits/floatn.h" 2 3 4 ># 31 "/usr/include/wchar.h" 2 3 4 > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 214 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 3 4 >typedef long unsigned int size_t; ># 36 "/usr/include/wchar.h" 2 3 4 > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stdarg.h" 1 3 4 ># 40 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 39 "/usr/include/wchar.h" 2 3 4 > ># 1 "/usr/include/bits/wchar.h" 1 3 4 ># 41 "/usr/include/wchar.h" 2 3 4 ># 1 "/usr/include/bits/types/wint_t.h" 1 3 4 ># 20 "/usr/include/bits/types/wint_t.h" 3 4 >typedef unsigned int wint_t; ># 42 "/usr/include/wchar.h" 2 3 4 ># 1 "/usr/include/bits/types/mbstate_t.h" 1 3 4 > > > ># 1 "/usr/include/bits/types/__mbstate_t.h" 1 3 4 ># 13 "/usr/include/bits/types/__mbstate_t.h" 3 4 >typedef struct >{ > int __count; > union > { > unsigned int __wch; > char __wchb[4]; > } __value; >} __mbstate_t; ># 5 "/usr/include/bits/types/mbstate_t.h" 2 3 4 > >typedef __mbstate_t mbstate_t; ># 43 "/usr/include/wchar.h" 2 3 4 ># 1 "/usr/include/bits/types/__FILE.h" 1 3 4 > > > >struct _IO_FILE; >typedef struct _IO_FILE __FILE; ># 44 "/usr/include/wchar.h" 2 3 4 > > ># 1 "/usr/include/bits/types/FILE.h" 1 3 4 > > > >struct _IO_FILE; > > >typedef struct _IO_FILE FILE; ># 47 "/usr/include/wchar.h" 2 3 4 > > ># 1 "/usr/include/bits/types/locale_t.h" 1 3 4 ># 22 "/usr/include/bits/types/locale_t.h" 3 4 ># 1 "/usr/include/bits/types/__locale_t.h" 1 3 4 ># 27 "/usr/include/bits/types/__locale_t.h" 3 4 >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; ># 23 "/usr/include/bits/types/locale_t.h" 2 3 4 > >typedef __locale_t locale_t; ># 50 "/usr/include/wchar.h" 2 3 4 ># 79 "/usr/include/wchar.h" 3 4 >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 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 size_t wcsxfrm (wchar_t *__restrict __s1, > const wchar_t *__restrict __s2, size_t __n) noexcept (true); > > > > > > > >extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, > locale_t __loc) noexcept (true); > > > > >extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, > size_t __n, locale_t __loc) noexcept (true); > > >extern wchar_t *wcsdup (const wchar_t *__s) noexcept (true) > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (__builtin_free, 1))); > > > > >extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) > noexcept (true) __asm ("wcschr") __attribute__ ((__pure__)); >extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) > noexcept (true) __asm ("wcschr") __attribute__ ((__pure__)); > > > > > > >extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) > noexcept (true) __asm ("wcsrchr") __attribute__ ((__pure__)); >extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) > noexcept (true) __asm ("wcsrchr") __attribute__ ((__pure__)); ># 182 "/usr/include/wchar.h" 3 4 >extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) > noexcept (true) __attribute__ ((__pure__)); > > > > >extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) > noexcept (true) __attribute__ ((__pure__)); > > >extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) > noexcept (true) __attribute__ ((__pure__)); > > >extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) > noexcept (true) __asm ("wcspbrk") __attribute__ ((__pure__)); >extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, > const wchar_t *__accept) > noexcept (true) __asm ("wcspbrk") __attribute__ ((__pure__)); > > > > > > >extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) > noexcept (true) __asm ("wcsstr") __attribute__ ((__pure__)); >extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, > const wchar_t *__needle) > noexcept (true) __asm ("wcsstr") __attribute__ ((__pure__)); > > > > > > >extern wchar_t *wcstok (wchar_t *__restrict __s, > const wchar_t *__restrict __delim, > wchar_t **__restrict __ptr) noexcept (true); > > >extern size_t wcslen (const wchar_t *__s) noexcept (true) __attribute__ ((__pure__)); > > > > >extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) > noexcept (true) __asm ("wcswcs") __attribute__ ((__pure__)); >extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, > const wchar_t *__needle) > noexcept (true) __asm ("wcswcs") __attribute__ ((__pure__)); ># 241 "/usr/include/wchar.h" 3 4 >extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) > noexcept (true) __attribute__ ((__pure__)); > > > > > >extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) > noexcept (true) __asm ("wmemchr") __attribute__ ((__pure__)); >extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, > size_t __n) > noexcept (true) __asm ("wmemchr") __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 wchar_t *wmempcpy (wchar_t *__restrict __s1, > const wchar_t *__restrict __s2, size_t __n) > noexcept (true); > > > > > >extern wint_t btowc (int __c) noexcept (true); > > > >extern int wctob (wint_t __c) noexcept (true); > > > >extern int mbsinit (const mbstate_t *__ps) noexcept (true) __attribute__ ((__pure__)); > > > >extern size_t mbrtowc (wchar_t *__restrict __pwc, > const char *__restrict __s, size_t __n, > mbstate_t *__restrict __p) noexcept (true); > > >extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, > mbstate_t *__restrict __ps) noexcept (true); > > >extern size_t __mbrlen (const char *__restrict __s, size_t __n, > mbstate_t *__restrict __ps) noexcept (true); >extern size_t mbrlen (const char *__restrict __s, size_t __n, > mbstate_t *__restrict __ps) noexcept (true); ># 338 "/usr/include/wchar.h" 3 4 >extern size_t mbsrtowcs (wchar_t *__restrict __dst, > const char **__restrict __src, size_t __len, > mbstate_t *__restrict __ps) noexcept (true); > > > >extern size_t wcsrtombs (char *__restrict __dst, > const wchar_t **__restrict __src, size_t __len, > mbstate_t *__restrict __ps) noexcept (true); > > > > > >extern size_t mbsnrtowcs (wchar_t *__restrict __dst, > const char **__restrict __src, size_t __nmc, > size_t __len, mbstate_t *__restrict __ps) noexcept (true); > > > >extern size_t wcsnrtombs (char *__restrict __dst, > const wchar_t **__restrict __src, > size_t __nwc, size_t __len, > mbstate_t *__restrict __ps) noexcept (true); > > > > > > >extern int wcwidth (wchar_t __c) noexcept (true); > > > >extern int wcswidth (const wchar_t *__s, size_t __n) noexcept (true); > > > > > >extern double wcstod (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr) noexcept (true); > > > >extern float wcstof (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr) noexcept (true); >extern long double wcstold (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr) noexcept (true); ># 397 "/usr/include/wchar.h" 3 4 >extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr) noexcept (true); > > > >extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr) noexcept (true); > > > >extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr) noexcept (true); > > > >extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr) noexcept (true); > > > >extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr) noexcept (true); ># 429 "/usr/include/wchar.h" 3 4 >extern long int wcstol (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, int __base) noexcept (true); > > > >extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, int __base) > noexcept (true); > > > > >__extension__ >extern long long int wcstoll (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, int __base) > noexcept (true); > > > >__extension__ >extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > int __base) noexcept (true); > > > > > >__extension__ >extern long long int wcstoq (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, int __base) > noexcept (true); > > > >__extension__ >extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > int __base) noexcept (true); > > > > > > >extern long int wcstol_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, int __base, > locale_t __loc) noexcept (true); > >extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > int __base, locale_t __loc) noexcept (true); > >__extension__ >extern long long int wcstoll_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > int __base, locale_t __loc) noexcept (true); > >__extension__ >extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > int __base, locale_t __loc) > noexcept (true); > >extern double wcstod_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, locale_t __loc) > noexcept (true); > >extern float wcstof_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, locale_t __loc) > noexcept (true); > >extern long double wcstold_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > locale_t __loc) noexcept (true); ># 512 "/usr/include/wchar.h" 3 4 >extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > locale_t __loc) noexcept (true); > > > >extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > locale_t __loc) noexcept (true); > > > >extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > locale_t __loc) noexcept (true); > > > >extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > locale_t __loc) noexcept (true); > > > >extern _Float64x wcstof64x_l (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, > locale_t __loc) noexcept (true); ># 552 "/usr/include/wchar.h" 3 4 >extern wchar_t *wcpcpy (wchar_t *__restrict __dest, > const wchar_t *__restrict __src) noexcept (true); > > > >extern wchar_t *wcpncpy (wchar_t *__restrict __dest, > const wchar_t *__restrict __src, size_t __n) > noexcept (true); ># 581 "/usr/include/wchar.h" 3 4 >extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) noexcept (true) > __attribute__ ((__malloc__)) ; > > > > > >extern int fwide (__FILE *__fp, int __mode) noexcept (true); > > > > > > >extern int fwprintf (__FILE *__restrict __stream, > const wchar_t *__restrict __format, ...) > ; > > > > >extern int wprintf (const wchar_t *__restrict __format, ...) > ; > >extern int swprintf (wchar_t *__restrict __s, size_t __n, > const wchar_t *__restrict __format, ...) > noexcept (true) ; > > > > > >extern int vfwprintf (__FILE *__restrict __s, > const wchar_t *__restrict __format, > __gnuc_va_list __arg) > ; > > > > >extern int vwprintf (const wchar_t *__restrict __format, > __gnuc_va_list __arg) > ; > > >extern int vswprintf (wchar_t *__restrict __s, size_t __n, > const wchar_t *__restrict __format, > __gnuc_va_list __arg) > noexcept (true) ; > > > > > > >extern int fwscanf (__FILE *__restrict __stream, > const wchar_t *__restrict __format, ...) > ; > > > > >extern int wscanf (const wchar_t *__restrict __format, ...) > ; > >extern int swscanf (const wchar_t *__restrict __s, > const wchar_t *__restrict __format, ...) > noexcept (true) ; ># 657 "/usr/include/wchar.h" 3 4 >extern int fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) __asm__ ("" "__isoc99_fwscanf") > > > ; >extern int wscanf (const wchar_t *__restrict __format, ...) __asm__ ("" "__isoc99_wscanf") > > ; >extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) noexcept (true) __asm__ ("" "__isoc99_swscanf") > > > ; ># 688 "/usr/include/wchar.h" 3 4 >extern int vfwscanf (__FILE *__restrict __s, > const wchar_t *__restrict __format, > __gnuc_va_list __arg) > ; > > > > >extern int vwscanf (const wchar_t *__restrict __format, > __gnuc_va_list __arg) > ; > >extern int vswscanf (const wchar_t *__restrict __s, > const wchar_t *__restrict __format, > __gnuc_va_list __arg) > noexcept (true) ; > > > > > > > >extern int vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfwscanf") > > > ; >extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vwscanf") > > ; >extern int vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) noexcept (true) __asm__ ("" "__isoc99_vswscanf") > > > ; ># 744 "/usr/include/wchar.h" 3 4 >extern wint_t fgetwc (__FILE *__stream); >extern wint_t getwc (__FILE *__stream); > > > > > >extern wint_t getwchar (void); > > > > > > >extern wint_t fputwc (wchar_t __wc, __FILE *__stream); >extern wint_t putwc (wchar_t __wc, __FILE *__stream); > > > > > >extern wint_t putwchar (wchar_t __wc); > > > > > > > >extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, > __FILE *__restrict __stream); > > > > > >extern int fputws (const wchar_t *__restrict __ws, > __FILE *__restrict __stream); > > > > > > >extern wint_t ungetwc (wint_t __wc, __FILE *__stream); ># 799 "/usr/include/wchar.h" 3 4 >extern wint_t getwc_unlocked (__FILE *__stream); >extern wint_t getwchar_unlocked (void); > > > > > > > >extern wint_t fgetwc_unlocked (__FILE *__stream); > > > > > > > >extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); ># 825 "/usr/include/wchar.h" 3 4 >extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); >extern wint_t putwchar_unlocked (wchar_t __wc); ># 835 "/usr/include/wchar.h" 3 4 >extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, > __FILE *__restrict __stream); > > > > > > > >extern int fputws_unlocked (const wchar_t *__restrict __ws, > __FILE *__restrict __stream); > > > > > > >extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, > const wchar_t *__restrict __format, > const struct tm *__restrict __tp) noexcept (true); > > > > >extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, > const wchar_t *__restrict __format, > const struct tm *__restrict __tp, > locale_t __loc) noexcept (true); ># 882 "/usr/include/wchar.h" 3 4 >} ># 45 "/usr/include/c++/13/cwchar" 2 3 ># 62 "/usr/include/c++/13/cwchar" 3 >namespace std >{ > using ::mbstate_t; >} ># 135 "/usr/include/c++/13/cwchar" 3 >extern "C++" >{ >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > using ::wint_t; > > using ::btowc; > using ::fgetwc; > using ::fgetws; > using ::fputwc; > using ::fputws; > using ::fwide; > using ::fwprintf; > using ::fwscanf; > using ::getwc; > using ::getwchar; > using ::mbrlen; > using ::mbrtowc; > using ::mbsinit; > using ::mbsrtowcs; > using ::putwc; > using ::putwchar; > > using ::swprintf; > > using ::swscanf; > using ::ungetwc; > using ::vfwprintf; > > using ::vfwscanf; > > > using ::vswprintf; > > > using ::vswscanf; > > using ::vwprintf; > > using ::vwscanf; > > using ::wcrtomb; > using ::wcscat; > using ::wcscmp; > using ::wcscoll; > using ::wcscpy; > using ::wcscspn; > using ::wcsftime; > using ::wcslen; > using ::wcsncat; > using ::wcsncmp; > using ::wcsncpy; > using ::wcsrtombs; > using ::wcsspn; > using ::wcstod; > > using ::wcstof; > > using ::wcstok; > using ::wcstol; > using ::wcstoul; > using ::wcsxfrm; > using ::wctob; > using ::wmemcmp; > using ::wmemcpy; > using ::wmemmove; > using ::wmemset; > using ::wprintf; > using ::wscanf; > using ::wcschr; > using ::wcspbrk; > using ::wcsrchr; > using ::wcsstr; > using ::wmemchr; ># 234 "/usr/include/c++/13/cwchar" 3 > >} >} > > > > > > > >namespace __gnu_cxx >{ > > > > > > using ::wcstold; ># 260 "/usr/include/c++/13/cwchar" 3 > using ::wcstoll; > using ::wcstoull; > >} > >namespace std >{ > using ::__gnu_cxx::wcstold; > using ::__gnu_cxx::wcstoll; > using ::__gnu_cxx::wcstoull; >} ># 280 "/usr/include/c++/13/cwchar" 3 >namespace std >{ > > using std::wcstof; > > > using std::vfwscanf; > > > using std::vswscanf; > > > using std::vwscanf; > > > > using std::wcstold; > using std::wcstoll; > using std::wcstoull; > >} ># 41 "/usr/include/c++/13/bits/postypes.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 62 "/usr/include/c++/13/bits/postypes.h" 3 > typedef long int streamoff; > > > > > > typedef ptrdiff_t streamsize; ># 81 "/usr/include/c++/13/bits/postypes.h" 3 > template<typename _StateT> > class fpos > { > private: > streamoff _M_off; > _StateT _M_state; > > public: > > > > > fpos() > : _M_off(0), _M_state() { } ># 103 "/usr/include/c++/13/bits/postypes.h" 3 > fpos(streamoff __off) > : _M_off(__off), _M_state() { } > > > fpos(const fpos&) = default; > fpos& operator=(const fpos&) = default; > ~fpos() = default; > > > > operator streamoff() const { return _M_off; } > > > void > state(_StateT __st) > { _M_state = __st; } > > > _StateT > state() const > { return _M_state; } > > > > > > fpos& > operator+=(streamoff __off) > { > _M_off += __off; > return *this; > } > > > > > > fpos& > operator-=(streamoff __off) > { > _M_off -= __off; > return *this; > } > > > > > > > > fpos > operator+(streamoff __off) const > { > fpos __pos(*this); > __pos += __off; > return __pos; > } > > > > > > > > fpos > operator-(streamoff __off) const > { > fpos __pos(*this); > __pos -= __off; > return __pos; > } > > > > > > > streamoff > operator-(const fpos& __other) const > { return _M_off - __other._M_off; } > }; > > > > > > > template<typename _StateT> > inline bool > operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) > { return streamoff(__lhs) == streamoff(__rhs); } > > template<typename _StateT> > inline bool > operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) > { return streamoff(__lhs) != streamoff(__rhs); } > > > > > > typedef fpos<mbstate_t> streampos; > > typedef fpos<mbstate_t> wstreampos; ># 215 "/usr/include/c++/13/bits/postypes.h" 3 > typedef fpos<mbstate_t> u16streampos; > > typedef fpos<mbstate_t> u32streampos; > > > >} ># 43 "/usr/include/c++/13/iosfwd" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 76 "/usr/include/c++/13/iosfwd" 3 > 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; ># 255 "/usr/include/c++/13/iosfwd" 3 > >} ># 41 "/usr/include/c++/13/ios" 2 3 ># 1 "/usr/include/c++/13/exception" 1 3 ># 33 "/usr/include/c++/13/exception" 3 > ># 34 "/usr/include/c++/13/exception" 3 > > ># 1 "/usr/include/c++/13/bits/exception.h" 1 3 ># 34 "/usr/include/c++/13/bits/exception.h" 3 > ># 35 "/usr/include/c++/13/bits/exception.h" 3 > > > >extern "C++" { > >namespace std __attribute__ ((__visibility__ ("default"))) >{ ># 59 "/usr/include/c++/13/bits/exception.h" 3 > 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; > }; > > > >} > >} ># 37 "/usr/include/c++/13/exception" 2 3 > >extern "C++" { > >namespace std __attribute__ ((__visibility__ ("default"))) >{ ># 51 "/usr/include/c++/13/exception" 3 > 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__)); ># 121 "/usr/include/c++/13/exception" 3 > __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"))) >{ > ># 156 "/usr/include/c++/13/exception" 3 > void __verbose_terminate_handler(); > > >} > >} > > ># 1 "/usr/include/c++/13/bits/exception_ptr.h" 1 3 ># 35 "/usr/include/c++/13/bits/exception_ptr.h" 3 ># 1 "/usr/include/c++/13/bits/exception_defines.h" 1 3 ># 36 "/usr/include/c++/13/bits/exception_ptr.h" 2 3 ># 1 "/usr/include/c++/13/bits/cxxabi_init_exception.h" 1 3 ># 34 "/usr/include/c++/13/bits/cxxabi_init_exception.h" 3 > ># 35 "/usr/include/c++/13/bits/cxxabi_init_exception.h" 3 > >#pragma GCC visibility push(default) > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 145 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 3 4 >typedef long int ptrdiff_t; ># 425 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 3 4 >typedef struct { > long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); > long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); ># 436 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 3 4 >} max_align_t; > > > > > > > typedef decltype(nullptr) nullptr_t; ># 39 "/usr/include/c++/13/bits/cxxabi_init_exception.h" 2 3 ># 50 "/usr/include/c++/13/bits/cxxabi_init_exception.h" 3 >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 ># 37 "/usr/include/c++/13/bits/exception_ptr.h" 2 3 ># 1 "/usr/include/c++/13/typeinfo" 1 3 ># 32 "/usr/include/c++/13/typeinfo" 3 > ># 33 "/usr/include/c++/13/typeinfo" 3 > > > ># 1 "/usr/include/c++/13/bits/hash_bytes.h" 1 3 ># 33 "/usr/include/c++/13/bits/hash_bytes.h" 3 > ># 34 "/usr/include/c++/13/bits/hash_bytes.h" 3 > > > >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); > > >} ># 37 "/usr/include/c++/13/typeinfo" 2 3 > > >#pragma GCC visibility push(default) > > > > > >extern "C++" { > >namespace __cxxabiv1 >{ > class __class_type_info; >} ># 84 "/usr/include/c++/13/typeinfo" 3 >namespace std >{ > > > > > > > class type_info > { > public: > > > > > virtual ~type_info(); > > > > const char* name() const noexcept > { return __name[0] == '*' ? __name + 1 : __name; } > > > > bool before(const type_info& __arg) const noexcept; > > > bool operator==(const type_info& __arg) const noexcept; > > > bool operator!=(const type_info& __arg) const noexcept > { return !operator==(__arg); } > > > > size_t hash_code() const noexcept > { > > return _Hash_bytes(name(), __builtin_strlen(name()), > static_cast<size_t>(0xc70f6907UL)); > > > > } > > > > 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): __name(__n) { } > > private: > > > type_info& operator=(const type_info&) = delete; > type_info(const type_info&) = delete; ># 167 "/usr/include/c++/13/typeinfo" 3 > }; > > > inline bool > type_info::before(const type_info& __arg) const noexcept > { > > > > > if (__name[0] != '*' || __arg.__name[0] != '*') > return __builtin_strcmp (__name, __arg.__name) < 0; ># 187 "/usr/include/c++/13/typeinfo" 3 > return __name < __arg.__name; > } > > > > inline bool > type_info::operator==(const type_info& __arg) const noexcept > { > if (std::__is_constant_evaluated()) > return this == &__arg; > > if (__name == __arg.__name) > return true; > > > > > > > return __name[0] != '*' && __builtin_strcmp (__name, __arg.name()) == 0; > > > > } ># 220 "/usr/include/c++/13/typeinfo" 3 > 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 ># 38 "/usr/include/c++/13/bits/exception_ptr.h" 2 3 ># 1 "/usr/include/c++/13/new" 1 3 ># 38 "/usr/include/c++/13/new" 3 > ># 39 "/usr/include/c++/13/new" 3 > > > > >#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; > >} ># 126 "/usr/include/c++/13/new" 3 >[[__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__)); > >void operator delete(void*, std::size_t) noexcept > __attribute__((__externally_visible__)); >void operator delete[](void*, std::size_t) 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__)); > >void operator delete(void*, std::size_t, std::align_val_t) > noexcept __attribute__((__externally_visible__)); >void operator delete[](void*, std::size_t, std::align_val_t) > noexcept __attribute__((__externally_visible__)); > > > > >[[__nodiscard__]] inline void* operator new(std::size_t, void* __p) noexcept >{ return __p; } >[[__nodiscard__]] inline void* operator new[](std::size_t, void* __p) noexcept >{ return __p; } > > >inline void operator delete (void*, void*) noexcept { } >inline void operator delete[](void*, void*) noexcept { } > >} > > >namespace std >{ > > > > template<typename _Tp> > [[nodiscard]] constexpr _Tp* > launder(_Tp* __p) noexcept > { return __builtin_launder(__p); } > > > > > 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; > > > > > inline constexpr size_t hardware_destructive_interference_size = 64; > inline constexpr size_t hardware_constructive_interference_size = 64; > >} ># 236 "/usr/include/c++/13/new" 3 >#pragma GCC visibility pop ># 39 "/usr/include/c++/13/bits/exception_ptr.h" 2 3 > > ># 1 "/usr/include/c++/13/bits/move.h" 1 3 ># 38 "/usr/include/c++/13/bits/move.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > template<typename _Tp> > inline constexpr _Tp* > __addressof(_Tp& __r) noexcept > { return __builtin_addressof(__r); } > > > > >} > ># 1 "/usr/include/c++/13/type_traits" 1 3 ># 32 "/usr/include/c++/13/type_traits" 3 > ># 33 "/usr/include/c++/13/type_traits" 3 > > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Tp> > class reference_wrapper; ># 61 "/usr/include/c++/13/type_traits" 3 > 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<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 { }; ># 440 "/usr/include/c++/13/type_traits" 3 > 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 { }; ># 500 "/usr/include/c++/13/type_traits" 3 > 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 ># 733 "/usr/include/c++/13/type_traits" 3 > >; > > > __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 ># 753 "/usr/include/c++/13/type_traits" 3 > >; > > > 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 > > 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 > { }; ># 936 "/usr/include/c++/13/type_traits" 3 > 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)> > > > > { }; ># 1409 "/usr/include/c++/13/type_traits" 3 > 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)> > { }; ># 1458 "/usr/include/c++/13/type_traits" 3 > template<typename _ToElementType, typename _FromElementType> > using __is_array_convertible > = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>; ># 1522 "/usr/include/c++/13/type_traits" 3 > 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); }; ># 1563 "/usr/include/c++/13/type_traits" 3 > 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 = __remove_reference(_Tp); }; ># 1628 "/usr/include/c++/13/type_traits" 3 > 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; }; ># 1741 "/usr/include/c++/13/type_traits" 3 > 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; > }; ># 1815 "/usr/include/c++/13/type_traits" 3 > template<> > struct __make_unsigned<char16_t> > { > using __type > = typename __make_unsigned_selector<char16_t, false, true>::__type; > }; > > template<> > struct __make_unsigned<char32_t> > { > using __type > = typename __make_unsigned_selector<char32_t, false, true>::__type; > }; > > > > > > > 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; }; ># 1901 "/usr/include/c++/13/type_traits" 3 > 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; > }; ># 1947 "/usr/include/c++/13/type_traits" 3 > template<> > struct __make_signed<char16_t> > { > using __type > = typename __make_signed_selector<char16_t, false, true>::__type; > }; > > template<> > struct __make_signed<char32_t> > { > using __type > = typename __make_signed_selector<char32_t, false, true>::__type; > }; > > > > > > > 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; > }; > }; ># 2095 "/usr/include/c++/13/type_traits" 3 > 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" ># 2141 "/usr/include/c++/13/type_traits" 3 > 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; ># 2256 "/usr/include/c++/13/type_traits" 3 > 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); ># 2283 "/usr/include/c++/13/type_traits" 3 > 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)) > { > static_assert(__declval_protector<_Tp>::__stop, > "declval() must not be used!"); > return __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; ># 2659 "/usr/include/c++/13/type_traits" 3 > template<typename _Default, typename _AlwaysVoid, > template<typename...> class _Op, typename... _Args> > struct __detector > { > using type = _Default; > using __is_detected = false_type; > }; > > > template<typename _Default, template<typename...> class _Op, > typename... _Args> > struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> > { > using type = _Op<_Args...>; > using __is_detected = true_type; > }; > > template<typename _Default, template<typename...> class _Op, > typename... _Args> > using __detected_or = __detector<_Default, void, _Op, _Args...>; > > > > template<typename _Default, template<typename...> class _Op, > typename... _Args> > using __detected_or_t > = typename __detected_or<_Default, _Op, _Args...>::type; ># 2701 "/usr/include/c++/13/type_traits" 3 > 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> > > inline > _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> > > inline > __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/include/c++/13/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 = __reference_converts_from_temporary(_Tp, _Res_t) > > > > > > 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) > { > using _Up = typename __inv_unwrap<_Tp>::type; > return noexcept((std::declval<_Up>().*std::declval<_Fn>())( > std::declval<_Args>()...)); > } > > template<typename _Fn, typename _Tp, typename... _Args> > constexpr bool __call_is_nt(__invoke_memfun_deref) > { > return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( > std::declval<_Args>()...)); > } > > template<typename _Fn, typename _Tp> > constexpr bool __call_is_nt(__invoke_memobj_ref) > { > using _Up = typename __inv_unwrap<_Tp>::type; > return noexcept(std::declval<_Up>().*std::declval<_Fn>()); > } > > template<typename _Fn, typename _Tp> > constexpr bool __call_is_nt(__invoke_memobj_deref) > { > return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); > } > > template<typename _Fn, typename... _Args> > constexpr bool __call_is_nt(__invoke_other) > { > return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); > } > > template<typename _Result, typename _Fn, typename... _Args> > struct __call_is_nothrow > : __bool_constant< > std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) > > > { }; > > template<typename _Fn, typename... _Args> > using __call_is_nothrow_ > = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; > > > 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"); > }; ># 3155 "/usr/include/c++/13/type_traits" 3 >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> > > 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>); ># 3828 "/usr/include/c++/13/type_traits" 3 > >} ># 58 "/usr/include/c++/13/bits/move.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 74 "/usr/include/c++/13/bits/move.h" 3 > template<typename _Tp> > [[__nodiscard__]] > constexpr _Tp&& > forward(typename std::remove_reference<_Tp>::type& __t) noexcept > { return static_cast<_Tp&&>(__t); } > > > > > > > > template<typename _Tp> > [[__nodiscard__]] > constexpr _Tp&& > forward(typename std::remove_reference<_Tp>::type&& __t) noexcept > { > static_assert(!std::is_lvalue_reference<_Tp>::value, > "std::forward must not be used to convert an rvalue to an lvalue"); > return static_cast<_Tp&&>(__t); > } > > > > > > > template<typename _Tp> > [[__nodiscard__]] > constexpr typename std::remove_reference<_Tp>::type&& > move(_Tp&& __t) noexcept > { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); } > > > template<typename _Tp> > struct __move_if_noexcept_cond > : public __and_<__not_<is_nothrow_move_constructible<_Tp>>, > is_copy_constructible<_Tp>>::type { }; ># 121 "/usr/include/c++/13/bits/move.h" 3 > template<typename _Tp> > [[__nodiscard__]] > constexpr > __conditional_t<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&> > move_if_noexcept(_Tp& __x) noexcept > { return std::move(__x); } ># 142 "/usr/include/c++/13/bits/move.h" 3 > template<typename _Tp> > [[__nodiscard__]] > inline constexpr _Tp* > addressof(_Tp& __r) noexcept > { return std::__addressof(__r); } > > > > template<typename _Tp> > const _Tp* addressof(const _Tp&&) = delete; > > > template <typename _Tp, typename _Up = _Tp> > > inline _Tp > __exchange(_Tp& __obj, _Up&& __new_val) > { > _Tp __old_val = std::move(__obj); > __obj = std::forward<_Up>(__new_val); > return __old_val; > } ># 186 "/usr/include/c++/13/bits/move.h" 3 > template<typename _Tp> > > inline > > typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, > is_move_constructible<_Tp>, > is_move_assignable<_Tp>>::value>::type > > > > swap(_Tp& __a, _Tp& __b) > noexcept(__and_<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>::value) > > { > > > > > _Tp __tmp = std::move(__a); > __a = std::move(__b); > __b = std::move(__tmp); > } > > > > > template<typename _Tp, size_t _Nm> > > inline > > typename enable_if<__is_swappable<_Tp>::value>::type > > > > swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) > noexcept(__is_nothrow_swappable<_Tp>::value) > { > for (size_t __n = 0; __n < _Nm; ++__n) > swap(__a[__n], __b[__n]); > } > > > >} ># 42 "/usr/include/c++/13/bits/exception_ptr.h" 2 3 ># 50 "/usr/include/c++/13/bits/exception_ptr.h" 3 >extern "C++" { > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > class type_info; > > > > > > > namespace __exception_ptr > { > class exception_ptr; > } > > using __exception_ptr::exception_ptr; ># 75 "/usr/include/c++/13/bits/exception_ptr.h" 3 > 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; ># 97 "/usr/include/c++/13/bits/exception_ptr.h" 3 > 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) noexcept > : _M_exception_object(nullptr) > { } > > exception_ptr(exception_ptr&& __o) noexcept > : _M_exception_object(__o._M_exception_object) > { __o._M_exception_object = nullptr; } ># 135 "/usr/include/c++/13/bits/exception_ptr.h" 3 > exception_ptr& > operator=(const exception_ptr&) noexcept; > > > exception_ptr& > operator=(exception_ptr&& __o) noexcept > { > exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this); > return *this; > } > > > ~exception_ptr() noexcept; > > void > swap(exception_ptr&) noexcept; ># 162 "/usr/include/c++/13/bits/exception_ptr.h" 3 > explicit operator bool() const noexcept > { return _M_exception_object; } > > > > > > > > friend bool > operator==(const exception_ptr& __x, const exception_ptr& __y) > noexcept > { return __x._M_exception_object == __y._M_exception_object; } > > friend bool > operator!=(const exception_ptr& __x, const exception_ptr& __y) > noexcept > { return __x._M_exception_object != __y._M_exception_object; } > > > const class std::type_info* > __cxa_exception_type() const noexcept > __attribute__ ((__pure__)); > }; > > > inline > exception_ptr::exception_ptr() noexcept > : _M_exception_object(0) > { } > > > inline > exception_ptr::exception_ptr(const exception_ptr& __other) > noexcept > : _M_exception_object(__other._M_exception_object) > { > if (_M_exception_object) > _M_addref(); > } > > > inline > exception_ptr::~exception_ptr() noexcept > { > if (_M_exception_object) > _M_release(); > } > > > inline exception_ptr& > exception_ptr::operator=(const exception_ptr& __other) noexcept > { > exception_ptr(__other).swap(*this); > return *this; > } > > > inline void > exception_ptr::swap(exception_ptr &__other) noexcept > { > void *__tmp = _M_exception_object; > _M_exception_object = __other._M_exception_object; > __other._M_exception_object = __tmp; > } > > > inline void > swap(exception_ptr& __lhs, exception_ptr& __rhs) > { __lhs.swap(__rhs); } > > > template<typename _Ex> > > inline void > __dest_thunk(void* __x) > { static_cast<_Ex*>(__x)->~_Ex(); } > > > } > > using __exception_ptr::swap; > > > > template<typename _Ex> > exception_ptr > make_exception_ptr(_Ex __ex) noexcept > { > > using _Ex2 = typename decay<_Ex>::type; > void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); > (void) __cxxabiv1::__cxa_init_primary_exception( > __e, const_cast<std::type_info*>(&typeid(_Ex)), > __exception_ptr::__dest_thunk<_Ex2>); > try > { > ::new (__e) _Ex2(__ex); > return exception_ptr(__e); > } > catch(...) > { > __cxxabiv1::__cxa_free_exception(__e); > return current_exception(); > } ># 277 "/usr/include/c++/13/bits/exception_ptr.h" 3 > } ># 291 "/usr/include/c++/13/bits/exception_ptr.h" 3 >} > >} ># 165 "/usr/include/c++/13/exception" 2 3 ># 1 "/usr/include/c++/13/bits/nested_exception.h" 1 3 ># 40 "/usr/include/c++/13/bits/nested_exception.h" 3 >extern "C++" { > >namespace std __attribute__ ((__visibility__ ("default"))) >{ ># 59 "/usr/include/c++/13/bits/nested_exception.h" 3 > class nested_exception > { > exception_ptr _M_ptr; > > public: > > nested_exception() noexcept : _M_ptr(current_exception()) { } > > nested_exception(const nested_exception&) noexcept = default; > > nested_exception& operator=(const nested_exception&) noexcept = default; > > virtual ~nested_exception() noexcept; > > > [[noreturn]] > void > rethrow_nested() const > { > if (_M_ptr) > rethrow_exception(_M_ptr); > std::terminate(); > } > > > exception_ptr > nested_ptr() const noexcept > { return _M_ptr; } > }; > > > > template<typename _Except> > struct _Nested_exception : public _Except, public nested_exception > { > explicit _Nested_exception(const _Except& __ex) > : _Except(__ex) > { } > > explicit _Nested_exception(_Except&& __ex) > : _Except(static_cast<_Except&&>(__ex)) > { } > }; ># 145 "/usr/include/c++/13/bits/nested_exception.h" 3 > template<typename _Tp> > [[noreturn]] > inline void > throw_with_nested(_Tp&& __t) > { > using _Up = typename decay<_Tp>::type; > using _CopyConstructible > = __and_<is_copy_constructible<_Up>, is_move_constructible<_Up>>; > static_assert(_CopyConstructible::value, > "throw_with_nested argument must be CopyConstructible"); > > > if constexpr (is_class_v<_Up>) > if constexpr (!is_final_v<_Up>) > if constexpr (!is_base_of_v<nested_exception, _Up>) > throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; > throw std::forward<_Tp>(__t); > > > > > > } ># 203 "/usr/include/c++/13/bits/nested_exception.h" 3 > template<typename _Ex> > > > > inline void > rethrow_if_nested(const _Ex& __ex) > { > const _Ex* __ptr = __builtin_addressof(__ex); ># 223 "/usr/include/c++/13/bits/nested_exception.h" 3 > 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(); > > } > > >} > >} ># 166 "/usr/include/c++/13/exception" 2 3 ># 42 "/usr/include/c++/13/ios" 2 3 ># 1 "/usr/include/c++/13/bits/char_traits.h" 1 3 ># 37 "/usr/include/c++/13/bits/char_traits.h" 3 > ># 38 "/usr/include/c++/13/bits/char_traits.h" 3 ># 46 "/usr/include/c++/13/bits/char_traits.h" 3 ># 1 "/usr/include/c++/13/cwchar" 1 3 ># 39 "/usr/include/c++/13/cwchar" 3 > ># 40 "/usr/include/c++/13/cwchar" 3 ># 47 "/usr/include/c++/13/bits/char_traits.h" 2 3 ># 64 "/usr/include/c++/13/bits/char_traits.h" 3 >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > ># 68 "/usr/include/c++/13/bits/char_traits.h" 3 >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wstringop-overflow" >#pragma GCC diagnostic ignored "-Wstringop-overread" >#pragma GCC diagnostic ignored "-Warray-bounds" ># 83 "/usr/include/c++/13/bits/char_traits.h" 3 > 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; > > }; ># 110 "/usr/include/c++/13/bits/char_traits.h" 3 > template<typename _CharT> > struct char_traits > { > typedef _CharT char_type; > typedef typename _Char_types<_CharT>::int_type int_type; > > typedef typename _Char_types<_CharT>::pos_type pos_type; > typedef typename _Char_types<_CharT>::off_type off_type; > typedef typename _Char_types<_CharT>::state_type state_type; > > > > > > static constexpr void > assign(char_type& __c1, const char_type& __c2) > { > > > > > > __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 char_type* > move(char_type* __s1, const char_type* __s2, std::size_t __n); > > static char_type* > copy(char_type* __s1, const char_type* __s2, std::size_t __n); > > static char_type* > assign(char_type* __s, std::size_t __n, char_type __a); > > static constexpr char_type > to_char_type(const int_type& __c) > { return static_cast<char_type>(__c); } > > static constexpr int_type > to_int_type(const char_type& __c) > { return static_cast<int_type>(__c); } > > static constexpr bool > eq_int_type(const int_type& __c1, const int_type& __c2) > { return __c1 == __c2; } > > > static constexpr int_type > eof() > { return static_cast<int_type>(-1); } > > 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; > } > > template<typename _CharT> > > typename char_traits<_CharT>::char_type* > char_traits<_CharT>:: > move(char_type* __s1, const char_type* __s2, std::size_t __n) > { > if (__n == 0) > return __s1; ># 256 "/usr/include/c++/13/bits/char_traits.h" 3 > __builtin_memmove(__s1, __s2, __n * sizeof(char_type)); > return __s1; > } > > template<typename _CharT> > > typename char_traits<_CharT>::char_type* > char_traits<_CharT>:: > copy(char_type* __s1, const char_type* __s2, std::size_t __n) > { > if (__n == 0) > return __s1; ># 276 "/usr/include/c++/13/bits/char_traits.h" 3 > __builtin_memcpy(__s1, __s2, __n * sizeof(char_type)); > return __s1; > } > > template<typename _CharT> > > typename char_traits<_CharT>::char_type* > char_traits<_CharT>:: > assign(char_type* __s, std::size_t __n, char_type __a) > { ># 295 "/usr/include/c++/13/bits/char_traits.h" 3 > if constexpr (sizeof(_CharT) == 1 && __is_trivial(_CharT)) > { > if (__n) > { > unsigned char __c; > __builtin_memcpy(&__c, __builtin_addressof(__a), 1); > __builtin_memset(__s, __c, __n); > } > } > else > { > for (std::size_t __i = 0; __i < __n; ++__i) > __s[__i] = __a; > } > return __s; > } > > >} > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 340 "/usr/include/c++/13/bits/char_traits.h" 3 > 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; > > > > > > static constexpr void > assign(char_type& __c1, const char_type& __c2) noexcept > { > > > > > > __c1 = __c2; > } > > static constexpr bool > eq(const char_type& __c1, const char_type& __c2) noexcept > { return __c1 == __c2; } > > static constexpr bool > lt(const char_type& __c1, const char_type& __c2) noexcept > { > > return (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) > { > 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 char_type* > move(char_type* __s1, const char_type* __s2, size_t __n) > { > if (__n == 0) > return __s1; > > > > > return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); > } > > static char_type* > copy(char_type* __s1, const char_type* __s2, size_t __n) > { > if (__n == 0) > return __s1; > > > > > return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); > } > > static char_type* > assign(char_type* __s, size_t __n, char_type __a) > { > if (__n == 0) > return __s; > > > > > return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); > } > > static constexpr char_type > to_char_type(const int_type& __c) noexcept > { return static_cast<char_type>(__c); } > > > > static constexpr int_type > to_int_type(const char_type& __c) noexcept > { return static_cast<int_type>(static_cast<unsigned char>(__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 (__c == eof()) ? 0 : __c; } > > }; > > > > > template<> > struct char_traits<wchar_t> > { > typedef wchar_t char_type; > typedef wint_t int_type; > > typedef streamoff off_type; > typedef wstreampos pos_type; > typedef mbstate_t state_type; > > > > > > static constexpr void > assign(char_type& __c1, const char_type& __c2) noexcept > { > > > > > > __c1 = __c2; > } > > static constexpr bool > eq(const char_type& __c1, const char_type& __c2) noexcept > { return __c1 == __c2; } > > static constexpr bool > lt(const char_type& __c1, const char_type& __c2) noexcept > { return __c1 < __c2; } > > static 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 wmemcmp(__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 wcslen(__s); > } > > 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 wmemchr(__s, __a, __n); > } > > static char_type* > move(char_type* __s1, const char_type* __s2, size_t __n) > { > if (__n == 0) > return __s1; > > > > > return wmemmove(__s1, __s2, __n); > } > > static char_type* > copy(char_type* __s1, const char_type* __s2, size_t __n) > { > if (__n == 0) > return __s1; > > > > > return wmemcpy(__s1, __s2, __n); > } > > static char_type* > assign(char_type* __s, size_t __n, char_type __a) > { > if (__n == 0) > return __s; > > > > > return wmemset(__s, __a, __n); > } > > static 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>((0xffffffffu)); } > > static constexpr int_type > not_eof(const int_type& __c) noexcept > { return eq_int_type(__c, eof()) ? 0 : __c; } > > }; ># 750 "/usr/include/c++/13/bits/char_traits.h" 3 > >} > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<> > struct char_traits<char16_t> > { > typedef char16_t char_type; > > typedef short unsigned int int_type; > > > > > > > typedef streamoff off_type; > typedef u16streampos pos_type; > typedef mbstate_t state_type; > > > > > > static constexpr void > assign(char_type& __c1, const char_type& __c2) noexcept > { > > > > > > __c1 = __c2; > } > > static constexpr bool > eq(const char_type& __c1, const char_type& __c2) noexcept > { return __c1 == __c2; } > > static constexpr bool > lt(const char_type& __c1, const char_type& __c2) noexcept > { return __c1 < __c2; } > > static constexpr int > compare(const char_type* __s1, const char_type* __s2, size_t __n) > { > for (size_t __i = 0; __i < __n; ++__i) > if (lt(__s1[__i], __s2[__i])) > return -1; > else if (lt(__s2[__i], __s1[__i])) > return 1; > return 0; > } > > static constexpr size_t > length(const char_type* __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) > { > for (size_t __i = 0; __i < __n; ++__i) > if (eq(__s[__i], __a)) > return __s + __i; > return 0; > } > > static char_type* > move(char_type* __s1, const char_type* __s2, size_t __n) > { > if (__n == 0) > return __s1; > > > > > return (static_cast<char_type*> > (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); > } > > static char_type* > copy(char_type* __s1, const char_type* __s2, size_t __n) > { > if (__n == 0) > return __s1; > > > > > return (static_cast<char_type*> > (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); > } > > static char_type* > assign(char_type* __s, size_t __n, char_type __a) > { > for (size_t __i = 0; __i < __n; ++__i) > assign(__s[__i], __a); > return __s; > } > > static constexpr char_type > to_char_type(const int_type& __c) noexcept > { return char_type(__c); } > > static constexpr bool > eq_int_type(const int_type& __c1, const int_type& __c2) noexcept > { return __c1 == __c2; } > > > static constexpr int_type > to_int_type(const char_type& __c) noexcept > { return __c == eof() ? int_type(0xfffd) : int_type(__c); } > > static constexpr int_type > eof() noexcept > { return static_cast<int_type>(-1); } > > static constexpr int_type > not_eof(const int_type& __c) noexcept > { return eq_int_type(__c, eof()) ? 0 : __c; } > > > > > > }; > > template<> > struct char_traits<char32_t> > { > typedef char32_t char_type; > > typedef unsigned int int_type; > > > > > > > typedef streamoff off_type; > typedef u32streampos pos_type; > typedef mbstate_t state_type; > > > > > > static constexpr void > assign(char_type& __c1, const char_type& __c2) noexcept > { > > > > > > __c1 = __c2; > } > > static constexpr bool > eq(const char_type& __c1, const char_type& __c2) noexcept > { return __c1 == __c2; } > > static constexpr bool > lt(const char_type& __c1, const char_type& __c2) noexcept > { return __c1 < __c2; } > > static constexpr int > compare(const char_type* __s1, const char_type* __s2, size_t __n) > { > for (size_t __i = 0; __i < __n; ++__i) > if (lt(__s1[__i], __s2[__i])) > return -1; > else if (lt(__s2[__i], __s1[__i])) > return 1; > return 0; > } > > static constexpr size_t > length(const char_type* __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) > { > for (size_t __i = 0; __i < __n; ++__i) > if (eq(__s[__i], __a)) > return __s + __i; > return 0; > } > > static char_type* > move(char_type* __s1, const char_type* __s2, size_t __n) > { > if (__n == 0) > return __s1; > > > > > return (static_cast<char_type*> > (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); > } > > static char_type* > copy(char_type* __s1, const char_type* __s2, size_t __n) > { > if (__n == 0) > return __s1; > > > > > return (static_cast<char_type*> > (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); > } > > static char_type* > assign(char_type* __s, size_t __n, char_type __a) > { > for (size_t __i = 0; __i < __n; ++__i) > assign(__s[__i], __a); > return __s; > } > > static constexpr char_type > to_char_type(const int_type& __c) noexcept > { return char_type(__c); } > > static constexpr int_type > to_int_type(const char_type& __c) noexcept > { return int_type(__c); } > > static constexpr bool > eq_int_type(const int_type& __c1, const int_type& __c2) noexcept > { return __c1 == __c2; } > > > static constexpr int_type > eof() noexcept > { return static_cast<int_type>(-1); } > > static constexpr int_type > not_eof(const int_type& __c) noexcept > { return eq_int_type(__c, eof()) ? 0 : __c; } > > }; ># 1032 "/usr/include/c++/13/bits/char_traits.h" 3 >#pragma GCC diagnostic pop > > >} ># 43 "/usr/include/c++/13/ios" 2 3 ># 1 "/usr/include/c++/13/bits/localefwd.h" 1 3 ># 37 "/usr/include/c++/13/bits/localefwd.h" 3 > ># 38 "/usr/include/c++/13/bits/localefwd.h" 3 > > ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++locale.h" 1 3 ># 39 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++locale.h" 3 > ># 40 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++locale.h" 3 > ># 1 "/usr/include/c++/13/clocale" 1 3 ># 39 "/usr/include/c++/13/clocale" 3 > ># 40 "/usr/include/c++/13/clocale" 3 > > ># 1 "/usr/include/locale.h" 1 3 4 ># 28 "/usr/include/locale.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 29 "/usr/include/locale.h" 2 3 4 ># 1 "/usr/include/bits/locale.h" 1 3 4 ># 30 "/usr/include/locale.h" 2 3 4 > >extern "C" { ># 51 "/usr/include/locale.h" 3 4 >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; ># 118 "/usr/include/locale.h" 3 4 >}; > > > >extern char *setlocale (int __category, const char *__locale) noexcept (true); > > >extern struct lconv *localeconv (void) noexcept (true); ># 141 "/usr/include/locale.h" 3 4 >extern locale_t newlocale (int __category_mask, const char *__locale, > locale_t __base) noexcept (true); ># 176 "/usr/include/locale.h" 3 4 >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); > > > > > > > >} ># 43 "/usr/include/c++/13/clocale" 2 3 ># 51 "/usr/include/c++/13/clocale" 3 >namespace std >{ > using ::lconv; > using ::setlocale; > using ::localeconv; >} ># 42 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++locale.h" 2 3 > > > > > > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > extern "C" __typeof(uselocale) __uselocale; > > >} > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > typedef __locale_t __c_locale; ># 73 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++locale.h" 3 > 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); ># 93 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++locale.h" 3 > __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; > } > > > > > > > >} ># 41 "/usr/include/c++/13/bits/localefwd.h" 2 3 > ># 1 "/usr/include/c++/13/cctype" 1 3 ># 39 "/usr/include/c++/13/cctype" 3 > ># 40 "/usr/include/c++/13/cctype" 3 > > ># 1 "/usr/include/ctype.h" 1 3 4 ># 26 "/usr/include/ctype.h" 3 4 ># 1 "/usr/include/bits/types.h" 1 3 4 ># 27 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 28 "/usr/include/bits/types.h" 2 3 4 ># 1 "/usr/include/bits/timesize.h" 1 3 4 ># 19 "/usr/include/bits/timesize.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 20 "/usr/include/bits/timesize.h" 2 3 4 ># 29 "/usr/include/bits/types.h" 2 3 4 > > >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; ># 141 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/typesizes.h" 1 3 4 ># 142 "/usr/include/bits/types.h" 2 3 4 ># 1 "/usr/include/bits/time64.h" 1 3 4 ># 143 "/usr/include/bits/types.h" 2 3 4 > > >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; ># 27 "/usr/include/ctype.h" 2 3 4 > >extern "C" { ># 39 "/usr/include/ctype.h" 3 4 ># 1 "/usr/include/bits/endian.h" 1 3 4 ># 35 "/usr/include/bits/endian.h" 3 4 ># 1 "/usr/include/bits/endianness.h" 1 3 4 ># 36 "/usr/include/bits/endian.h" 2 3 4 ># 40 "/usr/include/ctype.h" 2 3 4 > > > > > > >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)) >}; ># 79 "/usr/include/ctype.h" 3 4 >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__)); ># 108 "/usr/include/ctype.h" 3 4 >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); ># 251 "/usr/include/ctype.h" 3 4 >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); ># 327 "/usr/include/ctype.h" 3 4 >} ># 43 "/usr/include/c++/13/cctype" 2 3 ># 62 "/usr/include/c++/13/cctype" 3 >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; >} ># 43 "/usr/include/c++/13/bits/localefwd.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 55 "/usr/include/c++/13/bits/localefwd.h" 3 > 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<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; >} > > >} ># 44 "/usr/include/c++/13/ios" 2 3 ># 1 "/usr/include/c++/13/bits/ios_base.h" 1 3 ># 37 "/usr/include/c++/13/bits/ios_base.h" 3 > ># 38 "/usr/include/c++/13/bits/ios_base.h" 3 > ># 1 "/usr/include/c++/13/ext/atomicity.h" 1 3 ># 32 "/usr/include/c++/13/ext/atomicity.h" 3 > ># 33 "/usr/include/c++/13/ext/atomicity.h" 3 > > ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr.h" 1 3 ># 30 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr.h" 3 >#pragma GCC visibility push(default) ># 148 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr.h" 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 1 3 ># 35 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 3 ># 1 "/usr/include/pthread.h" 1 3 4 ># 22 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/sched.h" 1 3 4 ># 29 "/usr/include/sched.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 30 "/usr/include/sched.h" 2 3 4 > ># 1 "/usr/include/bits/types/time_t.h" 1 3 4 ># 10 "/usr/include/bits/types/time_t.h" 3 4 >typedef __time_t time_t; ># 32 "/usr/include/sched.h" 2 3 4 ># 1 "/usr/include/bits/types/struct_timespec.h" 1 3 4 ># 11 "/usr/include/bits/types/struct_timespec.h" 3 4 >struct timespec >{ > > > > __time_t tv_sec; > > > > > __syscall_slong_t tv_nsec; ># 31 "/usr/include/bits/types/struct_timespec.h" 3 4 >}; ># 33 "/usr/include/sched.h" 2 3 4 > > > > > >typedef __pid_t pid_t; > > > > ># 1 "/usr/include/bits/sched.h" 1 3 4 ># 80 "/usr/include/bits/sched.h" 3 4 ># 1 "/usr/include/bits/types/struct_sched_param.h" 1 3 4 ># 23 "/usr/include/bits/types/struct_sched_param.h" 3 4 >struct sched_param >{ > int sched_priority; >}; ># 81 "/usr/include/bits/sched.h" 2 3 4 > >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); > > >} ># 44 "/usr/include/sched.h" 2 3 4 ># 1 "/usr/include/bits/cpu-set.h" 1 3 4 ># 32 "/usr/include/bits/cpu-set.h" 3 4 >typedef unsigned long int __cpu_mask; > > > > > > >typedef struct >{ > __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; >} cpu_set_t; ># 115 "/usr/include/bits/cpu-set.h" 3 4 >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) ; >extern void __sched_cpufree (cpu_set_t *__set) noexcept (true); > >} ># 45 "/usr/include/sched.h" 2 3 4 > > > > > > >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); > > >extern int sched_get_priority_min (int __algorithm) noexcept (true); > > > >extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) noexcept (true); ># 130 "/usr/include/sched.h" 3 4 >extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, > const cpu_set_t *__cpuset) noexcept (true); > > >extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, > cpu_set_t *__cpuset) noexcept (true); > > >} ># 23 "/usr/include/pthread.h" 2 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 29 "/usr/include/time.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 30 "/usr/include/time.h" 2 3 4 > > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 73 "/usr/include/bits/time.h" 3 4 ># 1 "/usr/include/bits/timex.h" 1 3 4 ># 22 "/usr/include/bits/timex.h" 3 4 ># 1 "/usr/include/bits/types/struct_timeval.h" 1 3 4 > > > > > > > >struct timeval >{ > > > > > __time_t tv_sec; > __suseconds_t tv_usec; > >}; ># 23 "/usr/include/bits/timex.h" 2 3 4 > > > >struct timex >{ ># 58 "/usr/include/bits/timex.h" 3 4 > 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; > >}; ># 74 "/usr/include/bits/time.h" 2 3 4 > >extern "C" { > > >extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) noexcept (true) __attribute__ ((__nonnull__ (2))); ># 90 "/usr/include/bits/time.h" 3 4 >} ># 34 "/usr/include/time.h" 2 3 4 > > > ># 1 "/usr/include/bits/types/clock_t.h" 1 3 4 > > > > > > >typedef __clock_t clock_t; ># 38 "/usr/include/time.h" 2 3 4 > ># 1 "/usr/include/bits/types/struct_tm.h" 1 3 4 > > > > > > >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; > > > > >}; ># 40 "/usr/include/time.h" 2 3 4 > > > > > > ># 1 "/usr/include/bits/types/clockid_t.h" 1 3 4 > > > > > > >typedef __clockid_t clockid_t; ># 47 "/usr/include/time.h" 2 3 4 ># 1 "/usr/include/bits/types/timer_t.h" 1 3 4 > > > > > > >typedef __timer_t timer_t; ># 48 "/usr/include/time.h" 2 3 4 ># 1 "/usr/include/bits/types/struct_itimerspec.h" 1 3 4 > > > > > > > >struct itimerspec > { > struct timespec it_interval; > struct timespec it_value; > }; ># 49 "/usr/include/time.h" 2 3 4 >struct sigevent; ># 68 "/usr/include/time.h" 3 4 >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); ># 100 "/usr/include/time.h" 3 4 >extern size_t strftime (char *__restrict __s, size_t __maxsize, > const char *__restrict __format, > const struct tm *__restrict __tp) noexcept (true); > > > > >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); ># 154 "/usr/include/time.h" 3 4 >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); ># 179 "/usr/include/time.h" 3 4 >extern char *asctime (const struct tm *__tp) noexcept (true); > > > >extern char *ctime (const time_t *__timer) noexcept (true); ># 197 "/usr/include/time.h" 3 4 >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); ># 217 "/usr/include/time.h" 3 4 >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; ># 246 "/usr/include/time.h" 3 4 >extern time_t timegm (struct tm *__tp) noexcept (true); ># 263 "/usr/include/time.h" 3 4 >extern time_t timelocal (struct tm *__tp) noexcept (true); > > > > > > > >extern int dysize (int __year) noexcept (true) __attribute__ ((__const__)); ># 281 "/usr/include/time.h" 3 4 >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))); ># 323 "/usr/include/time.h" 3 4 >extern int clock_nanosleep (clockid_t __clock_id, int __flags, > const struct timespec *__req, > struct timespec *__rem); ># 338 "/usr/include/time.h" 3 4 >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); ># 376 "/usr/include/time.h" 3 4 >extern int timer_getoverrun (timer_t __timerid) noexcept (true); > > > > > > >extern int timespec_get (struct timespec *__ts, int __base) > noexcept (true) __attribute__ ((__nonnull__ (1))); ># 399 "/usr/include/time.h" 3 4 >extern int timespec_getres (struct timespec *__ts, int __base) > noexcept (true); ># 425 "/usr/include/time.h" 3 4 >extern int getdate_err; ># 434 "/usr/include/time.h" 3 4 >extern struct tm *getdate (const char *__string); ># 448 "/usr/include/time.h" 3 4 >extern int getdate_r (const char *__restrict __string, > struct tm *__restrict __resbufp); > > >} ># 24 "/usr/include/pthread.h" 2 3 4 > > ># 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 ># 23 "/usr/include/bits/pthreadtypes.h" 3 4 ># 1 "/usr/include/bits/thread-shared-types.h" 1 3 4 ># 44 "/usr/include/bits/thread-shared-types.h" 3 4 ># 1 "/usr/include/bits/pthreadtypes-arch.h" 1 3 4 ># 21 "/usr/include/bits/pthreadtypes-arch.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 22 "/usr/include/bits/pthreadtypes-arch.h" 2 3 4 ># 45 "/usr/include/bits/thread-shared-types.h" 2 3 4 > ># 1 "/usr/include/bits/atomic_wide_counter.h" 1 3 4 ># 25 "/usr/include/bits/atomic_wide_counter.h" 3 4 >typedef union >{ > __extension__ unsigned long long int __value64; > struct > { > unsigned int __low; > unsigned int __high; > } __value32; >} __atomic_wide_counter; ># 47 "/usr/include/bits/thread-shared-types.h" 2 3 4 > > > > >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; ># 76 "/usr/include/bits/thread-shared-types.h" 3 4 ># 1 "/usr/include/bits/struct_mutex.h" 1 3 4 ># 22 "/usr/include/bits/struct_mutex.h" 3 4 >struct __pthread_mutex_s >{ > int __lock; > unsigned int __count; > int __owner; > > unsigned int __nusers; > > > > int __kind; > > short __spins; > short __elision; > __pthread_list_t __list; ># 53 "/usr/include/bits/struct_mutex.h" 3 4 >}; ># 77 "/usr/include/bits/thread-shared-types.h" 2 3 4 ># 89 "/usr/include/bits/thread-shared-types.h" 3 4 ># 1 "/usr/include/bits/struct_rwlock.h" 1 3 4 ># 23 "/usr/include/bits/struct_rwlock.h" 3 4 >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; ># 55 "/usr/include/bits/struct_rwlock.h" 3 4 >}; ># 90 "/usr/include/bits/thread-shared-types.h" 2 3 4 > > > > >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; ># 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 > > > >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; ># 27 "/usr/include/pthread.h" 2 3 4 ># 1 "/usr/include/bits/setjmp.h" 1 3 4 ># 26 "/usr/include/bits/setjmp.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 27 "/usr/include/bits/setjmp.h" 2 3 4 > > > > >typedef long int __jmp_buf[8]; ># 28 "/usr/include/pthread.h" 2 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 29 "/usr/include/pthread.h" 2 3 4 > ># 1 "/usr/include/bits/types/__sigset_t.h" 1 3 4 > > > > >typedef struct >{ > unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; >} __sigset_t; ># 31 "/usr/include/pthread.h" 2 3 4 ># 1 "/usr/include/bits/types/struct___jmp_buf_tag.h" 1 3 4 ># 26 "/usr/include/bits/types/struct___jmp_buf_tag.h" 3 4 >struct __jmp_buf_tag > { > > > > > __jmp_buf __jmpbuf; > int __mask_was_saved; > __sigset_t __saved_mask; > }; ># 32 "/usr/include/pthread.h" 2 3 4 > ># 1 "/usr/include/bits/pthread_stack_min-dynamic.h" 1 3 4 ># 23 "/usr/include/bits/pthread_stack_min-dynamic.h" 3 4 >extern "C" { >extern long int __sysconf (int __name) noexcept (true); >} ># 34 "/usr/include/pthread.h" 2 3 4 > > > >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 >}; ># 104 "/usr/include/pthread.h" 3 4 >enum >{ > PTHREAD_RWLOCK_PREFER_READER_NP, > PTHREAD_RWLOCK_PREFER_WRITER_NP, > PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, > PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP >}; ># 124 "/usr/include/pthread.h" 3 4 >enum >{ > PTHREAD_INHERIT_SCHED, > > PTHREAD_EXPLICIT_SCHED > >}; > > > >enum >{ > PTHREAD_SCOPE_SYSTEM, > > PTHREAD_SCOPE_PROCESS > >}; > > > >enum >{ > PTHREAD_PROCESS_PRIVATE, > > PTHREAD_PROCESS_SHARED > >}; ># 159 "/usr/include/pthread.h" 3 4 >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 > >}; ># 197 "/usr/include/pthread.h" 3 4 >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 void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); > > > > > > > >extern int pthread_join (pthread_t __th, void **__thread_return); > > > > >extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) noexcept (true); ># 233 "/usr/include/pthread.h" 3 4 >extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, > const struct timespec *__abstime); ># 243 "/usr/include/pthread.h" 3 4 >extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return, > clockid_t __clockid, > const struct timespec *__abstime); ># 269 "/usr/include/pthread.h" 3 4 >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_attr_init (pthread_attr_t *__attr) noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_attr_destroy (pthread_attr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, > int *__detachstate) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, > int __detachstate) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, > size_t *__guardsize) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_attr_setguardsize (pthread_attr_t *__attr, > size_t __guardsize) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, > struct sched_param *__restrict __param) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, > const struct sched_param *__restrict > __param) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict > __attr, int *__restrict __policy) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict > __attr, int *__restrict __inherit) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, > int __inherit) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, > int *__restrict __scope) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict > __attr, void **__restrict __stackaddr) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); > > > > > >extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, > void *__stackaddr) > noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); > > >extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict > __attr, size_t *__restrict __stacksize) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int pthread_attr_setstacksize (pthread_attr_t *__attr, > size_t __stacksize) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, > void **__restrict __stackaddr, > size_t *__restrict __stacksize) > noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))); > > > > >extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, > size_t __stacksize) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, > size_t __cpusetsize, > const cpu_set_t *__cpuset) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > > > >extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, > size_t __cpusetsize, > cpu_set_t *__cpuset) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > > >extern int pthread_getattr_default_np (pthread_attr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr, > const __sigset_t *sigmask); > > > > >extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr, > __sigset_t *sigmask); > > > > > > > >extern int pthread_setattr_default_np (const pthread_attr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > >extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > > > > >extern int pthread_setschedparam (pthread_t __target_thread, int __policy, > const struct sched_param *__param) > noexcept (true) __attribute__ ((__nonnull__ (3))); > > >extern int pthread_getschedparam (pthread_t __target_thread, > int *__restrict __policy, > struct sched_param *__restrict __param) > noexcept (true) __attribute__ ((__nonnull__ (2, 3))); > > >extern int pthread_setschedprio (pthread_t __target_thread, int __prio) > noexcept (true); > > > > >extern int pthread_getname_np (pthread_t __target_thread, char *__buf, > size_t __buflen) > noexcept (true) __attribute__ ((__nonnull__ (2))); > > >extern int pthread_setname_np (pthread_t __target_thread, const char *__name) > noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > > >extern int pthread_getconcurrency (void) noexcept (true); > > >extern int pthread_setconcurrency (int __level) noexcept (true); > > > >extern int pthread_yield (void) noexcept (true); > >extern int pthread_yield (void) noexcept (true) __asm__ ("" "sched_yield") > __attribute__ ((__deprecated__ ("pthread_yield is deprecated, use sched_yield instead"))) > ; > > > > > > > >extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, > const cpu_set_t *__cpuset) > noexcept (true) __attribute__ ((__nonnull__ (3))); > > >extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, > cpu_set_t *__cpuset) > noexcept (true) __attribute__ ((__nonnull__ (3))); ># 509 "/usr/include/pthread.h" 3 4 >extern int pthread_once (pthread_once_t *__once_control, > void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); ># 521 "/usr/include/pthread.h" 3 4 >extern int pthread_setcancelstate (int __state, int *__oldstate); > > > >extern int pthread_setcanceltype (int __type, int *__oldtype); > > >extern int pthread_cancel (pthread_t __th); > > > > >extern void pthread_testcancel (void); > > > > >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__)); ># 557 "/usr/include/pthread.h" 3 4 >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: > __pthread_cleanup_class (void (*__fct) (void *), void *__arg) > : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } > ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } > void __setdoit (int __newval) { __do_it = __newval; } > void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, > &__cancel_type); } > void __restore () const { pthread_setcanceltype (__cancel_type, 0); } >}; ># 766 "/usr/include/pthread.h" 3 4 >extern int __sigsetjmp_cancel (struct __cancel_jmp_buf_tag __env[1], int __savemask) noexcept (true) __asm__ ("" "__sigsetjmp") > > > __attribute__ ((__returns_twice__)); ># 781 "/usr/include/pthread.h" 3 4 >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))); ># 817 "/usr/include/pthread.h" 3 4 >extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex, > clockid_t __clockid, > const struct timespec *__restrict > __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); ># 835 "/usr/include/pthread.h" 3 4 >extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_mutex_getprioceiling (const pthread_mutex_t * > __restrict __mutex, > int *__restrict __prioceiling) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, > int __prioceiling, > int *__restrict __old_ceiling) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > > > > >extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_mutex_consistent_np (pthread_mutex_t *) noexcept (true) __asm__ ("" "pthread_mutex_consistent") > __attribute__ ((__nonnull__ (1))) > __attribute__ ((__deprecated__ ("pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent"))) > ; ># 874 "/usr/include/pthread.h" 3 4 >extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * > __restrict __attr, > int *__restrict __pshared) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, > int __pshared) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict > __attr, int *__restrict __kind) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * > __restrict __attr, > int *__restrict __protocol) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, > int __protocol) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * > __restrict __attr, > int *__restrict __prioceiling) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, > int __prioceiling) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, > int *__robustness) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_mutexattr_getrobust_np (pthread_mutexattr_t *, int *) noexcept (true) __asm__ ("" "pthread_mutexattr_getrobust") > > __attribute__ ((__nonnull__ (1))) > __attribute__ ((__deprecated__ ("pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust"))) > ; > > > > > > >extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, > int __robustness) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *, int) noexcept (true) __asm__ ("" "pthread_mutexattr_setrobust") > > __attribute__ ((__nonnull__ (1))) > __attribute__ ((__deprecated__ ("pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust"))) > ; ># 967 "/usr/include/pthread.h" 3 4 >extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, > const pthread_rwlockattr_t *__restrict > __attr) noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) > 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))); ># 1004 "/usr/include/pthread.h" 3 4 >extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock, > clockid_t __clockid, > const struct timespec *__restrict > __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); ># 1023 "/usr/include/pthread.h" 3 4 >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))); ># 1051 "/usr/include/pthread.h" 3 4 >extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock, > clockid_t __clockid, > const struct timespec *__restrict > __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); ># 1071 "/usr/include/pthread.h" 3 4 >extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * > __restrict __attr, > int *__restrict __pshared) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, > int __pshared) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * > __restrict __attr, > int *__restrict __pref) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, > int __pref) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > > > >extern int pthread_cond_init (pthread_cond_t *__restrict __cond, > const pthread_condattr_t *__restrict __cond_attr) > 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))); ># 1145 "/usr/include/pthread.h" 3 4 >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))); ># 1171 "/usr/include/pthread.h" 3 4 >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))); ># 1194 "/usr/include/pthread.h" 3 4 >extern int pthread_condattr_init (pthread_condattr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_condattr_destroy (pthread_condattr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_condattr_getpshared (const pthread_condattr_t * > __restrict __attr, > int *__restrict __pshared) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, > int __pshared) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_condattr_getclock (const pthread_condattr_t * > __restrict __attr, > __clockid_t *__restrict __clock_id) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int pthread_condattr_setclock (pthread_condattr_t *__attr, > __clockid_t __clock_id) > noexcept (true) __attribute__ ((__nonnull__ (1))); ># 1230 "/usr/include/pthread.h" 3 4 >extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_spin_destroy (pthread_spinlock_t *__lock) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_spin_lock (pthread_spinlock_t *__lock) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_spin_trylock (pthread_spinlock_t *__lock) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_spin_unlock (pthread_spinlock_t *__lock) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, > const pthread_barrierattr_t *__restrict > __attr, unsigned int __count) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int pthread_barrier_wait (pthread_barrier_t *__barrier) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >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))); ># 1297 "/usr/include/pthread.h" 3 4 >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) __attribute__ ((__access__ (__none__, 2))); > > > > >extern int pthread_getcpuclockid (pthread_t __thread_id, > __clockid_t *__clock_id) > noexcept (true) __attribute__ ((__nonnull__ (2))); ># 1332 "/usr/include/pthread.h" 3 4 >extern int pthread_atfork (void (*__prepare) (void), > void (*__parent) (void), > void (*__child) (void)) noexcept (true); ># 1346 "/usr/include/pthread.h" 3 4 >} ># 36 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 2 3 ># 47 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 3 >typedef pthread_t __gthread_t; >typedef pthread_key_t __gthread_key_t; >typedef pthread_once_t __gthread_once_t; >typedef pthread_mutex_t __gthread_mutex_t; >typedef pthread_mutex_t __gthread_recursive_mutex_t; >typedef pthread_cond_t __gthread_cond_t; >typedef struct timespec __gthread_time_t; ># 102 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ># 299 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 3 >static inline int >__gthread_active_p (void) >{ > return 1; >} ># 659 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 3 >static inline int >__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), > void *__args) >{ > return pthread_create (__threadid, __null, __func, __args); >} > >static inline int >__gthread_join (__gthread_t __threadid, void **__value_ptr) >{ > return pthread_join (__threadid, __value_ptr); >} > >static inline int >__gthread_detach (__gthread_t __threadid) >{ > return pthread_detach (__threadid); >} > >static inline int >__gthread_equal (__gthread_t __t1, __gthread_t __t2) >{ > return pthread_equal (__t1, __t2); >} > >static inline __gthread_t >__gthread_self (void) >{ > return pthread_self (); >} > >static inline int >__gthread_yield (void) >{ > return sched_yield (); >} > >static inline int >__gthread_once (__gthread_once_t *__once, void (*__func) (void)) >{ > if (__gthread_active_p ()) > return pthread_once (__once, __func); > else > return -1; >} > >static inline int >__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) >{ > return pthread_key_create (__key, __dtor); >} > >static inline int >__gthread_key_delete (__gthread_key_t __key) >{ > return pthread_key_delete (__key); >} > >static inline void * >__gthread_getspecific (__gthread_key_t __key) >{ > return pthread_getspecific (__key); >} > >static inline int >__gthread_setspecific (__gthread_key_t __key, const void *__ptr) >{ > return pthread_setspecific (__key, __ptr); >} > >static inline void >__gthread_mutex_init_function (__gthread_mutex_t *__mutex) >{ > if (__gthread_active_p ()) > pthread_mutex_init (__mutex, __null); >} > >static inline int >__gthread_mutex_destroy (__gthread_mutex_t *__mutex) >{ > if (__gthread_active_p ()) > return pthread_mutex_destroy (__mutex); > else > return 0; >} > >static inline int >__gthread_mutex_lock (__gthread_mutex_t *__mutex) >{ > if (__gthread_active_p ()) > return pthread_mutex_lock (__mutex); > else > return 0; >} > >static inline int >__gthread_mutex_trylock (__gthread_mutex_t *__mutex) >{ > if (__gthread_active_p ()) > return pthread_mutex_trylock (__mutex); > else > return 0; >} > > >static inline int >__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, > const __gthread_time_t *__abs_timeout) >{ > if (__gthread_active_p ()) > return pthread_mutex_timedlock (__mutex, __abs_timeout); > else > return 0; >} > > >static inline int >__gthread_mutex_unlock (__gthread_mutex_t *__mutex) >{ > if (__gthread_active_p ()) > return pthread_mutex_unlock (__mutex); > else > return 0; >} ># 808 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 3 >static inline int >__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) >{ > return __gthread_mutex_lock (__mutex); >} > >static inline int >__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) >{ > return __gthread_mutex_trylock (__mutex); >} > > >static inline int >__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, > const __gthread_time_t *__abs_timeout) >{ > return __gthread_mutex_timedlock (__mutex, __abs_timeout); >} > > >static inline int >__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) >{ > return __gthread_mutex_unlock (__mutex); >} > >static inline int >__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) >{ > return __gthread_mutex_destroy (__mutex); >} ># 850 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr-default.h" 3 >static inline int >__gthread_cond_broadcast (__gthread_cond_t *__cond) >{ > return pthread_cond_broadcast (__cond); >} > >static inline int >__gthread_cond_signal (__gthread_cond_t *__cond) >{ > return pthread_cond_signal (__cond); >} > >static inline int >__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) >{ > return pthread_cond_wait (__cond, __mutex); >} > >static inline int >__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, > const __gthread_time_t *__abs_timeout) >{ > return pthread_cond_timedwait (__cond, __mutex, __abs_timeout); >} > >static inline int >__gthread_cond_wait_recursive (__gthread_cond_t *__cond, > __gthread_recursive_mutex_t *__mutex) >{ > return __gthread_cond_wait (__cond, __mutex); >} > >static inline int >__gthread_cond_destroy (__gthread_cond_t* __cond) >{ > return pthread_cond_destroy (__cond); >} ># 149 "/usr/include/c++/13/x86_64-redhat-linux/bits/gthr.h" 2 3 > > >#pragma GCC visibility pop ># 36 "/usr/include/c++/13/ext/atomicity.h" 2 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/atomic_word.h" 1 3 ># 32 "/usr/include/c++/13/x86_64-redhat-linux/bits/atomic_word.h" 3 >typedef int _Atomic_word; ># 37 "/usr/include/c++/13/ext/atomicity.h" 2 3 > ># 1 "/usr/include/sys/single_threaded.h" 1 3 4 ># 24 "/usr/include/sys/single_threaded.h" 3 4 >extern "C" { > > > > >extern char __libc_single_threaded; > >} ># 39 "/usr/include/c++/13/ext/atomicity.h" 2 3 > > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > __attribute__((__always_inline__)) > inline bool > __is_single_threaded() noexcept > { > > > > return ::__libc_single_threaded; > > > > } > > > > > > > inline _Atomic_word > __attribute__((__always_inline__)) > __exchange_and_add(volatile _Atomic_word* __mem, int __val) > { return __atomic_fetch_add(__mem, __val, 4); } > > inline void > __attribute__((__always_inline__)) > __atomic_add(volatile _Atomic_word* __mem, int __val) > { __atomic_fetch_add(__mem, __val, 4); } ># 80 "/usr/include/c++/13/ext/atomicity.h" 3 > inline _Atomic_word > __attribute__((__always_inline__)) > __exchange_and_add_single(_Atomic_word* __mem, int __val) > { > _Atomic_word __result = *__mem; > *__mem += __val; > return __result; > } > > inline void > __attribute__((__always_inline__)) > __atomic_add_single(_Atomic_word* __mem, int __val) > { *__mem += __val; } > > inline _Atomic_word > __attribute__ ((__always_inline__)) > __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) > { > if (__is_single_threaded()) > return __exchange_and_add_single(__mem, __val); > else > return __exchange_and_add(__mem, __val); > } > > inline void > __attribute__ ((__always_inline__)) > __atomic_add_dispatch(_Atomic_word* __mem, int __val) > { > if (__is_single_threaded()) > __atomic_add_single(__mem, __val); > else > __atomic_add(__mem, __val); > } > > >} ># 40 "/usr/include/c++/13/bits/ios_base.h" 2 3 > ># 1 "/usr/include/c++/13/bits/locale_classes.h" 1 3 ># 37 "/usr/include/c++/13/bits/locale_classes.h" 3 > ># 38 "/usr/include/c++/13/bits/locale_classes.h" 3 > > ># 1 "/usr/include/c++/13/string" 1 3 ># 36 "/usr/include/c++/13/string" 3 > ># 37 "/usr/include/c++/13/string" 3 > > > > > > ># 1 "/usr/include/c++/13/bits/allocator.h" 1 3 ># 46 "/usr/include/c++/13/bits/allocator.h" 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++allocator.h" 1 3 ># 33 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++allocator.h" 3 ># 1 "/usr/include/c++/13/bits/new_allocator.h" 1 3 ># 35 "/usr/include/c++/13/bits/new_allocator.h" 3 ># 1 "/usr/include/c++/13/bits/functexcept.h" 1 3 ># 42 "/usr/include/c++/13/bits/functexcept.h" 3 >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__)); ># 140 "/usr/include/c++/13/bits/functexcept.h" 3 > >} ># 36 "/usr/include/c++/13/bits/new_allocator.h" 2 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 62 "/usr/include/c++/13/bits/new_allocator.h" 3 > template<typename _Tp> > class __new_allocator > { > public: > typedef _Tp value_type; > typedef std::size_t size_type; > typedef std::ptrdiff_t difference_type; > > typedef _Tp* pointer; > typedef const _Tp* const_pointer; > typedef _Tp& reference; > typedef const _Tp& const_reference; > > template<typename _Tp1> > struct rebind > { typedef __new_allocator<_Tp1> other; }; > > > > > > typedef std::true_type propagate_on_container_move_assignment; > > > __attribute__((__always_inline__)) > > __new_allocator() noexcept { } > > __attribute__((__always_inline__)) > > __new_allocator(const __new_allocator&) noexcept { } > > template<typename _Tp1> > __attribute__((__always_inline__)) > > __new_allocator(const __new_allocator<_Tp1>&) noexcept { } > > > ~__new_allocator() noexcept { } > > pointer > address(reference __x) const noexcept > { return std::__addressof(__x); } > > const_pointer > address(const_reference __x) const noexcept > { return std::__addressof(__x); } ># 121 "/usr/include/c++/13/bits/new_allocator.h" 3 > [[__nodiscard__]] _Tp* > allocate(size_type __n, const void* = static_cast<const void*>(0)) > { > > > > static_assert(sizeof(_Tp) != 0, "cannot allocate incomplete types"); > > > if (__builtin_expect(__n > this->_M_max_size(), false)) > { > > > if (__n > (std::size_t(-1) / sizeof(_Tp))) > std::__throw_bad_array_new_length(); > std::__throw_bad_alloc(); > } > > > if (alignof(_Tp) > 16) > { > std::align_val_t __al = std::align_val_t(alignof(_Tp)); > return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), > __al)); > } > > return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); > } > > > void > deallocate(_Tp* __p, size_type __n __attribute__ ((__unused__))) > { > > > > > > > > if (alignof(_Tp) > 16) > { > ::operator delete((__p), (__n) * sizeof(_Tp), > std::align_val_t(alignof(_Tp))); > return; > } > > ::operator delete((__p), (__n) * sizeof(_Tp)); > } > > > > > > > __attribute__((__always_inline__)) > size_type > max_size() const noexcept > { return _M_max_size(); } > > > template<typename _Up, typename... _Args> > __attribute__((__always_inline__)) > void > construct(_Up* __p, _Args&&... __args) > noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) > { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } > > template<typename _Up> > __attribute__((__always_inline__)) > void > destroy(_Up* __p) > noexcept(std::is_nothrow_destructible<_Up>::value) > { __p->~_Up(); } ># 209 "/usr/include/c++/13/bits/new_allocator.h" 3 > template<typename _Up> > friend __attribute__((__always_inline__)) bool > operator==(const __new_allocator&, const __new_allocator<_Up>&) > noexcept > { return true; } > > > template<typename _Up> > friend __attribute__((__always_inline__)) bool > operator!=(const __new_allocator&, const __new_allocator<_Up>&) > noexcept > { return false; } > > > private: > __attribute__((__always_inline__)) > constexpr size_type > _M_max_size() const noexcept > { > > return std::size_t(0x7fffffffffffffffL) / sizeof(_Tp); > > > > } > }; > > >} ># 34 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++allocator.h" 2 3 > > >namespace std >{ ># 46 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++allocator.h" 3 > template<typename _Tp> > using __allocator_base = __new_allocator<_Tp>; >} ># 47 "/usr/include/c++/13/bits/allocator.h" 2 3 > > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 74 "/usr/include/c++/13/bits/allocator.h" 3 > template<> > class allocator<void> > { > public: > typedef void value_type; > typedef size_t size_type; > typedef ptrdiff_t difference_type; > > > > typedef void* pointer; > typedef const void* const_pointer; > > template<typename _Tp1> > struct rebind > { typedef allocator<_Tp1> other; }; > > > > > > using propagate_on_container_move_assignment = true_type; > > using is_always_equal > > = true_type; ># 117 "/usr/include/c++/13/bits/allocator.h" 3 > }; ># 129 "/usr/include/c++/13/bits/allocator.h" 3 > template<typename _Tp> > class allocator : public __allocator_base<_Tp> > { > public: > typedef _Tp value_type; > typedef size_t size_type; > typedef ptrdiff_t difference_type; > > > > typedef _Tp* pointer; > typedef const _Tp* const_pointer; > typedef _Tp& reference; > typedef const _Tp& const_reference; > > template<typename _Tp1> > struct rebind > { typedef allocator<_Tp1> other; }; > > > > > > using propagate_on_container_move_assignment = true_type; > > using is_always_equal > > = true_type; > > > > > __attribute__((__always_inline__)) > > allocator() noexcept { } > > __attribute__((__always_inline__)) > > allocator(const allocator& __a) noexcept > : __allocator_base<_Tp>(__a) { } > > > > allocator& operator=(const allocator&) = default; > > > template<typename _Tp1> > __attribute__((__always_inline__)) > > allocator(const allocator<_Tp1>&) noexcept { } > > __attribute__((__always_inline__)) > > > > ~allocator() noexcept { } ># 214 "/usr/include/c++/13/bits/allocator.h" 3 > friend __attribute__((__always_inline__)) > bool > operator==(const allocator&, const allocator&) noexcept > { return true; } > > > friend __attribute__((__always_inline__)) > bool > operator!=(const allocator&, const allocator&) noexcept > { return false; } > > > > }; > > > > > > > template<typename _T1, typename _T2> > __attribute__((__always_inline__)) > inline bool > operator==(const allocator<_T1>&, const allocator<_T2>&) > noexcept > { return true; } > > > template<typename _T1, typename _T2> > __attribute__((__always_inline__)) > inline bool > operator!=(const allocator<_T1>&, const allocator<_T2>&) > noexcept > { return false; } > > > > > > > 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>; > > > > > > >} ># 44 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/cpp_type_traits.h" 1 3 ># 35 "/usr/include/c++/13/bits/cpp_type_traits.h" 3 > ># 36 "/usr/include/c++/13/bits/cpp_type_traits.h" 3 ># 67 "/usr/include/c++/13/bits/cpp_type_traits.h" 3 >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; > }; ># 184 "/usr/include/c++/13/bits/cpp_type_traits.h" 3 > template<> > struct __is_integer<char16_t> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<char32_t> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > 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; > }; ># 289 "/usr/include/c++/13/bits/cpp_type_traits.h" 3 > 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; > }; ># 366 "/usr/include/c++/13/bits/cpp_type_traits.h" 3 > 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; > }; ># 470 "/usr/include/c++/13/bits/cpp_type_traits.h" 3 > 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; > }; ># 579 "/usr/include/c++/13/bits/cpp_type_traits.h" 3 > 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> > > inline _Iterator > __miter_base(_Iterator __it) > { return __it; } > > >} >} ># 45 "/usr/include/c++/13/string" 2 3 > ># 1 "/usr/include/c++/13/bits/ostream_insert.h" 1 3 ># 33 "/usr/include/c++/13/bits/ostream_insert.h" 3 > ># 34 "/usr/include/c++/13/bits/ostream_insert.h" 3 > > ># 1 "/usr/include/c++/13/bits/cxxabi_forced.h" 1 3 ># 34 "/usr/include/c++/13/bits/cxxabi_forced.h" 3 > ># 35 "/usr/include/c++/13/bits/cxxabi_forced.h" 3 > >#pragma GCC visibility push(default) > > >namespace __cxxabiv1 >{ > > > > > > > > class __forced_unwind > { > virtual ~__forced_unwind() throw(); > > > virtual void __pure_dummy() = 0; > }; >} > > >#pragma GCC visibility pop ># 37 "/usr/include/c++/13/bits/ostream_insert.h" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > template<typename _CharT, typename _Traits> > inline void > __ostream_write(basic_ostream<_CharT, _Traits>& __out, > const _CharT* __s, streamsize __n) > { > typedef basic_ostream<_CharT, _Traits> __ostream_type; > typedef typename __ostream_type::ios_base __ios_base; > > const streamsize __put = __out.rdbuf()->sputn(__s, __n); > if (__put != __n) > __out.setstate(__ios_base::badbit); > } > > template<typename _CharT, typename _Traits> > inline void > __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) > { > typedef basic_ostream<_CharT, _Traits> __ostream_type; > typedef typename __ostream_type::ios_base __ios_base; > > const _CharT __c = __out.fill(); > for (; __n > 0; --__n) > { > const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); > if (_Traits::eq_int_type(__put, _Traits::eof())) > { > __out.setstate(__ios_base::badbit); > break; > } > } > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > __ostream_insert(basic_ostream<_CharT, _Traits>& __out, > const _CharT* __s, streamsize __n) > { > typedef basic_ostream<_CharT, _Traits> __ostream_type; > typedef typename __ostream_type::ios_base __ios_base; > > typename __ostream_type::sentry __cerb(__out); > if (__cerb) > { > try > { > const streamsize __w = __out.width(); > if (__w > __n) > { > const bool __left = ((__out.flags() > & __ios_base::adjustfield) > == __ios_base::left); > if (!__left) > __ostream_fill(__out, __w - __n); > if (__out.good()) > __ostream_write(__out, __s, __n); > if (__left && __out.good()) > __ostream_fill(__out, __w - __n); > } > else > __ostream_write(__out, __s, __n); > __out.width(0); > } > catch(__cxxabiv1::__forced_unwind&) > { > __out._M_setstate(__ios_base::badbit); > throw; > } > catch(...) > { __out._M_setstate(__ios_base::badbit); } > } > return __out; > } > > > > > extern template ostream& __ostream_insert(ostream&, const char*, streamsize); > > > extern template wostream& __ostream_insert(wostream&, const wchar_t*, > streamsize); > > > > > > >} ># 47 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/stl_iterator_base_funcs.h" 1 3 ># 62 "/usr/include/c++/13/bits/stl_iterator_base_funcs.h" 3 > ># 63 "/usr/include/c++/13/bits/stl_iterator_base_funcs.h" 3 > ># 1 "/usr/include/c++/13/bits/concept_check.h" 1 3 ># 33 "/usr/include/c++/13/bits/concept_check.h" 3 > ># 34 "/usr/include/c++/13/bits/concept_check.h" 3 ># 65 "/usr/include/c++/13/bits/stl_iterator_base_funcs.h" 2 3 ># 1 "/usr/include/c++/13/debug/assertions.h" 1 3 ># 66 "/usr/include/c++/13/bits/stl_iterator_base_funcs.h" 2 3 ># 1 "/usr/include/c++/13/bits/stl_iterator_base_types.h" 1 3 ># 62 "/usr/include/c++/13/bits/stl_iterator_base_types.h" 3 > ># 63 "/usr/include/c++/13/bits/stl_iterator_base_types.h" 3 ># 74 "/usr/include/c++/13/bits/stl_iterator_base_types.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 93 "/usr/include/c++/13/bits/stl_iterator_base_types.h" 3 > 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 { }; ># 125 "/usr/include/c++/13/bits/stl_iterator_base_types.h" 3 > 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; > }; ># 149 "/usr/include/c++/13/bits/stl_iterator_base_types.h" 3 > template<typename _Iterator> > struct iterator_traits; > > > > > template<typename _Iterator, typename = __void_t<>> > struct __iterator_traits { }; > > > > template<typename _Iterator> > struct __iterator_traits<_Iterator, > __void_t<typename _Iterator::iterator_category, > typename _Iterator::value_type, > typename _Iterator::difference_type, > typename _Iterator::pointer, > typename _Iterator::reference>> > { > typedef typename _Iterator::iterator_category iterator_category; > typedef typename _Iterator::value_type value_type; > typedef typename _Iterator::difference_type difference_type; > typedef typename _Iterator::pointer pointer; > typedef typename _Iterator::reference reference; > }; > > > template<typename _Iterator> > struct iterator_traits > : public __iterator_traits<_Iterator> { }; ># 209 "/usr/include/c++/13/bits/stl_iterator_base_types.h" 3 > template<typename _Tp> > struct iterator_traits<_Tp*> > { > typedef random_access_iterator_tag iterator_category; > typedef _Tp value_type; > typedef ptrdiff_t difference_type; > typedef _Tp* pointer; > typedef _Tp& reference; > }; > > > template<typename _Tp> > struct iterator_traits<const _Tp*> > { > typedef random_access_iterator_tag iterator_category; > typedef _Tp value_type; > typedef ptrdiff_t difference_type; > typedef const _Tp* pointer; > typedef const _Tp& reference; > }; > > > > > > > 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 __iterator_category_t > = typename iterator_traits<_Iter>::iterator_category; > > template<typename _InIter> > using _RequireInputIter = > __enable_if_t<is_convertible<__iterator_category_t<_InIter>, > input_iterator_tag>::value>; > > template<typename _It, > typename _Cat = __iterator_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 }; > }; > > > > > > > > >} ># 67 "/usr/include/c++/13/bits/stl_iterator_base_funcs.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > template <typename> struct _List_iterator; > template <typename> struct _List_const_iterator; > > > template<typename _InputIterator> > inline constexpr > typename iterator_traits<_InputIterator>::difference_type > __distance(_InputIterator __first, _InputIterator __last, > input_iterator_tag) > { > > > > typename iterator_traits<_InputIterator>::difference_type __n = 0; > while (__first != __last) > { > ++__first; > ++__n; > } > return __n; > } > > template<typename _RandomAccessIterator> > __attribute__((__always_inline__)) > inline constexpr > typename iterator_traits<_RandomAccessIterator>::difference_type > __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, > random_access_iterator_tag) > { > > > > return __last - __first; > } > > > > 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; ># 144 "/usr/include/c++/13/bits/stl_iterator_base_funcs.h" 3 > template<typename _InputIterator> > [[__nodiscard__]] __attribute__((__always_inline__)) > inline constexpr > typename iterator_traits<_InputIterator>::difference_type > distance(_InputIterator __first, _InputIterator __last) > { > > return std::__distance(__first, __last, > std::__iterator_category(__first)); > } > > template<typename _InputIterator, typename _Distance> > inline constexpr void > __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) > { > > > do { if (std::__is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); > while (__n--) > ++__i; > } > > template<typename _BidirectionalIterator, typename _Distance> > inline constexpr void > __advance(_BidirectionalIterator& __i, _Distance __n, > bidirectional_iterator_tag) > { > > > > if (__n > 0) > while (__n--) > ++__i; > else > while (__n++) > --__i; > } > > template<typename _RandomAccessIterator, typename _Distance> > inline constexpr void > __advance(_RandomAccessIterator& __i, _Distance __n, > random_access_iterator_tag) > { > > > > if (__builtin_constant_p(__n) && __n == 1) > ++__i; > else if (__builtin_constant_p(__n) && __n == -1) > --__i; > else > __i += __n; > } > > > > template<typename _OutputIterator, typename _Distance> > void > __advance(_OutputIterator&, _Distance, output_iterator_tag) = delete; ># 217 "/usr/include/c++/13/bits/stl_iterator_base_funcs.h" 3 > template<typename _InputIterator, typename _Distance> > __attribute__((__always_inline__)) > inline constexpr void > advance(_InputIterator& __i, _Distance __n) > { > > typename iterator_traits<_InputIterator>::difference_type __d = __n; > std::__advance(__i, __d, std::__iterator_category(__i)); > } > > > > template<typename _InputIterator> > [[__nodiscard__]] [[__gnu__::__always_inline__]] > inline constexpr _InputIterator > next(_InputIterator __x, typename > iterator_traits<_InputIterator>::difference_type __n = 1) > { > > > std::advance(__x, __n); > return __x; > } > > template<typename _BidirectionalIterator> > [[__nodiscard__]] [[__gnu__::__always_inline__]] > inline constexpr _BidirectionalIterator > prev(_BidirectionalIterator __x, typename > iterator_traits<_BidirectionalIterator>::difference_type __n = 1) > { > > > > std::advance(__x, -__n); > return __x; > } > > > > >} ># 48 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/stl_iterator.h" 1 3 ># 65 "/usr/include/c++/13/bits/stl_iterator.h" 3 ># 1 "/usr/include/c++/13/ext/type_traits.h" 1 3 ># 32 "/usr/include/c++/13/ext/type_traits.h" 3 > ># 33 "/usr/include/c++/13/ext/type_traits.h" 3 > > > > >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 > inline bool > __is_null_pointer(_Type* __ptr) > { return __ptr == 0; } > > template<typename _Type> > constexpr > inline bool > __is_null_pointer(_Type) > { return false; } > > > constexpr bool > __is_null_pointer(std::nullptr_t) > { return true; } > > > > > 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; }; ># 225 "/usr/include/c++/13/ext/type_traits.h" 3 > 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>>; ># 269 "/usr/include/c++/13/ext/type_traits.h" 3 > >} >} ># 66 "/usr/include/c++/13/bits/stl_iterator.h" 2 3 > ># 1 "/usr/include/c++/13/bits/ptr_traits.h" 1 3 ># 46 "/usr/include/c++/13/bits/ptr_traits.h" 3 >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> > struct __ptr_traits_elem<_Ptr, __void_t<typename _Ptr::element_type>> > { 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) > > > > > > { return pointer::pointer_to(__r); } > }; > > > 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 pointer > pointer_to(element_type& __r) noexcept > { return std::addressof(__r); } > }; > > 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 > { > static_assert(!std::is_function<_Tp>::value, "not a function pointer"); > return __ptr; > } > > > template<typename _Ptr> > constexpr typename std::pointer_traits<_Ptr>::element_type* > __to_address(const _Ptr& __ptr) > { return std::__to_address(__ptr.operator->()); } ># 263 "/usr/include/c++/13/bits/ptr_traits.h" 3 > >} ># 68 "/usr/include/c++/13/bits/stl_iterator.h" 2 3 ># 88 "/usr/include/c++/13/bits/stl_iterator.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 109 "/usr/include/c++/13/bits/stl_iterator.h" 3 > ># 109 "/usr/include/c++/13/bits/stl_iterator.h" 3 >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ># 131 "/usr/include/c++/13/bits/stl_iterator.h" 3 > 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; ># 150 "/usr/include/c++/13/bits/stl_iterator.h" 3 > protected: > _Iterator current; > > typedef iterator_traits<_Iterator> __traits_type; > > public: > typedef _Iterator iterator_type; > typedef typename __traits_type::pointer pointer; > > typedef typename __traits_type::difference_type difference_type; > typedef typename __traits_type::reference reference; ># 181 "/usr/include/c++/13/bits/stl_iterator.h" 3 > constexpr > reverse_iterator() > noexcept(noexcept(_Iterator())) > : current() > { } > > > > > explicit constexpr > reverse_iterator(iterator_type __x) > noexcept(noexcept(_Iterator(__x))) > : current(__x) > { } > > > > > constexpr > reverse_iterator(const reverse_iterator& __x) > noexcept(noexcept(_Iterator(__x.current))) > : current(__x.current) > { } > > > reverse_iterator& operator=(const reverse_iterator&) = default; > > > > > > > template<typename _Iter> > > > > constexpr > reverse_iterator(const reverse_iterator<_Iter>& __x) > noexcept(noexcept(_Iterator(__x.current))) > : current(__x.current) > { } > > > template<typename _Iter> > > > > > constexpr > reverse_iterator& > operator=(const reverse_iterator<_Iter>& __x) > noexcept(noexcept(current = __x.current)) > { > current = __x.current; > return *this; > } > > > > > > [[__nodiscard__]] > constexpr iterator_type > base() const > noexcept(noexcept(_Iterator(current))) > { return current; } ># 258 "/usr/include/c++/13/bits/stl_iterator.h" 3 > [[__nodiscard__]] > constexpr reference > operator*() const > { > _Iterator __tmp = current; > return *--__tmp; > } > > > > > > > [[__nodiscard__]] > constexpr pointer > operator->() const > > > > > { > > > _Iterator __tmp = current; > --__tmp; > return _S_to_pointer(__tmp); > } > > > > > > > constexpr reverse_iterator& > operator++() > { > --current; > return *this; > } > > > > > > > constexpr reverse_iterator > operator++(int) > { > reverse_iterator __tmp = *this; > --current; > return __tmp; > } > > > > > > > constexpr reverse_iterator& > operator--() > { > ++current; > return *this; > } > > > > > > > constexpr reverse_iterator > operator--(int) > { > reverse_iterator __tmp = *this; > ++current; > return __tmp; > } > > > > > > > [[__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 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); } ># 418 "/usr/include/c++/13/bits/stl_iterator.h" 3 > private: > template<typename _Tp> > static constexpr _Tp* > _S_to_pointer(_Tp* __p) > { return __p; } > > template<typename _Tp> > static constexpr pointer > _S_to_pointer(_Tp __t) > { return __t.operator->(); } > }; ># 441 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator==(const reverse_iterator<_Iterator>& __x, > const reverse_iterator<_Iterator>& __y) > { return __x.base() == __y.base(); } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator<(const reverse_iterator<_Iterator>& __x, > const reverse_iterator<_Iterator>& __y) > { return __y.base() < __x.base(); } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator!=(const reverse_iterator<_Iterator>& __x, > const reverse_iterator<_Iterator>& __y) > { return !(__x == __y); } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator>(const reverse_iterator<_Iterator>& __x, > const reverse_iterator<_Iterator>& __y) > { return __y < __x; } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator<=(const reverse_iterator<_Iterator>& __x, > const reverse_iterator<_Iterator>& __y) > { return !(__y < __x); } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator>=(const reverse_iterator<_Iterator>& __x, > const reverse_iterator<_Iterator>& __y) > { return !(__x < __y); } > > > > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator==(const reverse_iterator<_IteratorL>& __x, > const reverse_iterator<_IteratorR>& __y) > { return __x.base() == __y.base(); } > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator<(const reverse_iterator<_IteratorL>& __x, > const reverse_iterator<_IteratorR>& __y) > { return __x.base() > __y.base(); } > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator!=(const reverse_iterator<_IteratorL>& __x, > const reverse_iterator<_IteratorR>& __y) > { return __x.base() != __y.base(); } > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator>(const reverse_iterator<_IteratorL>& __x, > const reverse_iterator<_IteratorR>& __y) > { return __x.base() < __y.base(); } > > template<typename _IteratorL, typename _IteratorR> > inline constexpr bool > operator<=(const reverse_iterator<_IteratorL>& __x, > const reverse_iterator<_IteratorR>& __y) > { return __x.base() >= __y.base(); } > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator>=(const reverse_iterator<_IteratorL>& __x, > const reverse_iterator<_IteratorR>& __y) > { return __x.base() <= __y.base(); } ># 618 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr auto > operator-(const reverse_iterator<_IteratorL>& __x, > const reverse_iterator<_IteratorR>& __y) > -> decltype(__y.base() - __x.base()) > { return __y.base() - __x.base(); } > > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr reverse_iterator<_Iterator> > operator+(typename reverse_iterator<_Iterator>::difference_type __n, > const reverse_iterator<_Iterator>& __x) > { return reverse_iterator<_Iterator>(__x.base() - __n); } > > > > template<typename _Iterator> > inline constexpr reverse_iterator<_Iterator> > __make_reverse_iterator(_Iterator __i) > { return reverse_iterator<_Iterator>(__i); } > > > > > > > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr reverse_iterator<_Iterator> > make_reverse_iterator(_Iterator __i) > { return reverse_iterator<_Iterator>(__i); } ># 662 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Iterator> > > auto > __niter_base(reverse_iterator<_Iterator> __it) > -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) > { return __make_reverse_iterator(__niter_base(__it.base())); } > > template<typename _Iterator> > struct __is_move_iterator<reverse_iterator<_Iterator> > > : __is_move_iterator<_Iterator> > { }; > > template<typename _Iterator> > > auto > __miter_base(reverse_iterator<_Iterator> __it) > -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) > { return __make_reverse_iterator(__miter_base(__it.base())); } ># 693 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Container> > class back_insert_iterator > : public iterator<output_iterator_tag, void, void, void, void> > { > protected: > _Container* container; > > public: > > typedef _Container container_type; > > > > > > explicit > back_insert_iterator(_Container& __x) > : container(std::__addressof(__x)) { } ># 731 "/usr/include/c++/13/bits/stl_iterator.h" 3 > > back_insert_iterator& > operator=(const typename _Container::value_type& __value) > { > container->push_back(__value); > return *this; > } > > > back_insert_iterator& > operator=(typename _Container::value_type&& __value) > { > container->push_back(std::move(__value)); > return *this; > } > > > > [[__nodiscard__]] > back_insert_iterator& > operator*() > { return *this; } > > > > back_insert_iterator& > operator++() > { return *this; } > > > > back_insert_iterator > operator++(int) > { return *this; } > }; ># 778 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Container> > [[__nodiscard__]] > inline back_insert_iterator<_Container> > back_inserter(_Container& __x) > { return back_insert_iterator<_Container>(__x); } ># 794 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Container> > class front_insert_iterator > : public iterator<output_iterator_tag, void, void, void, void> > { > protected: > _Container* container; > > public: > > typedef _Container container_type; > > > > > > explicit > front_insert_iterator(_Container& __x) > : container(std::__addressof(__x)) { } ># 832 "/usr/include/c++/13/bits/stl_iterator.h" 3 > > front_insert_iterator& > operator=(const typename _Container::value_type& __value) > { > container->push_front(__value); > return *this; > } > > > front_insert_iterator& > operator=(typename _Container::value_type&& __value) > { > container->push_front(std::move(__value)); > return *this; > } > > > > [[__nodiscard__]] > front_insert_iterator& > operator*() > { return *this; } > > > > front_insert_iterator& > operator++() > { return *this; } > > > > front_insert_iterator > operator++(int) > { return *this; } > }; ># 879 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Container> > [[__nodiscard__]] > inline front_insert_iterator<_Container> > front_inserter(_Container& __x) > { return front_insert_iterator<_Container>(__x); } ># 899 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Container> > class insert_iterator > : public iterator<output_iterator_tag, void, void, void, void> > { > > > > typedef typename _Container::iterator _Iter; > > protected: > _Container* container; > _Iter iter; > > public: > > typedef _Container container_type; ># 924 "/usr/include/c++/13/bits/stl_iterator.h" 3 > > insert_iterator(_Container& __x, _Iter __i) > : container(std::__addressof(__x)), iter(__i) {} ># 960 "/usr/include/c++/13/bits/stl_iterator.h" 3 > > insert_iterator& > operator=(const typename _Container::value_type& __value) > { > iter = container->insert(iter, __value); > ++iter; > return *this; > } > > > insert_iterator& > operator=(typename _Container::value_type&& __value) > { > iter = container->insert(iter, std::move(__value)); > ++iter; > return *this; > } > > > > [[__nodiscard__]] > insert_iterator& > operator*() > { return *this; } > > > > insert_iterator& > operator++() > { return *this; } > > > > insert_iterator& > operator++(int) > { return *this; } > }; > >#pragma GCC diagnostic pop ># 1019 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Container> > [[__nodiscard__]] > inline insert_iterator<_Container> > inserter(_Container& __x, typename _Container::iterator __i) > { return insert_iterator<_Container>(__x, __i); } > > > > > >} > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > ># 1042 "/usr/include/c++/13/bits/stl_iterator.h" 3 > 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; > > > > > > constexpr __normal_iterator() noexcept > : _M_current(_Iterator()) { } > > explicit > __normal_iterator(const _Iterator& __i) noexcept > : _M_current(__i) { } > > > > template<typename _Iter, typename = __convertible_from<_Iter>> > > __normal_iterator(const __normal_iterator<_Iter, _Container>& __i) > noexcept ># 1090 "/usr/include/c++/13/bits/stl_iterator.h" 3 > : _M_current(__i.base()) { } > > > > reference > operator*() const noexcept > { return *_M_current; } > > > pointer > operator->() const noexcept > { return _M_current; } > > > __normal_iterator& > operator++() noexcept > { > ++_M_current; > return *this; > } > > > __normal_iterator > operator++(int) noexcept > { return __normal_iterator(_M_current++); } > > > > __normal_iterator& > operator--() noexcept > { > --_M_current; > return *this; > } > > > __normal_iterator > operator--(int) noexcept > { return __normal_iterator(_M_current--); } > > > > reference > operator[](difference_type __n) const noexcept > { return _M_current[__n]; } > > > __normal_iterator& > operator+=(difference_type __n) noexcept > { _M_current += __n; return *this; } > > > __normal_iterator > operator+(difference_type __n) const noexcept > { return __normal_iterator(_M_current + __n); } > > > __normal_iterator& > operator-=(difference_type __n) noexcept > { _M_current -= __n; return *this; } > > > __normal_iterator > operator-(difference_type __n) const noexcept > { return __normal_iterator(_M_current - __n); } > > > const _Iterator& > base() const noexcept > { return _M_current; } > }; ># 1210 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _IteratorL, typename _IteratorR, typename _Container> > [[__nodiscard__]] > inline bool > operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, > const __normal_iterator<_IteratorR, _Container>& __rhs) > noexcept > { return __lhs.base() == __rhs.base(); } > > template<typename _Iterator, typename _Container> > [[__nodiscard__]] > inline bool > operator==(const __normal_iterator<_Iterator, _Container>& __lhs, > const __normal_iterator<_Iterator, _Container>& __rhs) > noexcept > { return __lhs.base() == __rhs.base(); } > > template<typename _IteratorL, typename _IteratorR, typename _Container> > [[__nodiscard__]] > inline bool > operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, > const __normal_iterator<_IteratorR, _Container>& __rhs) > noexcept > { return __lhs.base() != __rhs.base(); } > > template<typename _Iterator, typename _Container> > [[__nodiscard__]] > inline bool > operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, > const __normal_iterator<_Iterator, _Container>& __rhs) > noexcept > { return __lhs.base() != __rhs.base(); } > > > template<typename _IteratorL, typename _IteratorR, typename _Container> > [[__nodiscard__]] > inline bool > operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, > const __normal_iterator<_IteratorR, _Container>& __rhs) > noexcept > { return __lhs.base() < __rhs.base(); } > > template<typename _Iterator, typename _Container> > [[__nodiscard__]] > inline bool > operator<(const __normal_iterator<_Iterator, _Container>& __lhs, > const __normal_iterator<_Iterator, _Container>& __rhs) > noexcept > { return __lhs.base() < __rhs.base(); } > > template<typename _IteratorL, typename _IteratorR, typename _Container> > [[__nodiscard__]] > inline bool > operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, > const __normal_iterator<_IteratorR, _Container>& __rhs) > noexcept > { return __lhs.base() > __rhs.base(); } > > template<typename _Iterator, typename _Container> > [[__nodiscard__]] > inline bool > operator>(const __normal_iterator<_Iterator, _Container>& __lhs, > const __normal_iterator<_Iterator, _Container>& __rhs) > noexcept > { return __lhs.base() > __rhs.base(); } > > template<typename _IteratorL, typename _IteratorR, typename _Container> > [[__nodiscard__]] > inline bool > operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, > const __normal_iterator<_IteratorR, _Container>& __rhs) > noexcept > { return __lhs.base() <= __rhs.base(); } > > template<typename _Iterator, typename _Container> > [[__nodiscard__]] > inline bool > operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, > const __normal_iterator<_Iterator, _Container>& __rhs) > noexcept > { return __lhs.base() <= __rhs.base(); } > > template<typename _IteratorL, typename _IteratorR, typename _Container> > [[__nodiscard__]] > inline bool > operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, > const __normal_iterator<_IteratorR, _Container>& __rhs) > noexcept > { return __lhs.base() >= __rhs.base(); } > > template<typename _Iterator, typename _Container> > [[__nodiscard__]] > inline bool > operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, > const __normal_iterator<_Iterator, _Container>& __rhs) > noexcept > { return __lhs.base() >= __rhs.base(); } > > > > > > > template<typename _IteratorL, typename _IteratorR, typename _Container> > > > [[__nodiscard__]] > inline auto > operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, > const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept > -> decltype(__lhs.base() - __rhs.base()) > > > > > > { return __lhs.base() - __rhs.base(); } > > template<typename _Iterator, typename _Container> > [[__nodiscard__]] > inline typename __normal_iterator<_Iterator, _Container>::difference_type > operator-(const __normal_iterator<_Iterator, _Container>& __lhs, > const __normal_iterator<_Iterator, _Container>& __rhs) > noexcept > { return __lhs.base() - __rhs.base(); } > > template<typename _Iterator, typename _Container> > [[__nodiscard__]] > inline __normal_iterator<_Iterator, _Container> > operator+(typename __normal_iterator<_Iterator, _Container>::difference_type > __n, const __normal_iterator<_Iterator, _Container>& __i) > noexcept > { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } > > >} > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Iterator, typename _Container> > > _Iterator > __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) > noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) > { return __it.base(); } > > > > > > > template<typename _Iterator, typename _Container> > constexpr auto > __to_address(const __gnu_cxx::__normal_iterator<_Iterator, > _Container>& __it) noexcept > -> decltype(std::__to_address(__it.base())) > { return std::__to_address(__it.base()); } ># 1417 "/usr/include/c++/13/bits/stl_iterator.h" 3 > namespace __detail > { ># 1433 "/usr/include/c++/13/bits/stl_iterator.h" 3 > } ># 1444 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Iterator> > class move_iterator > > > > { > _Iterator _M_current; > > using __traits_type = iterator_traits<_Iterator>; > > using __base_ref = typename __traits_type::reference; > > > template<typename _Iter2> > friend class move_iterator; ># 1483 "/usr/include/c++/13/bits/stl_iterator.h" 3 > public: > using iterator_type = _Iterator; ># 1497 "/usr/include/c++/13/bits/stl_iterator.h" 3 > 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 _Iterator pointer; > > > using reference > = __conditional_t<is_reference<__base_ref>::value, > typename remove_reference<__base_ref>::type&&, > __base_ref>; > > > constexpr > move_iterator() > : _M_current() { } > > explicit constexpr > move_iterator(iterator_type __i) > : _M_current(std::move(__i)) { } > > template<typename _Iter> > > > > constexpr > move_iterator(const move_iterator<_Iter>& __i) > : _M_current(__i._M_current) { } > > template<typename _Iter> > > > > > constexpr > move_iterator& operator=(const move_iterator<_Iter>& __i) > { > _M_current = __i._M_current; > return *this; > } > > > [[__nodiscard__]] > constexpr iterator_type > base() const > { return _M_current; } ># 1555 "/usr/include/c++/13/bits/stl_iterator.h" 3 > [[__nodiscard__]] > constexpr reference > operator*() const > > > > { return static_cast<reference>(*_M_current); } > > > [[__nodiscard__]] > constexpr pointer > operator->() const > { return _M_current; } > > constexpr move_iterator& > operator++() > { > ++_M_current; > return *this; > } > > constexpr move_iterator > operator++(int) > { > move_iterator __tmp = *this; > ++_M_current; > return __tmp; > } > > > > > > > > constexpr move_iterator& > operator--() > { > --_M_current; > return *this; > } > > constexpr move_iterator > operator--(int) > { > move_iterator __tmp = *this; > --_M_current; > return __tmp; > } > > [[__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 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 std::move(_M_current[__n]); } ># 1669 "/usr/include/c++/13/bits/stl_iterator.h" 3 > }; > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator==(const move_iterator<_IteratorL>& __x, > const move_iterator<_IteratorR>& __y) > > > > { return __x.base() == __y.base(); } ># 1690 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator!=(const move_iterator<_IteratorL>& __x, > const move_iterator<_IteratorR>& __y) > { return !(__x == __y); } > > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator<(const move_iterator<_IteratorL>& __x, > const move_iterator<_IteratorR>& __y) > > > > { return __x.base() < __y.base(); } > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator<=(const move_iterator<_IteratorL>& __x, > const move_iterator<_IteratorR>& __y) > > > > { return !(__y < __x); } > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator>(const move_iterator<_IteratorL>& __x, > const move_iterator<_IteratorR>& __y) > > > > { return __y < __x; } > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr bool > operator>=(const move_iterator<_IteratorL>& __x, > const move_iterator<_IteratorR>& __y) > > > > { return !(__x < __y); } > > > > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator==(const move_iterator<_Iterator>& __x, > const move_iterator<_Iterator>& __y) > { return __x.base() == __y.base(); } ># 1756 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator!=(const move_iterator<_Iterator>& __x, > const move_iterator<_Iterator>& __y) > { return !(__x == __y); } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator<(const move_iterator<_Iterator>& __x, > const move_iterator<_Iterator>& __y) > { return __x.base() < __y.base(); } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator<=(const move_iterator<_Iterator>& __x, > const move_iterator<_Iterator>& __y) > { return !(__y < __x); } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator>(const move_iterator<_Iterator>& __x, > const move_iterator<_Iterator>& __y) > { return __y < __x; } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr bool > operator>=(const move_iterator<_Iterator>& __x, > const move_iterator<_Iterator>& __y) > { return !(__x < __y); } > > > > template<typename _IteratorL, typename _IteratorR> > [[__nodiscard__]] > inline constexpr auto > operator-(const move_iterator<_IteratorL>& __x, > const move_iterator<_IteratorR>& __y) > -> decltype(__x.base() - __y.base()) > { return __x.base() - __y.base(); } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr move_iterator<_Iterator> > operator+(typename move_iterator<_Iterator>::difference_type __n, > const move_iterator<_Iterator>& __x) > { return __x + __n; } > > template<typename _Iterator> > [[__nodiscard__]] > inline constexpr move_iterator<_Iterator> > make_move_iterator(_Iterator __i) > { return move_iterator<_Iterator>(std::move(__i)); } > > template<typename _Iterator, typename _ReturnType > = __conditional_t<__move_if_noexcept_cond > <typename iterator_traits<_Iterator>::value_type>::value, > _Iterator, move_iterator<_Iterator>>> > inline constexpr _ReturnType > __make_move_if_noexcept_iterator(_Iterator __i) > { return _ReturnType(__i); } > > > > template<typename _Tp, typename _ReturnType > = __conditional_t<__move_if_noexcept_cond<_Tp>::value, > const _Tp*, move_iterator<_Tp*>>> > inline constexpr _ReturnType > __make_move_if_noexcept_iterator(_Tp* __i) > { return _ReturnType(__i); } ># 2585 "/usr/include/c++/13/bits/stl_iterator.h" 3 > template<typename _Iterator> > > auto > __niter_base(move_iterator<_Iterator> __it) > -> decltype(make_move_iterator(__niter_base(__it.base()))) > { return make_move_iterator(__niter_base(__it.base())); } > > template<typename _Iterator> > struct __is_move_iterator<move_iterator<_Iterator> > > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<typename _Iterator> > > auto > __miter_base(move_iterator<_Iterator> __it) > -> decltype(__miter_base(__it.base())) > { return __miter_base(__it.base()); } ># 2617 "/usr/include/c++/13/bits/stl_iterator.h" 3 > 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>>; > > > >} ># 49 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/stl_function.h" 1 3 ># 63 "/usr/include/c++/13/bits/stl_function.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 116 "/usr/include/c++/13/bits/stl_function.h" 3 > 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__)); ># 157 "/usr/include/c++/13/bits/stl_function.h" 3 > 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 > { return __x + __y; } > }; > > > template<typename _Tp> > struct minus : public binary_function<_Tp, _Tp, _Tp> > { > constexpr > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x - __y; } > }; > > > template<typename _Tp> > struct multiplies : public binary_function<_Tp, _Tp, _Tp> > { > constexpr > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x * __y; } > }; > > > template<typename _Tp> > struct divides : public binary_function<_Tp, _Tp, _Tp> > { > constexpr > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x / __y; } > }; > > > template<typename _Tp> > struct modulus : public binary_function<_Tp, _Tp, _Tp> > { > constexpr > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x % __y; } > }; > > > template<typename _Tp> > struct negate : public unary_function<_Tp, _Tp> > { > constexpr > _Tp > operator()(const _Tp& __x) const > { return -__x; } > }; >#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)) > { return 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)) > { return 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)) > { return 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)) > { return 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)) > { return 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)) > { return -std::forward<_Tp>(__t); } > > typedef __is_transparent is_transparent; > }; ># 349 "/usr/include/c++/13/bits/stl_function.h" 3 > template<typename _Tp = void> > struct equal_to; > > template<typename _Tp = void> > struct not_equal_to; > > template<typename _Tp = void> > struct greater; > > template<typename _Tp = void> > struct less; > > template<typename _Tp = void> > struct greater_equal; > > template<typename _Tp = void> > struct less_equal; > > >#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 > { return __x == __y; } > }; > > > template<typename _Tp> > struct not_equal_to : public binary_function<_Tp, _Tp, bool> > { > constexpr > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x != __y; } > }; > > > template<typename _Tp> > struct greater : public binary_function<_Tp, _Tp, bool> > { > constexpr > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x > __y; } > }; > > > template<typename _Tp> > struct less : public binary_function<_Tp, _Tp, bool> > { > constexpr > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x < __y; } > }; > > > template<typename _Tp> > struct greater_equal : public binary_function<_Tp, _Tp, bool> > { > constexpr > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x >= __y; } > }; > > > template<typename _Tp> > struct less_equal : public binary_function<_Tp, _Tp, bool> > { > constexpr > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x <= __y; } > }; > > > template<typename _Tp> > struct greater<_Tp*> : public binary_function<_Tp*, _Tp*, bool> > { > constexpr bool > operator()(_Tp* __x, _Tp* __y) const noexcept > { > > if (std::__is_constant_evaluated()) > return __x > __y; > > return (long unsigned int)__x > (long unsigned int)__y; > } > }; > > > template<typename _Tp> > struct less<_Tp*> : public binary_function<_Tp*, _Tp*, bool> > { > constexpr bool > operator()(_Tp* __x, _Tp* __y) const noexcept > { > > if (std::__is_constant_evaluated()) > return __x < __y; > > return (long unsigned int)__x < (long unsigned int)__y; > } > }; > > > template<typename _Tp> > struct greater_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> > { > constexpr bool > operator()(_Tp* __x, _Tp* __y) const noexcept > { > > if (std::__is_constant_evaluated()) > return __x >= __y; > > return (long unsigned int)__x >= (long unsigned int)__y; > } > }; > > > template<typename _Tp> > struct less_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> > { > constexpr bool > operator()(_Tp* __x, _Tp* __y) const noexcept > { > > if (std::__is_constant_evaluated()) > return __x <= __y; > > return (long unsigned int)__x <= (long unsigned int)__y; > } > }; >#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)) > { return 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)) > { return 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)) > { > return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), > __ptr_cmp<_Tp, _Up>{}); > } > > template<typename _Tp, typename _Up> > constexpr bool > operator()(_Tp* __t, _Up* __u) const noexcept > { return greater<common_type_t<_Tp*, _Up*>>{}(__t, __u); } > > typedef __is_transparent is_transparent; > > private: > template <typename _Tp, typename _Up> > static constexpr decltype(auto) > _S_cmp(_Tp&& __t, _Up&& __u, false_type) > { return std::forward<_Tp>(__t) > std::forward<_Up>(__u); } > > template <typename _Tp, typename _Up> > static constexpr bool > _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept > { > return greater<const volatile void*>{}( > static_cast<const volatile void*>(std::forward<_Tp>(__t)), > static_cast<const volatile void*>(std::forward<_Up>(__u))); > } > > > 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)) > { > return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), > __ptr_cmp<_Tp, _Up>{}); > } > > template<typename _Tp, typename _Up> > constexpr bool > operator()(_Tp* __t, _Up* __u) const noexcept > { return less<common_type_t<_Tp*, _Up*>>{}(__t, __u); } > > typedef __is_transparent is_transparent; > > private: > template <typename _Tp, typename _Up> > static constexpr decltype(auto) > _S_cmp(_Tp&& __t, _Up&& __u, false_type) > { return std::forward<_Tp>(__t) < std::forward<_Up>(__u); } > > template <typename _Tp, typename _Up> > static constexpr bool > _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept > { > return less<const volatile void*>{}( > static_cast<const volatile void*>(std::forward<_Tp>(__t)), > static_cast<const volatile void*>(std::forward<_Up>(__u))); > } > > > 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)) > { > return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), > __ptr_cmp<_Tp, _Up>{}); > } > > template<typename _Tp, typename _Up> > constexpr bool > operator()(_Tp* __t, _Up* __u) const noexcept > { return greater_equal<common_type_t<_Tp*, _Up*>>{}(__t, __u); } > > typedef __is_transparent is_transparent; > > private: > template <typename _Tp, typename _Up> > static constexpr decltype(auto) > _S_cmp(_Tp&& __t, _Up&& __u, false_type) > { return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); } > > template <typename _Tp, typename _Up> > static constexpr bool > _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept > { > return greater_equal<const volatile void*>{}( > static_cast<const volatile void*>(std::forward<_Tp>(__t)), > static_cast<const volatile void*>(std::forward<_Up>(__u))); > } > > > 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)) > { > return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), > __ptr_cmp<_Tp, _Up>{}); > } > > template<typename _Tp, typename _Up> > constexpr bool > operator()(_Tp* __t, _Up* __u) const noexcept > { return less_equal<common_type_t<_Tp*, _Up*>>{}(__t, __u); } > > typedef __is_transparent is_transparent; > > private: > template <typename _Tp, typename _Up> > static constexpr decltype(auto) > _S_cmp(_Tp&& __t, _Up&& __u, false_type) > { return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); } > > template <typename _Tp, typename _Up> > static constexpr bool > _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept > { > return less_equal<const volatile void*>{}( > static_cast<const volatile void*>(std::forward<_Tp>(__t)), > static_cast<const volatile void*>(std::forward<_Up>(__u))); > } > > > 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*>>; > }; ># 781 "/usr/include/c++/13/bits/stl_function.h" 3 > template<typename _Tp = void> > struct logical_and; > > template<typename _Tp = void> > struct logical_or; > > template<typename _Tp = void> > struct logical_not; > > >#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 > { return __x && __y; } > }; > > > template<typename _Tp> > struct logical_or : public binary_function<_Tp, _Tp, bool> > { > constexpr > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x || __y; } > }; > > > template<typename _Tp> > struct logical_not : public unary_function<_Tp, bool> > { > constexpr > bool > operator()(const _Tp& __x) const > { return !__x; } > }; >#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)) > { return 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)) > { return 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)) > { return !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 > { return __x & __y; } > }; > > template<typename _Tp> > struct bit_or : public binary_function<_Tp, _Tp, _Tp> > { > constexpr > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x | __y; } > }; > > template<typename _Tp> > struct bit_xor : public binary_function<_Tp, _Tp, _Tp> > { > constexpr > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x ^ __y; } > }; > > template<typename _Tp> > struct bit_not : public unary_function<_Tp, _Tp> > { > constexpr > _Tp > operator()(const _Tp& __x) const > { return ~__x; } > }; >#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)) > { return 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)) > { return 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)) > { return 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)) > { return ~std::forward<_Tp>(__t); } > > typedef __is_transparent is_transparent; > }; > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ># 1023 "/usr/include/c++/13/bits/stl_function.h" 3 > 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) : _M_pred(__x) { } > > constexpr > bool > operator()(const typename _Predicate::argument_type& __x) const > { return !_M_pred(__x); } > }; > > > template<typename _Predicate> > __attribute__ ((__deprecated__ ("use '" "std::not_fn" "' instead"))) > constexpr > inline unary_negate<_Predicate> > not1(const _Predicate& __pred) > { return unary_negate<_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) : _M_pred(__x) { } > > constexpr > bool > operator()(const typename _Predicate::first_argument_type& __x, > const typename _Predicate::second_argument_type& __y) const > { return !_M_pred(__x, __y); } > }; > > > template<typename _Predicate> > __attribute__ ((__deprecated__ ("use '" "std::not_fn" "' instead"))) > constexpr > inline binary_negate<_Predicate> > not2(const _Predicate& __pred) > { return binary_negate<_Predicate>(__pred); } ># 1104 "/usr/include/c++/13/bits/stl_function.h" 3 > template<typename _Arg, typename _Result> > class pointer_to_unary_function : public unary_function<_Arg, _Result> > { > protected: > _Result (*_M_ptr)(_Arg); > > public: > pointer_to_unary_function() { } > > explicit > pointer_to_unary_function(_Result (*__x)(_Arg)) > : _M_ptr(__x) { } > > _Result > operator()(_Arg __x) const > { return _M_ptr(__x); } > } __attribute__ ((__deprecated__)); > > > template<typename _Arg, typename _Result> > __attribute__ ((__deprecated__ ("use '" "std::function" "' instead"))) > inline pointer_to_unary_function<_Arg, _Result> > ptr_fun(_Result (*__x)(_Arg)) > { return pointer_to_unary_function<_Arg, _Result>(__x); } > > > template<typename _Arg1, typename _Arg2, typename _Result> > class pointer_to_binary_function > : public binary_function<_Arg1, _Arg2, _Result> > { > protected: > _Result (*_M_ptr)(_Arg1, _Arg2); > > public: > pointer_to_binary_function() { } > > explicit > pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) > : _M_ptr(__x) { } > > _Result > operator()(_Arg1 __x, _Arg2 __y) const > { return _M_ptr(__x, __y); } > } __attribute__ ((__deprecated__)); > > > template<typename _Arg1, typename _Arg2, typename _Result> > __attribute__ ((__deprecated__ ("use '" "std::function" "' instead"))) > inline pointer_to_binary_function<_Arg1, _Arg2, _Result> > ptr_fun(_Result (*__x)(_Arg1, _Arg2)) > { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } > > > template<typename _Tp> > struct _Identity > : public unary_function<_Tp, _Tp> > { > _Tp& > operator()(_Tp& __x) const > { return __x; } > > const _Tp& > operator()(const _Tp& __x) const > { return __x; } > }; > > > template<typename _Tp> struct _Identity<const _Tp> : _Identity<_Tp> { }; > > template<typename _Pair> > struct _Select1st > : public unary_function<_Pair, typename _Pair::first_type> > { > typename _Pair::first_type& > operator()(_Pair& __x) const > { return __x.first; } > > const typename _Pair::first_type& > operator()(const _Pair& __x) const > { return __x.first; } > > > template<typename _Pair2> > typename _Pair2::first_type& > operator()(_Pair2& __x) const > { return __x.first; } > > template<typename _Pair2> > const typename _Pair2::first_type& > operator()(const _Pair2& __x) const > { return __x.first; } > > }; > > template<typename _Pair> > struct _Select2nd > : public unary_function<_Pair, typename _Pair::second_type> > { > typename _Pair::second_type& > operator()(_Pair& __x) const > { return __x.second; } > > const typename _Pair::second_type& > operator()(const _Pair& __x) const > { return __x.second; } > }; ># 1231 "/usr/include/c++/13/bits/stl_function.h" 3 > template<typename _Ret, typename _Tp> > class mem_fun_t : public unary_function<_Tp*, _Ret> > { > public: > explicit > mem_fun_t(_Ret (_Tp::*__pf)()) > : _M_f(__pf) { } > > _Ret > operator()(_Tp* __p) const > { return (__p->*_M_f)(); } > > private: > _Ret (_Tp::*_M_f)(); > } __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) > : _M_f(__pf) { } > > _Ret > operator()(const _Tp* __p) const > { return (__p->*_M_f)(); } > > 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)()) > : _M_f(__pf) { } > > _Ret > operator()(_Tp& __r) const > { return (__r.*_M_f)(); } > > 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) > : _M_f(__pf) { } > > _Ret > operator()(const _Tp& __r) const > { return (__r.*_M_f)(); } > > 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)) > : _M_f(__pf) { } > > _Ret > operator()(_Tp* __p, _Arg __x) const > { return (__p->*_M_f)(__x); } > > 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) > : _M_f(__pf) { } > > _Ret > operator()(const _Tp* __p, _Arg __x) const > { return (__p->*_M_f)(__x); } > > 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)) > : _M_f(__pf) { } > > _Ret > operator()(_Tp& __r, _Arg __x) const > { return (__r.*_M_f)(__x); } > > 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) > : _M_f(__pf) { } > > _Ret > operator()(const _Tp& __r, _Arg __x) const > { return (__r.*_M_f)(__x); } > > private: > _Ret (_Tp::*_M_f)(_Arg) const; > } __attribute__ ((__deprecated__)); > > > > template<typename _Ret, typename _Tp> > __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) > inline mem_fun_t<_Ret, _Tp> > mem_fun(_Ret (_Tp::*__f)()) > { return mem_fun_t<_Ret, _Tp>(__f); } > > template<typename _Ret, typename _Tp> > __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) > inline const_mem_fun_t<_Ret, _Tp> > mem_fun(_Ret (_Tp::*__f)() const) > { return const_mem_fun_t<_Ret, _Tp>(__f); } > > template<typename _Ret, typename _Tp> > __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) > inline mem_fun_ref_t<_Ret, _Tp> > mem_fun_ref(_Ret (_Tp::*__f)()) > { return mem_fun_ref_t<_Ret, _Tp>(__f); } > > template<typename _Ret, typename _Tp> > __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) > inline const_mem_fun_ref_t<_Ret, _Tp> > mem_fun_ref(_Ret (_Tp::*__f)() const) > { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } > > template<typename _Ret, typename _Tp, typename _Arg> > __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) > inline mem_fun1_t<_Ret, _Tp, _Arg> > mem_fun(_Ret (_Tp::*__f)(_Arg)) > { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } > > template<typename _Ret, typename _Tp, typename _Arg> > __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) > inline const_mem_fun1_t<_Ret, _Tp, _Arg> > mem_fun(_Ret (_Tp::*__f)(_Arg) const) > { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } > > template<typename _Ret, typename _Tp, typename _Arg> > __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) > inline mem_fun1_ref_t<_Ret, _Tp, _Arg> > mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) > { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } > > template<typename _Ret, typename _Tp, typename _Arg> > __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) > inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> > mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) > { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } >#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; > > > >} > > ># 1 "/usr/include/c++/13/backward/binders.h" 1 3 ># 60 "/usr/include/c++/13/backward/binders.h" 3 >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 107 "/usr/include/c++/13/backward/binders.h" 3 > template<typename _Operation> > class binder1st > : public unary_function<typename _Operation::second_argument_type, > typename _Operation::result_type> > { > protected: > _Operation op; > typename _Operation::first_argument_type value; > > public: > binder1st(const _Operation& __x, > const typename _Operation::first_argument_type& __y) > : op(__x), value(__y) { } > > typename _Operation::result_type > operator()(const typename _Operation::second_argument_type& __x) const > { return op(value, __x); } > > > > typename _Operation::result_type > operator()(typename _Operation::second_argument_type& __x) const > { return op(value, __x); } > } __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))); > > > template<typename _Operation, typename _Tp> > __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))) > inline binder1st<_Operation> > bind1st(const _Operation& __fn, const _Tp& __x) > { > typedef typename _Operation::first_argument_type _Arg1_type; > return binder1st<_Operation>(__fn, _Arg1_type(__x)); > } > > > template<typename _Operation> > class binder2nd > : public unary_function<typename _Operation::first_argument_type, > typename _Operation::result_type> > { > protected: > _Operation op; > typename _Operation::second_argument_type value; > > public: > binder2nd(const _Operation& __x, > const typename _Operation::second_argument_type& __y) > : op(__x), value(__y) { } > > typename _Operation::result_type > operator()(const typename _Operation::first_argument_type& __x) const > { return op(__x, value); } > > > > typename _Operation::result_type > operator()(typename _Operation::first_argument_type& __x) const > { return op(__x, value); } > } __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))); > > > template<typename _Operation, typename _Tp> > __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))) > inline binder2nd<_Operation> > bind2nd(const _Operation& __fn, const _Tp& __x) > { > typedef typename _Operation::second_argument_type _Arg2_type; > return binder2nd<_Operation>(__fn, _Arg2_type(__x)); > } > > > >} > >#pragma GCC diagnostic pop ># 1439 "/usr/include/c++/13/bits/stl_function.h" 2 3 ># 50 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/ext/numeric_traits.h" 1 3 ># 32 "/usr/include/c++/13/ext/numeric_traits.h" 3 > ># 33 "/usr/include/c++/13/ext/numeric_traits.h" 3 > > > > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > ># 50 "/usr/include/c++/13/ext/numeric_traits.h" 3 > 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; ># 130 "/usr/include/c++/13/ext/numeric_traits.h" 3 > __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>; ># 157 "/usr/include/c++/13/ext/numeric_traits.h" 3 > 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> > { }; ># 238 "/usr/include/c++/13/ext/numeric_traits.h" 3 > >} ># 51 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/stl_algobase.h" 1 3 ># 64 "/usr/include/c++/13/bits/stl_algobase.h" 3 ># 1 "/usr/include/c++/13/bits/stl_pair.h" 1 3 ># 62 "/usr/include/c++/13/bits/stl_pair.h" 3 ># 1 "/usr/include/c++/13/bits/utility.h" 1 3 ># 36 "/usr/include/c++/13/bits/utility.h" 3 > ># 37 "/usr/include/c++/13/bits/utility.h" 3 > > > > > > >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() > { > constexpr size_t __sz = sizeof...(_Types); > constexpr bool __found[__sz] = { __is_same(_Tp, _Types) ... }; > size_t __n = __sz; > for (size_t __i = 0; __i < __sz; ++__i) > { > if (__found[__i]) > { > if (__n < __sz) > return __sz; > __n = __i; > } > } > return __n; > } ># 134 "/usr/include/c++/13/bits/utility.h" 3 > 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 > { ># 154 "/usr/include/c++/13/bits/utility.h" 3 > using __type = _Index_tuple<__integer_pack(_Num)...>; > > }; > > > > > > > template<typename _Tp, _Tp... _Idx> > struct integer_sequence > { > typedef _Tp value_type; > static constexpr size_t size() noexcept { return sizeof...(_Idx); } > }; > > > template<typename _Tp, _Tp _Num> > using make_integer_sequence > > > > = integer_sequence<_Tp, __integer_pack(_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> > > > > struct _Nth_type<_Np, _Tp0, _Tp1, _Tp2, _Rest...> > : _Nth_type<_Np - 3, _Rest...> > { }; > > > template<typename _Tp0, typename _Tp1, typename... _Rest> > struct _Nth_type<0, _Tp0, _Tp1, _Rest...> > { using type = _Tp0; }; > > template<typename _Tp0, typename _Tp1, typename _Tp2, typename... _Rest> > struct _Nth_type<0, _Tp0, _Tp1, _Tp2, _Rest...> > { using type = _Tp0; }; > > template<typename _Tp0, typename _Tp1, typename _Tp2, typename... _Rest> > struct _Nth_type<1, _Tp0, _Tp1, _Tp2, _Rest...> > { using type = _Tp1; }; > > > > > > > >} ># 63 "/usr/include/c++/13/bits/stl_pair.h" 2 3 > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 80 "/usr/include/c++/13/bits/stl_pair.h" 3 > 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 <bool, typename _T1, typename _T2> > struct _PCC > { > template <typename _U1, typename _U2> > static constexpr bool _ConstructiblePair() > { > return __and_<is_constructible<_T1, const _U1&>, > is_constructible<_T2, const _U2&>>::value; > } > > template <typename _U1, typename _U2> > static constexpr bool _ImplicitlyConvertiblePair() > { > return __and_<is_convertible<const _U1&, _T1>, > is_convertible<const _U2&, _T2>>::value; > } > > template <typename _U1, typename _U2> > static constexpr bool _MoveConstructiblePair() > { > return __and_<is_constructible<_T1, _U1&&>, > is_constructible<_T2, _U2&&>>::value; > } > > template <typename _U1, typename _U2> > static constexpr bool _ImplicitlyMoveConvertiblePair() > { > return __and_<is_convertible<_U1&&, _T1>, > is_convertible<_U2&&, _T2>>::value; > } > }; > > template <typename _T1, typename _T2> > struct _PCC<false, _T1, _T2> > { > template <typename _U1, typename _U2> > static constexpr bool _ConstructiblePair() > { > return false; > } > > template <typename _U1, typename _U2> > static constexpr bool _ImplicitlyConvertiblePair() > { > return false; > } > > template <typename _U1, typename _U2> > static constexpr bool _MoveConstructiblePair() > { > return false; > } > > template <typename _U1, typename _U2> > static constexpr bool _ImplicitlyMoveConvertiblePair() > { > return false; > } > }; > > > > template<typename _U1, typename _U2> class __pair_base > { > > template<typename _T1, typename _T2> friend struct pair; > __pair_base() = default; > ~__pair_base() = default; > __pair_base(const __pair_base&) = default; > __pair_base& operator=(const __pair_base&) = delete; > > }; ># 186 "/usr/include/c++/13/bits/stl_pair.h" 3 > 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> > > pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); > > > void > swap(pair& __p) > noexcept(__and_<__is_nothrow_swappable<_T1>, > __is_nothrow_swappable<_T2>>::value) > { > using std::swap; > swap(first, __p.first); > swap(second, __p.second); > } ># 234 "/usr/include/c++/13/bits/stl_pair.h" 3 > private: > template<typename... _Args1, size_t... _Indexes1, > typename... _Args2, size_t... _Indexes2> > > pair(tuple<_Args1...>&, tuple<_Args2...>&, > _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); > public: ># 525 "/usr/include/c++/13/bits/stl_pair.h" 3 > template <typename _U1 = _T1, > typename _U2 = _T2, > typename enable_if<__and_< > __is_implicitly_default_constructible<_U1>, > __is_implicitly_default_constructible<_U2>> > ::value, bool>::type = true> > constexpr pair() > : first(), second() { } > > template <typename _U1 = _T1, > typename _U2 = _T2, > typename enable_if<__and_< > is_default_constructible<_U1>, > is_default_constructible<_U2>, > __not_< > __and_<__is_implicitly_default_constructible<_U1>, > __is_implicitly_default_constructible<_U2>>>> > ::value, bool>::type = false> > explicit constexpr pair() > : first(), second() { } > > > > using _PCCP = _PCC<true, _T1, _T2>; > > > > template<typename _U1 = _T1, typename _U2=_T2, typename > enable_if<_PCCP::template > _ConstructiblePair<_U1, _U2>() > && _PCCP::template > _ImplicitlyConvertiblePair<_U1, _U2>(), > bool>::type=true> > constexpr pair(const _T1& __a, const _T2& __b) > : first(__a), second(__b) { } > > > template<typename _U1 = _T1, typename _U2=_T2, typename > enable_if<_PCCP::template > _ConstructiblePair<_U1, _U2>() > && !_PCCP::template > _ImplicitlyConvertiblePair<_U1, _U2>(), > bool>::type=false> > explicit constexpr pair(const _T1& __a, const _T2& __b) > : first(__a), second(__b) { } > > > > template <typename _U1, typename _U2> > using _PCCFP = _PCC<!is_same<_T1, _U1>::value > || !is_same<_T2, _U2>::value, > _T1, _T2>; > > > template<typename _U1, typename _U2, typename > enable_if<_PCCFP<_U1, _U2>::template > _ConstructiblePair<_U1, _U2>() > && _PCCFP<_U1, _U2>::template > _ImplicitlyConvertiblePair<_U1, _U2>(), > bool>::type=true> > constexpr pair(const pair<_U1, _U2>& __p) > : first(__p.first), second(__p.second) > { ; } > > template<typename _U1, typename _U2, typename > enable_if<_PCCFP<_U1, _U2>::template > _ConstructiblePair<_U1, _U2>() > && !_PCCFP<_U1, _U2>::template > _ImplicitlyConvertiblePair<_U1, _U2>(), > bool>::type=false> > explicit constexpr pair(const pair<_U1, _U2>& __p) > : first(__p.first), second(__p.second) > { ; } ># 609 "/usr/include/c++/13/bits/stl_pair.h" 3 > private: > > > > struct __zero_as_null_pointer_constant > { > __zero_as_null_pointer_constant(int __zero_as_null_pointer_constant::*) > { } > template<typename _Tp, > typename = __enable_if_t<is_null_pointer<_Tp>::value>> > __zero_as_null_pointer_constant(_Tp) = delete; > }; > > public: > > > > > template<typename _U1, > __enable_if_t<__and_<__not_<is_reference<_U1>>, > is_pointer<_T2>, > is_constructible<_T1, _U1>, > __not_<is_constructible<_T1, const _U1&>>, > is_convertible<_U1, _T1>>::value, > bool> = true> > __attribute__ ((__deprecated__ ("use 'nullptr' instead of '0' to " "initialize std::pair of move-only " "type and pointer"))) > constexpr > pair(_U1&& __x, __zero_as_null_pointer_constant, ...) > : first(std::forward<_U1>(__x)), second(nullptr) > { ; } > > template<typename _U1, > __enable_if_t<__and_<__not_<is_reference<_U1>>, > is_pointer<_T2>, > is_constructible<_T1, _U1>, > __not_<is_constructible<_T1, const _U1&>>, > __not_<is_convertible<_U1, _T1>>>::value, > bool> = false> > __attribute__ ((__deprecated__ ("use 'nullptr' instead of '0' to " "initialize std::pair of move-only " "type and pointer"))) > explicit constexpr > pair(_U1&& __x, __zero_as_null_pointer_constant, ...) > : first(std::forward<_U1>(__x)), second(nullptr) > { ; } > > template<typename _U2, > __enable_if_t<__and_<is_pointer<_T1>, > __not_<is_reference<_U2>>, > is_constructible<_T2, _U2>, > __not_<is_constructible<_T2, const _U2&>>, > is_convertible<_U2, _T2>>::value, > bool> = true> > __attribute__ ((__deprecated__ ("use 'nullptr' instead of '0' to " "initialize std::pair of move-only " "type and pointer"))) > constexpr > pair(__zero_as_null_pointer_constant, _U2&& __y, ...) > : first(nullptr), second(std::forward<_U2>(__y)) > { ; } > > template<typename _U2, > __enable_if_t<__and_<is_pointer<_T1>, > __not_<is_reference<_U2>>, > is_constructible<_T2, _U2>, > __not_<is_constructible<_T2, const _U2&>>, > __not_<is_convertible<_U2, _T2>>>::value, > bool> = false> > __attribute__ ((__deprecated__ ("use 'nullptr' instead of '0' to " "initialize std::pair of move-only " "type and pointer"))) > explicit constexpr > pair(__zero_as_null_pointer_constant, _U2&& __y, ...) > : first(nullptr), second(std::forward<_U2>(__y)) > { ; } > > > > template<typename _U1, typename _U2, typename > enable_if<_PCCP::template > _MoveConstructiblePair<_U1, _U2>() > && _PCCP::template > _ImplicitlyMoveConvertiblePair<_U1, _U2>(), > bool>::type=true> > constexpr pair(_U1&& __x, _U2&& __y) > : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) > { ; } > > template<typename _U1, typename _U2, typename > enable_if<_PCCP::template > _MoveConstructiblePair<_U1, _U2>() > && !_PCCP::template > _ImplicitlyMoveConvertiblePair<_U1, _U2>(), > bool>::type=false> > explicit constexpr pair(_U1&& __x, _U2&& __y) > : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) > { ; } > > > template<typename _U1, typename _U2, typename > enable_if<_PCCFP<_U1, _U2>::template > _MoveConstructiblePair<_U1, _U2>() > && _PCCFP<_U1, _U2>::template > _ImplicitlyMoveConvertiblePair<_U1, _U2>(), > bool>::type=true> > constexpr pair(pair<_U1, _U2>&& __p) > : first(std::forward<_U1>(__p.first)), > second(std::forward<_U2>(__p.second)) > { ; } > > template<typename _U1, typename _U2, typename > enable_if<_PCCFP<_U1, _U2>::template > _MoveConstructiblePair<_U1, _U2>() > && !_PCCFP<_U1, _U2>::template > _ImplicitlyMoveConvertiblePair<_U1, _U2>(), > bool>::type=false> > explicit constexpr pair(pair<_U1, _U2>&& __p) > : first(std::forward<_U1>(__p.first)), > second(std::forward<_U2>(__p.second)) > { ; } > > > > pair& > operator=(__conditional_t<__and_<is_copy_assignable<_T1>, > is_copy_assignable<_T2>>::value, > const pair&, const __nonesuch&> __p) > { > first = __p.first; > second = __p.second; > return *this; > } > > pair& > operator=(__conditional_t<__and_<is_move_assignable<_T1>, > is_move_assignable<_T2>>::value, > pair&&, __nonesuch&&> __p) > noexcept(__and_<is_nothrow_move_assignable<_T1>, > is_nothrow_move_assignable<_T2>>::value) > { > first = std::forward<first_type>(__p.first); > second = std::forward<second_type>(__p.second); > return *this; > } > > template<typename _U1, typename _U2> > typename enable_if<__and_<is_assignable<_T1&, const _U1&>, > is_assignable<_T2&, const _U2&>>::value, > pair&>::type > operator=(const pair<_U1, _U2>& __p) > { > first = __p.first; > second = __p.second; > return *this; > } > > template<typename _U1, typename _U2> > typename enable_if<__and_<is_assignable<_T1&, _U1&&>, > is_assignable<_T2&, _U2&&>>::value, > pair&>::type > operator=(pair<_U1, _U2>&& __p) > { > first = std::forward<_U1>(__p.first); > second = std::forward<_U2>(__p.second); > return *this; > } ># 801 "/usr/include/c++/13/bits/stl_pair.h" 3 > }; > > > > > template<typename _T1, typename _T2> pair(_T1, _T2) -> pair<_T1, _T2>; > > > > template<typename _T1, typename _T2> > inline constexpr bool > operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return __x.first == __y.first && __x.second == __y.second; } ># 833 "/usr/include/c++/13/bits/stl_pair.h" 3 > template<typename _T1, typename _T2> > inline constexpr bool > operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return __x.first < __y.first > || (!(__y.first < __x.first) && __x.second < __y.second); } > > > template<typename _T1, typename _T2> > inline constexpr bool > operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return !(__x == __y); } > > > template<typename _T1, typename _T2> > inline constexpr bool > operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return __y < __x; } > > > template<typename _T1, typename _T2> > inline constexpr bool > operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return !(__y < __x); } > > > template<typename _T1, typename _T2> > inline constexpr bool > operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return !(__x < __y); } ># 870 "/usr/include/c++/13/bits/stl_pair.h" 3 > template<typename _T1, typename _T2> > inline > > > 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))) > { __x.swap(__y); } ># 893 "/usr/include/c++/13/bits/stl_pair.h" 3 > template<typename _T1, typename _T2> > typename enable_if<!__and_<__is_swappable<_T1>, > __is_swappable<_T2>>::value>::type > swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; ># 919 "/usr/include/c++/13/bits/stl_pair.h" 3 > template<typename _T1, typename _T2> > constexpr pair<typename __decay_and_strip<_T1>::__type, > typename __decay_and_strip<_T2>::__type> > make_pair(_T1&& __x, _T2&& __y) > { > typedef typename __decay_and_strip<_T1>::__type __ds_type1; > typedef typename __decay_and_strip<_T2>::__type __ds_type2; > typedef pair<__ds_type1, __ds_type2> __pair_type; > return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); > } ># 942 "/usr/include/c++/13/bits/stl_pair.h" 3 > 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 > { return __pair.first; } > > template<typename _Tp1, typename _Tp2> > static constexpr _Tp1&& > __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept > { return std::forward<_Tp1>(__pair.first); } > > template<typename _Tp1, typename _Tp2> > static constexpr const _Tp1& > __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept > { return __pair.first; } > > template<typename _Tp1, typename _Tp2> > static constexpr const _Tp1&& > __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept > { return std::forward<const _Tp1>(__pair.first); } > }; > > template<> > struct __pair_get<1> > { > template<typename _Tp1, typename _Tp2> > static constexpr _Tp2& > __get(pair<_Tp1, _Tp2>& __pair) noexcept > { return __pair.second; } > > template<typename _Tp1, typename _Tp2> > static constexpr _Tp2&& > __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept > { return std::forward<_Tp2>(__pair.second); } > > template<typename _Tp1, typename _Tp2> > static constexpr const _Tp2& > __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept > { return __pair.second; } > > template<typename _Tp1, typename _Tp2> > static constexpr const _Tp2&& > __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept > { return std::forward<const _Tp2>(__pair.second); } > }; > > > > > > > template<size_t _Int, class _Tp1, class _Tp2> > constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& > get(pair<_Tp1, _Tp2>& __in) noexcept > { return __pair_get<_Int>::__get(__in); } > > template<size_t _Int, class _Tp1, class _Tp2> > constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& > get(pair<_Tp1, _Tp2>&& __in) noexcept > { return __pair_get<_Int>::__move_get(std::move(__in)); } > > 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 > { return __pair_get<_Int>::__const_get(__in); } > > 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 > { return __pair_get<_Int>::__const_move_get(std::move(__in)); } > > > > > > template <typename _Tp, typename _Up> > constexpr _Tp& > get(pair<_Tp, _Up>& __p) noexcept > { return __p.first; } > > template <typename _Tp, typename _Up> > constexpr const _Tp& > get(const pair<_Tp, _Up>& __p) noexcept > { return __p.first; } > > template <typename _Tp, typename _Up> > constexpr _Tp&& > get(pair<_Tp, _Up>&& __p) noexcept > { return std::move(__p.first); } > > template <typename _Tp, typename _Up> > constexpr const _Tp&& > get(const pair<_Tp, _Up>&& __p) noexcept > { return std::move(__p.first); } > > template <typename _Tp, typename _Up> > constexpr _Tp& > get(pair<_Up, _Tp>& __p) noexcept > { return __p.second; } > > template <typename _Tp, typename _Up> > constexpr const _Tp& > get(const pair<_Up, _Tp>& __p) noexcept > { return __p.second; } > > template <typename _Tp, typename _Up> > constexpr _Tp&& > get(pair<_Up, _Tp>&& __p) noexcept > { return std::move(__p.second); } > > template <typename _Tp, typename _Up> > constexpr const _Tp&& > get(const pair<_Up, _Tp>&& __p) noexcept > { return std::move(__p.second); } ># 1118 "/usr/include/c++/13/bits/stl_pair.h" 3 > >} ># 65 "/usr/include/c++/13/bits/stl_algobase.h" 2 3 > > > > ># 1 "/usr/include/c++/13/debug/debug.h" 1 3 ># 48 "/usr/include/c++/13/debug/debug.h" 3 >namespace std >{ > namespace __debug { } >} > > > > >namespace __gnu_debug >{ > using namespace std::__debug; > > template<typename _Ite, typename _Seq, typename _Cat> > struct _Safe_iterator; >} ># 70 "/usr/include/c++/13/bits/stl_algobase.h" 2 3 > ># 1 "/usr/include/c++/13/bits/predefined_ops.h" 1 3 ># 35 "/usr/include/c++/13/bits/predefined_ops.h" 3 >namespace __gnu_cxx >{ >namespace __ops >{ > struct _Iter_less_iter > { > template<typename _Iterator1, typename _Iterator2> > constexpr > bool > operator()(_Iterator1 __it1, _Iterator2 __it2) const > { return *__it1 < *__it2; } > }; > > constexpr > inline _Iter_less_iter > __iter_less_iter() > { return _Iter_less_iter(); } > > struct _Iter_less_val > { > > constexpr _Iter_less_val() = default; > > > > > > explicit > _Iter_less_val(_Iter_less_iter) { } > > template<typename _Iterator, typename _Value> > > bool > operator()(_Iterator __it, _Value& __val) const > { return *__it < __val; } > }; > > > inline _Iter_less_val > __iter_less_val() > { return _Iter_less_val(); } > > > inline _Iter_less_val > __iter_comp_val(_Iter_less_iter) > { return _Iter_less_val(); } > > struct _Val_less_iter > { > > constexpr _Val_less_iter() = default; > > > > > > explicit > _Val_less_iter(_Iter_less_iter) { } > > template<typename _Value, typename _Iterator> > > bool > operator()(_Value& __val, _Iterator __it) const > { return __val < *__it; } > }; > > > inline _Val_less_iter > __val_less_iter() > { return _Val_less_iter(); } > > > inline _Val_less_iter > __val_comp_iter(_Iter_less_iter) > { return _Val_less_iter(); } > > struct _Iter_equal_to_iter > { > template<typename _Iterator1, typename _Iterator2> > > bool > operator()(_Iterator1 __it1, _Iterator2 __it2) const > { return *__it1 == *__it2; } > }; > > > inline _Iter_equal_to_iter > __iter_equal_to_iter() > { return _Iter_equal_to_iter(); } > > struct _Iter_equal_to_val > { > template<typename _Iterator, typename _Value> > > bool > operator()(_Iterator __it, _Value& __val) const > { return *__it == __val; } > }; > > > inline _Iter_equal_to_val > __iter_equal_to_val() > { return _Iter_equal_to_val(); } > > > inline _Iter_equal_to_val > __iter_comp_val(_Iter_equal_to_iter) > { return _Iter_equal_to_val(); } > > template<typename _Compare> > struct _Iter_comp_iter > { > _Compare _M_comp; > > explicit constexpr > _Iter_comp_iter(_Compare __comp) > : _M_comp(std::move(__comp)) > { } > > template<typename _Iterator1, typename _Iterator2> > constexpr > bool > operator()(_Iterator1 __it1, _Iterator2 __it2) > { return bool(_M_comp(*__it1, *__it2)); } > }; > > template<typename _Compare> > constexpr > inline _Iter_comp_iter<_Compare> > __iter_comp_iter(_Compare __comp) > { return _Iter_comp_iter<_Compare>(std::move(__comp)); } > > template<typename _Compare> > struct _Iter_comp_val > { > _Compare _M_comp; > > > explicit > _Iter_comp_val(_Compare __comp) > : _M_comp(std::move(__comp)) > { } > > > explicit > _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) > : _M_comp(__comp._M_comp) > { } > > > > explicit > _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) > : _M_comp(std::move(__comp._M_comp)) > { } > > > template<typename _Iterator, typename _Value> > > bool > operator()(_Iterator __it, _Value& __val) > { return bool(_M_comp(*__it, __val)); } > }; > > template<typename _Compare> > > inline _Iter_comp_val<_Compare> > __iter_comp_val(_Compare __comp) > { return _Iter_comp_val<_Compare>(std::move(__comp)); } > > template<typename _Compare> > > inline _Iter_comp_val<_Compare> > __iter_comp_val(_Iter_comp_iter<_Compare> __comp) > { return _Iter_comp_val<_Compare>(std::move(__comp)); } > > template<typename _Compare> > struct _Val_comp_iter > { > _Compare _M_comp; > > > explicit > _Val_comp_iter(_Compare __comp) > : _M_comp(std::move(__comp)) > { } > > > explicit > _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) > : _M_comp(__comp._M_comp) > { } > > > > explicit > _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) > : _M_comp(std::move(__comp._M_comp)) > { } > > > template<typename _Value, typename _Iterator> > > bool > operator()(_Value& __val, _Iterator __it) > { return bool(_M_comp(__val, *__it)); } > }; > > template<typename _Compare> > > inline _Val_comp_iter<_Compare> > __val_comp_iter(_Compare __comp) > { return _Val_comp_iter<_Compare>(std::move(__comp)); } > > template<typename _Compare> > > inline _Val_comp_iter<_Compare> > __val_comp_iter(_Iter_comp_iter<_Compare> __comp) > { return _Val_comp_iter<_Compare>(std::move(__comp)); } > > template<typename _Value> > struct _Iter_equals_val > { > _Value& _M_value; > > > explicit > _Iter_equals_val(_Value& __value) > : _M_value(__value) > { } > > template<typename _Iterator> > > bool > operator()(_Iterator __it) > { return *__it == _M_value; } > }; > > template<typename _Value> > > inline _Iter_equals_val<_Value> > __iter_equals_val(_Value& __val) > { return _Iter_equals_val<_Value>(__val); } > > template<typename _Iterator1> > struct _Iter_equals_iter > { > _Iterator1 _M_it1; > > > explicit > _Iter_equals_iter(_Iterator1 __it1) > : _M_it1(__it1) > { } > > template<typename _Iterator2> > > bool > operator()(_Iterator2 __it2) > { return *__it2 == *_M_it1; } > }; > > template<typename _Iterator> > > inline _Iter_equals_iter<_Iterator> > __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) > { return _Iter_equals_iter<_Iterator>(__it); } > > template<typename _Predicate> > struct _Iter_pred > { > _Predicate _M_pred; > > > explicit > _Iter_pred(_Predicate __pred) > : _M_pred(std::move(__pred)) > { } > > template<typename _Iterator> > > bool > operator()(_Iterator __it) > { return bool(_M_pred(*__it)); } > }; > > template<typename _Predicate> > > inline _Iter_pred<_Predicate> > __pred_iter(_Predicate __pred) > { return _Iter_pred<_Predicate>(std::move(__pred)); } > > template<typename _Compare, typename _Value> > struct _Iter_comp_to_val > { > _Compare _M_comp; > _Value& _M_value; > > > _Iter_comp_to_val(_Compare __comp, _Value& __value) > : _M_comp(std::move(__comp)), _M_value(__value) > { } > > template<typename _Iterator> > > bool > operator()(_Iterator __it) > { return bool(_M_comp(*__it, _M_value)); } > }; > > template<typename _Compare, typename _Value> > _Iter_comp_to_val<_Compare, _Value> > > __iter_comp_val(_Compare __comp, _Value &__val) > { > return _Iter_comp_to_val<_Compare, _Value>(std::move(__comp), __val); > } > > template<typename _Compare, typename _Iterator1> > struct _Iter_comp_to_iter > { > _Compare _M_comp; > _Iterator1 _M_it1; > > > _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) > : _M_comp(std::move(__comp)), _M_it1(__it1) > { } > > template<typename _Iterator2> > > bool > operator()(_Iterator2 __it2) > { return bool(_M_comp(*__it2, *_M_it1)); } > }; > > template<typename _Compare, typename _Iterator> > > inline _Iter_comp_to_iter<_Compare, _Iterator> > __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) > { > return _Iter_comp_to_iter<_Compare, _Iterator>( > std::move(__comp._M_comp), __it); > } > > template<typename _Predicate> > struct _Iter_negate > { > _Predicate _M_pred; > > > explicit > _Iter_negate(_Predicate __pred) > : _M_pred(std::move(__pred)) > { } > > template<typename _Iterator> > > bool > operator()(_Iterator __it) > { return !bool(_M_pred(*__it)); } > }; > > template<typename _Predicate> > > inline _Iter_negate<_Predicate> > __negate(_Iter_pred<_Predicate> __pred) > { return _Iter_negate<_Predicate>(std::move(__pred._M_pred)); } > >} >} ># 72 "/usr/include/c++/13/bits/stl_algobase.h" 2 3 > > > > ># 1 "/usr/include/c++/13/bit" 1 3 ># 32 "/usr/include/c++/13/bit" 3 > ># 33 "/usr/include/c++/13/bit" 3 ># 55 "/usr/include/c++/13/bit" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 149 "/usr/include/c++/13/bit" 3 > template<typename _Tp> > constexpr _Tp > __rotl(_Tp __x, int __s) noexcept > { > constexpr auto _Nd = __gnu_cxx::__int_traits<_Tp>::__digits; > if constexpr ((_Nd & (_Nd - 1)) == 0) > { > > > constexpr unsigned __uNd = _Nd; > const unsigned __r = __s; > return (__x << (__r % __uNd)) | (__x >> ((-__r) % __uNd)); > } > const int __r = __s % _Nd; > if (__r == 0) > return __x; > else if (__r > 0) > return (__x << __r) | (__x >> ((_Nd - __r) % _Nd)); > else > return (__x >> -__r) | (__x << ((_Nd + __r) % _Nd)); > } > > template<typename _Tp> > constexpr _Tp > __rotr(_Tp __x, int __s) noexcept > { > constexpr auto _Nd = __gnu_cxx::__int_traits<_Tp>::__digits; > if constexpr ((_Nd & (_Nd - 1)) == 0) > { > > > constexpr unsigned __uNd = _Nd; > const unsigned __r = __s; > return (__x >> (__r % __uNd)) | (__x << ((-__r) % __uNd)); > } > const int __r = __s % _Nd; > if (__r == 0) > return __x; > else if (__r > 0) > return (__x >> __r) | (__x << ((_Nd - __r) % _Nd)); > else > return (__x << -__r) | (__x >> ((_Nd + __r) % _Nd)); > } > > template<typename _Tp> > constexpr int > __countl_zero(_Tp __x) noexcept > { > using __gnu_cxx::__int_traits; > constexpr auto _Nd = __int_traits<_Tp>::__digits; > > if (__x == 0) > return _Nd; > > constexpr auto _Nd_ull = __int_traits<unsigned long long>::__digits; > constexpr auto _Nd_ul = __int_traits<unsigned long>::__digits; > constexpr auto _Nd_u = __int_traits<unsigned>::__digits; > > if constexpr (_Nd <= _Nd_u) > { > constexpr int __diff = _Nd_u - _Nd; > return __builtin_clz(__x) - __diff; > } > else if constexpr (_Nd <= _Nd_ul) > { > constexpr int __diff = _Nd_ul - _Nd; > return __builtin_clzl(__x) - __diff; > } > else if constexpr (_Nd <= _Nd_ull) > { > constexpr int __diff = _Nd_ull - _Nd; > return __builtin_clzll(__x) - __diff; > } > else > { > static_assert(_Nd <= (2 * _Nd_ull), > "Maximum supported integer size is 128-bit"); > > unsigned long long __high = __x >> _Nd_ull; > if (__high != 0) > { > constexpr int __diff = (2 * _Nd_ull) - _Nd; > return __builtin_clzll(__high) - __diff; > } > constexpr auto __max_ull = __int_traits<unsigned long long>::__max; > unsigned long long __low = __x & __max_ull; > return (_Nd - _Nd_ull) + __builtin_clzll(__low); > } > } > > template<typename _Tp> > constexpr int > __countl_one(_Tp __x) noexcept > { > return std::__countl_zero<_Tp>((_Tp)~__x); > } > > template<typename _Tp> > constexpr int > __countr_zero(_Tp __x) noexcept > { > using __gnu_cxx::__int_traits; > constexpr auto _Nd = __int_traits<_Tp>::__digits; > > if (__x == 0) > return _Nd; > > constexpr auto _Nd_ull = __int_traits<unsigned long long>::__digits; > constexpr auto _Nd_ul = __int_traits<unsigned long>::__digits; > constexpr auto _Nd_u = __int_traits<unsigned>::__digits; > > if constexpr (_Nd <= _Nd_u) > return __builtin_ctz(__x); > else if constexpr (_Nd <= _Nd_ul) > return __builtin_ctzl(__x); > else if constexpr (_Nd <= _Nd_ull) > return __builtin_ctzll(__x); > else > { > static_assert(_Nd <= (2 * _Nd_ull), > "Maximum supported integer size is 128-bit"); > > constexpr auto __max_ull = __int_traits<unsigned long long>::__max; > unsigned long long __low = __x & __max_ull; > if (__low != 0) > return __builtin_ctzll(__low); > unsigned long long __high = __x >> _Nd_ull; > return __builtin_ctzll(__high) + _Nd_ull; > } > } > > template<typename _Tp> > constexpr int > __countr_one(_Tp __x) noexcept > { > return std::__countr_zero((_Tp)~__x); > } > > template<typename _Tp> > constexpr int > __popcount(_Tp __x) noexcept > { > using __gnu_cxx::__int_traits; > constexpr auto _Nd = __int_traits<_Tp>::__digits; > > constexpr auto _Nd_ull = __int_traits<unsigned long long>::__digits; > constexpr auto _Nd_ul = __int_traits<unsigned long>::__digits; > constexpr auto _Nd_u = __int_traits<unsigned>::__digits; > > if constexpr (_Nd <= _Nd_u) > return __builtin_popcount(__x); > else if constexpr (_Nd <= _Nd_ul) > return __builtin_popcountl(__x); > else if constexpr (_Nd <= _Nd_ull) > return __builtin_popcountll(__x); > else > { > static_assert(_Nd <= (2 * _Nd_ull), > "Maximum supported integer size is 128-bit"); > > constexpr auto __max_ull = __int_traits<unsigned long long>::__max; > unsigned long long __low = __x & __max_ull; > unsigned long long __high = __x >> _Nd_ull; > return __builtin_popcountll(__low) + __builtin_popcountll(__high); > } > } > > template<typename _Tp> > constexpr bool > __has_single_bit(_Tp __x) noexcept > { return std::__popcount(__x) == 1; } > > template<typename _Tp> > constexpr _Tp > __bit_ceil(_Tp __x) noexcept > { > using __gnu_cxx::__int_traits; > constexpr auto _Nd = __int_traits<_Tp>::__digits; > if (__x == 0 || __x == 1) > return 1; > auto __shift_exponent = _Nd - std::__countl_zero((_Tp)(__x - 1u)); > > > > > if (!std::__is_constant_evaluated()) > { > do { if (std::__is_constant_evaluated() && !bool(__shift_exponent != __int_traits<_Tp>::__digits)) __builtin_unreachable(); } while (false); > } > > using __promoted_type = decltype(__x << 1); > if constexpr (!is_same<__promoted_type, _Tp>::value) > { > > > > > > const int __extra_exp = sizeof(__promoted_type) / sizeof(_Tp) / 2; > __shift_exponent |= (__shift_exponent & _Nd) << __extra_exp; > } > return (_Tp)1u << __shift_exponent; > } > > template<typename _Tp> > constexpr _Tp > __bit_floor(_Tp __x) noexcept > { > constexpr auto _Nd = __gnu_cxx::__int_traits<_Tp>::__digits; > if (__x == 0) > return 0; > return (_Tp)1u << (_Nd - std::__countl_zero((_Tp)(__x >> 1))); > } > > template<typename _Tp> > constexpr int > __bit_width(_Tp __x) noexcept > { > constexpr auto _Nd = __gnu_cxx::__int_traits<_Tp>::__digits; > return _Nd - std::__countl_zero(__x); > } ># 478 "/usr/include/c++/13/bit" 3 > >} ># 77 "/usr/include/c++/13/bits/stl_algobase.h" 2 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > template<typename _Tp, typename _Up> > constexpr > inline int > __memcmp(const _Tp* __first1, const _Up* __first2, size_t __num) > { > > static_assert(sizeof(_Tp) == sizeof(_Up), "can be compared with memcmp"); ># 108 "/usr/include/c++/13/bits/stl_algobase.h" 3 > return __builtin_memcmp(__first1, __first2, sizeof(_Tp) * __num); > } ># 152 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > > inline void > iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) > { > > > > ># 185 "/usr/include/c++/13/bits/stl_algobase.h" 3 > swap(*__a, *__b); > > } ># 201 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > > _ForwardIterator2 > swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2) > { > > > > > > ; > > for (; __first1 != __last1; ++__first1, (void)++__first2) > std::iter_swap(__first1, __first2); > return __first2; > } ># 230 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _Tp> > constexpr > inline const _Tp& > min(const _Tp& __a, const _Tp& __b) > { > > > > if (__b < __a) > return __b; > return __a; > } ># 254 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _Tp> > constexpr > inline const _Tp& > max(const _Tp& __a, const _Tp& __b) > { > > > > if (__a < __b) > return __b; > return __a; > } ># 278 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _Tp, typename _Compare> > constexpr > inline const _Tp& > min(const _Tp& __a, const _Tp& __b, _Compare __comp) > { > > if (__comp(__b, __a)) > return __b; > return __a; > } ># 300 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _Tp, typename _Compare> > constexpr > inline const _Tp& > max(const _Tp& __a, const _Tp& __b, _Compare __comp) > { > > if (__comp(__a, __b)) > return __b; > return __a; > } > > > > template<typename _Iterator> > > inline _Iterator > __niter_base(_Iterator __it) > noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) > { return __it; } > > 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> > > inline _From > __niter_wrap(_From __from, _To __res) > { return __from + (__res - std::__niter_base(__from)); } > > > template<typename _Iterator> > > inline _Iterator > __niter_wrap(const _Iterator&, _Iterator __res) > { return __res; } > > > > > > > > template<bool _IsMove, bool _IsSimple, typename _Category> > struct __copy_move > { > template<typename _II, typename _OI> > > static _OI > __copy_m(_II __first, _II __last, _OI __result) > { > for (; __first != __last; ++__result, (void)++__first) > *__result = *__first; > return __result; > } > }; > > > template<typename _Category> > struct __copy_move<true, false, _Category> > { > template<typename _II, typename _OI> > > static _OI > __copy_m(_II __first, _II __last, _OI __result) > { > for (; __first != __last; ++__result, (void)++__first) > *__result = std::move(*__first); > return __result; > } > }; > > > template<> > struct __copy_move<false, false, random_access_iterator_tag> > { > template<typename _II, typename _OI> > > static _OI > __copy_m(_II __first, _II __last, _OI __result) > { > typedef typename iterator_traits<_II>::difference_type _Distance; > for(_Distance __n = __last - __first; __n > 0; --__n) > { > *__result = *__first; > ++__first; > ++__result; > } > return __result; > } > > template<typename _Tp, typename _Up> > static void > __assign_one(_Tp* __to, _Up* __from) > { *__to = *__from; } > }; > > > template<> > struct __copy_move<true, false, random_access_iterator_tag> > { > template<typename _II, typename _OI> > > static _OI > __copy_m(_II __first, _II __last, _OI __result) > { > typedef typename iterator_traits<_II>::difference_type _Distance; > for(_Distance __n = __last - __first; __n > 0; --__n) > { > *__result = std::move(*__first); > ++__first; > ++__result; > } > return __result; > } > > template<typename _Tp, typename _Up> > static void > __assign_one(_Tp* __to, _Up* __from) > { *__to = std::move(*__from); } > }; > > > template<bool _IsMove> > struct __copy_move<_IsMove, true, random_access_iterator_tag> > { > template<typename _Tp, typename _Up> > > static _Up* > __copy_m(_Tp* __first, _Tp* __last, _Up* __result) > { > const ptrdiff_t _Num = __last - __first; > if (__builtin_expect(_Num > 1, true)) > __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); > else if (_Num == 1) > std::__copy_move<_IsMove, false, random_access_iterator_tag>:: > __assign_one(__result, __first); > return __result + _Num; > } > }; > > > > 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> > > inline _OI > __copy_move_a2(_II __first, _II __last, _OI __result) > { > typedef typename iterator_traits<_II>::iterator_category _Category; > > > > > > return std::__copy_move<_IsMove, __memcpyable<_OI, _II>::__value, > _Category>::__copy_m(__first, __last, __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> > > inline _OI > __copy_move_a1(_II __first, _II __last, _OI __result) > { return std::__copy_move_a2<_IsMove>(__first, __last, __result); } > > template<bool _IsMove, typename _II, typename _OI> > > inline _OI > __copy_move_a(_II __first, _II __last, _OI __result) > { > return std::__niter_wrap(__result, > std::__copy_move_a1<_IsMove>(std::__niter_base(__first), > std::__niter_base(__last), > std::__niter_base(__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> > > _OutputIterator > __copy_n_a(_InputIterator __first, _Size __n, _OutputIterator __result, > bool) > { > if (__n > 0) > { > while (true) > { > *__result = *__first; > ++__result; > if (--__n > 0) > ++__first; > else > break; > } > } > return __result; > } > > > 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); ># 621 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _II, typename _OI> > > inline _OI > copy(_II __first, _II __last, _OI __result) > { > > > > > ; > > return std::__copy_move_a<__is_move_iterator<_II>::__value> > (std::__miter_base(__first), std::__miter_base(__last), __result); > } ># 654 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _II, typename _OI> > > inline _OI > move(_II __first, _II __last, _OI __result) > { > > > > > ; > > return std::__copy_move_a<true>(std::__miter_base(__first), > std::__miter_base(__last), __result); > } > > > > > > > template<bool _IsMove, bool _IsSimple, typename _Category> > struct __copy_move_backward > { > template<typename _BI1, typename _BI2> > > static _BI2 > __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) > { > while (__first != __last) > *--__result = *--__last; > return __result; > } > }; > > > template<typename _Category> > struct __copy_move_backward<true, false, _Category> > { > template<typename _BI1, typename _BI2> > > static _BI2 > __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) > { > while (__first != __last) > *--__result = std::move(*--__last); > return __result; > } > }; > > > template<> > struct __copy_move_backward<false, false, random_access_iterator_tag> > { > template<typename _BI1, typename _BI2> > > static _BI2 > __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) > { > typename iterator_traits<_BI1>::difference_type > __n = __last - __first; > for (; __n > 0; --__n) > *--__result = *--__last; > return __result; > } > }; > > > template<> > struct __copy_move_backward<true, false, random_access_iterator_tag> > { > template<typename _BI1, typename _BI2> > > static _BI2 > __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) > { > typename iterator_traits<_BI1>::difference_type > __n = __last - __first; > for (; __n > 0; --__n) > *--__result = std::move(*--__last); > return __result; > } > }; > > > template<bool _IsMove> > struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> > { > template<typename _Tp, typename _Up> > > static _Up* > __copy_move_b(_Tp* __first, _Tp* __last, _Up* __result) > { > const ptrdiff_t _Num = __last - __first; > if (__builtin_expect(_Num > 1, true)) > __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); > else if (_Num == 1) > std::__copy_move<_IsMove, false, random_access_iterator_tag>:: > __assign_one(__result - 1, __first); > return __result - _Num; > } > }; > > template<bool _IsMove, typename _BI1, typename _BI2> > > inline _BI2 > __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) > { > typedef typename iterator_traits<_BI1>::iterator_category _Category; > > > > > > return std::__copy_move_backward<_IsMove, > __memcpyable<_BI2, _BI1>::__value, > _Category>::__copy_move_b(__first, > __last, > __result); > } > > template<bool _IsMove, typename _BI1, typename _BI2> > > inline _BI2 > __copy_move_backward_a1(_BI1 __first, _BI1 __last, _BI2 __result) > { return std::__copy_move_backward_a2<_IsMove>(__first, __last, __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> > > inline _OI > __copy_move_backward_a(_II __first, _II __last, _OI __result) > { > return std::__niter_wrap(__result, > std::__copy_move_backward_a1<_IsMove> > (std::__niter_base(__first), std::__niter_base(__last), > std::__niter_base(__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>&); ># 854 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _BI1, typename _BI2> > > inline _BI2 > copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) > { > > > > > > ; > > return std::__copy_move_backward_a<__is_move_iterator<_BI1>::__value> > (std::__miter_base(__first), std::__miter_base(__last), __result); > } ># 889 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _BI1, typename _BI2> > > inline _BI2 > move_backward(_BI1 __first, _BI1 __last, _BI2 __result) > { > > > > > > ; > > return std::__copy_move_backward_a<true>(std::__miter_base(__first), > std::__miter_base(__last), > __result); > } > > > > > > > template<typename _ForwardIterator, typename _Tp> > > inline typename > __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type > __fill_a1(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __value) > { > for (; __first != __last; ++__first) > *__first = __value; > } > > template<typename _ForwardIterator, typename _Tp> > > inline typename > __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type > __fill_a1(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __value) > { > const _Tp __tmp = __value; > for (; __first != __last; ++__first) > *__first = __tmp; > } > > > template<typename _Tp> > > inline typename > __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type > __fill_a1(_Tp* __first, _Tp* __last, const _Tp& __c) > { > const _Tp __tmp = __c; ># 950 "/usr/include/c++/13/bits/stl_algobase.h" 3 > if (const size_t __len = __last - __first) > __builtin_memset(__first, static_cast<unsigned char>(__tmp), __len); > } > > template<typename _Ite, typename _Cont, typename _Tp> > > inline void > __fill_a1(::__gnu_cxx::__normal_iterator<_Ite, _Cont> __first, > ::__gnu_cxx::__normal_iterator<_Ite, _Cont> __last, > const _Tp& __value) > { std::__fill_a1(__first.base(), __last.base(), __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&); > > > void > __fill_a1(std::_Bit_iterator, std::_Bit_iterator, > const bool&); > > template<typename _FIte, typename _Tp> > > inline void > __fill_a(_FIte __first, _FIte __last, const _Tp& __value) > { std::__fill_a1(__first, __last, __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&); ># 997 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _ForwardIterator, typename _Tp> > > inline void > fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) > { > > > > ; > > std::__fill_a(__first, __last, __value); > } > > > inline constexpr int > __size_to_integer(int __n) { return __n; } > inline constexpr unsigned > __size_to_integer(unsigned __n) { return __n; } > inline constexpr long > __size_to_integer(long __n) { return __n; } > inline constexpr unsigned long > __size_to_integer(unsigned long __n) { return __n; } > inline constexpr long long > __size_to_integer(long long __n) { return __n; } > inline constexpr unsigned long long > __size_to_integer(unsigned long long __n) { return __n; } ># 1049 "/usr/include/c++/13/bits/stl_algobase.h" 3 > inline constexpr long long > __size_to_integer(float __n) { return (long long)__n; } > inline constexpr long long > __size_to_integer(double __n) { return (long long)__n; } > inline constexpr long long > __size_to_integer(long double __n) { return (long long)__n; } > > > > > > template<typename _OutputIterator, typename _Size, typename _Tp> > > inline typename > __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type > __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) > { > for (; __n > 0; --__n, (void) ++__first) > *__first = __value; > return __first; > } > > template<typename _OutputIterator, typename _Size, typename _Tp> > > inline typename > __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type > __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) > { > const _Tp __tmp = __value; > for (; __n > 0; --__n, (void) ++__first) > *__first = __tmp; > return __first; > } > > 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> > > inline _OutputIterator > __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, > std::output_iterator_tag) > { > > static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); > > return __fill_n_a1(__first, __n, __value); > } > > template<typename _OutputIterator, typename _Size, typename _Tp> > > inline _OutputIterator > __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, > std::input_iterator_tag) > { > > static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); > > return __fill_n_a1(__first, __n, __value); > } > > template<typename _OutputIterator, typename _Size, typename _Tp> > > inline _OutputIterator > __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, > std::random_access_iterator_tag) > { > > static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); > > if (__n <= 0) > return __first; > > ; > > std::__fill_a(__first, __first + __n, __value); > return __first + __n; > } ># 1149 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _OI, typename _Size, typename _Tp> > > inline _OI > fill_n(_OI __first, _Size __n, const _Tp& __value) > { > > > > return std::__fill_n_a(__first, std::__size_to_integer(__n), __value, > std::__iterator_category(__first)); > } > > template<bool _BoolType> > struct __equal > { > template<typename _II1, typename _II2> > > static bool > equal(_II1 __first1, _II1 __last1, _II2 __first2) > { > for (; __first1 != __last1; ++__first1, (void) ++__first2) > if (!(*__first1 == *__first2)) > return false; > return true; > } > }; > > template<> > struct __equal<true> > { > template<typename _Tp> > > static bool > equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) > { > if (const size_t __len = (__last1 - __first1)) > return !std::__memcmp(__first1, __first2, __len); > return true; > } > }; > > 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> > > inline bool > __equal_aux1(_II1 __first1, _II1 __last1, _II2 __first2) > { > typedef typename iterator_traits<_II1>::value_type _ValueType1; > const bool __simple = ((__is_integer<_ValueType1>::__value > || __is_pointer<_ValueType1>::__value) > && __memcmpable<_II1, _II2>::__value); > return std::__equal<__simple>::equal(__first1, __last1, __first2); > } > > template<typename _II1, typename _II2> > > inline bool > __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) > { > return std::__equal_aux1(std::__niter_base(__first1), > std::__niter_base(__last1), > std::__niter_base(__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> > > static _II1 > __newlast1(_II1, _II1 __last1, _II2, _II2) > { return __last1; } > > template<typename _II> > > static bool > __cnd2(_II __first, _II __last) > { return __first != __last; } > }; > > template<> > struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag> > { > template<typename _RAI1, typename _RAI2> > > static _RAI1 > __newlast1(_RAI1 __first1, _RAI1 __last1, > _RAI2 __first2, _RAI2 __last2) > { > const typename iterator_traits<_RAI1>::difference_type > __diff1 = __last1 - __first1; > const typename iterator_traits<_RAI2>::difference_type > __diff2 = __last2 - __first2; > return __diff2 < __diff1 ? __first1 + __diff2 : __last1; > } > > template<typename _RAI> > static bool > __cnd2(_RAI, _RAI) > { return true; } > }; > > template<typename _II1, typename _II2, typename _Compare> > > bool > __lexicographical_compare_impl(_II1 __first1, _II1 __last1, > _II2 __first2, _II2 __last2, > _Compare __comp) > { > typedef typename iterator_traits<_II1>::iterator_category _Category1; > typedef typename iterator_traits<_II2>::iterator_category _Category2; > typedef std::__lc_rai<_Category1, _Category2> __rai_type; > > __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); > for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); > ++__first1, (void)++__first2) > { > if (__comp(__first1, __first2)) > return true; > if (__comp(__first2, __first1)) > return false; > } > return __first1 == __last1 && __first2 != __last2; > } > > template<bool _BoolType> > struct __lexicographical_compare > { > template<typename _II1, typename _II2> > > static bool > __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) > { > using __gnu_cxx::__ops::__iter_less_iter; > return std::__lexicographical_compare_impl(__first1, __last1, > __first2, __last2, > __iter_less_iter()); > } > > template<typename _II1, typename _II2> > > static int > __3way(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) > { > while (__first1 != __last1) > { > if (__first2 == __last2) > return +1; > if (*__first1 < *__first2) > return -1; > if (*__first2 < *__first1) > return +1; > ++__first1; > ++__first2; > } > return int(__first2 == __last2) - 1; > } > }; > > template<> > struct __lexicographical_compare<true> > { > template<typename _Tp, typename _Up> > > static bool > __lc(const _Tp* __first1, const _Tp* __last1, > const _Up* __first2, const _Up* __last2) > { return __3way(__first1, __last1, __first2, __last2) < 0; } > > template<typename _Tp, typename _Up> > > static ptrdiff_t > __3way(const _Tp* __first1, const _Tp* __last1, > const _Up* __first2, const _Up* __last2) > { > const size_t __len1 = __last1 - __first1; > const size_t __len2 = __last2 - __first2; > if (const size_t __len = std::min(__len1, __len2)) > if (int __result = std::__memcmp(__first1, __first2, __len)) > return __result; > return ptrdiff_t(__len1 - __len2); > } > }; > > template<typename _II1, typename _II2> > > inline bool > __lexicographical_compare_aux1(_II1 __first1, _II1 __last1, > _II2 __first2, _II2 __last2) > { > typedef typename iterator_traits<_II1>::value_type _ValueType1; > typedef typename iterator_traits<_II2>::value_type _ValueType2; > const bool __simple = > (__is_memcmp_ordered_with<_ValueType1, _ValueType2>::__value > && __is_pointer<_II1>::__value > && __is_pointer<_II2>::__value > > > > > > > > ); > > return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, > __first2, __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> > > inline bool > __lexicographical_compare_aux(_II1 __first1, _II1 __last1, > _II2 __first2, _II2 __last2) > { > return std::__lexicographical_compare_aux1(std::__niter_base(__first1), > std::__niter_base(__last1), > std::__niter_base(__first2), > std::__niter_base(__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> > > _ForwardIterator > __lower_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > typedef typename iterator_traits<_ForwardIterator>::difference_type > _DistanceType; > > _DistanceType __len = std::distance(__first, __last); > > while (__len > 0) > { > _DistanceType __half = __len >> 1; > _ForwardIterator __middle = __first; > std::advance(__middle, __half); > if (__comp(__middle, __val)) > { > __first = __middle; > ++__first; > __len = __len - __half - 1; > } > else > __len = __half; > } > return __first; > } ># 1495 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _ForwardIterator, typename _Tp> > > inline _ForwardIterator > lower_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val) > { > > > > > ; > > return std::__lower_bound(__first, __last, __val, > __gnu_cxx::__ops::__iter_less_val()); > } > > > > template<typename _Tp> > inline constexpr _Tp > __lg(_Tp __n) > { > > return std::__bit_width(make_unsigned_t<_Tp>(__n)) - 1; ># 1531 "/usr/include/c++/13/bits/stl_algobase.h" 3 > } > > ># 1547 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _II1, typename _II2> > > inline bool > equal(_II1 __first1, _II1 __last1, _II2 __first2) > { > > > > > > > ; > > return std::__equal_aux(__first1, __last1, __first2); > } ># 1578 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> > > inline bool > equal(_IIter1 __first1, _IIter1 __last1, > _IIter2 __first2, _BinaryPredicate __binary_pred) > { > > > > ; > > for (; __first1 != __last1; ++__first1, (void)++__first2) > if (!bool(__binary_pred(*__first1, *__first2))) > return false; > return true; > } > > > > template<typename _II1, typename _II2> > > inline bool > __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) > { > using _RATag = random_access_iterator_tag; > using _Cat1 = typename iterator_traits<_II1>::iterator_category; > using _Cat2 = typename iterator_traits<_II2>::iterator_category; > using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>; > if (_RAIters()) > { > auto __d1 = std::distance(__first1, __last1); > auto __d2 = std::distance(__first2, __last2); > if (__d1 != __d2) > return false; > return std::equal(__first1, __last1, __first2); > } > > for (; __first1 != __last1 && __first2 != __last2; > ++__first1, (void)++__first2) > if (!(*__first1 == *__first2)) > return false; > return __first1 == __last1 && __first2 == __last2; > } > > > template<typename _II1, typename _II2, typename _BinaryPredicate> > > inline bool > __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, > _BinaryPredicate __binary_pred) > { > using _RATag = random_access_iterator_tag; > using _Cat1 = typename iterator_traits<_II1>::iterator_category; > using _Cat2 = typename iterator_traits<_II2>::iterator_category; > using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>; > if (_RAIters()) > { > auto __d1 = std::distance(__first1, __last1); > auto __d2 = std::distance(__first2, __last2); > if (__d1 != __d2) > return false; > return std::equal(__first1, __last1, __first2, > __binary_pred); > } > > for (; __first1 != __last1 && __first2 != __last2; > ++__first1, (void)++__first2) > if (!bool(__binary_pred(*__first1, *__first2))) > return false; > return __first1 == __last1 && __first2 == __last2; > } ># 1668 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _II1, typename _II2> > > inline bool > equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) > { > > > > > > > ; > ; > > return std::__equal4(__first1, __last1, __first2, __last2); > } ># 1701 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> > > inline bool > equal(_IIter1 __first1, _IIter1 __last1, > _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred) > { > > > > ; > ; > > return std::__equal4(__first1, __last1, __first2, __last2, > __binary_pred); > } ># 1733 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _II1, typename _II2> > > inline bool > lexicographical_compare(_II1 __first1, _II1 __last1, > _II2 __first2, _II2 __last2) > { > > > > > > > > > > ; > ; > > return std::__lexicographical_compare_aux(__first1, __last1, > __first2, __last2); > } ># 1768 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _II1, typename _II2, typename _Compare> > > inline bool > lexicographical_compare(_II1 __first1, _II1 __last1, > _II2 __first2, _II2 __last2, _Compare __comp) > { > > > > ; > ; > > return std::__lexicographical_compare_impl > (__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } ># 1880 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _BinaryPredicate> > > pair<_InputIterator1, _InputIterator2> > __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _BinaryPredicate __binary_pred) > { > while (__first1 != __last1 && __binary_pred(__first1, __first2)) > { > ++__first1; > ++__first2; > } > return pair<_InputIterator1, _InputIterator2>(__first1, __first2); > } ># 1908 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _InputIterator1, typename _InputIterator2> > > inline pair<_InputIterator1, _InputIterator2> > mismatch(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2) > { > > > > > > > ; > > return std::__mismatch(__first1, __last1, __first2, > __gnu_cxx::__ops::__iter_equal_to_iter()); > } ># 1942 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _BinaryPredicate> > > inline pair<_InputIterator1, _InputIterator2> > mismatch(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _BinaryPredicate __binary_pred) > { > > > > ; > > return std::__mismatch(__first1, __last1, __first2, > __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); > } > > > > template<typename _InputIterator1, typename _InputIterator2, > typename _BinaryPredicate> > > pair<_InputIterator1, _InputIterator2> > __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _BinaryPredicate __binary_pred) > { > while (__first1 != __last1 && __first2 != __last2 > && __binary_pred(__first1, __first2)) > { > ++__first1; > ++__first2; > } > return pair<_InputIterator1, _InputIterator2>(__first1, __first2); > } ># 1991 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _InputIterator1, typename _InputIterator2> > > inline pair<_InputIterator1, _InputIterator2> > mismatch(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2) > { > > > > > > > ; > ; > > return std::__mismatch(__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_equal_to_iter()); > } ># 2027 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _BinaryPredicate> > > inline pair<_InputIterator1, _InputIterator2> > mismatch(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _BinaryPredicate __binary_pred) > { > > > > ; > ; > > return std::__mismatch(__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); > } > > > > > > template<typename _InputIterator, typename _Predicate> > > inline _InputIterator > __find_if(_InputIterator __first, _InputIterator __last, > _Predicate __pred, input_iterator_tag) > { > while (__first != __last && !__pred(__first)) > ++__first; > return __first; > } > > > template<typename _RandomAccessIterator, typename _Predicate> > > _RandomAccessIterator > __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Predicate __pred, random_access_iterator_tag) > { > typename iterator_traits<_RandomAccessIterator>::difference_type > __trip_count = (__last - __first) >> 2; > > for (; __trip_count > 0; --__trip_count) > { > if (__pred(__first)) > return __first; > ++__first; > > if (__pred(__first)) > return __first; > ++__first; > > if (__pred(__first)) > return __first; > ++__first; > > if (__pred(__first)) > return __first; > ++__first; > } > > switch (__last - __first) > { > case 3: > if (__pred(__first)) > return __first; > ++__first; > > case 2: > if (__pred(__first)) > return __first; > ++__first; > > case 1: > if (__pred(__first)) > return __first; > ++__first; > > case 0: > default: > return __last; > } > } > > template<typename _Iterator, typename _Predicate> > > inline _Iterator > __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) > { > return __find_if(__first, __last, __pred, > std::__iterator_category(__first)); > } > > template<typename _InputIterator, typename _Predicate> > > typename iterator_traits<_InputIterator>::difference_type > __count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) > { > typename iterator_traits<_InputIterator>::difference_type __n = 0; > for (; __first != __last; ++__first) > if (__pred(__first)) > ++__n; > return __n; > } > > template<typename _ForwardIterator, typename _Predicate> > > _ForwardIterator > __remove_if(_ForwardIterator __first, _ForwardIterator __last, > _Predicate __pred) > { > __first = std::__find_if(__first, __last, __pred); > if (__first == __last) > return __first; > _ForwardIterator __result = __first; > ++__first; > for (; __first != __last; ++__first) > if (!__pred(__first)) > { > *__result = std::move(*__first); > ++__result; > } > return __result; > } > > > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > > bool > __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _BinaryPredicate __pred) > { > > > for (; __first1 != __last1; ++__first1, (void)++__first2) > if (!__pred(__first1, __first2)) > break; > > if (__first1 == __last1) > return true; > > > > _ForwardIterator2 __last2 = __first2; > std::advance(__last2, std::distance(__first1, __last1)); > for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) > { > if (__scan != std::__find_if(__first1, __scan, > __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) > continue; > > auto __matches > = std::__count_if(__first2, __last2, > __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); > if (0 == __matches || > std::__count_if(__scan, __last1, > __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) > != __matches) > return false; > } > return true; > } ># 2204 "/usr/include/c++/13/bits/stl_algobase.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > > inline bool > is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2) > { > > > > > > > ; > > return std::__is_permutation(__first1, __last1, __first2, > __gnu_cxx::__ops::__iter_equal_to_iter()); > } > > > >} ># 52 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/refwrap.h" 1 3 ># 33 "/usr/include/c++/13/bits/refwrap.h" 3 > ># 34 "/usr/include/c++/13/bits/refwrap.h" 3 > > > > ># 1 "/usr/include/c++/13/bits/invoke.h" 1 3 ># 33 "/usr/include/c++/13/bits/invoke.h" 3 > ># 34 "/usr/include/c++/13/bits/invoke.h" 3 ># 42 "/usr/include/c++/13/bits/invoke.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 53 "/usr/include/c++/13/bits/invoke.h" 3 > template<typename _Tp, typename _Up = typename __inv_unwrap<_Tp>::type> > constexpr _Up&& > __invfwd(typename remove_reference<_Tp>::type& __t) noexcept > { return static_cast<_Up&&>(__t); } > > template<typename _Res, typename _Fn, typename... _Args> > constexpr _Res > __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) > { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } > > template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> > constexpr _Res > __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, > _Args&&... __args) > { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } > > template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> > constexpr _Res > __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, > _Args&&... __args) > { > return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); > } > > template<typename _Res, typename _MemPtr, typename _Tp> > constexpr _Res > __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) > { return __invfwd<_Tp>(__t).*__f; } > > template<typename _Res, typename _MemPtr, typename _Tp> > constexpr _Res > __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) > { return (*std::forward<_Tp>(__t)).*__f; } > > > template<typename _Callable, typename... _Args> > constexpr typename __invoke_result<_Callable, _Args...>::type > __invoke(_Callable&& __fn, _Args&&... __args) > noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) > { > using __result = __invoke_result<_Callable, _Args...>; > using __type = typename __result::type; > using __tag = typename __result::__invoke_type; > return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), > std::forward<_Args>(__args)...); > } > > > > 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...>) > { > using __result = __invoke_result<_Callable, _Args...>; > using __type = typename __result::type; > using __tag = typename __result::__invoke_type; > if constexpr (is_void_v<_Res>) > std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), > std::forward<_Args>(__args)...); > else > return std::__invoke_impl<__type>(__tag{}, > std::forward<_Callable>(__fn), > std::forward<_Args>(__args)...); > } ># 155 "/usr/include/c++/13/bits/invoke.h" 3 > >} ># 39 "/usr/include/c++/13/bits/refwrap.h" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 52 "/usr/include/c++/13/bits/refwrap.h" 3 > 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)>; > }; ># 103 "/usr/include/c++/13/bits/refwrap.h" 3 >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, typename = __void_t<>> > struct _Refwrap_base_arg1 > { }; > > > template<typename _Tp> > struct _Refwrap_base_arg1<_Tp, > __void_t<typename _Tp::argument_type>> > { > typedef typename _Tp::argument_type argument_type; > }; > > > template<typename _Tp, typename = __void_t<>> > struct _Refwrap_base_arg2 > { }; > > > template<typename _Tp> > struct _Refwrap_base_arg2<_Tp, > __void_t<typename _Tp::first_argument_type, > typename _Tp::second_argument_type>> > { > typedef typename _Tp::first_argument_type first_argument_type; > typedef typename _Tp::second_argument_type second_argument_type; > }; > > > > > > > > template<typename _Tp> > struct _Reference_wrapper_base > : _Weak_result_type<_Tp>, _Refwrap_base_arg1<_Tp>, _Refwrap_base_arg2<_Tp> > { }; > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > > > template<typename _Res, typename _T1 , bool _NE> > struct _Reference_wrapper_base<_Res(_T1) noexcept (_NE)> > : unary_function<_T1, _Res> > { }; > > template<typename _Res, typename _T1> > struct _Reference_wrapper_base<_Res(_T1) const> > : unary_function<_T1, _Res> > { }; > > template<typename _Res, typename _T1> > struct _Reference_wrapper_base<_Res(_T1) volatile> > : unary_function<_T1, _Res> > { }; > > template<typename _Res, typename _T1> > struct _Reference_wrapper_base<_Res(_T1) const volatile> > : unary_function<_T1, _Res> > { }; > > > template<typename _Res, typename _T1, typename _T2 , bool _NE> > struct _Reference_wrapper_base<_Res(_T1, _T2) noexcept (_NE)> > : binary_function<_T1, _T2, _Res> > { }; > > template<typename _Res, typename _T1, typename _T2> > struct _Reference_wrapper_base<_Res(_T1, _T2) const> > : binary_function<_T1, _T2, _Res> > { }; > > template<typename _Res, typename _T1, typename _T2> > struct _Reference_wrapper_base<_Res(_T1, _T2) volatile> > : binary_function<_T1, _T2, _Res> > { }; > > template<typename _Res, typename _T1, typename _T2> > struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile> > : binary_function<_T1, _T2, _Res> > { }; > > > template<typename _Res, typename _T1 , bool _NE> > struct _Reference_wrapper_base<_Res(*)(_T1) noexcept (_NE)> > : unary_function<_T1, _Res> > { }; > > > template<typename _Res, typename _T1, typename _T2 , bool _NE> > struct _Reference_wrapper_base<_Res(*)(_T1, _T2) noexcept (_NE)> > : binary_function<_T1, _T2, _Res> > { }; > > template<typename _Tp, bool = is_member_function_pointer<_Tp>::value> > struct _Reference_wrapper_base_memfun > : _Reference_wrapper_base<_Tp> > { }; > > template<typename _MemFunPtr> > struct _Reference_wrapper_base_memfun<_MemFunPtr, true> > : _Mem_fn_traits<_MemFunPtr>::__maybe_type > { > using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; > }; >#pragma GCC diagnostic pop ># 302 "/usr/include/c++/13/bits/refwrap.h" 3 > template<typename _Tp> > class reference_wrapper > > > > : public _Reference_wrapper_base_memfun<typename remove_cv<_Tp>::type> > > { > _Tp* _M_data; > > > static _Tp* _S_fun(_Tp& __r) noexcept { return std::__addressof(__r); } > > 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>()))> > > reference_wrapper(_Up&& __uref) > noexcept(noexcept(reference_wrapper::_S_fun(std::declval<_Up>()))) > : _M_data(reference_wrapper::_S_fun(std::forward<_Up>(__uref))) > { } > > reference_wrapper(const reference_wrapper&) = default; > > reference_wrapper& > operator=(const reference_wrapper&) = default; > > > operator _Tp&() const noexcept > { return this->get(); } > > > _Tp& > get() const noexcept > { return *_M_data; } > > template<typename... _Args> > > typename __invoke_result<_Tp&, _Args...>::type > operator()(_Args&&... __args) const > noexcept(__is_nothrow_invocable<_Tp&, _Args...>::value) > { > > > > > return std::__invoke(get(), std::forward<_Args>(__args)...); > } > }; > > > template<typename _Tp> > reference_wrapper(_Tp&) -> reference_wrapper<_Tp>; > > > > > > template<typename _Tp> > > inline reference_wrapper<_Tp> > ref(_Tp& __t) noexcept > { return reference_wrapper<_Tp>(__t); } > > > template<typename _Tp> > > inline reference_wrapper<const _Tp> > cref(const _Tp& __t) noexcept > { return reference_wrapper<const _Tp>(__t); } > > template<typename _Tp> > void ref(const _Tp&&) = delete; > > template<typename _Tp> > void cref(const _Tp&&) = delete; > > > template<typename _Tp> > > inline reference_wrapper<_Tp> > ref(reference_wrapper<_Tp> __t) noexcept > { return __t; } > > > template<typename _Tp> > > inline reference_wrapper<const _Tp> > cref(reference_wrapper<_Tp> __t) noexcept > { return { __t.get() }; } > > > > >} ># 53 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/range_access.h" 1 3 ># 33 "/usr/include/c++/13/bits/range_access.h" 3 > ># 34 "/usr/include/c++/13/bits/range_access.h" 3 > > ># 1 "/usr/include/c++/13/initializer_list" 1 3 ># 33 "/usr/include/c++/13/initializer_list" 3 > ># 34 "/usr/include/c++/13/initializer_list" 3 > > > > > > > >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) > : _M_array(__a), _M_len(__l) { } > > public: > constexpr initializer_list() noexcept > : _M_array(0), _M_len(0) { } > > > constexpr size_type > size() const noexcept { return _M_len; } > > > constexpr const_iterator > begin() const noexcept { return _M_array; } > > > constexpr const_iterator > end() const noexcept { return begin() + size(); } > }; > > > > > > > > template<class _Tp> > constexpr const _Tp* > begin(initializer_list<_Tp> __ils) noexcept > { return __ils.begin(); } > > > > > > > > template<class _Tp> > constexpr const _Tp* > end(initializer_list<_Tp> __ils) noexcept > { return __ils.end(); } >} ># 37 "/usr/include/c++/13/bits/range_access.h" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > begin(_Container& __cont) -> decltype(__cont.begin()) > { return __cont.begin(); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > begin(const _Container& __cont) -> decltype(__cont.begin()) > { return __cont.begin(); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > end(_Container& __cont) -> decltype(__cont.end()) > { return __cont.end(); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > end(const _Container& __cont) -> decltype(__cont.end()) > { return __cont.end(); } > > > > > > template<typename _Tp, size_t _Nm> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr _Tp* > begin(_Tp (&__arr)[_Nm]) noexcept > { return __arr; } > > > > > > > template<typename _Tp, size_t _Nm> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr _Tp* > end(_Tp (&__arr)[_Nm]) noexcept > { return __arr + _Nm; } > > > > 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)) > { return 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)) > { return std::end(__cont); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > rbegin(_Container& __cont) -> decltype(__cont.rbegin()) > { return __cont.rbegin(); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) > { return __cont.rbegin(); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > rend(_Container& __cont) -> decltype(__cont.rend()) > { return __cont.rend(); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > rend(const _Container& __cont) -> decltype(__cont.rend()) > { return __cont.rend(); } > > > > > > > template<typename _Tp, size_t _Nm> > [[__nodiscard__]] > inline constexpr reverse_iterator<_Tp*> > rbegin(_Tp (&__arr)[_Nm]) noexcept > { return reverse_iterator<_Tp*>(__arr + _Nm); } > > > > > > > template<typename _Tp, size_t _Nm> > [[__nodiscard__]] > inline constexpr reverse_iterator<_Tp*> > rend(_Tp (&__arr)[_Nm]) noexcept > { return reverse_iterator<_Tp*>(__arr); } > > > > > > > template<typename _Tp> > [[__nodiscard__]] > inline constexpr reverse_iterator<const _Tp*> > rbegin(initializer_list<_Tp> __il) noexcept > { return reverse_iterator<const _Tp*>(__il.end()); } > > > > > > > template<typename _Tp> > [[__nodiscard__]] > inline constexpr reverse_iterator<const _Tp*> > rend(initializer_list<_Tp> __il) noexcept > { return reverse_iterator<const _Tp*>(__il.begin()); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) > { return std::rbegin(__cont); } > > > > > > > template<typename _Container> > [[__nodiscard__, __gnu__::__always_inline__]] > inline constexpr auto > crend(const _Container& __cont) -> decltype(std::rend(__cont)) > { return std::rend(__cont); } ># 261 "/usr/include/c++/13/bits/range_access.h" 3 > template <typename _Container> > [[nodiscard, __gnu__::__always_inline__]] > constexpr auto > size(const _Container& __cont) noexcept(noexcept(__cont.size())) > -> decltype(__cont.size()) > { return __cont.size(); } > > > > > template <typename _Tp, size_t _Nm> > [[nodiscard, __gnu__::__always_inline__]] > constexpr size_t > size(const _Tp (&)[_Nm]) noexcept > { return _Nm; } > > > > > > template <typename _Container> > [[nodiscard, __gnu__::__always_inline__]] > constexpr auto > empty(const _Container& __cont) noexcept(noexcept(__cont.empty())) > -> decltype(__cont.empty()) > { return __cont.empty(); } > > > > > template <typename _Tp, size_t _Nm> > [[nodiscard, __gnu__::__always_inline__]] > constexpr bool > empty(const _Tp (&)[_Nm]) noexcept > { return false; } > > > > > > template <typename _Tp> > [[nodiscard, __gnu__::__always_inline__]] > constexpr bool > empty(initializer_list<_Tp> __il) noexcept > { return __il.size() == 0;} > > > > > > template <typename _Container> > [[nodiscard, __gnu__::__always_inline__]] > constexpr auto > data(_Container& __cont) noexcept(noexcept(__cont.data())) > -> decltype(__cont.data()) > { return __cont.data(); } > > > > > > template <typename _Container> > [[nodiscard, __gnu__::__always_inline__]] > constexpr auto > data(const _Container& __cont) noexcept(noexcept(__cont.data())) > -> decltype(__cont.data()) > { return __cont.data(); } > > > > > > template <typename _Tp, size_t _Nm> > [[nodiscard, __gnu__::__always_inline__]] > constexpr _Tp* > data(_Tp (&__array)[_Nm]) noexcept > { return __array; } > > > > > > template <typename _Tp> > [[nodiscard, __gnu__::__always_inline__]] > constexpr const _Tp* > data(initializer_list<_Tp> __il) noexcept > { return __il.begin(); } ># 370 "/usr/include/c++/13/bits/range_access.h" 3 > >} ># 54 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/basic_string.h" 1 3 ># 37 "/usr/include/c++/13/bits/basic_string.h" 3 > ># 38 "/usr/include/c++/13/bits/basic_string.h" 3 > ># 1 "/usr/include/c++/13/ext/alloc_traits.h" 1 3 ># 32 "/usr/include/c++/13/ext/alloc_traits.h" 3 > ># 33 "/usr/include/c++/13/ext/alloc_traits.h" 3 > ># 1 "/usr/include/c++/13/bits/alloc_traits.h" 1 3 ># 33 "/usr/include/c++/13/bits/alloc_traits.h" 3 ># 1 "/usr/include/c++/13/bits/stl_construct.h" 1 3 ># 73 "/usr/include/c++/13/bits/stl_construct.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template <typename _Tp> > inline void > destroy_at(_Tp* __location) > { > if constexpr (201703L > 201703L && is_array_v<_Tp>) > { > for (auto& __x : *__location) > std::destroy_at(std::__addressof(__x)); > } > else > __location->~_Tp(); > } ># 106 "/usr/include/c++/13/bits/stl_construct.h" 3 > template<typename _Tp, typename... _Args> > > inline void > _Construct(_Tp* __p, _Args&&... __args) > { ># 119 "/usr/include/c++/13/bits/stl_construct.h" 3 > ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); > } ># 132 "/usr/include/c++/13/bits/stl_construct.h" 3 > template<typename _T1> > inline void > _Construct_novalue(_T1* __p) > { ::new((void*)__p) _T1; } > > template<typename _ForwardIterator> > void > _Destroy(_ForwardIterator __first, _ForwardIterator __last); > > > > > template<typename _Tp> > constexpr inline void > _Destroy(_Tp* __pointer) > { > > > > __pointer->~_Tp(); > > } > > template<bool> > struct _Destroy_aux > { > template<typename _ForwardIterator> > static void > __destroy(_ForwardIterator __first, _ForwardIterator __last) > { > for (; __first != __last; ++__first) > std::_Destroy(std::__addressof(*__first)); > } > }; > > template<> > struct _Destroy_aux<true> > { > template<typename _ForwardIterator> > static void > __destroy(_ForwardIterator, _ForwardIterator) { } > }; > > > > > > > template<typename _ForwardIterator> > inline void > _Destroy(_ForwardIterator __first, _ForwardIterator __last) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _Value_type; > > > static_assert(is_destructible<_Value_type>::value, > "value type is destructible"); > > > > > > std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: > __destroy(__first, __last); > } > > template<bool> > struct _Destroy_n_aux > { > template<typename _ForwardIterator, typename _Size> > static _ForwardIterator > __destroy_n(_ForwardIterator __first, _Size __count) > { > for (; __count > 0; (void)++__first, --__count) > std::_Destroy(std::__addressof(*__first)); > return __first; > } > }; > > template<> > struct _Destroy_n_aux<true> > { > template<typename _ForwardIterator, typename _Size> > static _ForwardIterator > __destroy_n(_ForwardIterator __first, _Size __count) > { > std::advance(__first, __count); > return __first; > } > }; > > > > > > > template<typename _ForwardIterator, typename _Size> > inline _ForwardIterator > _Destroy_n(_ForwardIterator __first, _Size __count) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _Value_type; > > > static_assert(is_destructible<_Value_type>::value, > "value type is destructible"); > > > > > > return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: > __destroy_n(__first, __count); > } > > > template <typename _ForwardIterator> > inline void > destroy(_ForwardIterator __first, _ForwardIterator __last) > { > std::_Destroy(__first, __last); > } > > template <typename _ForwardIterator, typename _Size> > inline _ForwardIterator > destroy_n(_ForwardIterator __first, _Size __count) > { > return std::_Destroy_n(__first, __count); > } > > > >} ># 34 "/usr/include/c++/13/bits/alloc_traits.h" 2 3 ># 43 "/usr/include/c++/13/bits/alloc_traits.h" 3 >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; ># 104 "/usr/include/c++/13/bits/alloc_traits.h" 3 > 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)) > { return __a.allocate(__n, __hint); } > > template<typename _Alloc2> > static constexpr pointer > _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) > { return __a.allocate(__n); } > > template<typename _Tp, typename... _Args> > struct __construct_helper > { > template<typename _Alloc2, > typename = decltype(std::declval<_Alloc2*>()->construct( > std::declval<_Tp*>(), std::declval<_Args>()...))> > static true_type __test(int); > > template<typename> > static false_type __test(...); > > using type = decltype(__test<_Alloc>(0)); > }; > > template<typename _Tp, typename... _Args> > using __has_construct > = typename __construct_helper<_Tp, _Args...>::type; > > template<typename _Tp, typename... _Args> > static constexpr _Require<__has_construct<_Tp, _Args...>> > _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) > noexcept(noexcept(__a.construct(__p, std::forward<_Args>(__args)...))) > { __a.construct(__p, std::forward<_Args>(__args)...); } > > template<typename _Tp, typename... _Args> > static 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) > { > > ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); > > > > } > > template<typename _Alloc2, typename _Tp> > static constexpr auto > _S_destroy(_Alloc2& __a, _Tp* __p, int) > noexcept(noexcept(__a.destroy(__p))) > -> decltype(__a.destroy(__p)) > { __a.destroy(__p); } > > template<typename _Alloc2, typename _Tp> > static constexpr void > _S_destroy(_Alloc2&, _Tp* __p, ...) > noexcept(std::is_nothrow_destructible<_Tp>::value) > { std::_Destroy(__p); } > > template<typename _Alloc2> > static constexpr auto > _S_max_size(_Alloc2& __a, int) > -> decltype(__a.max_size()) > { return __a.max_size(); } > > template<typename _Alloc2> > static constexpr size_type > _S_max_size(_Alloc2&, ...) > { > > > return __gnu_cxx::__numeric_traits<size_type>::__max > / sizeof(value_type); > } > > template<typename _Alloc2> > static constexpr auto > _S_select(_Alloc2& __a, int) > -> decltype(__a.select_on_container_copy_construction()) > { return __a.select_on_container_copy_construction(); } > > template<typename _Alloc2> > static constexpr _Alloc2 > _S_select(_Alloc2& __a, ...) > { return __a; } > > public: ># 331 "/usr/include/c++/13/bits/alloc_traits.h" 3 > [[__nodiscard__]] static pointer > allocate(_Alloc& __a, size_type __n) > { return __a.allocate(__n); } ># 346 "/usr/include/c++/13/bits/alloc_traits.h" 3 > [[__nodiscard__]] static pointer > allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) > { return _S_allocate(__a, __n, __hint, 0); } ># 358 "/usr/include/c++/13/bits/alloc_traits.h" 3 > static void > deallocate(_Alloc& __a, pointer __p, size_type __n) > { __a.deallocate(__p, __n); } ># 373 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Tp, typename... _Args> > static auto > construct(_Alloc& __a, _Tp* __p, _Args&&... __args) > noexcept(noexcept(_S_construct(__a, __p, > std::forward<_Args>(__args)...))) > -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) > { _S_construct(__a, __p, std::forward<_Args>(__args)...); } ># 389 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Tp> > static void > destroy(_Alloc& __a, _Tp* __p) > noexcept(noexcept(_S_destroy(__a, __p, 0))) > { _S_destroy(__a, __p, 0); } ># 403 "/usr/include/c++/13/bits/alloc_traits.h" 3 > static size_type > max_size(const _Alloc& __a) noexcept > { return _S_max_size(__a, 0); } ># 415 "/usr/include/c++/13/bits/alloc_traits.h" 3 > static _Alloc > select_on_container_copy_construction(const _Alloc& __rhs) > { return _S_select(__rhs, 0); } > }; ># 427 "/usr/include/c++/13/bits/alloc_traits.h" 3 > 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>>; ># 479 "/usr/include/c++/13/bits/alloc_traits.h" 3 > [[__nodiscard__,__gnu__::__always_inline__]] > static pointer > allocate(allocator_type& __a, size_type __n) > { return __a.allocate(__n); } ># 494 "/usr/include/c++/13/bits/alloc_traits.h" 3 > [[__nodiscard__,__gnu__::__always_inline__]] > static pointer > allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) > { > > return __a.allocate(__n, __hint); > > > > } ># 513 "/usr/include/c++/13/bits/alloc_traits.h" 3 > [[__gnu__::__always_inline__]] > static void > deallocate(allocator_type& __a, pointer __p, size_type __n) > { __a.deallocate(__p, __n); } ># 529 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Up, typename... _Args> > [[__gnu__::__always_inline__]] > static void > construct(allocator_type& __a __attribute__((__unused__)), _Up* __p, > _Args&&... __args) > noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) > { > > __a.construct(__p, std::forward<_Args>(__args)...); > > > > } ># 550 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Up> > [[__gnu__::__always_inline__]] > static void > destroy(allocator_type& __a __attribute__((__unused__)), _Up* __p) > noexcept(is_nothrow_destructible<_Up>::value) > { > > __a.destroy(__p); > > > > } > > > > > > > [[__gnu__::__always_inline__]] > static size_type > max_size(const allocator_type& __a __attribute__((__unused__))) noexcept > { > > return __a.max_size(); > > > > } > > > > > > > [[__gnu__::__always_inline__]] > static allocator_type > select_on_container_copy_construction(const allocator_type& __rhs) > { return __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; ># 655 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Up, typename... _Args> > [[__gnu__::__always_inline__]] > static void > construct(allocator_type&, _Up* __p, _Args&&... __args) > noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) > { std::_Construct(__p, std::forward<_Args>(__args)...); } ># 669 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Up> > [[__gnu__::__always_inline__]] > static void > destroy(allocator_type&, _Up* __p) > noexcept(is_nothrow_destructible<_Up>::value) > { std::_Destroy(__p); } > > > static size_type > max_size(const allocator_type&) = delete; > > > > > > > [[__gnu__::__always_inline__]] > static allocator_type > select_on_container_copy_construction(const allocator_type& __rhs) > { return __rhs; } > }; ># 707 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Alloc> > [[__gnu__::__always_inline__]] > constexpr inline void > __alloc_on_copy(_Alloc& __one, const _Alloc& __two) > { > using __traits = allocator_traits<_Alloc>; > using __pocca = > typename __traits::propagate_on_container_copy_assignment::type; > > if constexpr (__pocca::value) > __one = __two; > > > > } > > template<typename _Alloc> > [[__gnu__::__always_inline__]] > constexpr _Alloc > __alloc_on_copy(const _Alloc& __a) > { > typedef allocator_traits<_Alloc> __traits; > return __traits::select_on_container_copy_construction(__a); > } ># 744 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Alloc> > [[__gnu__::__always_inline__]] > constexpr inline void > __alloc_on_move(_Alloc& __one, _Alloc& __two) > { > using __traits = allocator_traits<_Alloc>; > using __pocma > = typename __traits::propagate_on_container_move_assignment::type; > > if constexpr (__pocma::value) > __one = std::move(__two); > > > > } ># 775 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _Alloc> > [[__gnu__::__always_inline__]] > constexpr inline void > __alloc_on_swap(_Alloc& __one, _Alloc& __two) > { > using __traits = allocator_traits<_Alloc>; > using __pocs = typename __traits::propagate_on_container_swap::type; > > if constexpr (__pocs::value) > { > using std::swap; > swap(__one, __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; ># 872 "/usr/include/c++/13/bits/alloc_traits.h" 3 > 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 > { > > if (__one != __two) > swap(__one, __two); > } > }; > > > template<typename _Tp, bool > = __or_<is_copy_constructible<typename _Tp::value_type>, > is_nothrow_move_constructible<typename _Tp::value_type>>::value> > struct __shrink_to_fit_aux > { static bool _S_do_it(_Tp&) noexcept { return false; } }; > > template<typename _Tp> > struct __shrink_to_fit_aux<_Tp, true> > { > > static bool > _S_do_it(_Tp& __c) noexcept > { > > try > { > _Tp(__make_move_if_noexcept_iterator(__c.begin()), > __make_move_if_noexcept_iterator(__c.end()), > __c.get_allocator()).swap(__c); > return true; > } > catch(...) > { return false; } > > > > } > }; ># 925 "/usr/include/c++/13/bits/alloc_traits.h" 3 > template<typename _ForwardIterator, typename _Allocator> > > void > _Destroy(_ForwardIterator __first, _ForwardIterator __last, > _Allocator& __alloc) > { > for (; __first != __last; ++__first) > > > > allocator_traits<_Allocator>::destroy(__alloc, > std::__addressof(*__first)); > > } > > > template<typename _ForwardIterator, typename _Tp> > __attribute__((__always_inline__)) > inline void > _Destroy(_ForwardIterator __first, _ForwardIterator __last, > allocator<_Tp>&) > { > _Destroy(__first, __last); > } > > > > >} ># 35 "/usr/include/c++/13/ext/alloc_traits.h" 2 3 > >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)...))) > { > _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)))) > { _Base_type::destroy(__a, std::__to_address(__p)); } > > [[__gnu__::__always_inline__]] > static constexpr _Alloc _S_select_on_copy(const _Alloc& __a) > { return _Base_type::select_on_container_copy_construction(__a); } > > [[__gnu__::__always_inline__]] > static constexpr void _S_on_swap(_Alloc& __a, _Alloc& __b) > { std::__alloc_on_swap(__a, __b); } > > [[__gnu__::__always_inline__]] > static constexpr bool _S_propagate_on_copy_assign() > { return _Base_type::propagate_on_container_copy_assignment::value; } > > [[__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; }; ># 180 "/usr/include/c++/13/ext/alloc_traits.h" 3 > }; > > >} ># 40 "/usr/include/c++/13/bits/basic_string.h" 2 3 > > > > > > > ># 1 "/usr/include/c++/13/string_view" 1 3 ># 36 "/usr/include/c++/13/string_view" 3 > ># 37 "/usr/include/c++/13/string_view" 3 > > > > > ># 1 "/usr/include/c++/13/bits/functional_hash.h" 1 3 ># 33 "/usr/include/c++/13/bits/functional_hash.h" 3 > ># 34 "/usr/include/c++/13/bits/functional_hash.h" 3 > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 50 "/usr/include/c++/13/bits/functional_hash.h" 3 > 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); } > }; ># 125 "/usr/include/c++/13/bits/functional_hash.h" 3 > 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 { return static_cast<size_t>(__val); } }; > > > template<> struct hash<signed char> : public __hash_base<size_t, signed char> { size_t operator()(signed char __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<unsigned char> : public __hash_base<size_t, unsigned char> { size_t operator()(unsigned char __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<wchar_t> : public __hash_base<size_t, wchar_t> { size_t operator()(wchar_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 { return static_cast<size_t>(__val); } }; > > > template<> struct hash<char32_t> : public __hash_base<size_t, char32_t> { size_t operator()(char32_t __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<short> : public __hash_base<size_t, short> { size_t operator()(short __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<int> : public __hash_base<size_t, int> { size_t operator()(int __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<long> : public __hash_base<size_t, long> { size_t operator()(long __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<long long> : public __hash_base<size_t, long long> { size_t operator()(long long __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<unsigned short> : public __hash_base<size_t, unsigned short> { size_t operator()(unsigned short __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<unsigned int> : public __hash_base<size_t, unsigned int> { size_t operator()(unsigned int __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<unsigned long> : public __hash_base<size_t, unsigned long> { size_t operator()(unsigned long __val) const noexcept { return static_cast<size_t>(__val); } }; > > > template<> struct hash<unsigned long long> : public __hash_base<size_t, unsigned long long> { size_t operator()(unsigned long long __val) const noexcept { return static_cast<size_t>(__val); } }; ># 201 "/usr/include/c++/13/bits/functional_hash.h" 3 > struct _Hash_impl > { > static size_t > hash(const void* __ptr, size_t __clength, > size_t __seed = static_cast<size_t>(0xc70f6907UL)) > { return _Hash_bytes(__ptr, __clength, __seed); } > > template<typename _Tp> > static size_t > hash(const _Tp& __val) > { return hash(&__val, sizeof(__val)); } > > template<typename _Tp> > static size_t > __hash_combine(const _Tp& __val, size_t __hash) > { return hash(&__val, sizeof(__val), __hash); } > }; > > > struct _Fnv_hash_impl > { > static size_t > hash(const void* __ptr, size_t __clength, > size_t __seed = static_cast<size_t>(2166136261UL)) > { return _Fnv_hash_bytes(__ptr, __clength, __seed); } > > template<typename _Tp> > static size_t > hash(const _Tp& __val) > { return hash(&__val, sizeof(__val)); } > > template<typename _Tp> > static size_t > __hash_combine(const _Tp& __val, size_t __hash) > { return hash(&__val, sizeof(__val), __hash); } > }; > > > template<> > struct hash<float> : public __hash_base<size_t, float> > { > size_t > operator()(float __val) const noexcept > { > > return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; > } > }; > > > template<> > struct hash<double> : public __hash_base<size_t, double> > { > size_t > operator()(double __val) const noexcept > { > > return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; > } > }; > > > 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 > { return 0; } > }; ># 294 "/usr/include/c++/13/bits/functional_hash.h" 3 > template<typename _Hash> > struct __is_fast_hash : public std::true_type > { }; > > template<> > struct __is_fast_hash<hash<long double>> : public std::false_type > { }; > > >} ># 43 "/usr/include/c++/13/string_view" 2 3 ># 56 "/usr/include/c++/13/string_view" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 69 "/usr/include/c++/13/string_view" 3 > constexpr size_t > __sv_check(size_t __size, size_t __pos, const char* __s) > { > if (__pos > __size) > __throw_out_of_range_fmt(("%s: __pos (which is %zu) > __size " "(which is %zu)") > , __s, __pos, __size); > return __pos; > } > > > > constexpr size_t > __sv_limit(size_t __size, size_t __pos, size_t __off) noexcept > { > const bool __testoff = __off < __size - __pos; > return __testoff ? __off : __size - __pos; > } ># 105 "/usr/include/c++/13/string_view" 3 > 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() noexcept > : _M_len{0}, _M_str{nullptr} > { } > > 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} > { } ># 182 "/usr/include/c++/13/string_view" 3 > 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 > { return this->_M_str + this->_M_len; } > > [[nodiscard]] > constexpr const_iterator > cbegin() const noexcept > { return this->_M_str; } > > [[nodiscard]] > constexpr const_iterator > cend() const noexcept > { return this->_M_str + this->_M_len; } > > [[nodiscard]] > constexpr const_reverse_iterator > rbegin() const noexcept > { return const_reverse_iterator(this->end()); } > > [[nodiscard]] > constexpr const_reverse_iterator > rend() const noexcept > { return const_reverse_iterator(this->begin()); } > > [[nodiscard]] > constexpr const_reverse_iterator > crbegin() const noexcept > { return const_reverse_iterator(this->end()); } > > [[nodiscard]] > constexpr const_reverse_iterator > crend() const noexcept > { return const_reverse_iterator(this->begin()); } > > > > [[nodiscard]] > constexpr size_type > size() const noexcept > { return this->_M_len; } > > [[nodiscard]] > constexpr size_type > length() const noexcept > { return _M_len; } > > [[nodiscard]] > constexpr size_type > max_size() const noexcept > { > return (npos - sizeof(size_type) - sizeof(void*)) > / sizeof(value_type) / 4; > } > > [[nodiscard]] > constexpr bool > empty() const noexcept > { return this->_M_len == 0; } > > > > [[nodiscard]] > constexpr const_reference > operator[](size_type __pos) const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__pos < this->_M_len)) __builtin_unreachable(); } while (false); > return *(this->_M_str + __pos); > } > > [[nodiscard]] > constexpr const_reference > at(size_type __pos) const > { > if (__pos >= _M_len) > __throw_out_of_range_fmt(("basic_string_view::at: __pos " "(which is %zu) >= this->size() " "(which is %zu)") > > , __pos, this->size()); > return *(this->_M_str + __pos); > } > > [[nodiscard]] > constexpr const_reference > front() const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(this->_M_len > 0)) __builtin_unreachable(); } while (false); > return *this->_M_str; > } > > [[nodiscard]] > constexpr const_reference > back() const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(this->_M_len > 0)) __builtin_unreachable(); } while (false); > return *(this->_M_str + this->_M_len - 1); > } > > [[nodiscard]] > constexpr const_pointer > data() const noexcept > { return this->_M_str; } > > > > constexpr void > remove_prefix(size_type __n) noexcept > { > do { if (std::__is_constant_evaluated() && !bool(this->_M_len >= __n)) __builtin_unreachable(); } while (false); > this->_M_str += __n; > this->_M_len -= __n; > } > > constexpr void > remove_suffix(size_type __n) noexcept > { this->_M_len -= __n; } > > constexpr void > swap(basic_string_view& __sv) noexcept > { > auto __tmp = *this; > *this = __sv; > __sv = __tmp; > } > > > > > size_type > copy(_CharT* __str, size_type __n, size_type __pos = 0) const > { > ; > __pos = std::__sv_check(size(), __pos, "basic_string_view::copy"); > const size_type __rlen = std::min<size_t>(__n, _M_len - __pos); > > > traits_type::copy(__str, data() + __pos, __rlen); > return __rlen; > } > > [[nodiscard]] > constexpr basic_string_view > substr(size_type __pos = 0, size_type __n = npos) const noexcept(false) > { > __pos = std::__sv_check(size(), __pos, "basic_string_view::substr"); > const size_type __rlen = std::min<size_t>(__n, _M_len - __pos); > return basic_string_view{_M_str + __pos, __rlen}; > } > > [[nodiscard]] > constexpr int > compare(basic_string_view __str) const noexcept > { > const size_type __rlen = std::min(this->_M_len, __str._M_len); > int __ret = traits_type::compare(this->_M_str, __str._M_str, __rlen); > if (__ret == 0) > __ret = _S_compare(this->_M_len, __str._M_len); > return __ret; > } > > [[nodiscard]] > constexpr int > compare(size_type __pos1, size_type __n1, basic_string_view __str) const > { return this->substr(__pos1, __n1).compare(__str); } > > [[nodiscard]] > constexpr int > compare(size_type __pos1, size_type __n1, > basic_string_view __str, size_type __pos2, size_type __n2) const > { > return this->substr(__pos1, __n1).compare(__str.substr(__pos2, __n2)); > } > > [[nodiscard, __gnu__::__nonnull__]] > constexpr int > compare(const _CharT* __str) const noexcept > { return this->compare(basic_string_view{__str}); } > > [[nodiscard, __gnu__::__nonnull__]] > constexpr int > compare(size_type __pos1, size_type __n1, const _CharT* __str) const > { return this->substr(__pos1, __n1).compare(basic_string_view{__str}); } > > [[nodiscard]] > constexpr int > compare(size_type __pos1, size_type __n1, > const _CharT* __str, size_type __n2) const noexcept(false) > { > return this->substr(__pos1, __n1) > .compare(basic_string_view(__str, __n2)); > } ># 445 "/usr/include/c++/13/string_view" 3 > [[nodiscard]] > constexpr size_type > find(basic_string_view __str, size_type __pos = 0) const noexcept > { return this->find(__str._M_str, __pos, __str._M_len); } > > [[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 > { return this->find(__str, __pos, traits_type::length(__str)); } > > [[nodiscard]] > constexpr size_type > rfind(basic_string_view __str, size_type __pos = npos) const noexcept > { return this->rfind(__str._M_str, __pos, __str._M_len); } > > [[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 > { return this->rfind(__str, __pos, traits_type::length(__str)); } > > [[nodiscard]] > constexpr size_type > find_first_of(basic_string_view __str, size_type __pos = 0) const noexcept > { return this->find_first_of(__str._M_str, __pos, __str._M_len); } > > [[nodiscard]] > constexpr size_type > find_first_of(_CharT __c, size_type __pos = 0) const noexcept > { return this->find(__c, __pos); } > > [[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 > { return this->find_first_of(__str, __pos, traits_type::length(__str)); } > > [[nodiscard]] > constexpr size_type > find_last_of(basic_string_view __str, > size_type __pos = npos) const noexcept > { return this->find_last_of(__str._M_str, __pos, __str._M_len); } > > [[nodiscard]] > constexpr size_type > find_last_of(_CharT __c, size_type __pos=npos) const noexcept > { return this->rfind(__c, __pos); } > > [[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 > { return this->find_last_of(__str, __pos, traits_type::length(__str)); } > > [[nodiscard]] > constexpr size_type > find_first_not_of(basic_string_view __str, > size_type __pos = 0) const noexcept > { return this->find_first_not_of(__str._M_str, __pos, __str._M_len); } > > [[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 > { > return this->find_first_not_of(__str, __pos, > traits_type::length(__str)); > } > > [[nodiscard]] > constexpr size_type > find_last_not_of(basic_string_view __str, > size_type __pos = npos) const noexcept > { return this->find_last_not_of(__str._M_str, __pos, __str._M_len); } > > [[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 > { > return this->find_last_not_of(__str, __pos, > traits_type::length(__str)); > } > > private: > > static constexpr int > _S_compare(size_type __n1, size_type __n2) noexcept > { > using __limits = __gnu_cxx::__int_traits<int>; > const difference_type __diff = __n1 - __n2; > if (__diff > __limits::__max) > return __limits::__max; > if (__diff < __limits::__min) > return __limits::__min; > return static_cast<int>(__diff); > } > > size_t _M_len; > const _CharT* _M_str; > }; ># 605 "/usr/include/c++/13/string_view" 3 > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator==(basic_string_view<_CharT, _Traits> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.size() == __y.size() && __x.compare(__y) == 0; } > > 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 > { return __x.size() == __y.size() && __x.compare(__y) == 0; } ># 638 "/usr/include/c++/13/string_view" 3 > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.size() == __y.size() && __x.compare(__y) == 0; } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator!=(basic_string_view<_CharT, _Traits> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return !(__x == __y); } > > 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 > { return !(__x == __y); } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator!=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return !(__x == __y); } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator< (basic_string_view<_CharT, _Traits> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.compare(__y) < 0; } > > 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 > { return __x.compare(__y) < 0; } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.compare(__y) < 0; } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator> (basic_string_view<_CharT, _Traits> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.compare(__y) > 0; } > > 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 > { return __x.compare(__y) > 0; } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.compare(__y) > 0; } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator<=(basic_string_view<_CharT, _Traits> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.compare(__y) <= 0; } > > 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 > { return __x.compare(__y) <= 0; } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator<=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.compare(__y) <= 0; } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator>=(basic_string_view<_CharT, _Traits> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.compare(__y) >= 0; } > > 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 > { return __x.compare(__y) >= 0; } > > template<typename _CharT, typename _Traits> > [[nodiscard]] > constexpr bool > operator>=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, > basic_string_view<_CharT, _Traits> __y) noexcept > { return __x.compare(__y) >= 0; } > > > > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, > basic_string_view<_CharT,_Traits> __str) > { return __ostream_insert(__os, __str.data(), __str.size()); } > > > > > using string_view = basic_string_view<char>; > using wstring_view = basic_string_view<wchar_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 > { return std::_Hash_impl::hash(__str.data(), __str.length()); } > }; > > 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 > { return std::_Hash_impl::hash(__s.data(), > __s.length() * sizeof(wchar_t)); } > }; > > template<> > struct __is_fast_hash<hash<wstring_view>> : std::false_type > { }; ># 825 "/usr/include/c++/13/string_view" 3 > template<> > struct hash<u16string_view> > : public __hash_base<size_t, u16string_view> > { > [[nodiscard]] > size_t > operator()(const u16string_view& __s) const noexcept > { return std::_Hash_impl::hash(__s.data(), > __s.length() * sizeof(char16_t)); } > }; > > 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 > { return std::_Hash_impl::hash(__s.data(), > __s.length() * sizeof(char32_t)); } > }; > > template<> > struct __is_fast_hash<hash<u32string_view>> : std::false_type > { }; > > inline namespace literals > { > inline namespace string_view_literals > { >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wliteral-suffix" > inline constexpr basic_string_view<char> > operator""sv(const char* __str, size_t __len) noexcept > { return basic_string_view<char>{__str, __len}; } > > inline constexpr basic_string_view<wchar_t> > operator""sv(const wchar_t* __str, size_t __len) noexcept > { return basic_string_view<wchar_t>{__str, __len}; } > > > > > > > > inline constexpr basic_string_view<char16_t> > operator""sv(const char16_t* __str, size_t __len) noexcept > { return basic_string_view<char16_t>{__str, __len}; } > > inline constexpr basic_string_view<char32_t> > operator""sv(const char32_t* __str, size_t __len) noexcept > { return basic_string_view<char32_t>{__str, __len}; } > >#pragma GCC diagnostic pop > } > } ># 901 "/usr/include/c++/13/string_view" 3 > >} > ># 1 "/usr/include/c++/13/bits/string_view.tcc" 1 3 ># 37 "/usr/include/c++/13/bits/string_view.tcc" 3 > ># 38 "/usr/include/c++/13/bits/string_view.tcc" 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > find(const _CharT* __str, size_type __pos, size_type __n) const noexcept > { > ; > > if (__n == 0) > return __pos <= _M_len ? __pos : npos; > if (__pos >= _M_len) > return npos; > > const _CharT __elem0 = __str[0]; > const _CharT* __first = _M_str + __pos; > const _CharT* const __last = _M_str + _M_len; > size_type __len = _M_len - __pos; > > while (__len >= __n) > { > > __first = traits_type::find(__first, __len - __n + 1, __elem0); > if (!__first) > return npos; > > > > if (traits_type::compare(__first, __str, __n) == 0) > return __first - _M_str; > __len = __last - ++__first; > } > return npos; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > find(_CharT __c, size_type __pos) const noexcept > { > size_type __ret = npos; > if (__pos < this->_M_len) > { > const size_type __n = this->_M_len - __pos; > const _CharT* __p = traits_type::find(this->_M_str + __pos, __n, __c); > if (__p) > __ret = __p - this->_M_str; > } > return __ret; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept > { > ; > > if (__n <= this->_M_len) > { > __pos = std::min(size_type(this->_M_len - __n), __pos); > do > { > if (traits_type::compare(this->_M_str + __pos, __str, __n) == 0) > return __pos; > } > while (__pos-- > 0); > } > return npos; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > rfind(_CharT __c, size_type __pos) const noexcept > { > size_type __size = this->_M_len; > if (__size > 0) > { > if (--__size > __pos) > __size = __pos; > for (++__size; __size-- > 0; ) > if (traits_type::eq(this->_M_str[__size], __c)) > return __size; > } > return npos; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > find_first_of(const _CharT* __str, size_type __pos, > size_type __n) const noexcept > { > ; > for (; __n && __pos < this->_M_len; ++__pos) > { > const _CharT* __p = traits_type::find(__str, __n, > this->_M_str[__pos]); > if (__p) > return __pos; > } > return npos; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > find_last_of(const _CharT* __str, size_type __pos, > size_type __n) const noexcept > { > ; > size_type __size = this->size(); > if (__size && __n) > { > if (--__size > __pos) > __size = __pos; > do > { > if (traits_type::find(__str, __n, this->_M_str[__size])) > return __size; > } > while (__size-- != 0); > } > return npos; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > find_first_not_of(const _CharT* __str, size_type __pos, > size_type __n) const noexcept > { > ; > for (; __pos < this->_M_len; ++__pos) > if (!traits_type::find(__str, __n, this->_M_str[__pos])) > return __pos; > return npos; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > find_first_not_of(_CharT __c, size_type __pos) const noexcept > { > for (; __pos < this->_M_len; ++__pos) > if (!traits_type::eq(this->_M_str[__pos], __c)) > return __pos; > return npos; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > find_last_not_of(const _CharT* __str, size_type __pos, > size_type __n) const noexcept > { > ; > size_type __size = this->_M_len; > if (__size) > { > if (--__size > __pos) > __size = __pos; > do > { > if (!traits_type::find(__str, __n, this->_M_str[__size])) > return __size; > } > while (__size--); > } > return npos; > } > > template<typename _CharT, typename _Traits> > constexpr typename basic_string_view<_CharT, _Traits>::size_type > basic_string_view<_CharT, _Traits>:: > find_last_not_of(_CharT __c, size_type __pos) const noexcept > { > size_type __size = this->_M_len; > if (__size) > { > if (--__size > __pos) > __size = __pos; > do > { > if (!traits_type::eq(this->_M_str[__size], __c)) > return __size; > } > while (__size--); > } > return npos; > } > > >} ># 905 "/usr/include/c++/13/string_view" 2 3 ># 48 "/usr/include/c++/13/bits/basic_string.h" 2 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > >namespace __cxx11 { ># 84 "/usr/include/c++/13/bits/basic_string.h" 3 > 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; ># 122 "/usr/include/c++/13/bits/basic_string.h" 3 > 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: > > > 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>; > > > > static __sv_type > _S_to_string_view(__sv_type __svt) noexcept > { return __svt; } > > > > > > struct __sv_wrapper > { > explicit > __sv_wrapper(__sv_type __sv) noexcept : _M_sv(__sv) { } > > __sv_type _M_sv; > }; > > > > > > > > > explicit > basic_string(__sv_wrapper __svw, const _Alloc& __a) > : basic_string(__svw._M_sv.data(), __svw._M_sv.size(), __a) { } > > > > struct _Alloc_hider : allocator_type > { > > > > > > _Alloc_hider(pointer __dat, const _Alloc& __a) > : allocator_type(__a), _M_p(__dat) { } > > > _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) > : allocator_type(std::move(__a)), _M_p(__dat) { } > > > 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; > }; > > > void > _M_data(pointer __p) > { _M_dataplus._M_p = __p; } > > > void > _M_length(size_type __length) > { _M_string_length = __length; } > > > pointer > _M_data() const > { return _M_dataplus._M_p; } > > > pointer > _M_local_data() > { > > return std::pointer_traits<pointer>::pointer_to(*_M_local_buf); > > > > } > > > const_pointer > _M_local_data() const > { > > return std::pointer_traits<const_pointer>::pointer_to(*_M_local_buf); > > > > } > > > void > _M_capacity(size_type __capacity) > { _M_allocated_capacity = __capacity; } > > > void > _M_set_length(size_type __n) > { > _M_length(__n); > traits_type::assign(_M_data()[__n], _CharT()); > } > > > bool > _M_is_local() const > { > if (_M_data() == _M_local_data()) > { > if (_M_string_length > _S_local_capacity) > __builtin_unreachable(); > return true; > } > return false; > } > > > > pointer > _M_create(size_type&, size_type); > > > void > _M_dispose() > { > if (!_M_is_local()) > _M_destroy(_M_allocated_capacity); > } > > > void > _M_destroy(size_type __size) throw() > { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); } ># 327 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _InIterator> > > void > _M_construct(_InIterator __beg, _InIterator __end, > std::input_iterator_tag); > > > > template<typename _FwdIterator> > > void > _M_construct(_FwdIterator __beg, _FwdIterator __end, > std::forward_iterator_tag); > > > void > _M_construct(size_type __req, _CharT __c); > > > allocator_type& > _M_get_allocator() > { return _M_dataplus; } > > > const allocator_type& > _M_get_allocator() const > { return _M_dataplus; } > > > __attribute__((__always_inline__)) > constexpr > pointer > _M_use_local_data() noexcept > { > > > > > > return _M_local_data(); > } > > private: ># 385 "/usr/include/c++/13/bits/basic_string.h" 3 > > size_type > _M_check(size_type __pos, const char* __s) const > { > if (__pos > this->size()) > __throw_out_of_range_fmt(("%s: __pos (which is %zu) > " "this->size() (which is %zu)") > , > __s, __pos, this->size()); > return __pos; > } > > > void > _M_check_length(size_type __n1, size_type __n2, const char* __s) const > { > if (this->max_size() - (this->size() - __n1) < __n2) > __throw_length_error((__s)); > } > > > > > size_type > _M_limit(size_type __pos, size_type __off) const noexcept > { > const bool __testoff = __off < this->size() - __pos; > return __testoff ? __off : this->size() - __pos; > } > > > bool > _M_disjunct(const _CharT* __s) const noexcept > { > return (less<const _CharT*>()(__s, _M_data()) > || less<const _CharT*>()(_M_data() + this->size(), __s)); > } > > > > > static void > _S_copy(_CharT* __d, const _CharT* __s, size_type __n) > { > if (__n == 1) > traits_type::assign(*__d, *__s); > else > traits_type::copy(__d, __s, __n); > } > > > static void > _S_move(_CharT* __d, const _CharT* __s, size_type __n) > { > if (__n == 1) > traits_type::assign(*__d, *__s); > else > traits_type::move(__d, __s, __n); > } > > > static void > _S_assign(_CharT* __d, size_type __n, _CharT __c) > { > if (__n == 1) > traits_type::assign(*__d, __c); > else > traits_type::assign(__d, __n, __c); > } > > > > template<class _Iterator> > > static void > _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) > { > for (; __k1 != __k2; ++__k1, (void)++__p) > traits_type::assign(*__p, *__k1); > } > > > static void > _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) noexcept > { _S_copy_chars(__p, __k1.base(), __k2.base()); } > > > static void > _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) > noexcept > { _S_copy_chars(__p, __k1.base(), __k2.base()); } > > > static void > _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) noexcept > { _S_copy(__p, __k1, __k2 - __k1); } > > > static void > _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) > noexcept > { _S_copy(__p, __k1, __k2 - __k1); } > > > static int > _S_compare(size_type __n1, size_type __n2) noexcept > { > const difference_type __d = difference_type(__n1 - __n2); > > if (__d > __gnu_cxx::__numeric_traits<int>::__max) > return __gnu_cxx::__numeric_traits<int>::__max; > else if (__d < __gnu_cxx::__numeric_traits<int>::__min) > return __gnu_cxx::__numeric_traits<int>::__min; > else > return int(__d); > } > > > void > _M_assign(const basic_string&); > > > void > _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, > size_type __len2); > > > void > _M_erase(size_type __pos, size_type __n); > > public: > > > > > > > > > basic_string() > noexcept(is_nothrow_default_constructible<_Alloc>::value) > : _M_dataplus(_M_local_data()) > { > _M_use_local_data(); > _M_set_length(0); > } > > > > > > explicit > basic_string(const _Alloc& __a) noexcept > : _M_dataplus(_M_local_data(), __a) > { > _M_use_local_data(); > _M_set_length(0); > } > > > > > > > basic_string(const basic_string& __str) > : _M_dataplus(_M_local_data(), > _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) > { > _M_construct(__str._M_data(), __str._M_data() + __str.length(), > std::forward_iterator_tag()); > } ># 564 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string(const basic_string& __str, size_type __pos, > const _Alloc& __a = _Alloc()) > : _M_dataplus(_M_local_data(), __a) > { > const _CharT* __start = __str._M_data() > + __str._M_check(__pos, "basic_string::basic_string"); > _M_construct(__start, __start + __str._M_limit(__pos, npos), > std::forward_iterator_tag()); > } > > > > > > > > > basic_string(const basic_string& __str, size_type __pos, > size_type __n) > : _M_dataplus(_M_local_data()) > { > const _CharT* __start = __str._M_data() > + __str._M_check(__pos, "basic_string::basic_string"); > _M_construct(__start, __start + __str._M_limit(__pos, __n), > std::forward_iterator_tag()); > } ># 599 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string(const basic_string& __str, size_type __pos, > size_type __n, const _Alloc& __a) > : _M_dataplus(_M_local_data(), __a) > { > const _CharT* __start > = __str._M_data() + __str._M_check(__pos, "string::string"); > _M_construct(__start, __start + __str._M_limit(__pos, __n), > std::forward_iterator_tag()); > } ># 619 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string(const _CharT* __s, size_type __n, > const _Alloc& __a = _Alloc()) > : _M_dataplus(_M_local_data(), __a) > { > > if (__s == 0 && __n > 0) > std::__throw_logic_error(("basic_string: " "construction from null is not valid") > ); > _M_construct(__s, __s + __n, std::forward_iterator_tag()); > } ># 639 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename = _RequireAllocator<_Alloc>> > > > basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) > : _M_dataplus(_M_local_data(), __a) > { > > if (__s == 0) > std::__throw_logic_error(("basic_string: " "construction from null is not valid") > ); > const _CharT* __end = __s + traits_type::length(__s); > _M_construct(__s, __end, forward_iterator_tag()); > } ># 662 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename = _RequireAllocator<_Alloc>> > > > basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) > : _M_dataplus(_M_local_data(), __a) > { _M_construct(__n, __c); } ># 677 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string(basic_string&& __str) noexcept > : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator())) > { > if (__str._M_is_local()) > { > traits_type::copy(_M_local_buf, __str._M_local_buf, > __str.length() + 1); > } > else > { > _M_data(__str._M_data()); > _M_capacity(__str._M_allocated_capacity); > } > > > > > _M_length(__str.length()); > __str._M_data(__str._M_local_data()); > __str._M_set_length(0); > } > > > > > > > > basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) > : _M_dataplus(_M_local_data(), __a) > { _M_construct(__l.begin(), __l.end(), std::forward_iterator_tag()); } > > > basic_string(const basic_string& __str, const _Alloc& __a) > : _M_dataplus(_M_local_data(), __a) > { _M_construct(__str.begin(), __str.end(), std::forward_iterator_tag()); } > > > basic_string(basic_string&& __str, const _Alloc& __a) > noexcept(_Alloc_traits::_S_always_equal()) > : _M_dataplus(_M_local_data(), __a) > { > if (__str._M_is_local()) > { > traits_type::copy(_M_local_buf, __str._M_local_buf, > __str.length() + 1); > _M_length(__str.length()); > __str._M_set_length(0); > } > else if (_Alloc_traits::_S_always_equal() > || __str.get_allocator() == __a) > { > _M_data(__str._M_data()); > _M_length(__str.length()); > _M_capacity(__str._M_allocated_capacity); > __str._M_data(__str._M_local_buf); > __str._M_set_length(0); > } > else > _M_construct(__str.begin(), __str.end(), std::forward_iterator_tag()); > } ># 753 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > > > > basic_string(_InputIterator __beg, _InputIterator __end, > const _Alloc& __a = _Alloc()) > : _M_dataplus(_M_local_data(), __a) > { > > _M_construct(__beg, __end, std::__iterator_category(__beg)); > > > > > } ># 779 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp, > typename = enable_if_t<is_convertible_v<const _Tp&, __sv_type>>> > > basic_string(const _Tp& __t, size_type __pos, size_type __n, > const _Alloc& __a = _Alloc()) > : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { } > > > > > > > template<typename _Tp, typename = _If_sv<_Tp, void>> > > explicit > basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) > : basic_string(__sv_wrapper(_S_to_string_view(__t)), __a) { } > > > > > > > ~basic_string() > { _M_dispose(); } > > > > > > > basic_string& > operator=(const basic_string& __str) > { > return this->assign(__str); > } > > > > > > > basic_string& > operator=(const _CharT* __s) > { return this->assign(__s); } ># 832 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > operator=(_CharT __c) > { > this->assign(1, __c); > return *this; > } ># 850 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > operator=(basic_string&& __str) > noexcept(_Alloc_traits::_S_nothrow_move()) > { > const bool __equal_allocs = _Alloc_traits::_S_always_equal() > || _M_get_allocator() == __str._M_get_allocator(); > if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() > && !__equal_allocs) > { > > _M_destroy(_M_allocated_capacity); > _M_data(_M_local_data()); > _M_set_length(0); > } > > std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); > > if (__str._M_is_local()) > { > > > > if (__builtin_expect(std::__addressof(__str) != this, true)) > { > if (__str.size()) > this->_S_copy(_M_data(), __str._M_data(), __str.size()); > _M_set_length(__str.size()); > } > } > else if (_Alloc_traits::_S_propagate_on_move_assign() || __equal_allocs) > { > > pointer __data = nullptr; > size_type __capacity; > if (!_M_is_local()) > { > if (__equal_allocs) > { > > __data = _M_data(); > __capacity = _M_allocated_capacity; > } > else > _M_destroy(_M_allocated_capacity); > } > > _M_data(__str._M_data()); > _M_length(__str.length()); > _M_capacity(__str._M_allocated_capacity); > if (__data) > { > __str._M_data(__data); > __str._M_capacity(__capacity); > } > else > __str._M_data(__str._M_local_buf); > } > else > assign(__str); > __str.clear(); > return *this; > } > > > > > > > basic_string& > operator=(initializer_list<_CharT> __l) > { > this->assign(__l.begin(), __l.size()); > return *this; > } > > > > > > > > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > operator=(const _Tp& __svt) > { return this->assign(__svt); } > > > > > > > operator __sv_type() const noexcept > { return __sv_type(data(), size()); } > > > > > > > > [[__nodiscard__]] > iterator > begin() noexcept > { return iterator(_M_data()); } > > > > > > [[__nodiscard__]] > const_iterator > begin() const noexcept > { return const_iterator(_M_data()); } > > > > > > [[__nodiscard__]] > iterator > end() noexcept > { return iterator(_M_data() + this->size()); } > > > > > > [[__nodiscard__]] > const_iterator > end() const noexcept > { return const_iterator(_M_data() + this->size()); } > > > > > > > [[__nodiscard__]] > reverse_iterator > rbegin() noexcept > { return reverse_iterator(this->end()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > rbegin() const noexcept > { return const_reverse_iterator(this->end()); } > > > > > > > [[__nodiscard__]] > reverse_iterator > rend() noexcept > { return reverse_iterator(this->begin()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > rend() const noexcept > { return const_reverse_iterator(this->begin()); } > > > > > > > [[__nodiscard__]] > const_iterator > cbegin() const noexcept > { return const_iterator(this->_M_data()); } > > > > > > [[__nodiscard__]] > const_iterator > cend() const noexcept > { return const_iterator(this->_M_data() + this->size()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > crbegin() const noexcept > { return const_reverse_iterator(this->end()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > crend() const noexcept > { return const_reverse_iterator(this->begin()); } > > > public: > > > > [[__nodiscard__]] > size_type > size() const noexcept > { return _M_string_length; } > > > > [[__nodiscard__]] > size_type > length() const noexcept > { return _M_string_length; } > > > [[__nodiscard__]] > size_type > max_size() const noexcept > { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } ># 1096 "/usr/include/c++/13/bits/basic_string.h" 3 > > void > resize(size_type __n, _CharT __c); ># 1110 "/usr/include/c++/13/bits/basic_string.h" 3 > > void > resize(size_type __n) > { this->resize(__n, _CharT()); } > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > > > void > shrink_to_fit() noexcept > { reserve(); } >#pragma GCC diagnostic pop ># 1166 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > capacity() const noexcept > { > return _M_is_local() ? size_type(_S_local_capacity) > : _M_allocated_capacity; > } ># 1191 "/usr/include/c++/13/bits/basic_string.h" 3 > > void > reserve(size_type __res_arg); > > > > > > > > > void > reserve(); > > > > > > void > clear() noexcept > { _M_set_length(0); } > > > > > > [[__nodiscard__]] > bool > empty() const noexcept > { return this->size() == 0; } ># 1233 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > const_reference > operator[] (size_type __pos) const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__pos <= size())) __builtin_unreachable(); } while (false); > return _M_data()[__pos]; > } ># 1251 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > reference > operator[](size_type __pos) > { > > > do { if (std::__is_constant_evaluated() && !bool(__pos <= size())) __builtin_unreachable(); } while (false); > > ; > return _M_data()[__pos]; > } ># 1273 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > const_reference > at(size_type __n) const > { > if (__n >= this->size()) > __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") > > , > __n, this->size()); > return _M_data()[__n]; > } ># 1295 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > reference > at(size_type __n) > { > if (__n >= size()) > __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") > > , > __n, this->size()); > return _M_data()[__n]; > } > > > > > > > [[__nodiscard__]] > reference > front() noexcept > { > do { if (std::__is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); > return operator[](0); > } > > > > > > [[__nodiscard__]] > const_reference > front() const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); > return operator[](0); > } > > > > > > [[__nodiscard__]] > reference > back() noexcept > { > do { if (std::__is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); > return operator[](this->size() - 1); > } > > > > > > [[__nodiscard__]] > const_reference > back() const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); > return operator[](this->size() - 1); > } ># 1363 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > operator+=(const basic_string& __str) > { return this->append(__str); } > > > > > > > > basic_string& > operator+=(const _CharT* __s) > { return this->append(__s); } > > > > > > > > basic_string& > operator+=(_CharT __c) > { > this->push_back(__c); > return *this; > } > > > > > > > > > basic_string& > operator+=(initializer_list<_CharT> __l) > { return this->append(__l.begin(), __l.size()); } ># 1409 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > operator+=(const _Tp& __svt) > { return this->append(__svt); } > > > > > > > > > basic_string& > append(const basic_string& __str) > { return this->append(__str._M_data(), __str.size()); } ># 1439 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > append(const basic_string& __str, size_type __pos, size_type __n = npos) > { return this->append(__str._M_data() > + __str._M_check(__pos, "basic_string::append"), > __str._M_limit(__pos, __n)); } > > > > > > > > > basic_string& > append(const _CharT* __s, size_type __n) > { > ; > _M_check_length(size_type(0), __n, "basic_string::append"); > return _M_append(__s, __n); > } > > > > > > > > basic_string& > append(const _CharT* __s) > { > ; > const size_type __n = traits_type::length(__s); > _M_check_length(size_type(0), __n, "basic_string::append"); > return _M_append(__s, __n); > } ># 1484 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > append(size_type __n, _CharT __c) > { return _M_replace_aux(this->size(), size_type(0), __n, __c); } > > > > > > > > > basic_string& > append(initializer_list<_CharT> __l) > { return this->append(__l.begin(), __l.size()); } ># 1510 "/usr/include/c++/13/bits/basic_string.h" 3 > template<class _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > > > > basic_string& > append(_InputIterator __first, _InputIterator __last) > { return this->replace(end(), end(), __first, __last); } > > > > > > > > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > append(const _Tp& __svt) > { > __sv_type __sv = __svt; > return this->append(__sv.data(), __sv.size()); > } ># 1542 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > append(const _Tp& __svt, size_type __pos, size_type __n = npos) > { > __sv_type __sv = __svt; > return _M_append(__sv.data() > + std::__sv_check(__sv.size(), __pos, "basic_string::append"), > std::__sv_limit(__sv.size(), __pos, __n)); > } > > > > > > > > void > push_back(_CharT __c) > { > const size_type __size = this->size(); > if (__size + 1 > this->capacity()) > this->_M_mutate(__size, size_type(0), 0, size_type(1)); > traits_type::assign(this->_M_data()[__size], __c); > this->_M_set_length(__size + 1); > } > > > > > > > > basic_string& > assign(const basic_string& __str) > { > > if (_Alloc_traits::_S_propagate_on_copy_assign()) > { > if (!_Alloc_traits::_S_always_equal() && !_M_is_local() > && _M_get_allocator() != __str._M_get_allocator()) > { > > > if (__str.size() <= _S_local_capacity) > { > _M_destroy(_M_allocated_capacity); > _M_data(_M_use_local_data()); > _M_set_length(0); > } > else > { > const auto __len = __str.size(); > auto __alloc = __str._M_get_allocator(); > > auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); > _M_destroy(_M_allocated_capacity); > _M_data(__ptr); > _M_capacity(__len); > _M_set_length(__len); > } > } > std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); > } > > this->_M_assign(__str); > return *this; > } ># 1620 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > assign(basic_string&& __str) > noexcept(_Alloc_traits::_S_nothrow_move()) > { > > > return *this = std::move(__str); > } ># 1644 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > assign(const basic_string& __str, size_type __pos, size_type __n = npos) > { return _M_replace(size_type(0), this->size(), __str._M_data() > + __str._M_check(__pos, "basic_string::assign"), > __str._M_limit(__pos, __n)); } ># 1661 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > assign(const _CharT* __s, size_type __n) > { > ; > return _M_replace(size_type(0), this->size(), __s, __n); > } ># 1678 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > assign(const _CharT* __s) > { > ; > return _M_replace(size_type(0), this->size(), __s, > traits_type::length(__s)); > } ># 1696 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > assign(size_type __n, _CharT __c) > { return _M_replace_aux(size_type(0), this->size(), __n, __c); } ># 1710 "/usr/include/c++/13/bits/basic_string.h" 3 > template<class _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > > > > basic_string& > assign(_InputIterator __first, _InputIterator __last) > { return this->replace(begin(), end(), __first, __last); } > > > > > > > > > basic_string& > assign(initializer_list<_CharT> __l) > { return this->assign(__l.begin(), __l.size()); } ># 1738 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > assign(const _Tp& __svt) > { > __sv_type __sv = __svt; > return this->assign(__sv.data(), __sv.size()); > } ># 1754 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > assign(const _Tp& __svt, size_type __pos, size_type __n = npos) > { > __sv_type __sv = __svt; > return _M_replace(size_type(0), this->size(), > __sv.data() > + std::__sv_check(__sv.size(), __pos, "basic_string::assign"), > std::__sv_limit(__sv.size(), __pos, __n)); > } ># 1783 "/usr/include/c++/13/bits/basic_string.h" 3 > > iterator > insert(const_iterator __p, size_type __n, _CharT __c) > { > ; > const size_type __pos = __p - begin(); > this->replace(__p, __p, __n, __c); > return iterator(this->_M_data() + __pos); > } ># 1826 "/usr/include/c++/13/bits/basic_string.h" 3 > template<class _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > iterator > insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) > { > ; > const size_type __pos = __p - begin(); > this->replace(__p, __p, __beg, __end); > return iterator(this->_M_data() + __pos); > } ># 1863 "/usr/include/c++/13/bits/basic_string.h" 3 > > iterator > insert(const_iterator __p, initializer_list<_CharT> __l) > { return this->insert(__p, __l.begin(), __l.end()); } ># 1891 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > insert(size_type __pos1, const basic_string& __str) > { return this->replace(__pos1, size_type(0), > __str._M_data(), __str.size()); } ># 1915 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > insert(size_type __pos1, const basic_string& __str, > size_type __pos2, size_type __n = npos) > { return this->replace(__pos1, size_type(0), __str._M_data() > + __str._M_check(__pos2, "basic_string::insert"), > __str._M_limit(__pos2, __n)); } ># 1939 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > insert(size_type __pos, const _CharT* __s, size_type __n) > { return this->replace(__pos, size_type(0), __s, __n); } ># 1959 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > insert(size_type __pos, const _CharT* __s) > { > ; > return this->replace(__pos, size_type(0), __s, > traits_type::length(__s)); > } ># 1984 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > insert(size_type __pos, size_type __n, _CharT __c) > { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), > size_type(0), __n, __c); } ># 2003 "/usr/include/c++/13/bits/basic_string.h" 3 > > iterator > insert(__const_iterator __p, _CharT __c) > { > ; > const size_type __pos = __p - begin(); > _M_replace_aux(__pos, size_type(0), size_type(1), __c); > return iterator(_M_data() + __pos); > } ># 2020 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > insert(size_type __pos, const _Tp& __svt) > { > __sv_type __sv = __svt; > return this->insert(__pos, __sv.data(), __sv.size()); > } ># 2037 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > insert(size_type __pos1, const _Tp& __svt, > size_type __pos2, size_type __n = npos) > { > __sv_type __sv = __svt; > return this->replace(__pos1, size_type(0), > __sv.data() > + std::__sv_check(__sv.size(), __pos2, "basic_string::insert"), > std::__sv_limit(__sv.size(), __pos2, __n)); > } ># 2066 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > erase(size_type __pos = 0, size_type __n = npos) > { > _M_check(__pos, "basic_string::erase"); > if (__n == npos) > this->_M_set_length(__pos); > else if (__n != 0) > this->_M_erase(__pos, _M_limit(__pos, __n)); > return *this; > } ># 2086 "/usr/include/c++/13/bits/basic_string.h" 3 > > iterator > erase(__const_iterator __position) > { > > ; > const size_type __pos = __position - begin(); > this->_M_erase(__pos, size_type(1)); > return iterator(_M_data() + __pos); > } ># 2106 "/usr/include/c++/13/bits/basic_string.h" 3 > > iterator > erase(__const_iterator __first, __const_iterator __last) > { > > ; > const size_type __pos = __first - begin(); > if (__last == end()) > this->_M_set_length(__pos); > else > this->_M_erase(__pos, __last - __first); > return iterator(this->_M_data() + __pos); > } > > > > > > > > > void > pop_back() noexcept > { > do { if (std::__is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); > _M_erase(size() - 1, 1); > } ># 2152 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(size_type __pos, size_type __n, const basic_string& __str) > { return this->replace(__pos, __n, __str._M_data(), __str.size()); } ># 2175 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(size_type __pos1, size_type __n1, const basic_string& __str, > size_type __pos2, size_type __n2 = npos) > { return this->replace(__pos1, __n1, __str._M_data() > + __str._M_check(__pos2, "basic_string::replace"), > __str._M_limit(__pos2, __n2)); } ># 2201 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(size_type __pos, size_type __n1, const _CharT* __s, > size_type __n2) > { > ; > return _M_replace(_M_check(__pos, "basic_string::replace"), > _M_limit(__pos, __n1), __s, __n2); > } ># 2227 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(size_type __pos, size_type __n1, const _CharT* __s) > { > ; > return this->replace(__pos, __n1, __s, traits_type::length(__s)); > } ># 2252 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) > { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), > _M_limit(__pos, __n1), __n2, __c); } ># 2271 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(__const_iterator __i1, __const_iterator __i2, > const basic_string& __str) > { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } ># 2292 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(__const_iterator __i1, __const_iterator __i2, > const _CharT* __s, size_type __n) > { > > ; > return this->replace(__i1 - begin(), __i2 - __i1, __s, __n); > } ># 2315 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) > { > ; > return this->replace(__i1, __i2, __s, traits_type::length(__s)); > } ># 2337 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(__const_iterator __i1, __const_iterator __i2, size_type __n, > _CharT __c) > { > > ; > return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c); > } ># 2363 "/usr/include/c++/13/bits/basic_string.h" 3 > template<class _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > basic_string& > replace(const_iterator __i1, const_iterator __i2, > _InputIterator __k1, _InputIterator __k2) > { > > ; > ; > return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, > std::__false_type()); > } ># 2396 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& > replace(__const_iterator __i1, __const_iterator __i2, > _CharT* __k1, _CharT* __k2) > { > > ; > ; > return this->replace(__i1 - begin(), __i2 - __i1, > __k1, __k2 - __k1); > } > > > basic_string& > replace(__const_iterator __i1, __const_iterator __i2, > const _CharT* __k1, const _CharT* __k2) > { > > ; > ; > return this->replace(__i1 - begin(), __i2 - __i1, > __k1, __k2 - __k1); > } > > > basic_string& > replace(__const_iterator __i1, __const_iterator __i2, > iterator __k1, iterator __k2) > { > > ; > ; > return this->replace(__i1 - begin(), __i2 - __i1, > __k1.base(), __k2 - __k1); > } > > > basic_string& > replace(__const_iterator __i1, __const_iterator __i2, > const_iterator __k1, const_iterator __k2) > { > > ; > ; > return this->replace(__i1 - begin(), __i2 - __i1, > __k1.base(), __k2 - __k1); > } ># 2459 "/usr/include/c++/13/bits/basic_string.h" 3 > > basic_string& replace(const_iterator __i1, const_iterator __i2, > initializer_list<_CharT> __l) > { return this->replace(__i1, __i2, __l.begin(), __l.size()); } ># 2473 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > replace(size_type __pos, size_type __n, const _Tp& __svt) > { > __sv_type __sv = __svt; > return this->replace(__pos, __n, __sv.data(), __sv.size()); > } ># 2491 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > replace(size_type __pos1, size_type __n1, const _Tp& __svt, > size_type __pos2, size_type __n2 = npos) > { > __sv_type __sv = __svt; > return this->replace(__pos1, __n1, > __sv.data() > + std::__sv_check(__sv.size(), __pos2, "basic_string::replace"), > std::__sv_limit(__sv.size(), __pos2, __n2)); > } ># 2513 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > > _If_sv<_Tp, basic_string&> > replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) > { > __sv_type __sv = __svt; > return this->replace(__i1 - begin(), __i2 - __i1, __sv); > } > > > private: > template<class _Integer> > > basic_string& > _M_replace_dispatch(const_iterator __i1, const_iterator __i2, > _Integer __n, _Integer __val, __true_type) > { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } > > template<class _InputIterator> > > basic_string& > _M_replace_dispatch(const_iterator __i1, const_iterator __i2, > _InputIterator __k1, _InputIterator __k2, > __false_type); > > > basic_string& > _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, > _CharT __c); > > __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); > > > basic_string& > _M_replace(size_type __pos, size_type __len1, const _CharT* __s, > const size_type __len2); > > > basic_string& > _M_append(const _CharT* __s, size_type __n); > > public: ># 2570 "/usr/include/c++/13/bits/basic_string.h" 3 > > size_type > copy(_CharT* __s, size_type __n, size_type __pos = 0) const; ># 2581 "/usr/include/c++/13/bits/basic_string.h" 3 > > void > swap(basic_string& __s) noexcept; ># 2592 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > const _CharT* > c_str() const noexcept > { return _M_data(); } ># 2605 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > const _CharT* > data() const noexcept > { return _M_data(); } ># 2617 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > _CharT* > data() noexcept > { return _M_data(); } > > > > > > [[__nodiscard__]] > allocator_type > get_allocator() const noexcept > { return _M_get_allocator(); } ># 2643 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find(const _CharT* __s, size_type __pos, size_type __n) const > noexcept; ># 2658 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find(const basic_string& __str, size_type __pos = 0) const > noexcept > { return this->find(__str.data(), __pos, __str.size()); } ># 2671 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, size_type> > find(const _Tp& __svt, size_type __pos = 0) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > return this->find(__sv.data(), __pos, __sv.size()); > } ># 2692 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find(const _CharT* __s, size_type __pos = 0) const noexcept > { > ; > return this->find(__s, __pos, traits_type::length(__s)); > } ># 2710 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find(_CharT __c, size_type __pos = 0) const noexcept; ># 2724 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > rfind(const basic_string& __str, size_type __pos = npos) const > noexcept > { return this->rfind(__str.data(), __pos, __str.size()); } ># 2737 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, size_type> > rfind(const _Tp& __svt, size_type __pos = npos) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > return this->rfind(__sv.data(), __pos, __sv.size()); > } ># 2760 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > rfind(const _CharT* __s, size_type __pos, size_type __n) const > noexcept; ># 2775 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > rfind(const _CharT* __s, size_type __pos = npos) const > { > ; > return this->rfind(__s, __pos, traits_type::length(__s)); > } ># 2793 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > rfind(_CharT __c, size_type __pos = npos) const noexcept; ># 2808 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_first_of(const basic_string& __str, size_type __pos = 0) const > noexcept > { return this->find_first_of(__str.data(), __pos, __str.size()); } ># 2822 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, size_type> > find_first_of(const _Tp& __svt, size_type __pos = 0) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > return this->find_first_of(__sv.data(), __pos, __sv.size()); > } ># 2845 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_first_of(const _CharT* __s, size_type __pos, size_type __n) const > noexcept; ># 2860 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_first_of(const _CharT* __s, size_type __pos = 0) const > noexcept > { > ; > return this->find_first_of(__s, __pos, traits_type::length(__s)); > } ># 2881 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_first_of(_CharT __c, size_type __pos = 0) const noexcept > { return this->find(__c, __pos); } ># 2897 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_last_of(const basic_string& __str, size_type __pos = npos) const > noexcept > { return this->find_last_of(__str.data(), __pos, __str.size()); } ># 2911 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, size_type> > find_last_of(const _Tp& __svt, size_type __pos = npos) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > return this->find_last_of(__sv.data(), __pos, __sv.size()); > } ># 2934 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_last_of(const _CharT* __s, size_type __pos, size_type __n) const > noexcept; ># 2949 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_last_of(const _CharT* __s, size_type __pos = npos) const > noexcept > { > ; > return this->find_last_of(__s, __pos, traits_type::length(__s)); > } ># 2970 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_last_of(_CharT __c, size_type __pos = npos) const noexcept > { return this->rfind(__c, __pos); } ># 2985 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_first_not_of(const basic_string& __str, size_type __pos = 0) const > noexcept > { return this->find_first_not_of(__str.data(), __pos, __str.size()); } ># 2999 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, size_type> > find_first_not_of(const _Tp& __svt, size_type __pos = 0) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > return this->find_first_not_of(__sv.data(), __pos, __sv.size()); > } ># 3022 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_first_not_of(const _CharT* __s, size_type __pos, > size_type __n) const noexcept; ># 3037 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_first_not_of(const _CharT* __s, size_type __pos = 0) const > noexcept > { > ; > return this->find_first_not_of(__s, __pos, traits_type::length(__s)); > } ># 3056 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_first_not_of(_CharT __c, size_type __pos = 0) const > noexcept; ># 3072 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_last_not_of(const basic_string& __str, size_type __pos = npos) const > noexcept > { return this->find_last_not_of(__str.data(), __pos, __str.size()); } ># 3086 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, size_type> > find_last_not_of(const _Tp& __svt, size_type __pos = npos) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > return this->find_last_not_of(__sv.data(), __pos, __sv.size()); > } ># 3109 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_last_not_of(const _CharT* __s, size_type __pos, > size_type __n) const noexcept; ># 3124 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_last_not_of(const _CharT* __s, size_type __pos = npos) const > noexcept > { > ; > return this->find_last_not_of(__s, __pos, traits_type::length(__s)); > } ># 3143 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > size_type > find_last_not_of(_CharT __c, size_type __pos = npos) const > noexcept; ># 3160 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > basic_string > substr(size_type __pos = 0, size_type __n = npos) const > { return basic_string(*this, > _M_check(__pos, "basic_string::substr"), __n); } ># 3180 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > int > compare(const basic_string& __str) const > { > const size_type __size = this->size(); > const size_type __osize = __str.size(); > const size_type __len = std::min(__size, __osize); > > int __r = traits_type::compare(_M_data(), __str.data(), __len); > if (!__r) > __r = _S_compare(__size, __osize); > return __r; > } > > > > > > > > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, int> > compare(const _Tp& __svt) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > const size_type __size = this->size(); > const size_type __osize = __sv.size(); > const size_type __len = std::min(__size, __osize); > > int __r = traits_type::compare(_M_data(), __sv.data(), __len); > if (!__r) > __r = _S_compare(__size, __osize); > return __r; > } ># 3225 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, int> > compare(size_type __pos, size_type __n, const _Tp& __svt) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > return __sv_type(*this).substr(__pos, __n).compare(__sv); > } ># 3245 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _Tp> > [[__nodiscard__]] > _If_sv<_Tp, int> > compare(size_type __pos1, size_type __n1, const _Tp& __svt, > size_type __pos2, size_type __n2 = npos) const > noexcept(is_same<_Tp, __sv_type>::value) > { > __sv_type __sv = __svt; > return __sv_type(*this) > .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2)); > } ># 3277 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > int > compare(size_type __pos, size_type __n, const basic_string& __str) const > { > _M_check(__pos, "basic_string::compare"); > __n = _M_limit(__pos, __n); > const size_type __osize = __str.size(); > const size_type __len = std::min(__n, __osize); > int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); > if (!__r) > __r = _S_compare(__n, __osize); > return __r; > } ># 3314 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > int > compare(size_type __pos1, size_type __n1, const basic_string& __str, > size_type __pos2, size_type __n2 = npos) const > { > _M_check(__pos1, "basic_string::compare"); > __str._M_check(__pos2, "basic_string::compare"); > __n1 = _M_limit(__pos1, __n1); > __n2 = __str._M_limit(__pos2, __n2); > const size_type __len = std::min(__n1, __n2); > int __r = traits_type::compare(_M_data() + __pos1, > __str.data() + __pos2, __len); > if (!__r) > __r = _S_compare(__n1, __n2); > return __r; > } ># 3345 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > int > compare(const _CharT* __s) const noexcept > { > ; > const size_type __size = this->size(); > const size_type __osize = traits_type::length(__s); > const size_type __len = std::min(__size, __osize); > int __r = traits_type::compare(_M_data(), __s, __len); > if (!__r) > __r = _S_compare(__size, __osize); > return __r; > } ># 3380 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > int > compare(size_type __pos, size_type __n1, const _CharT* __s) const > { > ; > _M_check(__pos, "basic_string::compare"); > __n1 = _M_limit(__pos, __n1); > const size_type __osize = traits_type::length(__s); > const size_type __len = std::min(__n1, __osize); > int __r = traits_type::compare(_M_data() + __pos, __s, __len); > if (!__r) > __r = _S_compare(__n1, __osize); > return __r; > } ># 3419 "/usr/include/c++/13/bits/basic_string.h" 3 > [[__nodiscard__]] > int > compare(size_type __pos, size_type __n1, const _CharT* __s, > size_type __n2) const > { > ; > _M_check(__pos, "basic_string::compare"); > __n1 = _M_limit(__pos, __n1); > const size_type __len = std::min(__n1, __n2); > int __r = traits_type::compare(_M_data() + __pos, __s, __len); > if (!__r) > __r = _S_compare(__n1, __n2); > return __r; > } ># 3484 "/usr/include/c++/13/bits/basic_string.h" 3 > 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> > > inline _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) > { > typedef typename _Str::allocator_type allocator_type; > typedef __gnu_cxx::__alloc_traits<allocator_type> _Alloc_traits; > _Str __str(_Alloc_traits::_S_select_on_copy(__a)); > __str.reserve(__lhs_len + __rhs_len); > __str.append(__lhs, __lhs_len); > __str.append(__rhs, __rhs_len); > return __str; > } ># 3549 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > { > typedef basic_string<_CharT, _Traits, _Alloc> _Str; > return std::__str_concat<_Str>(__lhs.c_str(), __lhs.size(), > __rhs.c_str(), __rhs.size(), > __lhs.get_allocator()); > } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT,_Traits,_Alloc> > operator+(const _CharT* __lhs, > const basic_string<_CharT,_Traits,_Alloc>& __rhs) > { > ; > typedef basic_string<_CharT, _Traits, _Alloc> _Str; > return std::__str_concat<_Str>(__lhs, _Traits::length(__lhs), > __rhs.c_str(), __rhs.size(), > __rhs.get_allocator()); > } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT,_Traits,_Alloc> > operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) > { > typedef basic_string<_CharT, _Traits, _Alloc> _Str; > return std::__str_concat<_Str>(__builtin_addressof(__lhs), 1, > __rhs.c_str(), __rhs.size(), > __rhs.get_allocator()); > } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const _CharT* __rhs) > { > ; > typedef basic_string<_CharT, _Traits, _Alloc> _Str; > return std::__str_concat<_Str>(__lhs.c_str(), __lhs.size(), > __rhs, _Traits::length(__rhs), > __lhs.get_allocator()); > } > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) > { > typedef basic_string<_CharT, _Traits, _Alloc> _Str; > return std::__str_concat<_Str>(__lhs.c_str(), __lhs.size(), > __builtin_addressof(__rhs), 1, > __lhs.get_allocator()); > } > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > { return std::move(__lhs.append(__rhs)); } > > template<typename _CharT, typename _Traits, typename _Alloc> > > inline basic_string<_CharT, _Traits, _Alloc> > operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > basic_string<_CharT, _Traits, _Alloc>&& __rhs) > { return std::move(__rhs.insert(0, __lhs)); } > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, > basic_string<_CharT, _Traits, _Alloc>&& __rhs) > { > > using _Alloc_traits = allocator_traits<_Alloc>; > bool __use_rhs = false; > if constexpr (typename _Alloc_traits::is_always_equal{}) > __use_rhs = true; > else if (__lhs.get_allocator() == __rhs.get_allocator()) > __use_rhs = true; > if (__use_rhs) > > { > const auto __size = __lhs.size() + __rhs.size(); > if (__size > __lhs.capacity() && __size <= __rhs.capacity()) > return std::move(__rhs.insert(0, __lhs)); > } > return std::move(__lhs.append(__rhs)); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(const _CharT* __lhs, > basic_string<_CharT, _Traits, _Alloc>&& __rhs) > { return std::move(__rhs.insert(0, __lhs)); } > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(_CharT __lhs, > basic_string<_CharT, _Traits, _Alloc>&& __rhs) > { return std::move(__rhs.insert(0, 1, __lhs)); } > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, > const _CharT* __rhs) > { return std::move(__lhs.append(__rhs)); } > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline basic_string<_CharT, _Traits, _Alloc> > operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, > _CharT __rhs) > { return std::move(__lhs.append(1, __rhs)); } ># 3706 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > noexcept > { > return __lhs.size() == __rhs.size() > && !_Traits::compare(__lhs.data(), __rhs.data(), __lhs.size()); > } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const _CharT* __rhs) > { > return __lhs.size() == _Traits::length(__rhs) > && !_Traits::compare(__lhs.data(), __rhs, __lhs.size()); > } ># 3770 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator==(const _CharT* __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > { return __rhs == __lhs; } ># 3784 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > noexcept > { return !(__lhs == __rhs); } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator!=(const _CharT* __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > { return !(__rhs == __lhs); } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const _CharT* __rhs) > { return !(__lhs == __rhs); } ># 3825 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > noexcept > { return __lhs.compare(__rhs) < 0; } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const _CharT* __rhs) > { return __lhs.compare(__rhs) < 0; } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<(const _CharT* __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > { return __rhs.compare(__lhs) > 0; } ># 3866 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > noexcept > { return __lhs.compare(__rhs) > 0; } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const _CharT* __rhs) > { return __lhs.compare(__rhs) > 0; } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>(const _CharT* __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > { return __rhs.compare(__lhs) < 0; } ># 3907 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > noexcept > { return __lhs.compare(__rhs) <= 0; } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const _CharT* __rhs) > { return __lhs.compare(__rhs) <= 0; } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<=(const _CharT* __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > { return __rhs.compare(__lhs) >= 0; } ># 3948 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > noexcept > { return __lhs.compare(__rhs) >= 0; } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, > const _CharT* __rhs) > { return __lhs.compare(__rhs) >= 0; } > > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>=(const _CharT* __lhs, > const basic_string<_CharT, _Traits, _Alloc>& __rhs) > { return __rhs.compare(__lhs) <= 0; } ># 3990 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > > inline void > swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, > basic_string<_CharT, _Traits, _Alloc>& __rhs) > noexcept(noexcept(__lhs.swap(__rhs))) > { __lhs.swap(__rhs); } ># 4011 "/usr/include/c++/13/bits/basic_string.h" 3 > 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); ># 4029 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, > const basic_string<_CharT, _Traits, _Alloc>& __str) > { > > > return __ostream_insert(__os, __str.data(), __str.size()); > } ># 4052 "/usr/include/c++/13/bits/basic_string.h" 3 > 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); ># 4069 "/usr/include/c++/13/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > inline basic_istream<_CharT, _Traits>& > getline(basic_istream<_CharT, _Traits>& __is, > basic_string<_CharT, _Traits, _Alloc>& __str) > { return std::getline(__is, __str, __is.widen('\n')); } > > > > template<typename _CharT, typename _Traits, typename _Alloc> > inline basic_istream<_CharT, _Traits>& > getline(basic_istream<_CharT, _Traits>&& __is, > basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) > { return std::getline(__is, __str, __delim); } > > > template<typename _CharT, typename _Traits, typename _Alloc> > inline basic_istream<_CharT, _Traits>& > getline(basic_istream<_CharT, _Traits>&& __is, > basic_string<_CharT, _Traits, _Alloc>& __str) > { return std::getline(__is, __str); } > > > 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); > > > >} > > > ># 1 "/usr/include/c++/13/ext/string_conversions.h" 1 3 ># 32 "/usr/include/c++/13/ext/string_conversions.h" 3 > ># 33 "/usr/include/c++/13/ext/string_conversions.h" 3 ># 43 "/usr/include/c++/13/ext/string_conversions.h" 3 ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 79 "/usr/include/c++/13/cstdlib" 3 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 26 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/include/bits/libc-header-start.h" 1 3 4 ># 27 "/usr/include/stdlib.h" 2 3 4 > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 2 3 4 > >extern "C" { > > > > > ># 1 "/usr/include/bits/waitflags.h" 1 3 4 ># 41 "/usr/include/stdlib.h" 2 3 4 ># 1 "/usr/include/bits/waitstatus.h" 1 3 4 ># 42 "/usr/include/stdlib.h" 2 3 4 ># 59 "/usr/include/stdlib.h" 3 4 >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; ># 98 "/usr/include/stdlib.h" 3 4 >extern size_t __ctype_get_mb_cur_max (void) noexcept (true) ; > > > >extern double atof (const char *__nptr) > noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > >extern int atoi (const char *__nptr) > noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > >extern long int atol (const char *__nptr) > noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > >__extension__ extern long long int atoll (const char *__nptr) > noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > >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))); ># 141 "/usr/include/stdlib.h" 3 4 >extern _Float32 strtof32 (const char *__restrict __nptr, > char **__restrict __endptr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern _Float64 strtof64 (const char *__restrict __nptr, > char **__restrict __endptr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern _Float128 strtof128 (const char *__restrict __nptr, > char **__restrict __endptr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern _Float32x strtof32x (const char *__restrict __nptr, > char **__restrict __endptr) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern _Float64x strtof64x (const char *__restrict __nptr, > char **__restrict __endptr) > noexcept (true) __attribute__ ((__nonnull__ (1))); ># 177 "/usr/include/stdlib.h" 3 4 >extern long int strtol (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > noexcept (true) __attribute__ ((__nonnull__ (1))); > >extern unsigned long int strtoul (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >__extension__ >extern long long int strtoq (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > noexcept (true) __attribute__ ((__nonnull__ (1))); > >__extension__ >extern unsigned long long int strtouq (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > >__extension__ >extern long long int strtoll (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > noexcept (true) __attribute__ ((__nonnull__ (1))); > >__extension__ >extern unsigned long long int strtoull (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > >extern int strfromd (char *__dest, size_t __size, const char *__format, > double __f) > noexcept (true) __attribute__ ((__nonnull__ (3))); > >extern int strfromf (char *__dest, size_t __size, const char *__format, > float __f) > noexcept (true) __attribute__ ((__nonnull__ (3))); > >extern int strfroml (char *__dest, size_t __size, const char *__format, > long double __f) > noexcept (true) __attribute__ ((__nonnull__ (3))); ># 233 "/usr/include/stdlib.h" 3 4 >extern int strfromf32 (char *__dest, size_t __size, const char * __format, > _Float32 __f) > noexcept (true) __attribute__ ((__nonnull__ (3))); > > > >extern int strfromf64 (char *__dest, size_t __size, const char * __format, > _Float64 __f) > noexcept (true) __attribute__ ((__nonnull__ (3))); > > > >extern int strfromf128 (char *__dest, size_t __size, const char * __format, > _Float128 __f) > noexcept (true) __attribute__ ((__nonnull__ (3))); > > > >extern int strfromf32x (char *__dest, size_t __size, const char * __format, > _Float32x __f) > noexcept (true) __attribute__ ((__nonnull__ (3))); > > > >extern int strfromf64x (char *__dest, size_t __size, const char * __format, > _Float64x __f) > noexcept (true) __attribute__ ((__nonnull__ (3))); ># 275 "/usr/include/stdlib.h" 3 4 >extern long int strtol_l (const char *__restrict __nptr, > char **__restrict __endptr, int __base, > locale_t __loc) noexcept (true) __attribute__ ((__nonnull__ (1, 4))); > >extern unsigned long int strtoul_l (const char *__restrict __nptr, > char **__restrict __endptr, > int __base, locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 4))); > >__extension__ >extern long long int strtoll_l (const char *__restrict __nptr, > char **__restrict __endptr, int __base, > locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 4))); > >__extension__ >extern unsigned long long int strtoull_l (const char *__restrict __nptr, > char **__restrict __endptr, > int __base, locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 4))); > >extern double strtod_l (const char *__restrict __nptr, > char **__restrict __endptr, locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > >extern float strtof_l (const char *__restrict __nptr, > char **__restrict __endptr, locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > >extern long double strtold_l (const char *__restrict __nptr, > char **__restrict __endptr, > locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); ># 317 "/usr/include/stdlib.h" 3 4 >extern _Float32 strtof32_l (const char *__restrict __nptr, > char **__restrict __endptr, > locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > > > >extern _Float64 strtof64_l (const char *__restrict __nptr, > char **__restrict __endptr, > locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > > > >extern _Float128 strtof128_l (const char *__restrict __nptr, > char **__restrict __endptr, > locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > > > >extern _Float32x strtof32x_l (const char *__restrict __nptr, > char **__restrict __endptr, > locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); > > > >extern _Float64x strtof64x_l (const char *__restrict __nptr, > char **__restrict __endptr, > locale_t __loc) > noexcept (true) __attribute__ ((__nonnull__ (1, 3))); ># 386 "/usr/include/stdlib.h" 3 4 >extern char *l64a (long int __n) noexcept (true) ; > > >extern long int a64l (const char *__s) > noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; > > > > ># 1 "/usr/include/sys/types.h" 1 3 4 ># 27 "/usr/include/sys/types.h" 3 4 >extern "C" { > > > > > >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 __ino64_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 __off64_t off_t; > > > > >typedef __off64_t off64_t; ># 103 "/usr/include/sys/types.h" 3 4 >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; ># 134 "/usr/include/sys/types.h" 3 4 >typedef __useconds_t useconds_t; > > > >typedef __suseconds_t suseconds_t; > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 145 "/usr/include/sys/types.h" 2 3 4 > > > >typedef unsigned long int ulong; >typedef unsigned short int ushort; >typedef unsigned int uint; > > > > ># 1 "/usr/include/bits/stdint-intn.h" 1 3 4 ># 24 "/usr/include/bits/stdint-intn.h" 3 4 >typedef __int8_t int8_t; >typedef __int16_t int16_t; >typedef __int32_t int32_t; >typedef __int64_t int64_t; ># 156 "/usr/include/sys/types.h" 2 3 4 > > >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__))); ># 176 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/endian.h" 1 3 4 ># 35 "/usr/include/endian.h" 3 4 ># 1 "/usr/include/bits/byteswap.h" 1 3 4 ># 33 "/usr/include/bits/byteswap.h" 3 4 >static __inline __uint16_t >__bswap_16 (__uint16_t __bsx) >{ > > return __builtin_bswap16 (__bsx); > > > >} > > > > > > >static __inline __uint32_t >__bswap_32 (__uint32_t __bsx) >{ > > return __builtin_bswap32 (__bsx); > > > >} ># 69 "/usr/include/bits/byteswap.h" 3 4 >__extension__ static __inline __uint64_t >__bswap_64 (__uint64_t __bsx) >{ > > return __builtin_bswap64 (__bsx); > > > >} ># 36 "/usr/include/endian.h" 2 3 4 ># 1 "/usr/include/bits/uintn-identity.h" 1 3 4 ># 32 "/usr/include/bits/uintn-identity.h" 3 4 >static __inline __uint16_t >__uint16_identity (__uint16_t __x) >{ > return __x; >} > >static __inline __uint32_t >__uint32_identity (__uint32_t __x) >{ > return __x; >} > >static __inline __uint64_t >__uint64_identity (__uint64_t __x) >{ > return __x; >} ># 37 "/usr/include/endian.h" 2 3 4 ># 177 "/usr/include/sys/types.h" 2 3 4 > > ># 1 "/usr/include/sys/select.h" 1 3 4 ># 30 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/bits/select.h" 1 3 4 ># 31 "/usr/include/sys/select.h" 2 3 4 > > ># 1 "/usr/include/bits/types/sigset_t.h" 1 3 4 > > > > > > >typedef __sigset_t sigset_t; ># 34 "/usr/include/sys/select.h" 2 3 4 ># 49 "/usr/include/sys/select.h" 3 4 >typedef long int __fd_mask; ># 59 "/usr/include/sys/select.h" 3 4 >typedef struct > { > > > > __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; > > > > > > } fd_set; > > > > > > >typedef __fd_mask fd_mask; ># 91 "/usr/include/sys/select.h" 3 4 >extern "C" { ># 102 "/usr/include/sys/select.h" 3 4 >extern int select (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > struct timeval *__restrict __timeout); ># 127 "/usr/include/sys/select.h" 3 4 >extern int pselect (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > const struct timespec *__restrict __timeout, > const __sigset_t *__restrict __sigmask); ># 153 "/usr/include/sys/select.h" 3 4 >} ># 180 "/usr/include/sys/types.h" 2 3 4 > > > > > >typedef __blksize_t blksize_t; ># 205 "/usr/include/sys/types.h" 3 4 >typedef __blkcnt64_t blkcnt_t; > > > >typedef __fsblkcnt64_t fsblkcnt_t; > > > >typedef __fsfilcnt64_t fsfilcnt_t; > > > > > >typedef __blkcnt64_t blkcnt64_t; >typedef __fsblkcnt64_t fsblkcnt64_t; >typedef __fsfilcnt64_t fsfilcnt64_t; ># 230 "/usr/include/sys/types.h" 3 4 >} ># 396 "/usr/include/stdlib.h" 2 3 4 > > > > > > >extern long int random (void) noexcept (true); > > >extern void srandom (unsigned int __seed) noexcept (true); > > > > > >extern char *initstate (unsigned int __seed, char *__statebuf, > size_t __statelen) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > >extern char *setstate (char *__statebuf) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > > > >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; > }; > >extern int random_r (struct random_data *__restrict __buf, > int32_t *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > >extern int srandom_r (unsigned int __seed, struct random_data *__buf) > noexcept (true) __attribute__ ((__nonnull__ (2))); > >extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, > size_t __statelen, > struct random_data *__restrict __buf) > noexcept (true) __attribute__ ((__nonnull__ (2, 4))); > >extern int setstate_r (char *__restrict __statebuf, > struct random_data *__restrict __buf) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern int rand (void) noexcept (true); > >extern void srand (unsigned int __seed) noexcept (true); > > > >extern int rand_r (unsigned int *__seed) noexcept (true); > > > > > > > >extern double drand48 (void) noexcept (true); >extern double erand48 (unsigned short int __xsubi[3]) noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern long int lrand48 (void) noexcept (true); >extern long int nrand48 (unsigned short int __xsubi[3]) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern long int mrand48 (void) noexcept (true); >extern long int jrand48 (unsigned short int __xsubi[3]) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern void srand48 (long int __seedval) noexcept (true); >extern unsigned short int *seed48 (unsigned short int __seed16v[3]) > noexcept (true) __attribute__ ((__nonnull__ (1))); >extern void lcong48 (unsigned short int __param[7]) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >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 int drand48_r (struct drand48_data *__restrict __buffer, > double *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); >extern int erand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > double *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int lrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); >extern int nrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int mrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); >extern int jrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern int srand48_r (long int __seedval, struct drand48_data *__buffer) > noexcept (true) __attribute__ ((__nonnull__ (2))); > >extern int seed48_r (unsigned short int __seed16v[3], > struct drand48_data *__buffer) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > >extern int lcong48_r (unsigned short int __param[7], > struct drand48_data *__buffer) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > >extern __uint32_t arc4random (void) > noexcept (true) ; > > >extern void arc4random_buf (void *__buf, size_t __size) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern __uint32_t arc4random_uniform (__uint32_t __upper_bound) > noexcept (true) ; > > > > >extern void *malloc (size_t __size) noexcept (true) __attribute__ ((__malloc__)) > __attribute__ ((__alloc_size__ (1))) ; > >extern void *calloc (size_t __nmemb, size_t __size) > noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) ; > > > > > > >extern void *realloc (void *__ptr, size_t __size) > noexcept (true) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2))); > > >extern void free (void *__ptr) noexcept (true); > > > > > > > >extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) > noexcept (true) __attribute__ ((__warn_unused_result__)) > __attribute__ ((__alloc_size__ (2, 3))) > __attribute__ ((__malloc__ (__builtin_free, 1))); > > >extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) > noexcept (true) __attribute__ ((__malloc__ (reallocarray, 1))); > > > ># 1 "/usr/include/alloca.h" 1 3 4 ># 24 "/usr/include/alloca.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 25 "/usr/include/alloca.h" 2 3 4 > >extern "C" { > > > > > >extern void *alloca (size_t __size) noexcept (true); > > > > > >} ># 588 "/usr/include/stdlib.h" 2 3 4 > > > > > >extern void *valloc (size_t __size) noexcept (true) __attribute__ ((__malloc__)) > __attribute__ ((__alloc_size__ (1))) ; > > > > >extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) > noexcept (true) __attribute__ ((__nonnull__ (1))) ; > > > > >extern void *aligned_alloc (size_t __alignment, size_t __size) > noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__alloc_align__ (1))) > __attribute__ ((__alloc_size__ (2))) ; > > > >extern void abort (void) noexcept (true) __attribute__ ((__noreturn__)); > > > >extern int atexit (void (*__func) (void)) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > >extern "C++" int at_quick_exit (void (*__func) (void)) > noexcept (true) __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); ># 630 "/usr/include/stdlib.h" 3 4 >extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern void exit (int __status) noexcept (true) __attribute__ ((__noreturn__)); > > > > > >extern void quick_exit (int __status) noexcept (true) __attribute__ ((__noreturn__)); > > > > > >extern void _Exit (int __status) noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern char *getenv (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))) ; > > > > >extern char *secure_getenv (const char *__name) > noexcept (true) __attribute__ ((__nonnull__ (1))) ; > > > > > > >extern int putenv (char *__string) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern int setenv (const char *__name, const char *__value, int __replace) > noexcept (true) __attribute__ ((__nonnull__ (2))); > > >extern int unsetenv (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int clearenv (void) noexcept (true); ># 695 "/usr/include/stdlib.h" 3 4 >extern char *mktemp (char *__template) noexcept (true) __attribute__ ((__nonnull__ (1))); ># 711 "/usr/include/stdlib.h" 3 4 >extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") > __attribute__ ((__nonnull__ (1))) ; > > > > > >extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; ># 733 "/usr/include/stdlib.h" 3 4 >extern int mkstemps (char *__template, int __suffixlen) __asm__ ("" "mkstemps64") > __attribute__ ((__nonnull__ (1))) ; > > > > > >extern int mkstemps64 (char *__template, int __suffixlen) > __attribute__ ((__nonnull__ (1))) ; ># 751 "/usr/include/stdlib.h" 3 4 >extern char *mkdtemp (char *__template) noexcept (true) __attribute__ ((__nonnull__ (1))) ; ># 765 "/usr/include/stdlib.h" 3 4 >extern int mkostemp (char *__template, int __flags) __asm__ ("" "mkostemp64") > __attribute__ ((__nonnull__ (1))) ; > > > > > >extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; ># 786 "/usr/include/stdlib.h" 3 4 >extern int mkostemps (char *__template, int __suffixlen, int __flags) __asm__ ("" "mkostemps64") > > __attribute__ ((__nonnull__ (1))) ; > > > > > >extern int mkostemps64 (char *__template, int __suffixlen, int __flags) > __attribute__ ((__nonnull__ (1))) ; ># 804 "/usr/include/stdlib.h" 3 4 >extern int system (const char *__command) ; > > > > > >extern char *canonicalize_file_name (const char *__name) > noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__malloc__)) > __attribute__ ((__malloc__ (__builtin_free, 1))) ; ># 821 "/usr/include/stdlib.h" 3 4 >extern char *realpath (const char *__restrict __name, > char *__restrict __resolved) noexcept (true) ; > > > > > > >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 void *bsearch (const void *__key, const void *__base, > size_t __nmemb, size_t __size, __compar_fn_t __compar) > __attribute__ ((__nonnull__ (1, 2, 5))) ; > > > > > > > >extern void qsort (void *__base, size_t __nmemb, size_t __size, > __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); > >extern void qsort_r (void *__base, size_t __nmemb, size_t __size, > __compar_d_fn_t __compar, void *__arg) > __attribute__ ((__nonnull__ (1, 4))); > > > > >extern int abs (int __x) noexcept (true) __attribute__ ((__const__)) ; >extern long int labs (long int __x) noexcept (true) __attribute__ ((__const__)) ; > > >__extension__ extern long long int llabs (long long int __x) > noexcept (true) __attribute__ ((__const__)) ; > > > > > > >extern div_t div (int __numer, int __denom) > noexcept (true) __attribute__ ((__const__)) ; >extern ldiv_t ldiv (long int __numer, long int __denom) > noexcept (true) __attribute__ ((__const__)) ; > > >__extension__ extern lldiv_t lldiv (long long int __numer, > long long int __denom) > noexcept (true) __attribute__ ((__const__)) ; ># 893 "/usr/include/stdlib.h" 3 4 >extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) noexcept (true) __attribute__ ((__nonnull__ (3, 4))) ; > > > > >extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) noexcept (true) __attribute__ ((__nonnull__ (3, 4))) ; > > > > >extern char *gcvt (double __value, int __ndigit, char *__buf) > noexcept (true) __attribute__ ((__nonnull__ (3))) ; > > > > >extern char *qecvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > noexcept (true) __attribute__ ((__nonnull__ (3, 4))) ; >extern char *qfcvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > noexcept (true) __attribute__ ((__nonnull__ (3, 4))) ; >extern char *qgcvt (long double __value, int __ndigit, char *__buf) > noexcept (true) __attribute__ ((__nonnull__ (3))) ; > > > > >extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5))); >extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5))); > >extern int qecvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) > noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5))); >extern int qfcvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) > noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5))); > > > > > >extern int mblen (const char *__s, size_t __n) noexcept (true); > > >extern int mbtowc (wchar_t *__restrict __pwc, > const char *__restrict __s, size_t __n) noexcept (true); > > >extern int wctomb (char *__s, wchar_t __wchar) noexcept (true); > > > >extern size_t mbstowcs (wchar_t *__restrict __pwcs, > const char *__restrict __s, size_t __n) noexcept (true) > __attribute__ ((__access__ (__read_only__, 2))); > >extern size_t wcstombs (char *__restrict __s, > const wchar_t *__restrict __pwcs, size_t __n) > noexcept (true) > __attribute__ ((__access__ (__write_only__, 1, 3))) > __attribute__ ((__access__ (__read_only__, 2))); > > > > > > >extern int rpmatch (const char *__response) noexcept (true) __attribute__ ((__nonnull__ (1))) ; ># 980 "/usr/include/stdlib.h" 3 4 >extern int getsubopt (char **__restrict __optionp, > char *const *__restrict __tokens, > char **__restrict __valuep) > noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))) ; > > > > > > > >extern int posix_openpt (int __oflag) ; > > > > > > > >extern int grantpt (int __fd) noexcept (true); > > > >extern int unlockpt (int __fd) noexcept (true); > > > > >extern char *ptsname (int __fd) noexcept (true) ; > > > > > > >extern int ptsname_r (int __fd, char *__buf, size_t __buflen) > noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3))); > > >extern int getpt (void); > > > > > > >extern int getloadavg (double __loadavg[], int __nelem) > noexcept (true) __attribute__ ((__nonnull__ (1))); ># 1036 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/include/bits/stdlib-float.h" 1 3 4 ># 1037 "/usr/include/stdlib.h" 2 3 4 ># 1048 "/usr/include/stdlib.h" 3 4 >} ># 80 "/usr/include/c++/13/cstdlib" 2 3 > ># 1 "/usr/include/c++/13/bits/std_abs.h" 1 3 ># 33 "/usr/include/c++/13/bits/std_abs.h" 3 > ># 34 "/usr/include/c++/13/bits/std_abs.h" 3 ># 46 "/usr/include/c++/13/bits/std_abs.h" 3 >extern "C++" >{ >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > using ::abs; > > > inline long > abs(long __i) { return __builtin_labs(__i); } > > > > inline long long > abs(long long __x) { return __builtin_llabs (__x); } ># 70 "/usr/include/c++/13/bits/std_abs.h" 3 > inline constexpr double > abs(double __x) > { return __builtin_fabs(__x); } > > inline constexpr float > abs(float __x) > { return __builtin_fabsf(__x); } > > inline constexpr long double > abs(long double __x) > { return __builtin_fabsl(__x); } ># 141 "/usr/include/c++/13/bits/std_abs.h" 3 > >} >} ># 82 "/usr/include/c++/13/cstdlib" 2 3 ># 125 "/usr/include/c++/13/cstdlib" 3 >extern "C++" >{ >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > using ::div_t; > using ::ldiv_t; > > using ::abort; > > using ::aligned_alloc; > > using ::atexit; > > > using ::at_quick_exit; > > > using ::atof; > using ::atoi; > using ::atol; > using ::bsearch; > using ::calloc; > using ::div; > using ::exit; > using ::free; > using ::getenv; > using ::labs; > using ::ldiv; > using ::malloc; > > using ::mblen; > using ::mbstowcs; > using ::mbtowc; > > using ::qsort; > > > using ::quick_exit; > > > using ::rand; > using ::realloc; > using ::srand; > using ::strtod; > using ::strtol; > using ::strtoul; > using ::system; > > using ::wcstombs; > using ::wctomb; > > > > inline ldiv_t > div(long __i, long __j) noexcept { return ldiv(__i, __j); } > > > > >} ># 199 "/usr/include/c++/13/cstdlib" 3 >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > > using ::lldiv_t; > > > > > > using ::_Exit; > > > > using ::llabs; > > inline lldiv_t > div(long long __n, long long __d) > { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } > > using ::lldiv; ># 231 "/usr/include/c++/13/cstdlib" 3 > using ::atoll; > using ::strtoll; > using ::strtoull; > > using ::strtof; > using ::strtold; > > >} > >namespace std >{ > > using ::__gnu_cxx::lldiv_t; > > using ::__gnu_cxx::_Exit; > > using ::__gnu_cxx::llabs; > using ::__gnu_cxx::div; > using ::__gnu_cxx::lldiv; > > using ::__gnu_cxx::atoll; > using ::__gnu_cxx::strtof; > using ::__gnu_cxx::strtoll; > using ::__gnu_cxx::strtoull; > using ::__gnu_cxx::strtold; >} > > > >} ># 44 "/usr/include/c++/13/ext/string_conversions.h" 2 3 ># 1 "/usr/include/c++/13/cwchar" 1 3 ># 39 "/usr/include/c++/13/cwchar" 3 > ># 40 "/usr/include/c++/13/cwchar" 3 ># 45 "/usr/include/c++/13/ext/string_conversions.h" 2 3 ># 1 "/usr/include/c++/13/cstdio" 1 3 ># 39 "/usr/include/c++/13/cstdio" 3 > ># 40 "/usr/include/c++/13/cstdio" 3 > > ># 1 "/usr/include/stdio.h" 1 3 4 ># 27 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/libc-header-start.h" 1 3 4 ># 28 "/usr/include/stdio.h" 2 3 4 > >extern "C" { > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 34 "/usr/include/stdio.h" 2 3 4 > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stdarg.h" 1 3 4 ># 37 "/usr/include/stdio.h" 2 3 4 > > ># 1 "/usr/include/bits/types/__fpos_t.h" 1 3 4 ># 10 "/usr/include/bits/types/__fpos_t.h" 3 4 >typedef struct _G_fpos_t >{ > __off_t __pos; > __mbstate_t __state; >} __fpos_t; ># 40 "/usr/include/stdio.h" 2 3 4 ># 1 "/usr/include/bits/types/__fpos64_t.h" 1 3 4 ># 10 "/usr/include/bits/types/__fpos64_t.h" 3 4 >typedef struct _G_fpos64_t >{ > __off64_t __pos; > __mbstate_t __state; >} __fpos64_t; ># 41 "/usr/include/stdio.h" 2 3 4 > > ># 1 "/usr/include/bits/types/struct_FILE.h" 1 3 4 ># 35 "/usr/include/bits/types/struct_FILE.h" 3 4 >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)]; >}; ># 44 "/usr/include/stdio.h" 2 3 4 > > ># 1 "/usr/include/bits/types/cookie_io_functions_t.h" 1 3 4 ># 27 "/usr/include/bits/types/cookie_io_functions_t.h" 3 4 >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; ># 47 "/usr/include/stdio.h" 2 3 4 > > > > > >typedef __gnuc_va_list va_list; ># 86 "/usr/include/stdio.h" 3 4 >typedef __fpos64_t fpos_t; > > >typedef __fpos64_t fpos64_t; ># 133 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 134 "/usr/include/stdio.h" 2 3 4 ># 143 "/usr/include/stdio.h" 3 4 >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); ># 170 "/usr/include/stdio.h" 3 4 >extern int renameat2 (int __oldfd, const char *__old, int __newfd, > const char *__new, unsigned int __flags) noexcept (true); > > > > > > >extern int fclose (FILE *__stream); ># 192 "/usr/include/stdio.h" 3 4 >extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ; > > > > > > >extern FILE *tmpfile64 (void) > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ; > > > >extern char *tmpnam (char[20]) noexcept (true) ; > > > > >extern char *tmpnam_r (char __s[20]) noexcept (true) ; ># 222 "/usr/include/stdio.h" 3 4 >extern char *tempnam (const char *__dir, const char *__pfx) > noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (__builtin_free, 1))); > > > > > > >extern int fflush (FILE *__stream); ># 239 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 249 "/usr/include/stdio.h" 3 4 >extern int fcloseall (void); ># 270 "/usr/include/stdio.h" 3 4 >extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __asm__ ("" "fopen64") > > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ; >extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64") > > > ; > > > > > > >extern FILE *fopen64 (const char *__restrict __filename, > const char *__restrict __modes) > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ; >extern FILE *freopen64 (const char *__restrict __filename, > const char *__restrict __modes, > FILE *__restrict __stream) ; > > > > >extern FILE *fdopen (int __fd, const char *__modes) noexcept (true) > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ; > > > > > >extern FILE *fopencookie (void *__restrict __magic_cookie, > const char *__restrict __modes, > cookie_io_functions_t __io_funcs) noexcept (true) > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ; > > > > >extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) > noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ; > > > > >extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) noexcept (true) > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ; > > > > > >extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) noexcept (true) > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))); > > > > > >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))) ; >extern int __asprintf (char **__restrict __ptr, > const char *__restrict __fmt, ...) > noexcept (true) __attribute__ ((__format__ (__printf__, 2, 3))) ; >extern int asprintf (char **__restrict __ptr, > const char *__restrict __fmt, ...) > noexcept (true) __attribute__ ((__format__ (__printf__, 2, 3))) ; > > > > >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, ...) ; > > > > >extern int scanf (const char *__restrict __format, ...) ; > >extern int sscanf (const char *__restrict __s, > const char *__restrict __format, ...) noexcept (true); ># 434 "/usr/include/stdio.h" 3 4 >extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") > > ; >extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") > ; >extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) noexcept (true) __asm__ ("" "__isoc99_sscanf") > > ; ># 459 "/usr/include/stdio.h" 3 4 >extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))) ; > > > > > >extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 1, 0))) ; > > >extern int vsscanf (const char *__restrict __s, > const char *__restrict __format, __gnuc_va_list __arg) > noexcept (true) __attribute__ ((__format__ (__scanf__, 2, 0))); > > > > > >extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") > > > > __attribute__ ((__format__ (__scanf__, 2, 0))) ; >extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") > > __attribute__ ((__format__ (__scanf__, 1, 0))) ; >extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) noexcept (true) __asm__ ("" "__isoc99_vsscanf") > > > > __attribute__ ((__format__ (__scanf__, 2, 0))); ># 513 "/usr/include/stdio.h" 3 4 >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); > > > > > > >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 538 "/usr/include/stdio.h" 3 4 >extern int fgetc_unlocked (FILE *__stream); ># 549 "/usr/include/stdio.h" 3 4 >extern int fputc (int __c, FILE *__stream); >extern int putc (int __c, FILE *__stream); > > > > > >extern int putchar (int __c); ># 565 "/usr/include/stdio.h" 3 4 >extern int fputc_unlocked (int __c, FILE *__stream); > > > > > > > >extern int putc_unlocked (int __c, FILE *__stream); >extern int putchar_unlocked (int __c); > > > > > > >extern int getw (FILE *__stream); > > >extern int putw (int __w, FILE *__stream); > > > > > > > >extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) > __attribute__ ((__access__ (__write_only__, 1, 2))); ># 615 "/usr/include/stdio.h" 3 4 >extern char *fgets_unlocked (char *__restrict __s, int __n, > FILE *__restrict __stream) > __attribute__ ((__access__ (__write_only__, 1, 2))); ># 632 "/usr/include/stdio.h" 3 4 >extern __ssize_t __getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) ; >extern __ssize_t getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) ; > > > > > > > >extern __ssize_t getline (char **__restrict __lineptr, > size_t *__restrict __n, > FILE *__restrict __stream) ; > > > > > > > >extern int fputs (const char *__restrict __s, FILE *__restrict __stream); > > > > > >extern int puts (const char *__s); > > > > > > >extern int ungetc (int __c, FILE *__stream); > > > > > > >extern size_t fread (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) ; > > > > >extern size_t fwrite (const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __s); ># 691 "/usr/include/stdio.h" 3 4 >extern int fputs_unlocked (const char *__restrict __s, > FILE *__restrict __stream); ># 702 "/usr/include/stdio.h" 3 4 >extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) ; >extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); > > > > > > > >extern int fseek (FILE *__stream, long int __off, int __whence); > > > > >extern long int ftell (FILE *__stream) ; > > > > >extern void rewind (FILE *__stream); ># 744 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64") > > ; >extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); ># 768 "/usr/include/stdio.h" 3 4 >extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64") > ; >extern int fsetpos (FILE *__stream, const fpos_t *__pos) __asm__ ("" "fsetpos64") > ; > > > > > > > >extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); >extern __off64_t ftello64 (FILE *__stream) ; >extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); >extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); > > > >extern void clearerr (FILE *__stream) noexcept (true); > >extern int feof (FILE *__stream) noexcept (true) ; > >extern int ferror (FILE *__stream) noexcept (true) ; > > > >extern void clearerr_unlocked (FILE *__stream) noexcept (true); >extern int feof_unlocked (FILE *__stream) noexcept (true) ; >extern int ferror_unlocked (FILE *__stream) noexcept (true) ; > > > > > > > >extern void perror (const char *__s); > > > > >extern int fileno (FILE *__stream) noexcept (true) ; > > > > >extern int fileno_unlocked (FILE *__stream) noexcept (true) ; ># 823 "/usr/include/stdio.h" 3 4 >extern int pclose (FILE *__stream); > > > > > >extern FILE *popen (const char *__command, const char *__modes) > __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (pclose, 1))) ; > > > > > > >extern char *ctermid (char *__s) noexcept (true) > __attribute__ ((__access__ (__write_only__, 1))); > > > > > >extern char *cuserid (char *__s) > __attribute__ ((__access__ (__write_only__, 1))); > > > > >struct obstack; > > >extern int obstack_printf (struct obstack *__restrict __obstack, > const char *__restrict __format, ...) > noexcept (true) __attribute__ ((__format__ (__printf__, 2, 3))); >extern int obstack_vprintf (struct obstack *__restrict __obstack, > const char *__restrict __format, > __gnuc_va_list __args) > noexcept (true) __attribute__ ((__format__ (__printf__, 2, 0))); > > > > > > > >extern void flockfile (FILE *__stream) noexcept (true); > > > >extern int ftrylockfile (FILE *__stream) noexcept (true) ; > > >extern void funlockfile (FILE *__stream) noexcept (true); ># 885 "/usr/include/stdio.h" 3 4 >extern int __uflow (FILE *); >extern int __overflow (FILE *, int); ># 909 "/usr/include/stdio.h" 3 4 >} ># 43 "/usr/include/c++/13/cstdio" 2 3 ># 96 "/usr/include/c++/13/cstdio" 3 >namespace std >{ > using ::FILE; > using ::fpos_t; > > using ::clearerr; > using ::fclose; > using ::feof; > using ::ferror; > using ::fflush; > using ::fgetc; > using ::fgetpos; > using ::fgets; > using ::fopen; > using ::fprintf; > using ::fputc; > using ::fputs; > using ::fread; > using ::freopen; > using ::fscanf; > using ::fseek; > using ::fsetpos; > using ::ftell; > using ::fwrite; > using ::getc; > using ::getchar; > > > > > using ::perror; > using ::printf; > using ::putc; > using ::putchar; > using ::puts; > using ::remove; > using ::rename; > using ::rewind; > using ::scanf; > using ::setbuf; > using ::setvbuf; > using ::sprintf; > using ::sscanf; > using ::tmpfile; > > using ::tmpnam; > > using ::ungetc; > using ::vfprintf; > using ::vprintf; > using ::vsprintf; >} ># 157 "/usr/include/c++/13/cstdio" 3 >namespace __gnu_cxx >{ ># 175 "/usr/include/c++/13/cstdio" 3 > using ::snprintf; > using ::vfscanf; > using ::vscanf; > using ::vsnprintf; > using ::vsscanf; > >} > >namespace std >{ > using ::__gnu_cxx::snprintf; > using ::__gnu_cxx::vfscanf; > using ::__gnu_cxx::vscanf; > using ::__gnu_cxx::vsnprintf; > using ::__gnu_cxx::vsscanf; >} ># 46 "/usr/include/c++/13/ext/string_conversions.h" 2 3 ># 1 "/usr/include/c++/13/cerrno" 1 3 ># 39 "/usr/include/c++/13/cerrno" 3 > ># 40 "/usr/include/c++/13/cerrno" 3 > > ># 1 "/usr/include/errno.h" 1 3 4 ># 28 "/usr/include/errno.h" 3 4 ># 1 "/usr/include/bits/errno.h" 1 3 4 ># 26 "/usr/include/bits/errno.h" 3 4 ># 1 "/usr/include/linux/errno.h" 1 3 4 ># 1 "/usr/include/asm/errno.h" 1 3 4 ># 1 "/usr/include/asm-generic/errno.h" 1 3 4 > > > > ># 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 ># 6 "/usr/include/asm-generic/errno.h" 2 3 4 ># 2 "/usr/include/asm/errno.h" 2 3 4 ># 2 "/usr/include/linux/errno.h" 2 3 4 ># 27 "/usr/include/bits/errno.h" 2 3 4 ># 29 "/usr/include/errno.h" 2 3 4 > > > > > >extern "C" { > > >extern int *__errno_location (void) noexcept (true) __attribute__ ((__const__)); > > > > > > > >extern char *program_invocation_name; >extern char *program_invocation_short_name; > ># 1 "/usr/include/bits/types/error_t.h" 1 3 4 ># 22 "/usr/include/bits/types/error_t.h" 3 4 >typedef int error_t; ># 49 "/usr/include/errno.h" 2 3 4 > > > >} ># 43 "/usr/include/c++/13/cerrno" 2 3 ># 47 "/usr/include/c++/13/ext/string_conversions.h" 2 3 > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _TRet, typename _Ret = _TRet, typename _CharT, > typename... _Base> > _Ret > __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), > const char* __name, const _CharT* __str, std::size_t* __idx, > _Base... __base) > { > _Ret __ret; > > _CharT* __endptr; > > struct _Save_errno { > _Save_errno() : _M_errno((*__errno_location ())) { (*__errno_location ()) = 0; } > ~_Save_errno() { if ((*__errno_location ()) == 0) (*__errno_location ()) = _M_errno; } > int _M_errno; > } const __save_errno; > > struct _Range_chk { > static bool > _S_chk(_TRet, std::false_type) { return false; } > > static bool > _S_chk(_TRet __val, std::true_type) > { > return __val < _TRet(__numeric_traits<int>::__min) > || __val > _TRet(__numeric_traits<int>::__max); > } > }; > > const _TRet __tmp = __convf(__str, &__endptr, __base...); > > if (__endptr == __str) > std::__throw_invalid_argument(__name); > else if ((*__errno_location ()) == 34 > || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) > std::__throw_out_of_range(__name); > else > __ret = __tmp; > > if (__idx) > *__idx = __endptr - __str; > > return __ret; > } > > > template<typename _String, typename _CharT = typename _String::value_type> > _String > __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, > __builtin_va_list), std::size_t __n, > const _CharT* __fmt, ...) > { > > > _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) > * __n)); > > __builtin_va_list __args; > __builtin_va_start(__args, __fmt); > > const int __len = __convf(__s, __n, __fmt, __args); > > __builtin_va_end(__args); > > return _String(__s, __s + __len); > } > > >} ># 4109 "/usr/include/c++/13/bits/basic_string.h" 2 3 ># 1 "/usr/include/c++/13/bits/charconv.h" 1 3 ># 33 "/usr/include/c++/13/bits/charconv.h" 3 > ># 34 "/usr/include/c++/13/bits/charconv.h" 3 > > > > > > >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 > { > > static_assert(__integer_to_chars_is_unsigned<_Tp>, "implementation bug"); > > > unsigned __n = 1; > const unsigned __b2 = __base * __base; > const unsigned __b3 = __b2 * __base; > const unsigned long __b4 = __b3 * __base; > for (;;) > { > if (__value < (unsigned)__base) return __n; > if (__value < __b2) return __n + 1; > if (__value < __b3) return __n + 2; > if (__value < __b4) return __n + 3; > __value /= __b4; > __n += 4; > } > } > > > > > template<typename _Tp> > void > __to_chars_10_impl(char* __first, unsigned __len, _Tp __val) noexcept > { > > static_assert(__integer_to_chars_is_unsigned<_Tp>, "implementation bug"); > > > constexpr char __digits[201] = > "0001020304050607080910111213141516171819" > "2021222324252627282930313233343536373839" > "4041424344454647484950515253545556575859" > "6061626364656667686970717273747576777879" > "8081828384858687888990919293949596979899"; > unsigned __pos = __len - 1; > while (__val >= 100) > { > auto const __num = (__val % 100) * 2; > __val /= 100; > __first[__pos] = __digits[__num + 1]; > __first[__pos - 1] = __digits[__num]; > __pos -= 2; > } > if (__val >= 10) > { > auto const __num = __val * 2; > __first[1] = __digits[__num + 1]; > __first[0] = __digits[__num]; > } > else > __first[0] = '0' + __val; > } > >} > >} ># 4110 "/usr/include/c++/13/bits/basic_string.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > >namespace __cxx11 { > > > > inline int > stoi(const string& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(), > __idx, __base); } > > inline long > stol(const string& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), > __idx, __base); } > > inline unsigned long > stoul(const string& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), > __idx, __base); } > > inline long long > stoll(const string& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), > __idx, __base); } > > inline unsigned long long > stoull(const string& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), > __idx, __base); } > > > inline float > stof(const string& __str, size_t* __idx = 0) > { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } > > inline double > stod(const string& __str, size_t* __idx = 0) > { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } > > inline long double > stold(const string& __str, size_t* __idx = 0) > { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } > > > > > [[__nodiscard__]] > inline string > to_string(int __val) > > noexcept > > { > const bool __neg = __val < 0; > const unsigned __uval = __neg ? (unsigned)~__val + 1u : __val; > const auto __len = __detail::__to_chars_len(__uval); > string __str(__neg + __len, '-'); > __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); > return __str; > } > > [[__nodiscard__]] > inline string > to_string(unsigned __val) > > noexcept > > { > string __str(__detail::__to_chars_len(__val), '\0'); > __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); > return __str; > } > > [[__nodiscard__]] > inline string > to_string(long __val) > > > > { > const bool __neg = __val < 0; > const unsigned long __uval = __neg ? (unsigned long)~__val + 1ul : __val; > const auto __len = __detail::__to_chars_len(__uval); > string __str(__neg + __len, '-'); > __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); > return __str; > } > > [[__nodiscard__]] > inline string > to_string(unsigned long __val) > > > > { > string __str(__detail::__to_chars_len(__val), '\0'); > __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); > return __str; > } > > [[__nodiscard__]] > inline string > to_string(long long __val) > { > const bool __neg = __val < 0; > const unsigned long long __uval > = __neg ? (unsigned long long)~__val + 1ull : __val; > const auto __len = __detail::__to_chars_len(__uval); > string __str(__neg + __len, '-'); > __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); > return __str; > } > > [[__nodiscard__]] > inline string > to_string(unsigned long long __val) > { > string __str(__detail::__to_chars_len(__val), '\0'); > __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); > return __str; > } > > > > > [[__nodiscard__]] > inline string > to_string(float __val) > { > const int __n = > __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20; > return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, > "%f", __val); > } > > [[__nodiscard__]] > inline string > to_string(double __val) > { > const int __n = > __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20; > return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, > "%f", __val); > } > > [[__nodiscard__]] > inline string > to_string(long double __val) > { > const int __n = > __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20; > return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, > "%Lf", __val); > } > > > > inline int > stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(), > __idx, __base); } > > inline long > stol(const wstring& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), > __idx, __base); } > > inline unsigned long > stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), > __idx, __base); } > > inline long long > stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), > __idx, __base); } > > inline unsigned long long > stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) > { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), > __idx, __base); } > > > inline float > stof(const wstring& __str, size_t* __idx = 0) > { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } > > inline double > stod(const wstring& __str, size_t* __idx = 0) > { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } > > inline long double > stold(const wstring& __str, size_t* __idx = 0) > { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } > > > > [[__nodiscard__]] > inline wstring > to_wstring(int __val) > { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(int), > L"%d", __val); } > > [[__nodiscard__]] > inline wstring > to_wstring(unsigned __val) > { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, > 4 * sizeof(unsigned), > L"%u", __val); } > > [[__nodiscard__]] > inline wstring > to_wstring(long __val) > { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(long), > L"%ld", __val); } > > [[__nodiscard__]] > inline wstring > to_wstring(unsigned long __val) > { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, > 4 * sizeof(unsigned long), > L"%lu", __val); } > > [[__nodiscard__]] > inline wstring > to_wstring(long long __val) > { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, > 4 * sizeof(long long), > L"%lld", __val); } > > [[__nodiscard__]] > inline wstring > to_wstring(unsigned long long __val) > { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, > 4 * sizeof(unsigned long long), > L"%llu", __val); } > > [[__nodiscard__]] > inline wstring > to_wstring(float __val) > { > const int __n = > __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20; > return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, > L"%f", __val); > } > > [[__nodiscard__]] > inline wstring > to_wstring(double __val) > { > const int __n = > __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20; > return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, > L"%f", __val); > } > > [[__nodiscard__]] > inline wstring > to_wstring(long double __val) > { > const int __n = > __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20; > return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, > L"%Lf", __val); > } > > > >} > >} > > > > > > > >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 > { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(_CharT)); } > }; > > > > 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 > { }; ># 4439 "/usr/include/c++/13/bits/basic_string.h" 3 > 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 { }; ># 4471 "/usr/include/c++/13/bits/basic_string.h" 3 > inline namespace literals > { > inline namespace string_literals > { >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wliteral-suffix" > > > > > > > > __attribute ((__abi_tag__ ("cxx11"))) > inline basic_string<char> > operator""s(const char* __str, size_t __len) > { return basic_string<char>{__str, __len}; } > > __attribute ((__abi_tag__ ("cxx11"))) > inline basic_string<wchar_t> > operator""s(const wchar_t* __str, size_t __len) > { return basic_string<wchar_t>{__str, __len}; } ># 4501 "/usr/include/c++/13/bits/basic_string.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > inline basic_string<char16_t> > operator""s(const char16_t* __str, size_t __len) > { return basic_string<char16_t>{__str, __len}; } > > __attribute ((__abi_tag__ ("cxx11"))) > inline basic_string<char32_t> > operator""s(const char32_t* __str, size_t __len) > { return basic_string<char32_t>{__str, __len}; } > > >#pragma GCC diagnostic pop > } > } > > > 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 > { }; > } > > > > >} ># 55 "/usr/include/c++/13/string" 2 3 ># 1 "/usr/include/c++/13/bits/basic_string.tcc" 1 3 ># 42 "/usr/include/c++/13/bits/basic_string.tcc" 3 > ># 43 "/usr/include/c++/13/bits/basic_string.tcc" 3 > > > >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> > > void > basic_string<_CharT, _Traits, _Alloc>:: > swap(basic_string& __s) noexcept > { > if (this == std::__addressof(__s)) > return; > > _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); > > if (_M_is_local()) > if (__s._M_is_local()) > { > if (length() && __s.length()) > { > _CharT __tmp_data[_S_local_capacity + 1]; > traits_type::copy(__tmp_data, __s._M_local_buf, > __s.length() + 1); > traits_type::copy(__s._M_local_buf, _M_local_buf, > length() + 1); > traits_type::copy(_M_local_buf, __tmp_data, > __s.length() + 1); > } > else if (__s.length()) > { > traits_type::copy(_M_local_buf, __s._M_local_buf, > __s.length() + 1); > _M_length(__s.length()); > __s._M_set_length(0); > return; > } > else if (length()) > { > traits_type::copy(__s._M_local_buf, _M_local_buf, > length() + 1); > __s._M_length(length()); > _M_set_length(0); > return; > } > } > else > { > const size_type __tmp_capacity = __s._M_allocated_capacity; > traits_type::copy(__s._M_local_buf, _M_local_buf, > length() + 1); > _M_data(__s._M_data()); > __s._M_data(__s._M_local_buf); > _M_capacity(__tmp_capacity); > } > else > { > const size_type __tmp_capacity = _M_allocated_capacity; > if (__s._M_is_local()) > { > traits_type::copy(_M_local_buf, __s._M_local_buf, > __s.length() + 1); > __s._M_data(_M_data()); > _M_data(_M_local_buf); > } > else > { > pointer __tmp_ptr = _M_data(); > _M_data(__s._M_data()); > __s._M_data(__tmp_ptr); > _M_capacity(__s._M_allocated_capacity); > } > __s._M_capacity(__tmp_capacity); > } > > const size_type __tmp_length = length(); > _M_length(__s.length()); > __s._M_length(__tmp_length); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::pointer > basic_string<_CharT, _Traits, _Alloc>:: > _M_create(size_type& __capacity, size_type __old_capacity) > { > > > if (__capacity > max_size()) > std::__throw_length_error(("basic_string::_M_create")); > > > > > if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) > { > __capacity = 2 * __old_capacity; > > if (__capacity > max_size()) > __capacity = max_size(); > } > > > > return _Alloc_traits::allocate(_M_get_allocator(), __capacity + 1); > } > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > template<typename _InIterator> > > void > basic_string<_CharT, _Traits, _Alloc>:: > _M_construct(_InIterator __beg, _InIterator __end, > std::input_iterator_tag) > { > size_type __len = 0; > size_type __capacity = size_type(_S_local_capacity); > > pointer __p = _M_use_local_data(); > > while (__beg != __end && __len < __capacity) > { > __p[__len++] = *__beg; > ++__beg; > } > > struct _Guard > { > > explicit _Guard(basic_string* __s) : _M_guarded(__s) { } > > > ~_Guard() { if (_M_guarded) _M_guarded->_M_dispose(); } > > basic_string* _M_guarded; > } __guard(this); > > while (__beg != __end) > { > if (__len == __capacity) > { > > __capacity = __len + 1; > pointer __another = _M_create(__capacity, __len); > this->_S_copy(__another, _M_data(), __len); > _M_dispose(); > _M_data(__another); > _M_capacity(__capacity); > } > traits_type::assign(_M_data()[__len++], *__beg); > ++__beg; > } > > __guard._M_guarded = 0; > > _M_set_length(__len); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > template<typename _InIterator> > > void > basic_string<_CharT, _Traits, _Alloc>:: > _M_construct(_InIterator __beg, _InIterator __end, > std::forward_iterator_tag) > { > size_type __dnew = static_cast<size_type>(std::distance(__beg, __end)); > > if (__dnew > size_type(_S_local_capacity)) > { > _M_data(_M_create(__dnew, size_type(0))); > _M_capacity(__dnew); > } > else > _M_use_local_data(); > > > struct _Guard > { > > explicit _Guard(basic_string* __s) : _M_guarded(__s) { } > > > ~_Guard() { if (_M_guarded) _M_guarded->_M_dispose(); } > > basic_string* _M_guarded; > } __guard(this); > > this->_S_copy_chars(_M_data(), __beg, __end); > > __guard._M_guarded = 0; > > _M_set_length(__dnew); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > void > basic_string<_CharT, _Traits, _Alloc>:: > _M_construct(size_type __n, _CharT __c) > { > if (__n > size_type(_S_local_capacity)) > { > _M_data(_M_create(__n, size_type(0))); > _M_capacity(__n); > } > else > _M_use_local_data(); > > if (__n) > this->_S_assign(_M_data(), __n, __c); > > _M_set_length(__n); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > void > basic_string<_CharT, _Traits, _Alloc>:: > _M_assign(const basic_string& __str) > { > if (this != std::__addressof(__str)) > { > const size_type __rsize = __str.length(); > const size_type __capacity = capacity(); > > if (__rsize > __capacity) > { > size_type __new_capacity = __rsize; > pointer __tmp = _M_create(__new_capacity, __capacity); > _M_dispose(); > _M_data(__tmp); > _M_capacity(__new_capacity); > } > > if (__rsize) > this->_S_copy(_M_data(), __str._M_data(), __rsize); > > _M_set_length(__rsize); > } > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > void > basic_string<_CharT, _Traits, _Alloc>:: > reserve(size_type __res) > { > const size_type __capacity = capacity(); > > > > > if (__res <= __capacity) > return; > > pointer __tmp = _M_create(__res, __capacity); > this->_S_copy(__tmp, _M_data(), length() + 1); > _M_dispose(); > _M_data(__tmp); > _M_capacity(__res); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > void > basic_string<_CharT, _Traits, _Alloc>:: > _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, > size_type __len2) > { > const size_type __how_much = length() - __pos - __len1; > > size_type __new_capacity = length() + __len2 - __len1; > pointer __r = _M_create(__new_capacity, capacity()); > > if (__pos) > this->_S_copy(__r, _M_data(), __pos); > if (__s && __len2) > this->_S_copy(__r + __pos, __s, __len2); > if (__how_much) > this->_S_copy(__r + __pos + __len2, > _M_data() + __pos + __len1, __how_much); > > _M_dispose(); > _M_data(__r); > _M_capacity(__new_capacity); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > void > basic_string<_CharT, _Traits, _Alloc>:: > _M_erase(size_type __pos, size_type __n) > { > const size_type __how_much = length() - __pos - __n; > > if (__how_much && __n) > this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); > > _M_set_length(length() - __n); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > void > basic_string<_CharT, _Traits, _Alloc>:: > reserve() > { > if (_M_is_local()) > return; > > const size_type __length = length(); > const size_type __capacity = _M_allocated_capacity; > > if (__length <= size_type(_S_local_capacity)) > { > this->_S_copy(_M_use_local_data(), _M_data(), __length + 1); > _M_destroy(__capacity); > _M_data(_M_local_data()); > } > > else if (__length < __capacity) > try > { > pointer __tmp > = _Alloc_traits::allocate(_M_get_allocator(), __length + 1); > this->_S_copy(__tmp, _M_data(), __length + 1); > _M_dispose(); > _M_data(__tmp); > _M_capacity(__length); > } > catch (const __cxxabiv1::__forced_unwind&) > { throw; } > catch (...) > { } > > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > void > basic_string<_CharT, _Traits, _Alloc>:: > resize(size_type __n, _CharT __c) > { > const size_type __size = this->size(); > if (__size < __n) > this->append(__n - __size, __c); > else if (__n < __size) > this->_M_set_length(__n); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > _M_append(const _CharT* __s, size_type __n) > { > const size_type __len = __n + this->size(); > > if (__len <= this->capacity()) > { > if (__n) > this->_S_copy(this->_M_data() + this->size(), __s, __n); > } > else > this->_M_mutate(this->size(), size_type(0), __s, __n); > > this->_M_set_length(__len); > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > template<typename _InputIterator> > > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > _M_replace_dispatch(const_iterator __i1, const_iterator __i2, > _InputIterator __k1, _InputIterator __k2, > std::__false_type) > { > > > const basic_string __s(__k1, __k2, this->get_allocator()); > const size_type __n1 = __i2 - __i1; > return _M_replace(__i1 - begin(), __n1, __s._M_data(), > __s.size()); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, > _CharT __c) > { > _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); > > const size_type __old_size = this->size(); > const size_type __new_size = __old_size + __n2 - __n1; > > if (__new_size <= this->capacity()) > { > pointer __p = this->_M_data() + __pos1; > > const size_type __how_much = __old_size - __pos1 - __n1; > if (__how_much && __n1 != __n2) > this->_S_move(__p + __n2, __p + __n1, __how_much); > } > else > this->_M_mutate(__pos1, __n1, 0, __n2); > > if (__n2) > this->_S_assign(this->_M_data() + __pos1, __n2, __c); > > this->_M_set_length(__new_size); > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > __attribute__((__noinline__, __noclone__, __cold__)) void > basic_string<_CharT, _Traits, _Alloc>:: > _M_replace_cold(pointer __p, size_type __len1, const _CharT* __s, > const size_type __len2, const size_type __how_much) > { > > if (__len2 && __len2 <= __len1) > this->_S_move(__p, __s, __len2); > if (__how_much && __len1 != __len2) > this->_S_move(__p + __len2, __p + __len1, __how_much); > if (__len2 > __len1) > { > if (__s + __len2 <= __p + __len1) > this->_S_move(__p, __s, __len2); > else if (__s >= __p + __len1) > { > > > const size_type __poff = (__s - __p) + (__len2 - __len1); > this->_S_copy(__p, __p + __poff, __len2); > } > else > { > const size_type __nleft = (__p + __len1) - __s; > this->_S_move(__p, __s, __nleft); > this->_S_copy(__p + __nleft, __p + __len2, __len2 - __nleft); > } > } > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > _M_replace(size_type __pos, size_type __len1, const _CharT* __s, > const size_type __len2) > { > _M_check_length(__len1, __len2, "basic_string::_M_replace"); > > const size_type __old_size = this->size(); > const size_type __new_size = __old_size + __len2 - __len1; > > if (__new_size <= this->capacity()) > { > pointer __p = this->_M_data() + __pos; > > const size_type __how_much = __old_size - __pos - __len1; ># 534 "/usr/include/c++/13/bits/basic_string.tcc" 3 > if (__builtin_expect(_M_disjunct(__s), true)) > { > if (__how_much && __len1 != __len2) > this->_S_move(__p + __len2, __p + __len1, __how_much); > if (__len2) > this->_S_copy(__p, __s, __len2); > } > else > _M_replace_cold(__p, __len1, __s, __len2, __how_much); > } > else > this->_M_mutate(__pos, __len1, __s, __len2); > > this->_M_set_length(__new_size); > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > copy(_CharT* __s, size_type __n, size_type __pos) const > { > _M_check(__pos, "basic_string::copy"); > __n = _M_limit(__pos, __n); > ; > if (__n) > _S_copy(__s, _M_data() + __pos, __n); > > return __n; > } ># 611 "/usr/include/c++/13/bits/basic_string.tcc" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > find(const _CharT* __s, size_type __pos, size_type __n) const > noexcept > { > ; > const size_type __size = this->size(); > > if (__n == 0) > return __pos <= __size ? __pos : npos; > if (__pos >= __size) > return npos; > > const _CharT __elem0 = __s[0]; > const _CharT* const __data = data(); > const _CharT* __first = __data + __pos; > const _CharT* const __last = __data + __size; > size_type __len = __size - __pos; > > while (__len >= __n) > { > > __first = traits_type::find(__first, __len - __n + 1, __elem0); > if (!__first) > return npos; > > > > if (traits_type::compare(__first, __s, __n) == 0) > return __first - __data; > __len = __last - ++__first; > } > return npos; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > find(_CharT __c, size_type __pos) const noexcept > { > size_type __ret = npos; > const size_type __size = this->size(); > if (__pos < __size) > { > const _CharT* __data = _M_data(); > const size_type __n = __size - __pos; > const _CharT* __p = traits_type::find(__data + __pos, __n, __c); > if (__p) > __ret = __p - __data; > } > return __ret; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > rfind(const _CharT* __s, size_type __pos, size_type __n) const > noexcept > { > ; > const size_type __size = this->size(); > if (__n <= __size) > { > __pos = std::min(size_type(__size - __n), __pos); > const _CharT* __data = _M_data(); > do > { > if (traits_type::compare(__data + __pos, __s, __n) == 0) > return __pos; > } > while (__pos-- > 0); > } > return npos; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > rfind(_CharT __c, size_type __pos) const noexcept > { > size_type __size = this->size(); > if (__size) > { > if (--__size > __pos) > __size = __pos; > for (++__size; __size-- > 0; ) > if (traits_type::eq(_M_data()[__size], __c)) > return __size; > } > return npos; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > find_first_of(const _CharT* __s, size_type __pos, size_type __n) const > noexcept > { > ; > for (; __n && __pos < this->size(); ++__pos) > { > const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); > if (__p) > return __pos; > } > return npos; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > find_last_of(const _CharT* __s, size_type __pos, size_type __n) const > noexcept > { > ; > size_type __size = this->size(); > if (__size && __n) > { > if (--__size > __pos) > __size = __pos; > do > { > if (traits_type::find(__s, __n, _M_data()[__size])) > return __size; > } > while (__size-- != 0); > } > return npos; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const > noexcept > { > ; > for (; __pos < this->size(); ++__pos) > if (!traits_type::find(__s, __n, _M_data()[__pos])) > return __pos; > return npos; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > find_first_not_of(_CharT __c, size_type __pos) const noexcept > { > for (; __pos < this->size(); ++__pos) > if (!traits_type::eq(_M_data()[__pos], __c)) > return __pos; > return npos; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const > noexcept > { > ; > size_type __size = this->size(); > if (__size) > { > if (--__size > __pos) > __size = __pos; > do > { > if (!traits_type::find(__s, __n, _M_data()[__size])) > return __size; > } > while (__size--); > } > return npos; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>:: > find_last_not_of(_CharT __c, size_type __pos) const noexcept > { > size_type __size = this->size(); > if (__size) > { > if (--__size > __pos) > __size = __pos; > do > { > if (!traits_type::eq(_M_data()[__size], __c)) > return __size; > } > while (__size--); > } > return npos; > } > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __in, > basic_string<_CharT, _Traits, _Alloc>& __str) > { > typedef basic_istream<_CharT, _Traits> __istream_type; > typedef basic_string<_CharT, _Traits, _Alloc> __string_type; > typedef typename __istream_type::ios_base __ios_base; > typedef typename __istream_type::int_type __int_type; > typedef typename __string_type::size_type __size_type; > typedef ctype<_CharT> __ctype_type; > typedef typename __ctype_type::ctype_base __ctype_base; > > __size_type __extracted = 0; > typename __ios_base::iostate __err = __ios_base::goodbit; > typename __istream_type::sentry __cerb(__in, false); > if (__cerb) > { > try > { > > __str.erase(); > _CharT __buf[128]; > __size_type __len = 0; > const streamsize __w = __in.width(); > const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) > : __str.max_size(); > const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); > const __int_type __eof = _Traits::eof(); > __int_type __c = __in.rdbuf()->sgetc(); > > while (__extracted < __n > && !_Traits::eq_int_type(__c, __eof) > && !__ct.is(__ctype_base::space, > _Traits::to_char_type(__c))) > { > if (__len == sizeof(__buf) / sizeof(_CharT)) > { > __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); > __len = 0; > } > __buf[__len++] = _Traits::to_char_type(__c); > ++__extracted; > __c = __in.rdbuf()->snextc(); > } > __str.append(__buf, __len); > > if (__extracted < __n && _Traits::eq_int_type(__c, __eof)) > __err |= __ios_base::eofbit; > __in.width(0); > } > catch(__cxxabiv1::__forced_unwind&) > { > __in._M_setstate(__ios_base::badbit); > throw; > } > catch(...) > { > > > > __in._M_setstate(__ios_base::badbit); > } > } > > if (!__extracted) > __err |= __ios_base::failbit; > if (__err) > __in.setstate(__err); > return __in; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_istream<_CharT, _Traits>& > getline(basic_istream<_CharT, _Traits>& __in, > basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) > { > typedef basic_istream<_CharT, _Traits> __istream_type; > typedef basic_string<_CharT, _Traits, _Alloc> __string_type; > typedef typename __istream_type::ios_base __ios_base; > typedef typename __istream_type::int_type __int_type; > typedef typename __string_type::size_type __size_type; > > __size_type __extracted = 0; > const __size_type __n = __str.max_size(); > typename __ios_base::iostate __err = __ios_base::goodbit; > typename __istream_type::sentry __cerb(__in, true); > if (__cerb) > { > try > { > __str.erase(); > const __int_type __idelim = _Traits::to_int_type(__delim); > const __int_type __eof = _Traits::eof(); > __int_type __c = __in.rdbuf()->sgetc(); > > while (__extracted < __n > && !_Traits::eq_int_type(__c, __eof) > && !_Traits::eq_int_type(__c, __idelim)) > { > __str += _Traits::to_char_type(__c); > ++__extracted; > __c = __in.rdbuf()->snextc(); > } > > if (_Traits::eq_int_type(__c, __eof)) > __err |= __ios_base::eofbit; > else if (_Traits::eq_int_type(__c, __idelim)) > { > ++__extracted; > __in.rdbuf()->sbumpc(); > } > else > __err |= __ios_base::failbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > __in._M_setstate(__ios_base::badbit); > throw; > } > catch(...) > { > > > > __in._M_setstate(__ios_base::badbit); > } > } > if (!__extracted) > __err |= __ios_base::failbit; > if (__err) > __in.setstate(__err); > return __in; > } ># 965 "/usr/include/c++/13/bits/basic_string.tcc" 3 > extern template class basic_string<char>; ># 978 "/usr/include/c++/13/bits/basic_string.tcc" 3 > extern template > basic_istream<char>& > operator>>(basic_istream<char>&, string&); > extern template > basic_ostream<char>& > operator<<(basic_ostream<char>&, const string&); > extern template > basic_istream<char>& > getline(basic_istream<char>&, string&, char); > extern template > basic_istream<char>& > getline(basic_istream<char>&, string&); > > > > extern template class basic_string<wchar_t>; ># 1004 "/usr/include/c++/13/bits/basic_string.tcc" 3 > extern template > basic_istream<wchar_t>& > operator>>(basic_istream<wchar_t>&, wstring&); > extern template > basic_ostream<wchar_t>& > operator<<(basic_ostream<wchar_t>&, const wstring&); > extern template > basic_istream<wchar_t>& > getline(basic_istream<wchar_t>&, wstring&, wchar_t); > extern template > basic_istream<wchar_t>& > getline(basic_istream<wchar_t>&, wstring&); > > > > >} ># 56 "/usr/include/c++/13/string" 2 3 > > ># 1 "/usr/include/c++/13/bits/memory_resource.h" 1 3 ># 33 "/usr/include/c++/13/bits/memory_resource.h" 3 > ># 34 "/usr/include/c++/13/bits/memory_resource.h" 3 > > > > ># 1 "/usr/include/c++/13/cstddef" 1 3 ># 42 "/usr/include/c++/13/cstddef" 3 > ># 43 "/usr/include/c++/13/cstddef" 3 > > > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 51 "/usr/include/c++/13/cstddef" 2 3 > >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<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; }; ># 108 "/usr/include/c++/13/cstddef" 3 > 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 > { return (byte)(unsigned char)((unsigned)__b << __shift); } > > template<typename _IntegerType> > [[__gnu__::__always_inline__]] > constexpr __byte_op_t<_IntegerType> > operator>>(byte __b, _IntegerType __shift) noexcept > { return (byte)(unsigned char)((unsigned)__b >> __shift); } > > [[__gnu__::__always_inline__]] > constexpr byte > operator|(byte __l, byte __r) noexcept > { return (byte)(unsigned char)((unsigned)__l | (unsigned)__r); } > > [[__gnu__::__always_inline__]] > constexpr byte > operator&(byte __l, byte __r) noexcept > { return (byte)(unsigned char)((unsigned)__l & (unsigned)__r); } > > [[__gnu__::__always_inline__]] > constexpr byte > operator^(byte __l, byte __r) noexcept > { return (byte)(unsigned char)((unsigned)__l ^ (unsigned)__r); } > > [[__gnu__::__always_inline__]] > constexpr byte > operator~(byte __b) noexcept > { return (byte)(unsigned char)~(unsigned)__b; } > > template<typename _IntegerType> > [[__gnu__::__always_inline__]] > constexpr __byte_op_t<_IntegerType>& > operator<<=(byte& __b, _IntegerType __shift) noexcept > { return __b = __b << __shift; } > > template<typename _IntegerType> > [[__gnu__::__always_inline__]] > constexpr __byte_op_t<_IntegerType>& > operator>>=(byte& __b, _IntegerType __shift) noexcept > { return __b = __b >> __shift; } > > [[__gnu__::__always_inline__]] > constexpr byte& > operator|=(byte& __l, byte __r) noexcept > { return __l = __l | __r; } > > [[__gnu__::__always_inline__]] > constexpr byte& > operator&=(byte& __l, byte __r) noexcept > { return __l = __l & __r; } > > [[__gnu__::__always_inline__]] > constexpr byte& > operator^=(byte& __l, byte __r) noexcept > { return __l = __l ^ __r; } > > template<typename _IntegerType> > [[nodiscard,__gnu__::__always_inline__]] > constexpr _IntegerType > to_integer(__byte_op_t<_IntegerType> __b) noexcept > { return _IntegerType(__b); } > > >} > >} ># 39 "/usr/include/c++/13/bits/memory_resource.h" 2 3 > ># 1 "/usr/include/c++/13/bits/uses_allocator.h" 1 3 ># 35 "/usr/include/c++/13/bits/uses_allocator.h" 3 >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 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> > > inline __uses_alloc_t<_Tp, _Alloc, _Args...> > __use_alloc(const _Alloc& __a) > { > __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; > __ret._M_a = std::__addressof(__a); > return __ret; > } > > template<typename _Tp, typename _Alloc, typename... _Args> > void > __use_alloc(const _Alloc&&) = delete; > > > 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 __a, _Tp* __ptr, > _Args&&... __args) > { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } > > template<typename _Tp, typename _Alloc, typename... _Args> > void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, > _Args&&... __args) > { > ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, > std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename _Alloc, typename... _Args> > void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, > _Args&&... __args) > { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } > > template<typename _Tp, typename _Alloc, typename... _Args> > void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, > _Args&&... __args) > { > std::__uses_allocator_construct_impl( > std::__use_alloc<_Tp, _Alloc, _Args...>(__a), __ptr, > std::forward<_Args>(__args)...); > } > > > >} ># 41 "/usr/include/c++/13/bits/memory_resource.h" 2 3 ># 1 "/usr/include/c++/13/bits/uses_allocator_args.h" 1 3 ># 33 "/usr/include/c++/13/bits/uses_allocator_args.h" 3 > ># 34 "/usr/include/c++/13/bits/uses_allocator_args.h" 3 ># 42 "/usr/include/c++/13/bits/memory_resource.h" 2 3 > > > > > ># 1 "/usr/include/c++/13/tuple" 1 3 ># 32 "/usr/include/c++/13/tuple" 3 > ># 33 "/usr/include/c++/13/tuple" 3 ># 48 "/usr/include/c++/13/tuple" 3 >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() > : _M_head_impl() { } > > constexpr _Head_base(const _Head& __h) > : _M_head_impl(__h) { } > > constexpr _Head_base(const _Head_base&) = default; > constexpr _Head_base(_Head_base&&) = default; > > template<typename _UHead> > constexpr _Head_base(_UHead&& __h) > : _M_head_impl(std::forward<_UHead>(__h)) { } > > > _Head_base(allocator_arg_t, __uses_alloc0) > : _M_head_impl() { } > > template<typename _Alloc> > > _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) > : _M_head_impl(allocator_arg, *__a._M_a) { } > > template<typename _Alloc> > > _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) > : _M_head_impl(*__a._M_a) { } > > template<typename _UHead> > > _Head_base(__uses_alloc0, _UHead&& __uhead) > : _M_head_impl(std::forward<_UHead>(__uhead)) { } > > template<typename _Alloc, typename _UHead> > > _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) > : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) > { } > > template<typename _Alloc, typename _UHead> > > _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) > : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } > > static constexpr _Head& > _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } > > static constexpr const _Head& > _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } > > [[__no_unique_address__]] _Head _M_head_impl; > }; ># 187 "/usr/include/c++/13/tuple" 3 > template<size_t _Idx, typename _Head> > struct _Head_base<_Idx, _Head, false> > { > constexpr _Head_base() > : _M_head_impl() { } > > constexpr _Head_base(const _Head& __h) > : _M_head_impl(__h) { } > > constexpr _Head_base(const _Head_base&) = default; > constexpr _Head_base(_Head_base&&) = default; > > template<typename _UHead> > constexpr _Head_base(_UHead&& __h) > : _M_head_impl(std::forward<_UHead>(__h)) { } > > > _Head_base(allocator_arg_t, __uses_alloc0) > : _M_head_impl() { } > > template<typename _Alloc> > > _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) > : _M_head_impl(allocator_arg, *__a._M_a) { } > > template<typename _Alloc> > > _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) > : _M_head_impl(*__a._M_a) { } > > template<typename _UHead> > > _Head_base(__uses_alloc0, _UHead&& __uhead) > : _M_head_impl(std::forward<_UHead>(__uhead)) { } > > template<typename _Alloc, typename _UHead> > > _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) > : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) > { } > > template<typename _Alloc, typename _UHead> > > _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) > : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } > > static constexpr _Head& > _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } > > static constexpr const _Head& > _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } > > _Head _M_head_impl; > }; ># 250 "/usr/include/c++/13/tuple" 3 > 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 { return _Base::_M_head(__t); } > > static constexpr const _Head& > _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } > > static constexpr _Inherited& > _M_tail(_Tuple_impl& __t) noexcept { return __t; } > > static constexpr const _Inherited& > _M_tail(const _Tuple_impl& __t) noexcept { return __t; } > > constexpr _Tuple_impl() > : _Inherited(), _Base() { } > > explicit constexpr > _Tuple_impl(const _Head& __head, const _Tail&... __tail) > : _Inherited(__tail...), _Base(__head) > { } > > template<typename _UHead, typename... _UTail, > typename = __enable_if_t<sizeof...(_Tail) == sizeof...(_UTail)>> > explicit constexpr > _Tuple_impl(_UHead&& __head, _UTail&&... __tail) > : _Inherited(std::forward<_UTail>(__tail)...), > _Base(std::forward<_UHead>(__head)) > { } > > constexpr _Tuple_impl(const _Tuple_impl&) = default; > > > > _Tuple_impl& operator=(const _Tuple_impl&) = delete; > > _Tuple_impl(_Tuple_impl&&) = default; > > template<typename... _UElements> > constexpr > _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) > : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), > _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) > { } > > template<typename _UHead, typename... _UTails> > constexpr > _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) > : _Inherited(std::move > (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), > _Base(std::forward<_UHead> > (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) > { } ># 338 "/usr/include/c++/13/tuple" 3 > template<typename _Alloc> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) > : _Inherited(__tag, __a), > _Base(__tag, __use_alloc<_Head>(__a)) > { } > > template<typename _Alloc> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > const _Head& __head, const _Tail&... __tail) > : _Inherited(__tag, __a, __tail...), > _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) > { } > > template<typename _Alloc, typename _UHead, typename... _UTail, > typename = __enable_if_t<sizeof...(_Tail) == sizeof...(_UTail)>> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > _UHead&& __head, _UTail&&... __tail) > : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), > _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), > std::forward<_UHead>(__head)) > { } > > template<typename _Alloc> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > const _Tuple_impl& __in) > : _Inherited(__tag, __a, _M_tail(__in)), > _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) > { } > > template<typename _Alloc> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > _Tuple_impl&& __in) > : _Inherited(__tag, __a, std::move(_M_tail(__in))), > _Base(__use_alloc<_Head, _Alloc, _Head>(__a), > std::forward<_Head>(_M_head(__in))) > { } > > template<typename _Alloc, typename _UHead, typename... _UTails> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > const _Tuple_impl<_Idx, _UHead, _UTails...>& __in) > : _Inherited(__tag, __a, > _Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)), > _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), > _Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)) > { } > > template<typename _Alloc, typename _UHead, typename... _UTails> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) > : _Inherited(__tag, __a, std::move > (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), > _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), > std::forward<_UHead> > (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) > { } ># 424 "/usr/include/c++/13/tuple" 3 > template<typename... _UElements> > > void > _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) > { > _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); > _M_tail(*this)._M_assign( > _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)); > } > > template<typename _UHead, typename... _UTails> > > void > _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) > { > _M_head(*this) = std::forward<_UHead> > (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); > _M_tail(*this)._M_assign( > std::move(_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))); > } ># 466 "/usr/include/c++/13/tuple" 3 > protected: > > void > _M_swap(_Tuple_impl& __in) > { > using std::swap; > swap(_M_head(*this), _M_head(__in)); > _Inherited::_M_swap(_M_tail(__in)); > } ># 485 "/usr/include/c++/13/tuple" 3 > }; > > > 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 { return _Base::_M_head(__t); } > > static constexpr const _Head& > _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } > > constexpr > _Tuple_impl() > : _Base() { } > > explicit constexpr > _Tuple_impl(const _Head& __head) > : _Base(__head) > { } > > template<typename _UHead> > explicit constexpr > _Tuple_impl(_UHead&& __head) > : _Base(std::forward<_UHead>(__head)) > { } > > constexpr _Tuple_impl(const _Tuple_impl&) = default; > > > > _Tuple_impl& operator=(const _Tuple_impl&) = delete; > > > > > constexpr > _Tuple_impl(_Tuple_impl&& __in) > noexcept(is_nothrow_move_constructible<_Head>::value) > : _Base(static_cast<_Base&&>(__in)) > { } > > > template<typename _UHead> > constexpr > _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) > : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) > { } > > template<typename _UHead> > constexpr > _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) > : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) > { } ># 559 "/usr/include/c++/13/tuple" 3 > template<typename _Alloc> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) > : _Base(__tag, __use_alloc<_Head>(__a)) > { } > > template<typename _Alloc> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > const _Head& __head) > : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), __head) > { } > > template<typename _Alloc, typename _UHead> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > _UHead&& __head) > : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), > std::forward<_UHead>(__head)) > { } > > template<typename _Alloc> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > const _Tuple_impl& __in) > : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), _M_head(__in)) > { } > > template<typename _Alloc> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > _Tuple_impl&& __in) > : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), > std::forward<_Head>(_M_head(__in))) > { } > > template<typename _Alloc, typename _UHead> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > const _Tuple_impl<_Idx, _UHead>& __in) > : _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), > _Tuple_impl<_Idx, _UHead>::_M_head(__in)) > { } > > template<typename _Alloc, typename _UHead> > > _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, > _Tuple_impl<_Idx, _UHead>&& __in) > : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), > std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) > { } ># 629 "/usr/include/c++/13/tuple" 3 > template<typename _UHead> > > void > _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) > { > _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); > } > > template<typename _UHead> > > void > _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) > { > _M_head(*this) > = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); > } ># 663 "/usr/include/c++/13/tuple" 3 > protected: > > void > _M_swap(_Tuple_impl& __in) > { > using std::swap; > swap(_M_head(*this), _M_head(__in)); > } ># 680 "/usr/include/c++/13/tuple" 3 > }; > > > > 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() > { > return > __and_<is_nothrow_constructible<_Elements, _UElements>...>::value; > } > > > template<typename _Up> > static constexpr bool __valid_args() > { > return sizeof...(_Elements) == 1 > && !is_same<tuple, __remove_cvref_t<_Up>>::value; > } > > > template<typename, typename, typename... _Tail> > static constexpr bool __valid_args() > { return (sizeof...(_Tail) + 2) == sizeof...(_Elements); } ># 821 "/usr/include/c++/13/tuple" 3 > 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() > { return _UseOtherCtor<_Tuple>::value; } ># 856 "/usr/include/c++/13/tuple" 3 > public: > template<typename _Dummy = void, > _ImplicitDefaultCtor<is_void<_Dummy>::value> = true> > constexpr > tuple() > noexcept(__and_<is_nothrow_default_constructible<_Elements>...>::value) > : _Inherited() { } > > template<typename _Dummy = void, > _ExplicitDefaultCtor<is_void<_Dummy>::value> = false> > explicit constexpr > tuple() > noexcept(__and_<is_nothrow_default_constructible<_Elements>...>::value) > : _Inherited() { } > > template<bool _NotEmpty = (sizeof...(_Elements) >= 1), > _ImplicitCtor<_NotEmpty, const _Elements&...> = true> > constexpr > tuple(const _Elements&... __elements) > noexcept(__nothrow_constructible<const _Elements&...>()) > : _Inherited(__elements...) { } > > template<bool _NotEmpty = (sizeof...(_Elements) >= 1), > _ExplicitCtor<_NotEmpty, const _Elements&...> = false> > explicit constexpr > tuple(const _Elements&... __elements) > noexcept(__nothrow_constructible<const _Elements&...>()) > : _Inherited(__elements...) { } > > template<typename... _UElements, > bool _Valid = __valid_args<_UElements...>(), > _ImplicitCtor<_Valid, _UElements...> = true> > constexpr > tuple(_UElements&&... __elements) > noexcept(__nothrow_constructible<_UElements...>()) > : _Inherited(std::forward<_UElements>(__elements)...) { } > > template<typename... _UElements, > bool _Valid = __valid_args<_UElements...>(), > _ExplicitCtor<_Valid, _UElements...> = false> > explicit constexpr > tuple(_UElements&&... __elements) > noexcept(__nothrow_constructible<_UElements...>()) > : _Inherited(std::forward<_UElements>(__elements)...) { } > > 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&...>()) > : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) > { } > > 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&...>()) > : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) > { } > > 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...>()) > : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } > > 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...>()) > : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } ># 968 "/usr/include/c++/13/tuple" 3 > template<typename _Alloc, > _ImplicitDefaultCtor<is_object<_Alloc>::value> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a) > : _Inherited(__tag, __a) { } > > template<typename _Alloc, bool _NotEmpty = (sizeof...(_Elements) >= 1), > _ImplicitCtor<_NotEmpty, const _Elements&...> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, > const _Elements&... __elements) > : _Inherited(__tag, __a, __elements...) { } > > template<typename _Alloc, bool _NotEmpty = (sizeof...(_Elements) >= 1), > _ExplicitCtor<_NotEmpty, const _Elements&...> = false> > > explicit > tuple(allocator_arg_t __tag, const _Alloc& __a, > const _Elements&... __elements) > : _Inherited(__tag, __a, __elements...) { } > > template<typename _Alloc, typename... _UElements, > bool _Valid = __valid_args<_UElements...>(), > _ImplicitCtor<_Valid, _UElements...> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, > _UElements&&... __elements) > : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) > { } > > template<typename _Alloc, typename... _UElements, > bool _Valid = __valid_args<_UElements...>(), > _ExplicitCtor<_Valid, _UElements...> = false> > > explicit > tuple(allocator_arg_t __tag, const _Alloc& __a, > _UElements&&... __elements) > : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) > { } > > template<typename _Alloc> > > tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) > : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } > > template<typename _Alloc> > > tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) > : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } > > template<typename _Alloc, typename... _UElements, > bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) > && !__use_other_ctor<const tuple<_UElements...>&>(), > _ImplicitCtor<_Valid, const _UElements&...> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, > const tuple<_UElements...>& __in) > : _Inherited(__tag, __a, > static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) > { } > > template<typename _Alloc, typename... _UElements, > bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) > && !__use_other_ctor<const tuple<_UElements...>&>(), > _ExplicitCtor<_Valid, const _UElements&...> = false> > > explicit > tuple(allocator_arg_t __tag, const _Alloc& __a, > const tuple<_UElements...>& __in) > : _Inherited(__tag, __a, > static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) > { } > > template<typename _Alloc, typename... _UElements, > bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) > && !__use_other_ctor<tuple<_UElements...>&&>(), > _ImplicitCtor<_Valid, _UElements...> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, > tuple<_UElements...>&& __in) > : _Inherited(__tag, __a, > static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) > { } > > template<typename _Alloc, typename... _UElements, > bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) > && !__use_other_ctor<tuple<_UElements...>&&>(), > _ExplicitCtor<_Valid, _UElements...> = false> > > explicit > tuple(allocator_arg_t __tag, const _Alloc& __a, > tuple<_UElements...>&& __in) > : _Inherited(__tag, __a, > static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) > { } ># 1092 "/usr/include/c++/13/tuple" 3 > > tuple& > operator=(__conditional_t<__assignable<const _Elements&...>(), > const tuple&, > const __nonesuch&> __in) > noexcept(__nothrow_assignable<const _Elements&...>()) > { > this->_M_assign(__in); > return *this; > } > > > tuple& > operator=(__conditional_t<__assignable<_Elements...>(), > tuple&&, > __nonesuch&&> __in) > noexcept(__nothrow_assignable<_Elements...>()) > { > this->_M_assign(std::move(__in)); > return *this; > } > > template<typename... _UElements> > > __enable_if_t<__assignable<const _UElements&...>(), tuple&> > operator=(const tuple<_UElements...>& __in) > noexcept(__nothrow_assignable<const _UElements&...>()) > { > this->_M_assign(__in); > return *this; > } > > template<typename... _UElements> > > __enable_if_t<__assignable<_UElements...>(), tuple&> > operator=(tuple<_UElements...>&& __in) > noexcept(__nothrow_assignable<_UElements...>()) > { > this->_M_assign(std::move(__in)); > return *this; > } ># 1173 "/usr/include/c++/13/tuple" 3 > > void > swap(tuple& __in) > noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value) > { _Inherited::_M_swap(__in); } ># 1192 "/usr/include/c++/13/tuple" 3 > }; > > > template<typename... _UTypes> > tuple(_UTypes...) -> tuple<_UTypes...>; > template<typename _T1, typename _T2> > tuple(pair<_T1, _T2>) -> tuple<_T1, _T2>; > template<typename _Alloc, typename... _UTypes> > tuple(allocator_arg_t, _Alloc, _UTypes...) -> tuple<_UTypes...>; > template<typename _Alloc, typename _T1, typename _T2> > tuple(allocator_arg_t, _Alloc, pair<_T1, _T2>) -> tuple<_T1, _T2>; > template<typename _Alloc, typename... _UTypes> > tuple(allocator_arg_t, _Alloc, tuple<_UTypes...>) -> tuple<_UTypes...>; > > > > template<> > class tuple<> > { > public: > > void swap(tuple&) noexcept { } > > > > > > tuple() = default; > > template<typename _Alloc> > > tuple(allocator_arg_t, const _Alloc&) noexcept { } > template<typename _Alloc> > > 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; } ># 1306 "/usr/include/c++/13/tuple" 3 > 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()) > : _Inherited() { } > > 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&>()) > : _Inherited(__a1, __a2) { } > > 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&>()) > : _Inherited(__a1, __a2) { } > > template<typename _U1, typename _U2, > _ImplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> = true> > constexpr > tuple(_U1&& __a1, _U2&& __a2) > noexcept(__nothrow_constructible<_U1, _U2>()) > : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } > > 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>()) > : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } > > 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&>()) > : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } > > 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&>()) > : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } > > template<typename _U1, typename _U2, > _ImplicitCtor<true, _U1, _U2> = true> > constexpr > tuple(tuple<_U1, _U2>&& __in) > noexcept(__nothrow_constructible<_U1, _U2>()) > : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } > > template<typename _U1, typename _U2, > _ExplicitCtor<true, _U1, _U2> = false> > explicit constexpr > tuple(tuple<_U1, _U2>&& __in) > noexcept(__nothrow_constructible<_U1, _U2>()) > : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } ># 1399 "/usr/include/c++/13/tuple" 3 > 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&>()) > : _Inherited(__in.first, __in.second) { } > > 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&>()) > : _Inherited(__in.first, __in.second) { } > > template<typename _U1, typename _U2, > _ImplicitCtor<true, _U1, _U2> = true> > constexpr > tuple(pair<_U1, _U2>&& __in) > noexcept(__nothrow_constructible<_U1, _U2>()) > : _Inherited(std::forward<_U1>(__in.first), > std::forward<_U2>(__in.second)) { } > > template<typename _U1, typename _U2, > _ExplicitCtor<true, _U1, _U2> = false> > explicit constexpr > tuple(pair<_U1, _U2>&& __in) > noexcept(__nothrow_constructible<_U1, _U2>()) > : _Inherited(std::forward<_U1>(__in.first), > std::forward<_U2>(__in.second)) { } ># 1450 "/usr/include/c++/13/tuple" 3 > template<typename _Alloc, > _ImplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a) > : _Inherited(__tag, __a) { } > > template<typename _Alloc, bool _Dummy = true, > _ImplicitCtor<_Dummy, const _T1&, const _T2&> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, > const _T1& __a1, const _T2& __a2) > : _Inherited(__tag, __a, __a1, __a2) { } > > template<typename _Alloc, bool _Dummy = true, > _ExplicitCtor<_Dummy, const _T1&, const _T2&> = false> > explicit > > tuple(allocator_arg_t __tag, const _Alloc& __a, > const _T1& __a1, const _T2& __a2) > : _Inherited(__tag, __a, __a1, __a2) { } > > template<typename _Alloc, typename _U1, typename _U2, > _ImplicitCtor<true, _U1, _U2> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) > : _Inherited(__tag, __a, std::forward<_U1>(__a1), > std::forward<_U2>(__a2)) { } > > template<typename _Alloc, typename _U1, typename _U2, > _ExplicitCtor<true, _U1, _U2> = false> > explicit > > tuple(allocator_arg_t __tag, const _Alloc& __a, > _U1&& __a1, _U2&& __a2) > : _Inherited(__tag, __a, std::forward<_U1>(__a1), > std::forward<_U2>(__a2)) { } > > template<typename _Alloc> > > tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) > : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } > > template<typename _Alloc> > > tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) > : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } > > template<typename _Alloc, typename _U1, typename _U2, > _ImplicitCtor<true, const _U1&, const _U2&> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, > const tuple<_U1, _U2>& __in) > : _Inherited(__tag, __a, > static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) > { } > > template<typename _Alloc, typename _U1, typename _U2, > _ExplicitCtor<true, const _U1&, const _U2&> = false> > explicit > > tuple(allocator_arg_t __tag, const _Alloc& __a, > const tuple<_U1, _U2>& __in) > : _Inherited(__tag, __a, > static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) > { } > > template<typename _Alloc, typename _U1, typename _U2, > _ImplicitCtor<true, _U1, _U2> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) > : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) > { } > > template<typename _Alloc, typename _U1, typename _U2, > _ExplicitCtor<true, _U1, _U2> = false> > explicit > > tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) > : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) > { } ># 1553 "/usr/include/c++/13/tuple" 3 > template<typename _Alloc, typename _U1, typename _U2, > _ImplicitCtor<true, const _U1&, const _U2&> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, > const pair<_U1, _U2>& __in) > : _Inherited(__tag, __a, __in.first, __in.second) { } > > template<typename _Alloc, typename _U1, typename _U2, > _ExplicitCtor<true, const _U1&, const _U2&> = false> > explicit > > tuple(allocator_arg_t __tag, const _Alloc& __a, > const pair<_U1, _U2>& __in) > : _Inherited(__tag, __a, __in.first, __in.second) { } > > template<typename _Alloc, typename _U1, typename _U2, > _ImplicitCtor<true, _U1, _U2> = true> > > tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) > : _Inherited(__tag, __a, std::forward<_U1>(__in.first), > std::forward<_U2>(__in.second)) { } > > template<typename _Alloc, typename _U1, typename _U2, > _ExplicitCtor<true, _U1, _U2> = false> > explicit > > tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) > : _Inherited(__tag, __a, std::forward<_U1>(__in.first), > std::forward<_U2>(__in.second)) { } ># 1603 "/usr/include/c++/13/tuple" 3 > > tuple& > operator=(__conditional_t<__assignable<const _T1&, const _T2&>(), > const tuple&, > const __nonesuch&> __in) > noexcept(__nothrow_assignable<const _T1&, const _T2&>()) > { > this->_M_assign(__in); > return *this; > } > > > tuple& > operator=(__conditional_t<__assignable<_T1, _T2>(), > tuple&&, > __nonesuch&&> __in) > noexcept(__nothrow_assignable<_T1, _T2>()) > { > this->_M_assign(std::move(__in)); > return *this; > } > > template<typename _U1, typename _U2> > > __enable_if_t<__assignable<const _U1&, const _U2&>(), tuple&> > operator=(const tuple<_U1, _U2>& __in) > noexcept(__nothrow_assignable<const _U1&, const _U2&>()) > { > this->_M_assign(__in); > return *this; > } > > template<typename _U1, typename _U2> > > __enable_if_t<__assignable<_U1, _U2>(), tuple&> > operator=(tuple<_U1, _U2>&& __in) > noexcept(__nothrow_assignable<_U1, _U2>()) > { > this->_M_assign(std::move(__in)); > return *this; > } ># 1683 "/usr/include/c++/13/tuple" 3 > template<typename _U1, typename _U2> > > __enable_if_t<__assignable<const _U1&, const _U2&>(), tuple&> > operator=(const pair<_U1, _U2>& __in) > noexcept(__nothrow_assignable<const _U1&, const _U2&>()) > { > this->_M_head(*this) = __in.first; > this->_M_tail(*this)._M_head(*this) = __in.second; > return *this; > } > > template<typename _U1, typename _U2> > > __enable_if_t<__assignable<_U1, _U2>(), tuple&> > operator=(pair<_U1, _U2>&& __in) > noexcept(__nothrow_assignable<_U1, _U2>()) > { > this->_M_head(*this) = std::forward<_U1>(__in.first); > this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); > return *this; > } ># 1729 "/usr/include/c++/13/tuple" 3 > > void > swap(tuple& __in) > noexcept(__and_<__is_nothrow_swappable<_T1>, > __is_nothrow_swappable<_T2>>::value) > { _Inherited::_M_swap(__in); } ># 1744 "/usr/include/c++/13/tuple" 3 > }; > > > > 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 > { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } > > template<size_t __i, typename _Head, typename... _Tail> > constexpr const _Head& > __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept > { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } > > > 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 > { return std::__get_helper<__i>(__t); } > > > template<size_t __i, typename... _Elements> > constexpr const __tuple_element_t<__i, tuple<_Elements...>>& > get(const tuple<_Elements...>& __t) noexcept > { return std::__get_helper<__i>(__t); } > > > template<size_t __i, typename... _Elements> > constexpr __tuple_element_t<__i, tuple<_Elements...>>&& > get(tuple<_Elements...>&& __t) noexcept > { > typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; > return std::forward<__element_type>(std::__get_helper<__i>(__t)); > } > > > template<size_t __i, typename... _Elements> > constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& > get(const tuple<_Elements...>&& __t) noexcept > { > typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; > return std::forward<const __element_type>(std::__get_helper<__i>(__t)); > } > > > > 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 > { > constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); > static_assert(__idx < sizeof...(_Types), > "the type T in std::get<T> must occur exactly once in the tuple"); > return std::__get_helper<__idx>(__t); > } > > > template <typename _Tp, typename... _Types> > constexpr _Tp&& > get(tuple<_Types...>&& __t) noexcept > { > constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); > static_assert(__idx < sizeof...(_Types), > "the type T in std::get<T> must occur exactly once in the tuple"); > return std::forward<_Tp>(std::__get_helper<__idx>(__t)); > } > > > template <typename _Tp, typename... _Types> > constexpr const _Tp& > get(const tuple<_Types...>& __t) noexcept > { > constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); > static_assert(__idx < sizeof...(_Types), > "the type T in std::get<T> must occur exactly once in the tuple"); > return std::__get_helper<__idx>(__t); > } > > > > template <typename _Tp, typename... _Types> > constexpr const _Tp&& > get(const tuple<_Types...>&& __t) noexcept > { > constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); > static_assert(__idx < sizeof...(_Types), > "the type T in std::get<T> must occur exactly once in the tuple"); > return std::forward<const _Tp>(std::__get_helper<__idx>(__t)); > } > > > > template<typename _Tp, typename _Up, size_t __i, size_t __size> > struct __tuple_compare > { > static constexpr bool > __eq(const _Tp& __t, const _Up& __u) > { > return bool(std::get<__i>(__t) == std::get<__i>(__u)) > && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); > } > > static constexpr bool > __less(const _Tp& __t, const _Up& __u) > { > return bool(std::get<__i>(__t) < std::get<__i>(__u)) > || (!bool(std::get<__i>(__u) < std::get<__i>(__t)) > && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u)); > } > }; > > template<typename _Tp, typename _Up, size_t __size> > struct __tuple_compare<_Tp, _Up, __size, __size> > { > static constexpr bool > __eq(const _Tp&, const _Up&) { return true; } > > static constexpr bool > __less(const _Tp&, const _Up&) { return false; } > }; > > template<typename... _TElements, typename... _UElements> > constexpr bool > operator==(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { > static_assert(sizeof...(_TElements) == sizeof...(_UElements), > "tuple objects can only be compared if they have equal sizes."); > using __compare = __tuple_compare<tuple<_TElements...>, > tuple<_UElements...>, > 0, sizeof...(_TElements)>; > return __compare::__eq(__t, __u); > } ># 1945 "/usr/include/c++/13/tuple" 3 > template<typename... _TElements, typename... _UElements> > constexpr bool > operator<(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { > static_assert(sizeof...(_TElements) == sizeof...(_UElements), > "tuple objects can only be compared if they have equal sizes."); > using __compare = __tuple_compare<tuple<_TElements...>, > tuple<_UElements...>, > 0, sizeof...(_TElements)>; > return __compare::__less(__t, __u); > } > > template<typename... _TElements, typename... _UElements> > constexpr bool > operator!=(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { return !(__t == __u); } > > template<typename... _TElements, typename... _UElements> > constexpr bool > operator>(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { return __u < __t; } > > template<typename... _TElements, typename... _UElements> > constexpr bool > operator<=(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { return !(__u < __t); } > > template<typename... _TElements, typename... _UElements> > constexpr bool > operator>=(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { return !(__t < __u); } > > > > > template<typename... _Elements> > constexpr tuple<typename __decay_and_strip<_Elements>::__type...> > make_tuple(_Elements&&... __args) > { > typedef tuple<typename __decay_and_strip<_Elements>::__type...> > __result_type; > return __result_type(std::forward<_Elements>(__args)...); > } > > > > > template<typename... _Elements> > constexpr tuple<_Elements&&...> > forward_as_tuple(_Elements&&... __args) noexcept > { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } > > > > > 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) > { > typedef typename __make_1st_indices<_Tpls...>::__type __idx; > typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; > return __next::_S_do(std::forward<_Tpls>(__tps)..., > std::forward<_Us>(__us)..., > std::get<_Is>(std::forward<_Tp>(__tp))...); > } > }; > > template<typename _Ret> > struct __tuple_concater<_Ret, _Index_tuple<>> > { > template<typename... _Us> > static constexpr _Ret > _S_do(_Us&&... __us) > { > return _Ret(std::forward<_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 > { > typedef typename __tuple_cat_result<_Tpls...>::__type __ret; > typedef typename __make_1st_indices<_Tpls...>::__type __idx; > typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; > return __concater::_S_do(std::forward<_Tpls>(__tpls)...); > } > > > > > template<typename... _Elements> > constexpr tuple<_Elements&...> > tie(_Elements&... __args) noexcept > { return tuple<_Elements&...>(__args...); } > > > template<typename... _Elements> > > inline > > > typename enable_if<__and_<__is_swappable<_Elements>...>::value > >::type > > > > swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } ># 2184 "/usr/include/c++/13/tuple" 3 > template<typename... _Elements> > > 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 > { return *this; } > }; ># 2219 "/usr/include/c++/13/tuple" 3 > inline constexpr _Swallow_assign ignore{}; > > > template<typename... _Types, typename _Alloc> > struct uses_allocator<tuple<_Types...>, _Alloc> : true_type { }; ># 2234 "/usr/include/c++/13/tuple" 3 > template<class _T1, class _T2> > template<typename... _Args1, typename... _Args2> > > inline > pair<_T1, _T2>:: > pair(piecewise_construct_t, > tuple<_Args1...> __first, tuple<_Args2...> __second) > : pair(__first, __second, > typename _Build_index_tuple<sizeof...(_Args1)>::__type(), > typename _Build_index_tuple<sizeof...(_Args2)>::__type()) > { } > > template<class _T1, class _T2> > template<typename... _Args1, size_t... _Indexes1, > typename... _Args2, size_t... _Indexes2> > inline > pair<_T1, _T2>:: > pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, > _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) > : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), > second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) > { } > > > > > > > > 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...>) > { > return std::__invoke(std::forward<_Fn>(__f), > std::get<_Idx>(std::forward<_Tuple>(__t))...); > } > > template <typename _Fn, typename _Tuple> > constexpr decltype(auto) > apply(_Fn&& __f, _Tuple&& __t) > noexcept(__unpack_std_tuple<is_nothrow_invocable, _Fn, _Tuple>) > { > using _Indices > = make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>; > return std::__apply_impl(std::forward<_Fn>(__f), > std::forward<_Tuple>(__t), > _Indices{}); > } > > > > template <typename _Tp, typename _Tuple, size_t... _Idx> > constexpr _Tp > __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>) > { return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); } > > template <typename _Tp, typename _Tuple> > constexpr _Tp > make_from_tuple(_Tuple&& __t) > noexcept(__unpack_std_tuple<is_nothrow_constructible, _Tp, _Tuple>) > { > constexpr size_t __n = tuple_size_v<remove_reference_t<_Tuple>>; > > if constexpr (__n == 1) > { > using _Elt = decltype(std::get<0>(std::declval<_Tuple>())); > static_assert(!__reference_constructs_from_temporary(_Tp, _Elt)); > } > > return __make_from_tuple_impl<_Tp>(std::forward<_Tuple>(__t), > make_index_sequence<__n>{}); > } ># 2344 "/usr/include/c++/13/tuple" 3 > >} ># 48 "/usr/include/c++/13/bits/memory_resource.h" 2 3 > > >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))) > { return ::operator new(__bytes, do_allocate(__bytes, __alignment)); } > > void > deallocate(void* __p, size_t __bytes, size_t __alignment = _S_max_align) > __attribute__((__nonnull__)) > { return do_deallocate(__p, __bytes, __alignment); } > > [[nodiscard]] > bool > is_equal(const memory_resource& __other) const noexcept > { return do_is_equal(__other); } > > 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]] > inline bool > operator==(const memory_resource& __a, const memory_resource& __b) noexcept > { return &__a == &__b || __a.is_equal(__b); } > > > [[nodiscard]] > inline bool > operator!=(const memory_resource& __a, const memory_resource& __b) noexcept > { return !(__a == __b); } > > > > 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 > { > extern memory_resource* get_default_resource() noexcept > __attribute__((__returns_nonnull__)); > _M_resource = get_default_resource(); > } > > polymorphic_allocator(memory_resource* __r) noexcept > __attribute__((__nonnull__)) > : _M_resource(__r) > { ; } > > polymorphic_allocator(const polymorphic_allocator& __other) = default; > > template<typename _Up> > polymorphic_allocator(const polymorphic_allocator<_Up>& __x) noexcept > : _M_resource(__x.resource()) > { } > > polymorphic_allocator& > operator=(const polymorphic_allocator&) = delete; > > [[nodiscard]] > _Tp* > allocate(size_t __n) > __attribute__((__returns_nonnull__)) > { > if ((__gnu_cxx::__int_traits<size_t>::__max / sizeof(_Tp)) < __n) > std::__throw_bad_array_new_length(); > return static_cast<_Tp*>(_M_resource->allocate(__n * sizeof(_Tp), > alignof(_Tp))); > } > > void > deallocate(_Tp* __p, size_t __n) noexcept > __attribute__((__nonnull__)) > { _M_resource->deallocate(__p, __n * sizeof(_Tp), alignof(_Tp)); } ># 212 "/usr/include/c++/13/bits/memory_resource.h" 3 > template<typename _Tp1, typename... _Args> > __attribute__((__nonnull__)) > typename __not_pair<_Tp1>::type > construct(_Tp1* __p, _Args&&... __args) > { > > > using __use_tag > = std::__uses_alloc_t<_Tp1, polymorphic_allocator, _Args...>; > if constexpr (is_base_of_v<__uses_alloc0, __use_tag>) > ::new(__p) _Tp1(std::forward<_Args>(__args)...); > else if constexpr (is_base_of_v<__uses_alloc1_, __use_tag>) > ::new(__p) _Tp1(allocator_arg, *this, > std::forward<_Args>(__args)...); > else > ::new(__p) _Tp1(std::forward<_Args>(__args)..., *this); > } > > template<typename _Tp1, typename _Tp2, > typename... _Args1, typename... _Args2> > __attribute__((__nonnull__)) > void > construct(pair<_Tp1, _Tp2>* __p, piecewise_construct_t, > tuple<_Args1...> __x, tuple<_Args2...> __y) > { > auto __x_tag = > __use_alloc<_Tp1, polymorphic_allocator, _Args1...>(*this); > auto __y_tag = > __use_alloc<_Tp2, polymorphic_allocator, _Args2...>(*this); > index_sequence_for<_Args1...> __x_i; > index_sequence_for<_Args2...> __y_i; > > ::new(__p) pair<_Tp1, _Tp2>(piecewise_construct, > _S_construct_p(__x_tag, __x_i, __x), > _S_construct_p(__y_tag, __y_i, __y)); > } > > template<typename _Tp1, typename _Tp2> > __attribute__((__nonnull__)) > void > construct(pair<_Tp1, _Tp2>* __p) > { this->construct(__p, piecewise_construct, tuple<>(), tuple<>()); } > > template<typename _Tp1, typename _Tp2, typename _Up, typename _Vp> > __attribute__((__nonnull__)) > void > construct(pair<_Tp1, _Tp2>* __p, _Up&& __x, _Vp&& __y) > { > this->construct(__p, piecewise_construct, > std::forward_as_tuple(std::forward<_Up>(__x)), > std::forward_as_tuple(std::forward<_Vp>(__y))); > } > > template <typename _Tp1, typename _Tp2, typename _Up, typename _Vp> > __attribute__((__nonnull__)) > void > construct(pair<_Tp1, _Tp2>* __p, const std::pair<_Up, _Vp>& __pr) > { > this->construct(__p, piecewise_construct, > std::forward_as_tuple(__pr.first), > std::forward_as_tuple(__pr.second)); > } > > template<typename _Tp1, typename _Tp2, typename _Up, typename _Vp> > __attribute__((__nonnull__)) > void > construct(pair<_Tp1, _Tp2>* __p, pair<_Up, _Vp>&& __pr) > { > this->construct(__p, piecewise_construct, > std::forward_as_tuple(std::forward<_Up>(__pr.first)), > std::forward_as_tuple(std::forward<_Vp>(__pr.second))); > } ># 295 "/usr/include/c++/13/bits/memory_resource.h" 3 > template<typename _Up> > > __attribute__((__nonnull__)) > void > destroy(_Up* __p) > { __p->~_Up(); } > > polymorphic_allocator > select_on_container_copy_construction() const noexcept > { return polymorphic_allocator(); } > > memory_resource* > resource() const noexcept > __attribute__((__returns_nonnull__)) > { return _M_resource; } > > > > [[nodiscard]] > friend bool > operator==(const polymorphic_allocator& __a, > const polymorphic_allocator& __b) noexcept > { return *__a.resource() == *__b.resource(); } > > > [[nodiscard]] > friend bool > operator!=(const polymorphic_allocator& __a, > const polymorphic_allocator& __b) noexcept > { return !(__a == __b); } > > > private: > > using __uses_alloc1_ = __uses_alloc1<polymorphic_allocator>; > using __uses_alloc2_ = __uses_alloc2<polymorphic_allocator>; > > template<typename _Ind, typename... _Args> > static tuple<_Args&&...> > _S_construct_p(__uses_alloc0, _Ind, tuple<_Args...>& __t) > { return std::move(__t); } > > template<size_t... _Ind, typename... _Args> > static tuple<allocator_arg_t, polymorphic_allocator, _Args&&...> > _S_construct_p(__uses_alloc1_ __ua, index_sequence<_Ind...>, > tuple<_Args...>& __t) > { > return { > allocator_arg, *__ua._M_a, std::get<_Ind>(std::move(__t))... > }; > } > > template<size_t... _Ind, typename... _Args> > static tuple<_Args&&..., polymorphic_allocator> > _S_construct_p(__uses_alloc2_ __ua, index_sequence<_Ind...>, > tuple<_Args...>& __t) > { return { std::get<_Ind>(std::move(__t))..., *__ua._M_a }; } > > > 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 _Tp1, typename _Tp2> > [[nodiscard]] > inline bool > operator!=(const polymorphic_allocator<_Tp1>& __a, > const polymorphic_allocator<_Tp2>& __b) noexcept > { return !(__a == __b); } > > >} > > 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>>; ># 434 "/usr/include/c++/13/bits/memory_resource.h" 3 > [[nodiscard]] static pointer > allocate(allocator_type& __a, size_type __n) > { return __a.allocate(__n); } ># 449 "/usr/include/c++/13/bits/memory_resource.h" 3 > [[nodiscard]] static pointer > allocate(allocator_type& __a, size_type __n, const_void_pointer) > { return __a.allocate(__n); } ># 461 "/usr/include/c++/13/bits/memory_resource.h" 3 > static void > deallocate(allocator_type& __a, pointer __p, size_type __n) > { __a.deallocate(__p, __n); } ># 476 "/usr/include/c++/13/bits/memory_resource.h" 3 > template<typename _Up, typename... _Args> > static void > construct(allocator_type& __a, _Up* __p, _Args&&... __args) > { __a.construct(__p, std::forward<_Args>(__args)...); } ># 488 "/usr/include/c++/13/bits/memory_resource.h" 3 > template<typename _Up> > static void > destroy(allocator_type&, _Up* __p) > noexcept(is_nothrow_destructible<_Up>::value) > { __p->~_Up(); } > > > > > > static size_type > max_size(const allocator_type&) noexcept > { return size_t(-1) / sizeof(value_type); } > }; > > >} ># 59 "/usr/include/c++/13/string" 2 3 >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 u16string = basic_string<char16_t>; > using u32string = basic_string<char32_t>; > using wstring = basic_string<wchar_t>; > } > >} ># 41 "/usr/include/c++/13/bits/locale_classes.h" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 62 "/usr/include/c++/13/bits/locale_classes.h" 3 > 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; ># 102 "/usr/include/c++/13/bits/locale_classes.h" 3 > 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); ># 121 "/usr/include/c++/13/bits/locale_classes.h" 3 > locale() throw(); ># 130 "/usr/include/c++/13/bits/locale_classes.h" 3 > locale(const locale& __other) throw(); ># 140 "/usr/include/c++/13/bits/locale_classes.h" 3 > explicit > locale(const char* __s); ># 155 "/usr/include/c++/13/bits/locale_classes.h" 3 > locale(const locale& __base, const char* __s, category __cat); ># 166 "/usr/include/c++/13/bits/locale_classes.h" 3 > explicit > locale(const std::string& __s) : locale(__s.c_str()) { } ># 181 "/usr/include/c++/13/bits/locale_classes.h" 3 > locale(const locale& __base, const std::string& __s, category __cat) > : locale(__base, __s.c_str(), __cat) { } ># 196 "/usr/include/c++/13/bits/locale_classes.h" 3 > locale(const locale& __base, const locale& __add, category __cat); ># 209 "/usr/include/c++/13/bits/locale_classes.h" 3 > template<typename _Facet> > locale(const locale& __other, _Facet* __f); > > > ~locale() throw(); ># 223 "/usr/include/c++/13/bits/locale_classes.h" 3 > const locale& > operator=(const locale& __other) throw(); ># 238 "/usr/include/c++/13/bits/locale_classes.h" 3 > template<typename _Facet> > locale > combine(const locale& __other) const; > > > > > > > __attribute ((__abi_tag__ ("cxx11"))) > string > name() const; ># 258 "/usr/include/c++/13/bits/locale_classes.h" 3 > bool > operator==(const locale& __other) const throw(); ># 268 "/usr/include/c++/13/bits/locale_classes.h" 3 > bool > operator!=(const locale& __other) const throw() > { return !(this->operator==(__other)); } ># 288 "/usr/include/c++/13/bits/locale_classes.h" 3 > template<typename _Char, typename _Traits, typename _Alloc> > bool > operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, > const basic_string<_Char, _Traits, _Alloc>& __s2) const; ># 304 "/usr/include/c++/13/bits/locale_classes.h" 3 > 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; ># 339 "/usr/include/c++/13/bits/locale_classes.h" 3 > 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[]; > > }; ># 377 "/usr/include/c++/13/bits/locale_classes.h" 3 > 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: ># 408 "/usr/include/c++/13/bits/locale_classes.h" 3 > explicit > facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) > { } > > > 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(); ># 444 "/usr/include/c++/13/bits/locale_classes.h" 3 > facet(const facet&) = delete; > > facet& > operator=(const facet&) = delete; > > > private: > void > _M_add_reference() const throw() > { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } > > void > _M_remove_reference() const throw() > { > > ; > if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) > { > ; > try > { delete this; } > catch(...) > { } > } > } > > const facet* _M_sso_shim(const id*) const; > const facet* _M_cow_shim(const id*) const; > > protected: > class __shim; > }; ># 489 "/usr/include/c++/13/bits/locale_classes.h" 3 > 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() > { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } > > void > _M_remove_reference() throw() > { > > ; > if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) > { > ; > try > { delete this; } > catch(...) > { } > } > } > > _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() > { > bool __ret = true; > if (_M_names[1]) > > for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) > __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; > return __ret; > } > > 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) > { _M_install_facet(&_Facet::id, __facet); } > > template<typename _Facet> > void > _M_init_facet_unchecked(_Facet* __facet) > { > __facet->_M_add_reference(); > _M_facets[_Facet::id._M_id()] = __facet; > } > > void > _M_install_cache(const facet*, size_t); > > void _M_init_extra(facet**); > void _M_init_extra(void*, void*, const char*, const char*); > > > > > }; ># 659 "/usr/include/c++/13/bits/locale_classes.h" 3 > 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; ># 686 "/usr/include/c++/13/bits/locale_classes.h" 3 > explicit > collate(size_t __refs = 0) > : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) > { } ># 700 "/usr/include/c++/13/bits/locale_classes.h" 3 > explicit > collate(__c_locale __cloc, size_t __refs = 0) > : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) > { } ># 717 "/usr/include/c++/13/bits/locale_classes.h" 3 > int > compare(const _CharT* __lo1, const _CharT* __hi1, > const _CharT* __lo2, const _CharT* __hi2) const > { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } ># 736 "/usr/include/c++/13/bits/locale_classes.h" 3 > string_type > transform(const _CharT* __lo, const _CharT* __hi) const > { return this->do_transform(__lo, __hi); } ># 750 "/usr/include/c++/13/bits/locale_classes.h" 3 > long > hash(const _CharT* __lo, const _CharT* __hi) const > { return this->do_hash(__lo, __hi); } > > > int > _M_compare(const _CharT*, const _CharT*) const throw(); > > size_t > _M_transform(_CharT*, const _CharT*, size_t) const throw(); > > protected: > > virtual > ~collate() > { _S_destroy_c_locale(_M_c_locale_collate); } ># 779 "/usr/include/c++/13/bits/locale_classes.h" 3 > virtual int > do_compare(const _CharT* __lo1, const _CharT* __hi1, > const _CharT* __lo2, const _CharT* __hi2) const; ># 793 "/usr/include/c++/13/bits/locale_classes.h" 3 > virtual string_type > do_transform(const _CharT* __lo, const _CharT* __hi) const; ># 806 "/usr/include/c++/13/bits/locale_classes.h" 3 > 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) > : collate<_CharT>(__refs) > { > if (__builtin_strcmp(__s, "C") != 0 > && __builtin_strcmp(__s, "POSIX") != 0) > { > this->_S_destroy_c_locale(this->_M_c_locale_collate); > this->_S_create_c_locale(this->_M_c_locale_collate, __s); > } > } > > > explicit > collate_byname(const string& __s, size_t __refs = 0) > : collate_byname(__s.c_str(), __refs) { } > > > protected: > virtual > ~collate_byname() { } > }; > > >} > ># 1 "/usr/include/c++/13/bits/locale_classes.tcc" 1 3 ># 37 "/usr/include/c++/13/bits/locale_classes.tcc" 3 > ># 38 "/usr/include/c++/13/bits/locale_classes.tcc" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Facet> > locale:: > locale(const locale& __other, _Facet* __f) > { > _M_impl = new _Impl(*__other._M_impl, 1); > > try > { _M_impl->_M_install_facet(&_Facet::id, __f); } > catch(...) > { > _M_impl->_M_remove_reference(); > throw; > } > delete [] _M_impl->_M_names[0]; > _M_impl->_M_names[0] = 0; > } > > template<typename _Facet> > locale > locale:: > combine(const locale& __other) const > { > _Impl* __tmp = new _Impl(*_M_impl, 1); > try > { > __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); > } > catch(...) > { > __tmp->_M_remove_reference(); > throw; > } > return locale(__tmp); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > bool > locale:: > operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, > const basic_string<_CharT, _Traits, _Alloc>& __s2) const > { > typedef std::collate<_CharT> __collate_type; > const __collate_type& __collate = use_facet<__collate_type>(*this); > return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), > __s2.data(), __s2.data() + __s2.length()) < 0); > } > > template<typename _Facet> > inline const _Facet* > __try_use_facet(const locale& __loc) noexcept > { > const size_t __i = _Facet::id._M_id(); > const locale::facet** __facets = __loc._M_impl->_M_facets; > > > > > > > > if constexpr (__is_same(_Facet, ctype<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, num_get<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, num_put<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, codecvt<char, char, mbstate_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, collate<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, moneypunct<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, moneypunct<char, true>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, money_get<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, money_put<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, numpunct<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, time_get<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, time_put<char>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, messages<char>)) return static_cast<const _Facet*>(__facets[__i]); > > > if constexpr (__is_same(_Facet, ctype<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, num_get<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, num_put<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, codecvt<wchar_t, char, mbstate_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, collate<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, moneypunct<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, moneypunct<wchar_t, true>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, money_get<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, money_put<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, numpunct<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, time_get<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, time_put<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, messages<wchar_t>)) return static_cast<const _Facet*>(__facets[__i]); > > > > > > if constexpr (__is_same(_Facet, codecvt<char16_t, char, mbstate_t>)) return static_cast<const _Facet*>(__facets[__i]); > if constexpr (__is_same(_Facet, codecvt<char32_t, char, mbstate_t>)) return static_cast<const _Facet*>(__facets[__i]); > > > > > if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) > return 0; > > > return dynamic_cast<const _Facet*>(__facets[__i]); > > > > } ># 164 "/usr/include/c++/13/bits/locale_classes.tcc" 3 > template<typename _Facet> > inline bool > has_facet(const locale& __loc) throw() > { > > static_assert(__is_base_of(locale::facet, _Facet), > "template argument must be derived from locale::facet"); > > > > return std::__try_use_facet<_Facet>(__loc) != 0; > } ># 191 "/usr/include/c++/13/bits/locale_classes.tcc" 3 >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdangling-reference" > template<typename _Facet> > inline const _Facet& > use_facet(const locale& __loc) > { > > static_assert(__is_base_of(locale::facet, _Facet), > "template argument must be derived from locale::facet"); > > > > if (const _Facet* __f = std::__try_use_facet<_Facet>(__loc)) > return *__f; > __throw_bad_cast(); > } >#pragma GCC diagnostic pop > > > > template<typename _CharT> > int > collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () > { return 0; } > > > template<typename _CharT> > size_t > collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () > { return 0; } > > template<typename _CharT> > int > collate<_CharT>:: > do_compare(const _CharT* __lo1, const _CharT* __hi1, > const _CharT* __lo2, const _CharT* __hi2) const > { > > > const string_type __one(__lo1, __hi1); > const string_type __two(__lo2, __hi2); > > const _CharT* __p = __one.c_str(); > const _CharT* __pend = __one.data() + __one.length(); > const _CharT* __q = __two.c_str(); > const _CharT* __qend = __two.data() + __two.length(); > > > > > for (;;) > { > const int __res = _M_compare(__p, __q); > if (__res) > return __res; > > __p += char_traits<_CharT>::length(__p); > __q += char_traits<_CharT>::length(__q); > if (__p == __pend && __q == __qend) > return 0; > else if (__p == __pend) > return -1; > else if (__q == __qend) > return 1; > > __p++; > __q++; > } > } > > template<typename _CharT> > typename collate<_CharT>::string_type > collate<_CharT>:: > do_transform(const _CharT* __lo, const _CharT* __hi) const > { > string_type __ret; > > > const string_type __str(__lo, __hi); > > const _CharT* __p = __str.c_str(); > const _CharT* __pend = __str.data() + __str.length(); > > size_t __len = (__hi - __lo) * 2; > > _CharT* __c = new _CharT[__len]; > > try > { > > > > for (;;) > { > > size_t __res = _M_transform(__c, __p, __len); > > > if (__res >= __len) > { > __len = __res + 1; > delete [] __c, __c = 0; > __c = new _CharT[__len]; > __res = _M_transform(__c, __p, __len); > } > > __ret.append(__c, __res); > __p += char_traits<_CharT>::length(__p); > if (__p == __pend) > break; > > __p++; > __ret.push_back(_CharT()); > } > } > catch(...) > { > delete [] __c; > throw; > } > > delete [] __c; > > return __ret; > } > > template<typename _CharT> > long > collate<_CharT>:: > do_hash(const _CharT* __lo, const _CharT* __hi) const > { > unsigned long __val = 0; > for (; __lo < __hi; ++__lo) > __val = > *__lo + ((__val << 7) > | (__val >> (__gnu_cxx::__numeric_traits<unsigned long>:: > __digits - 7))); > return static_cast<long>(__val); > } > > > > > 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&); > > > > >} ># 870 "/usr/include/c++/13/bits/locale_classes.h" 2 3 ># 42 "/usr/include/c++/13/bits/ios_base.h" 2 3 > > > > ># 1 "/usr/include/c++/13/system_error" 1 3 ># 32 "/usr/include/c++/13/system_error" 3 > ># 33 "/usr/include/c++/13/system_error" 3 ># 41 "/usr/include/c++/13/system_error" 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/error_constants.h" 1 3 ># 34 "/usr/include/c++/13/x86_64-redhat-linux/bits/error_constants.h" 3 ># 1 "/usr/include/c++/13/cerrno" 1 3 ># 39 "/usr/include/c++/13/cerrno" 3 > ># 40 "/usr/include/c++/13/cerrno" 3 ># 35 "/usr/include/c++/13/x86_64-redhat-linux/bits/error_constants.h" 2 3 > >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 > }; > > >} ># 42 "/usr/include/c++/13/system_error" 2 3 > ># 1 "/usr/include/c++/13/stdexcept" 1 3 ># 36 "/usr/include/c++/13/stdexcept" 3 > ># 37 "/usr/include/c++/13/stdexcept" 3 > > > > >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; ># 113 "/usr/include/c++/13/stdexcept" 3 > 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; > }; > > > > >} ># 44 "/usr/include/c++/13/system_error" 2 3 > > > > >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 { ># 106 "/usr/include/c++/13/system_error" 3 > 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; ># 144 "/usr/include/c++/13/system_error" 3 > 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 > { return this == &__other; } ># 170 "/usr/include/c++/13/system_error" 3 > bool > operator<(const error_category& __other) const noexcept > { return less<const error_category*>()(this, &__other); } > > bool > operator!=(const error_category& __other) const noexcept > { return this != &__other; } > > }; > > > > > [[__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; >} ># 223 "/usr/include/c++/13/system_error" 3 > class error_code > { > template<typename _ErrorCodeEnum> > using _Check > = __enable_if_t<is_error_code_enum<_ErrorCodeEnum>::value>; > > public: > error_code() noexcept > : _M_value(0), _M_cat(&system_category()) { } > > error_code(int __v, const error_category& __cat) noexcept > : _M_value(__v), _M_cat(&__cat) { } > > > template<typename _ErrorCodeEnum, > typename = _Check<_ErrorCodeEnum>> > error_code(_ErrorCodeEnum __e) noexcept > { > using __adl_only::make_error_code; > *this = make_error_code(__e); > } > > error_code(const error_code&) = default; > error_code& operator=(const error_code&) = default; > > void > assign(int __v, const error_category& __cat) noexcept > { > _M_value = __v; > _M_cat = &__cat; > } > > void > clear() noexcept > { assign(0, system_category()); } > > > [[__nodiscard__]] > int > value() const noexcept { return _M_value; } > > > [[__nodiscard__]] > const error_category& > category() const noexcept { return *_M_cat; } > > > error_condition > default_error_condition() const noexcept; > > > __attribute ((__abi_tag__ ("cxx11"))) > string > message() const > { return category().message(value()); } > > > [[__nodiscard__]] > explicit operator bool() const noexcept > { return _M_value != 0; } > > > private: > int _M_value; > const error_category* _M_cat; > }; ># 300 "/usr/include/c++/13/system_error" 3 > [[__nodiscard__]] > inline error_code > make_error_code(errc __e) noexcept > { return error_code(static_cast<int>(__e), generic_category()); } ># 323 "/usr/include/c++/13/system_error" 3 > inline bool > operator<(const error_code& __lhs, const error_code& __rhs) noexcept > { > return (__lhs.category() < __rhs.category() > || (__lhs.category() == __rhs.category() > && __lhs.value() < __rhs.value())); > } > > > > > > > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) > { return (__os << __e.category().name() << ':' << __e.value()); } ># 354 "/usr/include/c++/13/system_error" 3 > class error_condition > { > template<typename _ErrorConditionEnum> > using _Check > = __enable_if_t<is_error_condition_enum<_ErrorConditionEnum>::value>; > > public: > > error_condition() noexcept > : _M_value(0), _M_cat(&generic_category()) { } > > > error_condition(int __v, const error_category& __cat) noexcept > : _M_value(__v), _M_cat(&__cat) { } > > > template<typename _ErrorConditionEnum, > typename = _Check<_ErrorConditionEnum>> > error_condition(_ErrorConditionEnum __e) noexcept > { > using __adl_only::make_error_condition; > *this = make_error_condition(__e); > } > > error_condition(const error_condition&) = default; > error_condition& operator=(const error_condition&) = default; > > > void > assign(int __v, const error_category& __cat) noexcept > { > _M_value = __v; > _M_cat = &__cat; > } > > > void > clear() noexcept > { assign(0, generic_category()); } > > > > > [[__nodiscard__]] > int > value() const noexcept { return _M_value; } > > > [[__nodiscard__]] > const error_category& > category() const noexcept { return *_M_cat; } > > > __attribute ((__abi_tag__ ("cxx11"))) > string > message() const > { return category().message(value()); } > > > [[__nodiscard__]] > explicit operator bool() const noexcept > { return _M_value != 0; } > > > private: > int _M_value; > const error_category* _M_cat; > }; ># 433 "/usr/include/c++/13/system_error" 3 > [[__nodiscard__]] > inline error_condition > make_error_condition(errc __e) noexcept > { return error_condition(static_cast<int>(__e), generic_category()); } ># 447 "/usr/include/c++/13/system_error" 3 > [[__nodiscard__]] > inline bool > operator==(const error_code& __lhs, const error_code& __rhs) noexcept > { > return __lhs.category() == __rhs.category() > && __lhs.value() == __rhs.value(); > } ># 463 "/usr/include/c++/13/system_error" 3 > [[__nodiscard__]] > inline bool > operator==(const error_code& __lhs, const error_condition& __rhs) noexcept > { > return __lhs.category().equivalent(__lhs.value(), __rhs) > || __rhs.category().equivalent(__lhs, __rhs.value()); > } ># 478 "/usr/include/c++/13/system_error" 3 > [[__nodiscard__]] > inline bool > operator==(const error_condition& __lhs, > const error_condition& __rhs) noexcept > { > return __lhs.category() == __rhs.category() > && __lhs.value() == __rhs.value(); > } ># 506 "/usr/include/c++/13/system_error" 3 > inline bool > operator<(const error_condition& __lhs, > const error_condition& __rhs) noexcept > { > return (__lhs.category() < __rhs.category() > || (__lhs.category() == __rhs.category() > && __lhs.value() < __rhs.value())); > } > > > inline bool > operator==(const error_condition& __lhs, const error_code& __rhs) noexcept > { > return (__rhs.category().equivalent(__rhs.value(), __lhs) > || __lhs.category().equivalent(__rhs, __lhs.value())); > } > > > inline bool > operator!=(const error_code& __lhs, const error_code& __rhs) noexcept > { return !(__lhs == __rhs); } > > > inline bool > operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept > { return !(__lhs == __rhs); } > > > inline bool > operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept > { return !(__lhs == __rhs); } > > > inline bool > operator!=(const error_condition& __lhs, > const error_condition& __rhs) noexcept > { return !(__lhs == __rhs); } ># 556 "/usr/include/c++/13/system_error" 3 > class system_error : public std::runtime_error > { > private: > error_code _M_code; > > public: > system_error(error_code __ec = error_code()) > : runtime_error(__ec.message()), _M_code(__ec) { } > > system_error(error_code __ec, const string& __what) > : runtime_error(__what + ": " + __ec.message()), _M_code(__ec) { } > > system_error(error_code __ec, const char* __what) > : runtime_error(__what + (": " + __ec.message())), _M_code(__ec) { } > > system_error(int __v, const error_category& __ecat, const char* __what) > : system_error(error_code(__v, __ecat), __what) { } > > system_error(int __v, const error_category& __ecat) > : runtime_error(error_code(__v, __ecat).message()), > _M_code(__v, __ecat) { } > > system_error(int __v, const error_category& __ecat, const string& __what) > : runtime_error(__what + ": " + error_code(__v, __ecat).message()), > _M_code(__v, __ecat) { } > > > system_error (const system_error &) = default; > system_error &operator= (const system_error &) = default; > > > virtual ~system_error() noexcept; > > const error_code& > code() const noexcept { return _M_code; } > }; > > >} > > > >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 > { > const size_t __tmp = std::_Hash_impl::hash(__e.value()); > return std::_Hash_impl::__hash_combine(&__e.category(), __tmp); > } > }; > > > > > > > template<> > struct hash<error_condition> > : public __hash_base<size_t, error_condition> > { > size_t > operator()(const error_condition& __e) const noexcept > { > const size_t __tmp = std::_Hash_impl::hash(__e.value()); > return std::_Hash_impl::__hash_combine(&__e.category(), __tmp); > } > }; > > > >} ># 47 "/usr/include/c++/13/bits/ios_base.h" 2 3 > > >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 = 0x7fffffff, > _S_ios_fmtflags_min = ~0x7fffffff > }; > > inline constexpr _Ios_Fmtflags > operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) > { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); } > > inline constexpr _Ios_Fmtflags > operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) > { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); } > > inline constexpr _Ios_Fmtflags > operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) > { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); } > > inline constexpr _Ios_Fmtflags > operator~(_Ios_Fmtflags __a) > { return _Ios_Fmtflags(~static_cast<int>(__a)); } > > inline const _Ios_Fmtflags& > operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) > { return __a = __a | __b; } > > inline const _Ios_Fmtflags& > operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) > { return __a = __a & __b; } > > inline const _Ios_Fmtflags& > operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) > { return __a = __a ^ __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 = 0x7fffffff, > _S_ios_openmode_min = ~0x7fffffff > }; > > inline constexpr _Ios_Openmode > operator&(_Ios_Openmode __a, _Ios_Openmode __b) > { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); } > > inline constexpr _Ios_Openmode > operator|(_Ios_Openmode __a, _Ios_Openmode __b) > { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); } > > inline constexpr _Ios_Openmode > operator^(_Ios_Openmode __a, _Ios_Openmode __b) > { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); } > > inline constexpr _Ios_Openmode > operator~(_Ios_Openmode __a) > { return _Ios_Openmode(~static_cast<int>(__a)); } > > inline const _Ios_Openmode& > operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) > { return __a = __a | __b; } > > inline const _Ios_Openmode& > operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) > { return __a = __a & __b; } > > inline const _Ios_Openmode& > operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) > { return __a = __a ^ __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 = 0x7fffffff, > _S_ios_iostate_min = ~0x7fffffff > }; > > inline constexpr _Ios_Iostate > operator&(_Ios_Iostate __a, _Ios_Iostate __b) > { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); } > > inline constexpr _Ios_Iostate > operator|(_Ios_Iostate __a, _Ios_Iostate __b) > { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); } > > inline constexpr _Ios_Iostate > operator^(_Ios_Iostate __a, _Ios_Iostate __b) > { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); } > > inline constexpr _Ios_Iostate > operator~(_Ios_Iostate __a) > { return _Ios_Iostate(~static_cast<int>(__a)); } > > inline const _Ios_Iostate& > operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) > { return __a = __a | __b; } > > inline const _Ios_Iostate& > operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) > { return __a = __a & __b; } > > inline const _Ios_Iostate& > operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) > { return __a = __a ^ __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__]] > inline error_code > make_error_code(io_errc __e) noexcept > { return error_code(static_cast<int>(__e), iostream_category()); } > > [[__nodiscard__]] > inline error_condition > make_error_condition(io_errc __e) noexcept > { return error_condition(static_cast<int>(__e), iostream_category()); } ># 233 "/usr/include/c++/13/bits/ios_base.h" 3 > class ios_base > { ># 251 "/usr/include/c++/13/bits/ios_base.h" 3 > public: ># 260 "/usr/include/c++/13/bits/ios_base.h" 3 > class __attribute ((__abi_tag__ ("cxx11"))) failure : public system_error > { > public: > explicit > failure(const string& __str); > > > explicit > failure(const string&, const error_code&); > > explicit > failure(const char*, const error_code& = io_errc::stream); > > > virtual > ~failure() throw(); > > virtual const char* > what() const throw(); > }; ># 346 "/usr/include/c++/13/bits/ios_base.h" 3 > 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; ># 421 "/usr/include/c++/13/bits/ios_base.h" 3 > 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; ># 452 "/usr/include/c++/13/bits/ios_base.h" 3 > 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; ># 492 "/usr/include/c++/13/bits/ios_base.h" 3 > typedef _Ios_Seekdir seekdir; > > > static const seekdir beg = _S_beg; > > > static const seekdir cur = _S_cur; > > > static const seekdir end = _S_end; ># 525 "/usr/include/c++/13/bits/ios_base.h" 3 > enum event > { > erase_event, > imbue_event, > copyfmt_event > }; ># 542 "/usr/include/c++/13/bits/ios_base.h" 3 > typedef void (*event_callback) (event __e, ios_base& __b, int __i); ># 554 "/usr/include/c++/13/bits/ios_base.h" 3 > void > register_callback(event_callback __fn, int __index); > > 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(ios_base::event_callback __fn, int __index, > _Callback_list* __cb) > : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } > > void > _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } > > > int > _M_remove_reference() > { > > ; > int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); > if (__res == 0) > { > ; > } > return __res; > } > }; > > _Callback_list* _M_callbacks; > > void > _M_call_callbacks(event __ev) throw(); > > void > _M_dispose_callbacks(void) throw(); > > > struct _Words > { > void* _M_pword; > long _M_iword; > _Words() : _M_pword(0), _M_iword(0) { } > }; > > > _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; > > void > _M_init() throw(); > > public: > > > > > > class Init > { > friend class ios_base; > public: > Init(); > ~Init(); > > > Init(const Init&) = default; > Init& operator=(const Init&) = default; > > > private: > static _Atomic_word _S_refcount; > static bool _S_synced_with_stdio; > }; > > > > > > > fmtflags > flags() const > { return _M_flags; } ># 672 "/usr/include/c++/13/bits/ios_base.h" 3 > fmtflags > flags(fmtflags __fmtfl) > { > fmtflags __old = _M_flags; > _M_flags = __fmtfl; > return __old; > } ># 688 "/usr/include/c++/13/bits/ios_base.h" 3 > fmtflags > setf(fmtflags __fmtfl) > { > fmtflags __old = _M_flags; > _M_flags |= __fmtfl; > return __old; > } ># 705 "/usr/include/c++/13/bits/ios_base.h" 3 > fmtflags > setf(fmtflags __fmtfl, fmtflags __mask) > { > fmtflags __old = _M_flags; > _M_flags &= ~__mask; > _M_flags |= (__fmtfl & __mask); > return __old; > } > > > > > > > > void > unsetf(fmtflags __mask) > { _M_flags &= ~__mask; } ># 731 "/usr/include/c++/13/bits/ios_base.h" 3 > streamsize > precision() const > { return _M_precision; } > > > > > > > streamsize > precision(streamsize __prec) > { > streamsize __old = _M_precision; > _M_precision = __prec; > return __old; > } > > > > > > > > streamsize > width() const > { return _M_width; } > > > > > > > streamsize > width(streamsize __wide) > { > streamsize __old = _M_width; > _M_width = __wide; > return __old; > } ># 782 "/usr/include/c++/13/bits/ios_base.h" 3 > static bool > sync_with_stdio(bool __sync = true); ># 794 "/usr/include/c++/13/bits/ios_base.h" 3 > locale > imbue(const locale& __loc) throw(); ># 805 "/usr/include/c++/13/bits/ios_base.h" 3 > locale > getloc() const > { return _M_ios_locale; } ># 816 "/usr/include/c++/13/bits/ios_base.h" 3 > const locale& > _M_getloc() const > { return _M_ios_locale; } ># 835 "/usr/include/c++/13/bits/ios_base.h" 3 > static int > xalloc() throw(); ># 851 "/usr/include/c++/13/bits/ios_base.h" 3 > long& > iword(int __ix) > { > _Words& __word = ((unsigned)__ix < (unsigned)_M_word_size) > ? _M_word[__ix] : _M_grow_words(__ix, true); > return __word._M_iword; > } ># 872 "/usr/include/c++/13/bits/ios_base.h" 3 > void*& > pword(int __ix) > { > _Words& __word = ((unsigned)__ix < (unsigned)_M_word_size) > ? _M_word[__ix] : _M_grow_words(__ix, false); > return __word._M_pword; > } ># 889 "/usr/include/c++/13/bits/ios_base.h" 3 > virtual ~ios_base(); > > protected: > ios_base() throw (); ># 903 "/usr/include/c++/13/bits/ios_base.h" 3 > public: > ios_base(const ios_base&) = delete; > > ios_base& > operator=(const ios_base&) = delete; > > protected: > void > _M_move(ios_base&) noexcept; > > void > _M_swap(ios_base& __rhs) noexcept; > > }; > > > > inline ios_base& > boolalpha(ios_base& __base) > { > __base.setf(ios_base::boolalpha); > return __base; > } > > > inline ios_base& > noboolalpha(ios_base& __base) > { > __base.unsetf(ios_base::boolalpha); > return __base; > } > > > inline ios_base& > showbase(ios_base& __base) > { > __base.setf(ios_base::showbase); > return __base; > } > > > inline ios_base& > noshowbase(ios_base& __base) > { > __base.unsetf(ios_base::showbase); > return __base; > } > > > inline ios_base& > showpoint(ios_base& __base) > { > __base.setf(ios_base::showpoint); > return __base; > } > > > inline ios_base& > noshowpoint(ios_base& __base) > { > __base.unsetf(ios_base::showpoint); > return __base; > } > > > inline ios_base& > showpos(ios_base& __base) > { > __base.setf(ios_base::showpos); > return __base; > } > > > inline ios_base& > noshowpos(ios_base& __base) > { > __base.unsetf(ios_base::showpos); > return __base; > } > > > inline ios_base& > skipws(ios_base& __base) > { > __base.setf(ios_base::skipws); > return __base; > } > > > inline ios_base& > noskipws(ios_base& __base) > { > __base.unsetf(ios_base::skipws); > return __base; > } > > > inline ios_base& > uppercase(ios_base& __base) > { > __base.setf(ios_base::uppercase); > return __base; > } > > > inline ios_base& > nouppercase(ios_base& __base) > { > __base.unsetf(ios_base::uppercase); > return __base; > } > > > inline ios_base& > unitbuf(ios_base& __base) > { > __base.setf(ios_base::unitbuf); > return __base; > } > > > inline ios_base& > nounitbuf(ios_base& __base) > { > __base.unsetf(ios_base::unitbuf); > return __base; > } > > > > inline ios_base& > internal(ios_base& __base) > { > __base.setf(ios_base::internal, ios_base::adjustfield); > return __base; > } > > > inline ios_base& > left(ios_base& __base) > { > __base.setf(ios_base::left, ios_base::adjustfield); > return __base; > } > > > inline ios_base& > right(ios_base& __base) > { > __base.setf(ios_base::right, ios_base::adjustfield); > return __base; > } > > > > inline ios_base& > dec(ios_base& __base) > { > __base.setf(ios_base::dec, ios_base::basefield); > return __base; > } > > > inline ios_base& > hex(ios_base& __base) > { > __base.setf(ios_base::hex, ios_base::basefield); > return __base; > } > > > inline ios_base& > oct(ios_base& __base) > { > __base.setf(ios_base::oct, ios_base::basefield); > return __base; > } > > > > inline ios_base& > fixed(ios_base& __base) > { > __base.setf(ios_base::fixed, ios_base::floatfield); > return __base; > } > > > inline ios_base& > scientific(ios_base& __base) > { > __base.setf(ios_base::scientific, ios_base::floatfield); > return __base; > } > > > > > > > inline ios_base& > hexfloat(ios_base& __base) > { > __base.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield); > return __base; > } > > > inline ios_base& > defaultfloat(ios_base& __base) > { > __base.unsetf(ios_base::floatfield); > return __base; > } > > > >} ># 45 "/usr/include/c++/13/ios" 2 3 ># 1 "/usr/include/c++/13/streambuf" 1 3 ># 36 "/usr/include/c++/13/streambuf" 3 > ># 37 "/usr/include/c++/13/streambuf" 3 ># 47 "/usr/include/c++/13/streambuf" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > template<typename _CharT, typename _Traits> > streamsize > __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, > basic_streambuf<_CharT, _Traits>*, bool&); ># 123 "/usr/include/c++/13/streambuf" 3 > 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&); > > 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> > 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); > > friend void __istream_extract(istream&, char*, streamsize); > > template<typename _CharT2, typename _Traits2, typename _Alloc> > friend basic_istream<_CharT2, _Traits2>& > operator>>(basic_istream<_CharT2, _Traits2>&, > basic_string<_CharT2, _Traits2, _Alloc>&); > > template<typename _CharT2, typename _Traits2, typename _Alloc> > friend basic_istream<_CharT2, _Traits2>& > getline(basic_istream<_CharT2, _Traits2>&, > basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); > > 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: > > virtual > ~basic_streambuf() > { } ># 215 "/usr/include/c++/13/streambuf" 3 > locale > pubimbue(const locale& __loc) > { > locale __tmp(this->getloc()); > this->imbue(__loc); > _M_buf_locale = __loc; > return __tmp; > } ># 232 "/usr/include/c++/13/streambuf" 3 > locale > getloc() const > { return _M_buf_locale; } ># 245 "/usr/include/c++/13/streambuf" 3 > basic_streambuf* > pubsetbuf(char_type* __s, streamsize __n) > { return this->setbuf(__s, __n); } ># 257 "/usr/include/c++/13/streambuf" 3 > pos_type > pubseekoff(off_type __off, ios_base::seekdir __way, > ios_base::openmode __mode = ios_base::in | ios_base::out) > { return this->seekoff(__off, __way, __mode); } ># 269 "/usr/include/c++/13/streambuf" 3 > pos_type > pubseekpos(pos_type __sp, > ios_base::openmode __mode = ios_base::in | ios_base::out) > { return this->seekpos(__sp, __mode); } > > > > > int > pubsync() { return this->sync(); } ># 290 "/usr/include/c++/13/streambuf" 3 > streamsize > in_avail() > { > const streamsize __ret = this->egptr() - this->gptr(); > return __ret ? __ret : this->showmanyc(); > } ># 304 "/usr/include/c++/13/streambuf" 3 > int_type > snextc() > { > int_type __ret = traits_type::eof(); > if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), > __ret), true)) > __ret = this->sgetc(); > return __ret; > } ># 322 "/usr/include/c++/13/streambuf" 3 > int_type > sbumpc() > { > int_type __ret; > if (__builtin_expect(this->gptr() < this->egptr(), true)) > { > __ret = traits_type::to_int_type(*this->gptr()); > this->gbump(1); > } > else > __ret = this->uflow(); > return __ret; > } ># 344 "/usr/include/c++/13/streambuf" 3 > int_type > sgetc() > { > int_type __ret; > if (__builtin_expect(this->gptr() < this->egptr(), true)) > __ret = traits_type::to_int_type(*this->gptr()); > else > __ret = this->underflow(); > return __ret; > } ># 363 "/usr/include/c++/13/streambuf" 3 > streamsize > sgetn(char_type* __s, streamsize __n) > { return this->xsgetn(__s, __n); } ># 378 "/usr/include/c++/13/streambuf" 3 > int_type > sputbackc(char_type __c) > { > int_type __ret; > const bool __testpos = this->eback() < this->gptr(); > if (__builtin_expect(!__testpos || > !traits_type::eq(__c, this->gptr()[-1]), false)) > __ret = this->pbackfail(traits_type::to_int_type(__c)); > else > { > this->gbump(-1); > __ret = traits_type::to_int_type(*this->gptr()); > } > return __ret; > } ># 403 "/usr/include/c++/13/streambuf" 3 > int_type > sungetc() > { > int_type __ret; > if (__builtin_expect(this->eback() < this->gptr(), true)) > { > this->gbump(-1); > __ret = traits_type::to_int_type(*this->gptr()); > } > else > __ret = this->pbackfail(); > return __ret; > } ># 430 "/usr/include/c++/13/streambuf" 3 > int_type > sputc(char_type __c) > { > int_type __ret; > if (__builtin_expect(this->pptr() < this->epptr(), true)) > { > *this->pptr() = __c; > this->pbump(1); > __ret = traits_type::to_int_type(__c); > } > else > __ret = this->overflow(traits_type::to_int_type(__c)); > return __ret; > } ># 456 "/usr/include/c++/13/streambuf" 3 > streamsize > sputn(const char_type* __s, streamsize __n) > { return this->xsputn(__s, __n); } > > protected: ># 470 "/usr/include/c++/13/streambuf" 3 > basic_streambuf() > : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), > _M_out_beg(0), _M_out_cur(0), _M_out_end(0), > _M_buf_locale(locale()) > { } ># 488 "/usr/include/c++/13/streambuf" 3 > char_type* > eback() const { return _M_in_beg; } > > char_type* > gptr() const { return _M_in_cur; } > > char_type* > egptr() const { return _M_in_end; } ># 504 "/usr/include/c++/13/streambuf" 3 > void > gbump(int __n) { _M_in_cur += __n; } ># 515 "/usr/include/c++/13/streambuf" 3 > void > setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) > { > _M_in_beg = __gbeg; > _M_in_cur = __gnext; > _M_in_end = __gend; > } ># 535 "/usr/include/c++/13/streambuf" 3 > char_type* > pbase() const { return _M_out_beg; } > > char_type* > pptr() const { return _M_out_cur; } > > char_type* > epptr() const { return _M_out_end; } ># 551 "/usr/include/c++/13/streambuf" 3 > void > pbump(int __n) { _M_out_cur += __n; } ># 561 "/usr/include/c++/13/streambuf" 3 > void > setp(char_type* __pbeg, char_type* __pend) > { > _M_out_beg = _M_out_cur = __pbeg; > _M_out_end = __pend; > } ># 582 "/usr/include/c++/13/streambuf" 3 > virtual void > imbue(const locale& __loc __attribute__ ((__unused__))) > { } ># 597 "/usr/include/c++/13/streambuf" 3 > virtual basic_streambuf<char_type,_Traits>* > setbuf(char_type*, streamsize) > { return this; } ># 608 "/usr/include/c++/13/streambuf" 3 > virtual pos_type > seekoff(off_type, ios_base::seekdir, > ios_base::openmode = ios_base::in | ios_base::out) > { return pos_type(off_type(-1)); } ># 620 "/usr/include/c++/13/streambuf" 3 > virtual pos_type > seekpos(pos_type, > ios_base::openmode = ios_base::in | ios_base::out) > { return pos_type(off_type(-1)); } ># 633 "/usr/include/c++/13/streambuf" 3 > virtual int > sync() { return 0; } ># 655 "/usr/include/c++/13/streambuf" 3 > virtual streamsize > showmanyc() { return 0; } ># 671 "/usr/include/c++/13/streambuf" 3 > virtual streamsize > xsgetn(char_type* __s, streamsize __n); ># 693 "/usr/include/c++/13/streambuf" 3 > virtual int_type > underflow() > { return traits_type::eof(); } ># 706 "/usr/include/c++/13/streambuf" 3 > virtual int_type > uflow() > { > int_type __ret = traits_type::eof(); > const bool __testeof = traits_type::eq_int_type(this->underflow(), > __ret); > if (!__testeof) > { > __ret = traits_type::to_int_type(*this->gptr()); > this->gbump(1); > } > return __ret; > } ># 730 "/usr/include/c++/13/streambuf" 3 > virtual int_type > pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) > { return traits_type::eof(); } ># 748 "/usr/include/c++/13/streambuf" 3 > virtual streamsize > xsputn(const char_type* __s, streamsize __n); ># 774 "/usr/include/c++/13/streambuf" 3 > virtual int_type > overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) > { return traits_type::eof(); } ># 801 "/usr/include/c++/13/streambuf" 3 > void > __safe_gbump(streamsize __n) { _M_in_cur += __n; } > > void > __safe_pbump(streamsize __n) { _M_out_cur += __n; } > > > > > protected: > > basic_streambuf(const basic_streambuf&); > > basic_streambuf& > operator=(const basic_streambuf&); > > > void > swap(basic_streambuf& __sb) > { > std::swap(_M_in_beg, __sb._M_in_beg); > std::swap(_M_in_cur, __sb._M_in_cur); > std::swap(_M_in_end, __sb._M_in_end); > std::swap(_M_out_beg, __sb._M_out_beg); > std::swap(_M_out_cur, __sb._M_out_cur); > std::swap(_M_out_end, __sb._M_out_end); > std::swap(_M_buf_locale, __sb._M_buf_locale); > } > > }; > > > template<typename _CharT, typename _Traits> > std::basic_streambuf<_CharT, _Traits>:: > basic_streambuf(const basic_streambuf&) = default; > > template<typename _CharT, typename _Traits> > std::basic_streambuf<_CharT, _Traits>& > std::basic_streambuf<_CharT, _Traits>:: > operator=(const basic_streambuf&) = default; > > > > 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); > > > > > >} > ># 1 "/usr/include/c++/13/bits/streambuf.tcc" 1 3 ># 37 "/usr/include/c++/13/bits/streambuf.tcc" 3 > ># 38 "/usr/include/c++/13/bits/streambuf.tcc" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _CharT, typename _Traits> > streamsize > basic_streambuf<_CharT, _Traits>:: > xsgetn(char_type* __s, streamsize __n) > { > streamsize __ret = 0; > while (__ret < __n) > { > const streamsize __buf_len = this->egptr() - this->gptr(); > if (__buf_len) > { > const streamsize __remaining = __n - __ret; > const streamsize __len = std::min(__buf_len, __remaining); > traits_type::copy(__s, this->gptr(), __len); > __ret += __len; > __s += __len; > this->__safe_gbump(__len); > } > > if (__ret < __n) > { > const int_type __c = this->uflow(); > if (!traits_type::eq_int_type(__c, traits_type::eof())) > { > traits_type::assign(*__s++, traits_type::to_char_type(__c)); > ++__ret; > } > else > break; > } > } > return __ret; > } > > template<typename _CharT, typename _Traits> > streamsize > basic_streambuf<_CharT, _Traits>:: > xsputn(const char_type* __s, streamsize __n) > { > streamsize __ret = 0; > while (__ret < __n) > { > const streamsize __buf_len = this->epptr() - this->pptr(); > if (__buf_len) > { > const streamsize __remaining = __n - __ret; > const streamsize __len = std::min(__buf_len, __remaining); > traits_type::copy(this->pptr(), __s, __len); > __ret += __len; > __s += __len; > this->__safe_pbump(__len); > } > > if (__ret < __n) > { > int_type __c = this->overflow(traits_type::to_int_type(*__s)); > if (!traits_type::eq_int_type(__c, traits_type::eof())) > { > ++__ret; > ++__s; > } > else > break; > } > } > return __ret; > } > > > > > template<typename _CharT, typename _Traits> > streamsize > __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, > basic_streambuf<_CharT, _Traits>* __sbout, > bool& __ineof) > { > streamsize __ret = 0; > __ineof = true; > typename _Traits::int_type __c = __sbin->sgetc(); > while (!_Traits::eq_int_type(__c, _Traits::eof())) > { > __c = __sbout->sputc(_Traits::to_char_type(__c)); > if (_Traits::eq_int_type(__c, _Traits::eof())) > { > __ineof = false; > break; > } > ++__ret; > __c = __sbin->snextc(); > } > return __ret; > } > > template<typename _CharT, typename _Traits> > inline streamsize > __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, > basic_streambuf<_CharT, _Traits>* __sbout) > { > bool __ineof; > return __copy_streambufs_eof(__sbin, __sbout, __ineof); > } > > > > > extern template class basic_streambuf<char>; > > extern template > streamsize > __copy_streambufs(basic_streambuf<char>*, > basic_streambuf<char>*); > > > extern template class basic_streambuf<wchar_t>; > > extern template > streamsize > __copy_streambufs(basic_streambuf<wchar_t>*, > basic_streambuf<wchar_t>*); > > > > >} ># 861 "/usr/include/c++/13/streambuf" 2 3 ># 46 "/usr/include/c++/13/ios" 2 3 ># 1 "/usr/include/c++/13/bits/basic_ios.h" 1 3 ># 33 "/usr/include/c++/13/bits/basic_ios.h" 3 > ># 34 "/usr/include/c++/13/bits/basic_ios.h" 3 > > > ># 1 "/usr/include/c++/13/bits/locale_facets.h" 1 3 ># 37 "/usr/include/c++/13/bits/locale_facets.h" 3 > ># 38 "/usr/include/c++/13/bits/locale_facets.h" 3 > ># 1 "/usr/include/c++/13/cwctype" 1 3 ># 39 "/usr/include/c++/13/cwctype" 3 > ># 40 "/usr/include/c++/13/cwctype" 3 ># 50 "/usr/include/c++/13/cwctype" 3 ># 1 "/usr/include/wctype.h" 1 3 4 ># 38 "/usr/include/wctype.h" 3 4 ># 1 "/usr/include/bits/wctype-wchar.h" 1 3 4 ># 38 "/usr/include/bits/wctype-wchar.h" 3 4 >typedef unsigned long int wctype_t; ># 56 "/usr/include/bits/wctype-wchar.h" 3 4 >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 iswalnum (wint_t __wc) noexcept (true); > > > > > >extern int iswalpha (wint_t __wc) noexcept (true); > > >extern int iswcntrl (wint_t __wc) noexcept (true); > > > >extern int iswdigit (wint_t __wc) noexcept (true); > > > >extern int iswgraph (wint_t __wc) noexcept (true); > > > > >extern int iswlower (wint_t __wc) noexcept (true); > > >extern int iswprint (wint_t __wc) noexcept (true); > > > > >extern int iswpunct (wint_t __wc) noexcept (true); > > > > >extern int iswspace (wint_t __wc) noexcept (true); > > > > >extern int iswupper (wint_t __wc) noexcept (true); > > > > >extern int iswxdigit (wint_t __wc) noexcept (true); > > > > > >extern int iswblank (wint_t __wc) noexcept (true); ># 155 "/usr/include/bits/wctype-wchar.h" 3 4 >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); > >} ># 39 "/usr/include/wctype.h" 2 3 4 > > > > > >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); > > > >} ># 51 "/usr/include/c++/13/cwctype" 2 3 ># 80 "/usr/include/c++/13/cwctype" 3 >namespace std >{ > using ::wctrans_t; > using ::wctype_t; > using ::wint_t; > > using ::iswalnum; > using ::iswalpha; > > using ::iswblank; > > using ::iswcntrl; > using ::iswctype; > using ::iswdigit; > using ::iswgraph; > using ::iswlower; > using ::iswprint; > using ::iswpunct; > using ::iswspace; > using ::iswupper; > using ::iswxdigit; > using ::towctrans; > using ::towlower; > using ::towupper; > using ::wctrans; > using ::wctype; >} ># 40 "/usr/include/c++/13/bits/locale_facets.h" 2 3 ># 1 "/usr/include/c++/13/cctype" 1 3 ># 39 "/usr/include/c++/13/cctype" 3 > ># 40 "/usr/include/c++/13/cctype" 3 ># 41 "/usr/include/c++/13/bits/locale_facets.h" 2 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/ctype_base.h" 1 3 ># 36 "/usr/include/c++/13/x86_64-redhat-linux/bits/ctype_base.h" 3 >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; > > }; > > >} ># 42 "/usr/include/c++/13/bits/locale_facets.h" 2 3 > > > > > > ># 1 "/usr/include/c++/13/bits/streambuf_iterator.h" 1 3 ># 33 "/usr/include/c++/13/bits/streambuf_iterator.h" 3 > ># 34 "/usr/include/c++/13/bits/streambuf_iterator.h" 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > > ># 49 "/usr/include/c++/13/bits/streambuf_iterator.h" 3 >#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: ># 70 "/usr/include/c++/13/bits/streambuf_iterator.h" 3 > 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() noexcept > : _M_sbuf(0), _M_c(traits_type::eof()) { } > > > > > > > > istreambuf_iterator(const istreambuf_iterator&) noexcept = default; > > ~istreambuf_iterator() = default; > > > > istreambuf_iterator(istream_type& __s) noexcept > : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } > > > istreambuf_iterator(streambuf_type* __s) noexcept > : _M_sbuf(__s), _M_c(traits_type::eof()) { } > > > istreambuf_iterator& > operator=(const istreambuf_iterator&) noexcept = default; > > > > > > [[__nodiscard__]] > char_type > operator*() const > { > int_type __c = _M_get(); ># 161 "/usr/include/c++/13/bits/streambuf_iterator.h" 3 > return traits_type::to_char_type(__c); > } > > > istreambuf_iterator& > operator++() > { > > > > ; > > _M_sbuf->sbumpc(); > _M_c = traits_type::eof(); > return *this; > } > > > istreambuf_iterator > operator++(int) > { > > > > ; > > istreambuf_iterator __old = *this; > __old._M_c = _M_sbuf->sbumpc(); > _M_c = traits_type::eof(); > return __old; > } > > > > > > [[__nodiscard__]] > bool > equal(const istreambuf_iterator& __b) const > { return _M_at_eof() == __b._M_at_eof(); } > > private: > int_type > _M_get() const > { > int_type __ret = _M_c; > if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc())) > _M_sbuf = 0; > return __ret; > } > > bool > _M_at_eof() const > { return _S_is_eof(_M_get()); } > > static bool > _S_is_eof(int_type __c) > { > const int_type __eof = traits_type::eof(); > return traits_type::eq_int_type(__c, __eof); > } > > > > > > > > }; > > template<typename _CharT, typename _Traits> > [[__nodiscard__]] > inline bool > operator==(const istreambuf_iterator<_CharT, _Traits>& __a, > const istreambuf_iterator<_CharT, _Traits>& __b) > { return __a.equal(__b); } > > > template<typename _CharT, typename _Traits> > [[__nodiscard__]] > inline bool > operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, > const istreambuf_iterator<_CharT, _Traits>& __b) > { return !__a.equal(__b); } > > > > template<typename _CharT, typename _Traits> > class ostreambuf_iterator > : public iterator<output_iterator_tag, void, void, void, void> > { > public: > > > > > > > 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: ># 284 "/usr/include/c++/13/bits/streambuf_iterator.h" 3 > ostreambuf_iterator(ostream_type& __s) noexcept > : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } > > > ostreambuf_iterator(streambuf_type* __s) noexcept > : _M_sbuf(__s), _M_failed(!_M_sbuf) { } > > > ostreambuf_iterator& > operator=(_CharT __c) > { > if (!_M_failed && > _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) > _M_failed = true; > return *this; > } > > > [[__nodiscard__]] > ostreambuf_iterator& > operator*() > { return *this; } > > > ostreambuf_iterator& > operator++(int) > { return *this; } > > > ostreambuf_iterator& > operator++() > { return *this; } > > > [[__nodiscard__]] > bool > failed() const noexcept > { return _M_failed; } > > ostreambuf_iterator& > _M_put(const _CharT* __ws, streamsize __len) > { > if (__builtin_expect(!_M_failed, true) > && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, > false)) > _M_failed = true; > return *this; > } > }; >#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) > { > if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) > { > bool __ineof; > __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); > if (!__ineof) > __result._M_failed = true; > } > return __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) > { > const streamsize __num = __last - __first; > if (__num > 0) > __result._M_put(__first, __num); > return __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) > { > const streamsize __num = __last - __first; > if (__num > 0) > __result._M_put(__first, __num); > return __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) > { > typedef istreambuf_iterator<_CharT> __is_iterator_type; > typedef typename __is_iterator_type::traits_type traits_type; > typedef typename __is_iterator_type::streambuf_type streambuf_type; > typedef typename traits_type::int_type int_type; > > if (__first._M_sbuf && !__last._M_sbuf) > { > streambuf_type* __sb = __first._M_sbuf; > int_type __c = __sb->sgetc(); > while (!traits_type::eq_int_type(__c, traits_type::eof())) > { > const streamsize __n = __sb->egptr() - __sb->gptr(); > if (__n > 1) > { > traits_type::copy(__result, __sb->gptr(), __n); > __sb->__safe_gbump(__n); > __result += __n; > __c = __sb->underflow(); > } > else > { > *__result++ = traits_type::to_char_type(__c); > __c = __sb->snextc(); > } > } > } > return __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__))) > { > if (__n == 0) > return __result; > > > > ; > _CharT* __beg = __result; > __result += __it._M_sbuf->sgetn(__beg, __n); > > > ; > return __result; > } > > 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) > { > typedef istreambuf_iterator<_CharT> __is_iterator_type; > typedef typename __is_iterator_type::traits_type traits_type; > typedef typename __is_iterator_type::streambuf_type streambuf_type; > typedef typename traits_type::int_type int_type; > const int_type __eof = traits_type::eof(); > > if (__first._M_sbuf && !__last._M_sbuf) > { > const int_type __ival = traits_type::to_int_type(__val); > streambuf_type* __sb = __first._M_sbuf; > int_type __c = __sb->sgetc(); > while (!traits_type::eq_int_type(__c, __eof) > && !traits_type::eq_int_type(__c, __ival)) > { > streamsize __n = __sb->egptr() - __sb->gptr(); > if (__n > 1) > { > const _CharT* __p = traits_type::find(__sb->gptr(), > __n, __val); > if (__p) > __n = __p - __sb->gptr(); > __sb->__safe_gbump(__n); > __c = __sb->sgetc(); > } > else > __c = __sb->snextc(); > } > > __first._M_c = __eof; > } > > return __first; > } > > template<typename _CharT, typename _Distance> > typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, > void>::__type > advance(istreambuf_iterator<_CharT>& __i, _Distance __n) > { > if (__n == 0) > return; > > do { if (std::__is_constant_evaluated() && !bool(__n > 0)) __builtin_unreachable(); } while (false); > > > ; > > typedef istreambuf_iterator<_CharT> __is_iterator_type; > typedef typename __is_iterator_type::traits_type traits_type; > typedef typename __is_iterator_type::streambuf_type streambuf_type; > typedef typename traits_type::int_type int_type; > const int_type __eof = traits_type::eof(); > > streambuf_type* __sb = __i._M_sbuf; > while (__n > 0) > { > streamsize __size = __sb->egptr() - __sb->gptr(); > if (__size > __n) > { > __sb->__safe_gbump(__n); > break; > } > > __sb->__safe_gbump(__size); > __n -= __size; > if (traits_type::eq_int_type(__sb->underflow(), __eof)) > { > > > ; > break; > } > } > > __i._M_c = __eof; > } > > > > >} ># 49 "/usr/include/c++/13/bits/locale_facets.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 74 "/usr/include/c++/13/bits/locale_facets.h" 3 > 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> > inline > ostreambuf_iterator<_CharT> > __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) > { > __s._M_put(__ws, __len); > return __s; > } > > > template<typename _CharT, typename _OutIter> > inline > _OutIter > __write(_OutIter __s, const _CharT* __ws, int __len) > { > for (int __j = 0; __j < __len; __j++, ++__s) > *__s = __ws[__j]; > return __s; > } ># 152 "/usr/include/c++/13/bits/locale_facets.h" 3 > template<typename _CharT> > class __ctype_abstract_base : public locale::facet, public ctype_base > { > public: > > > typedef _CharT char_type; ># 171 "/usr/include/c++/13/bits/locale_facets.h" 3 > bool > is(mask __m, char_type __c) const > { return this->do_is(__m, __c); } ># 188 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > is(const char_type *__lo, const char_type *__hi, mask *__vec) const > { return this->do_is(__lo, __hi, __vec); } ># 204 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > scan_is(mask __m, const char_type* __lo, const char_type* __hi) const > { return this->do_scan_is(__m, __lo, __hi); } ># 220 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > scan_not(mask __m, const char_type* __lo, const char_type* __hi) const > { return this->do_scan_not(__m, __lo, __hi); } ># 234 "/usr/include/c++/13/bits/locale_facets.h" 3 > char_type > toupper(char_type __c) const > { return this->do_toupper(__c); } ># 249 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > toupper(char_type *__lo, const char_type* __hi) const > { return this->do_toupper(__lo, __hi); } ># 263 "/usr/include/c++/13/bits/locale_facets.h" 3 > char_type > tolower(char_type __c) const > { return this->do_tolower(__c); } ># 278 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > tolower(char_type* __lo, const char_type* __hi) const > { return this->do_tolower(__lo, __hi); } ># 295 "/usr/include/c++/13/bits/locale_facets.h" 3 > char_type > widen(char __c) const > { return this->do_widen(__c); } ># 314 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char* > widen(const char* __lo, const char* __hi, char_type* __to) const > { return this->do_widen(__lo, __hi, __to); } ># 333 "/usr/include/c++/13/bits/locale_facets.h" 3 > char > narrow(char_type __c, char __dfault) const > { return this->do_narrow(__c, __dfault); } ># 355 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > narrow(const char_type* __lo, const char_type* __hi, > char __dfault, char* __to) const > { return this->do_narrow(__lo, __hi, __dfault, __to); } > > protected: > explicit > __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } > > virtual > ~__ctype_abstract_base() { } ># 380 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual bool > do_is(mask __m, char_type __c) const = 0; ># 399 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_is(const char_type* __lo, const char_type* __hi, > mask* __vec) const = 0; ># 418 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_scan_is(mask __m, const char_type* __lo, > const char_type* __hi) const = 0; ># 437 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_scan_not(mask __m, const char_type* __lo, > const char_type* __hi) const = 0; ># 455 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_toupper(char_type __c) const = 0; ># 472 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_toupper(char_type* __lo, const char_type* __hi) const = 0; ># 488 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_tolower(char_type __c) const = 0; ># 505 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_tolower(char_type* __lo, const char_type* __hi) const = 0; ># 524 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_widen(char __c) const = 0; ># 545 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char* > do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; ># 566 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char > do_narrow(char_type __c, char __dfault) const = 0; ># 591 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_narrow(const char_type* __lo, const char_type* __hi, > char __dfault, char* __to) const = 0; > }; ># 614 "/usr/include/c++/13/bits/locale_facets.h" 3 > 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) : __ctype_abstract_base<_CharT>(__refs) { } > > 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> >; ># 688 "/usr/include/c++/13/bits/locale_facets.h" 3 > 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); ># 725 "/usr/include/c++/13/bits/locale_facets.h" 3 > explicit > ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); ># 738 "/usr/include/c++/13/bits/locale_facets.h" 3 > explicit > ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, > size_t __refs = 0); ># 751 "/usr/include/c++/13/bits/locale_facets.h" 3 > inline bool > is(mask __m, char __c) const; ># 766 "/usr/include/c++/13/bits/locale_facets.h" 3 > inline const char* > is(const char* __lo, const char* __hi, mask* __vec) const; ># 780 "/usr/include/c++/13/bits/locale_facets.h" 3 > inline const char* > scan_is(mask __m, const char* __lo, const char* __hi) const; ># 794 "/usr/include/c++/13/bits/locale_facets.h" 3 > inline const char* > scan_not(mask __m, const char* __lo, const char* __hi) const; ># 809 "/usr/include/c++/13/bits/locale_facets.h" 3 > char_type > toupper(char_type __c) const > { return this->do_toupper(__c); } ># 826 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > toupper(char_type *__lo, const char_type* __hi) const > { return this->do_toupper(__lo, __hi); } ># 842 "/usr/include/c++/13/bits/locale_facets.h" 3 > char_type > tolower(char_type __c) const > { return this->do_tolower(__c); } ># 859 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > tolower(char_type* __lo, const char_type* __hi) const > { return this->do_tolower(__lo, __hi); } ># 879 "/usr/include/c++/13/bits/locale_facets.h" 3 > char_type > widen(char __c) const > { > if (_M_widen_ok) > return _M_widen[static_cast<unsigned char>(__c)]; > this->_M_widen_init(); > return this->do_widen(__c); > } ># 906 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char* > widen(const char* __lo, const char* __hi, char_type* __to) const > { > if (_M_widen_ok == 1) > { > if (__builtin_expect(__hi != __lo, true)) > __builtin_memcpy(__to, __lo, __hi - __lo); > return __hi; > } > if (!_M_widen_ok) > _M_widen_init(); > return this->do_widen(__lo, __hi, __to); > } ># 938 "/usr/include/c++/13/bits/locale_facets.h" 3 > char > narrow(char_type __c, char __dfault) const > { > if (_M_narrow[static_cast<unsigned char>(__c)]) > return _M_narrow[static_cast<unsigned char>(__c)]; > const char __t = do_narrow(__c, __dfault); > if (__t != __dfault) > _M_narrow[static_cast<unsigned char>(__c)] = __t; > return __t; > } ># 971 "/usr/include/c++/13/bits/locale_facets.h" 3 > const char_type* > narrow(const char_type* __lo, const char_type* __hi, > char __dfault, char* __to) const > { > if (__builtin_expect(_M_narrow_ok == 1, true)) > { > if (__builtin_expect(__hi != __lo, true)) > __builtin_memcpy(__to, __lo, __hi - __lo); > return __hi; > } > if (!_M_narrow_ok) > _M_narrow_init(); > return this->do_narrow(__lo, __hi, __dfault, __to); > } > > > > > > const mask* > table() const throw() > { return _M_table; } > > > static const mask* > classic_table() throw(); > protected: > > > > > > > > virtual > ~ctype(); ># 1021 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_toupper(char_type __c) const; ># 1038 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_toupper(char_type* __lo, const char_type* __hi) const; ># 1054 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_tolower(char_type __c) const; ># 1071 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_tolower(char_type* __lo, const char_type* __hi) const; ># 1091 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_widen(char __c) const > { return __c; } ># 1114 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char* > do_widen(const char* __lo, const char* __hi, char_type* __to) const > { > if (__builtin_expect(__hi != __lo, true)) > __builtin_memcpy(__to, __lo, __hi - __lo); > return __hi; > } ># 1141 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char > do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const > { return __c; } ># 1167 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_narrow(const char_type* __lo, const char_type* __hi, > char __dfault __attribute__((__unused__)), char* __to) const > { > if (__builtin_expect(__hi != __lo, true)) > __builtin_memcpy(__to, __lo, __hi - __lo); > return __hi; > } > > private: > void _M_narrow_init() const; > void _M_widen_init() const; > }; ># 1193 "/usr/include/c++/13/bits/locale_facets.h" 3 > 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; ># 1226 "/usr/include/c++/13/bits/locale_facets.h" 3 > explicit > ctype(size_t __refs = 0); ># 1237 "/usr/include/c++/13/bits/locale_facets.h" 3 > explicit > ctype(__c_locale __cloc, size_t __refs = 0); > > protected: > __wmask_type > _M_convert_to_wmask(const mask __m) const throw(); > > > virtual > ~ctype(); ># 1261 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual bool > do_is(mask __m, char_type __c) const; ># 1280 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; ># 1298 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; ># 1316 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_scan_not(mask __m, const char_type* __lo, > const char_type* __hi) const; ># 1333 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_toupper(char_type __c) const; ># 1350 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_toupper(char_type* __lo, const char_type* __hi) const; ># 1366 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_tolower(char_type __c) const; ># 1383 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char_type* > do_tolower(char_type* __lo, const char_type* __hi) const; ># 1403 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_widen(char __c) const; ># 1425 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual const char* > do_widen(const char* __lo, const char* __hi, char_type* __to) const; ># 1448 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char > do_narrow(char_type __c, char __dfault) const; ># 1474 "/usr/include/c++/13/bits/locale_facets.h" 3 > 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) > : ctype_byname(__s.c_str(), __refs) { } > > > 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(); > }; > > > >} > > ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/ctype_inline.h" 1 3 ># 37 "/usr/include/c++/13/x86_64-redhat-linux/bits/ctype_inline.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > bool > ctype<char>:: > is(mask __m, char __c) const > { return _M_table[static_cast<unsigned char>(__c)] & __m; } > > const char* > ctype<char>:: > is(const char* __low, const char* __high, mask* __vec) const > { > while (__low < __high) > *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; > return __high; > } > > const char* > ctype<char>:: > scan_is(mask __m, const char* __low, const char* __high) const > { > while (__low < __high > && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) > ++__low; > return __low; > } > > const char* > ctype<char>:: > scan_not(mask __m, const char* __low, const char* __high) const > { > while (__low < __high > && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) > ++__low; > return __low; > } > > >} ># 1547 "/usr/include/c++/13/bits/locale_facets.h" 2 3 > >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) > : facet(__refs), _M_grouping(0), _M_grouping_size(0), > _M_use_grouping(false), > _M_truename(0), _M_truename_size(0), _M_falsename(0), > _M_falsename_size(0), _M_decimal_point(_CharT()), > _M_thousands_sep(_CharT()), _M_allocated(false) > { } > > ~__numpunct_cache(); > > void > _M_cache(const locale& __loc); > > private: > __numpunct_cache& > operator=(const __numpunct_cache&); > > explicit > __numpunct_cache(const __numpunct_cache&); > }; > > template<typename _CharT> > __numpunct_cache<_CharT>::~__numpunct_cache() > { > if (_M_allocated) > { > delete [] _M_grouping; > delete [] _M_truename; > delete [] _M_falsename; > } > } > >namespace __cxx11 { ># 1677 "/usr/include/c++/13/bits/locale_facets.h" 3 > 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) > : facet(__refs), _M_data(0) > { _M_initialize_numpunct(); } ># 1715 "/usr/include/c++/13/bits/locale_facets.h" 3 > explicit > numpunct(__cache_type* __cache, size_t __refs = 0) > : facet(__refs), _M_data(__cache) > { _M_initialize_numpunct(); } ># 1729 "/usr/include/c++/13/bits/locale_facets.h" 3 > explicit > numpunct(__c_locale __cloc, size_t __refs = 0) > : facet(__refs), _M_data(0) > { _M_initialize_numpunct(__cloc); } ># 1743 "/usr/include/c++/13/bits/locale_facets.h" 3 > char_type > decimal_point() const > { return this->do_decimal_point(); } ># 1756 "/usr/include/c++/13/bits/locale_facets.h" 3 > char_type > thousands_sep() const > { return this->do_thousands_sep(); } ># 1787 "/usr/include/c++/13/bits/locale_facets.h" 3 > string > grouping() const > { return this->do_grouping(); } ># 1800 "/usr/include/c++/13/bits/locale_facets.h" 3 > string_type > truename() const > { return this->do_truename(); } ># 1813 "/usr/include/c++/13/bits/locale_facets.h" 3 > string_type > falsename() const > { return this->do_falsename(); } > > protected: > > virtual > ~numpunct(); ># 1830 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_decimal_point() const > { return _M_data->_M_decimal_point; } ># 1842 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual char_type > do_thousands_sep() const > { return _M_data->_M_thousands_sep; } ># 1855 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual string > do_grouping() const > { return _M_data->_M_grouping; } ># 1868 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual string_type > do_truename() const > { return _M_data->_M_truename; } ># 1881 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual string_type > do_falsename() const > { return _M_data->_M_falsename; } > > > void > _M_initialize_numpunct(__c_locale __cloc = 0); > }; > > template<typename _CharT> > locale::id numpunct<_CharT>::id; > > template<> > numpunct<char>::~numpunct(); > > template<> > void > numpunct<char>::_M_initialize_numpunct(__c_locale __cloc); > > > template<> > numpunct<wchar_t>::~numpunct(); > > template<> > void > numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc); > > > > template<typename _CharT> > class numpunct_byname : public numpunct<_CharT> > { > public: > typedef _CharT char_type; > typedef basic_string<_CharT> string_type; > > explicit > numpunct_byname(const char* __s, size_t __refs = 0) > : numpunct<_CharT>(__refs) > { > if (__builtin_strcmp(__s, "C") != 0 > && __builtin_strcmp(__s, "POSIX") != 0) > { > __c_locale __tmp; > this->_S_create_c_locale(__tmp, __s); > this->_M_initialize_numpunct(__tmp); > this->_S_destroy_c_locale(__tmp); > } > } > > > explicit > numpunct_byname(const string& __s, size_t __refs = 0) > : numpunct_byname(__s.c_str(), __refs) { } > > > protected: > virtual > ~numpunct_byname() { } > }; > >} > > ># 1959 "/usr/include/c++/13/bits/locale_facets.h" 3 > template<typename _CharT, typename _InIter> > class num_get : public locale::facet > { > public: > > > > typedef _CharT char_type; > typedef _InIter iter_type; > > > > static locale::id id; ># 1980 "/usr/include/c++/13/bits/locale_facets.h" 3 > explicit > num_get(size_t __refs = 0) : facet(__refs) { } ># 2006 "/usr/include/c++/13/bits/locale_facets.h" 3 > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, bool& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } ># 2043 "/usr/include/c++/13/bits/locale_facets.h" 3 > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, long& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } > > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, unsigned short& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } > > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, unsigned int& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } > > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, unsigned long& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } > > > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, long long& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } > > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, unsigned long long& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } ># 2103 "/usr/include/c++/13/bits/locale_facets.h" 3 > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, float& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } > > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, double& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } > > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, long double& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } ># 2146 "/usr/include/c++/13/bits/locale_facets.h" 3 > iter_type > get(iter_type __in, iter_type __end, ios_base& __io, > ios_base::iostate& __err, void*& __v) const > { return this->do_get(__in, __end, __io, __err, __v); } > > protected: > > virtual ~num_get() { } > > __attribute ((__abi_tag__ ("cxx11"))) > iter_type > _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, > string&) const; > > template<typename _ValueT> > __attribute ((__abi_tag__ ("cxx11"))) > iter_type > _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, > _ValueT&) const; > > template<typename _CharT2> > typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type > _M_find(const _CharT2*, size_t __len, _CharT2 __c) const > { > int __ret = -1; > if (__len <= 10) > { > if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) > __ret = __c - _CharT2('0'); > } > else > { > if (__c >= _CharT2('0') && __c <= _CharT2('9')) > __ret = __c - _CharT2('0'); > else if (__c >= _CharT2('a') && __c <= _CharT2('f')) > __ret = 10 + (__c - _CharT2('a')); > else if (__c >= _CharT2('A') && __c <= _CharT2('F')) > __ret = 10 + (__c - _CharT2('A')); > } > return __ret; > } > > template<typename _CharT2> > typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value, > int>::__type > _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const > { > int __ret = -1; > const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); > if (__q) > { > __ret = __q - __zero; > if (__ret > 15) > __ret -= 6; > } > return __ret; > } ># 2219 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual iter_type > do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; > > virtual iter_type > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, long& __v) const > { return _M_extract_int(__beg, __end, __io, __err, __v); } > > virtual iter_type > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, unsigned short& __v) const > { return _M_extract_int(__beg, __end, __io, __err, __v); } > > virtual iter_type > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, unsigned int& __v) const > { return _M_extract_int(__beg, __end, __io, __err, __v); } > > virtual iter_type > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, unsigned long& __v) const > { return _M_extract_int(__beg, __end, __io, __err, __v); } > > > virtual iter_type > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, long long& __v) const > { return _M_extract_int(__beg, __end, __io, __err, __v); } > > virtual iter_type > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, unsigned long long& __v) const > { return _M_extract_int(__beg, __end, __io, __err, __v); } > > > virtual iter_type > do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, float&) const; > > virtual iter_type > do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, > double&) const; ># 2271 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual iter_type > do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, > long double&) const; > > > virtual iter_type > do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, void*&) const; ># 2299 "/usr/include/c++/13/bits/locale_facets.h" 3 > }; > > template<typename _CharT, typename _InIter> > locale::id num_get<_CharT, _InIter>::id; ># 2317 "/usr/include/c++/13/bits/locale_facets.h" 3 > template<typename _CharT, typename _OutIter> > class num_put : public locale::facet > { > public: > > > > typedef _CharT char_type; > typedef _OutIter iter_type; > > > > static locale::id id; ># 2338 "/usr/include/c++/13/bits/locale_facets.h" 3 > explicit > num_put(size_t __refs = 0) : facet(__refs) { } ># 2356 "/usr/include/c++/13/bits/locale_facets.h" 3 > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const > { return this->do_put(__s, __io, __fill, __v); } ># 2398 "/usr/include/c++/13/bits/locale_facets.h" 3 > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, long __v) const > { return this->do_put(__s, __io, __fill, __v); } > > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, > unsigned long __v) const > { return this->do_put(__s, __io, __fill, __v); } > > > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const > { return this->do_put(__s, __io, __fill, __v); } > > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, > unsigned long long __v) const > { return this->do_put(__s, __io, __fill, __v); } ># 2461 "/usr/include/c++/13/bits/locale_facets.h" 3 > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, double __v) const > { return this->do_put(__s, __io, __fill, __v); } > > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, > long double __v) const > { return this->do_put(__s, __io, __fill, __v); } ># 2486 "/usr/include/c++/13/bits/locale_facets.h" 3 > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, > const void* __v) const > { return this->do_put(__s, __io, __fill, __v); } > > protected: > template<typename _ValueT> > iter_type > _M_insert_float(iter_type, ios_base& __io, char_type __fill, > char __mod, _ValueT __v) const; > > void > _M_group_float(const char* __grouping, size_t __grouping_size, > char_type __sep, const char_type* __p, char_type* __new, > char_type* __cs, int& __len) const; > > template<typename _ValueT> > iter_type > _M_insert_int(iter_type, ios_base& __io, char_type __fill, > _ValueT __v) const; > > void > _M_group_int(const char* __grouping, size_t __grouping_size, > char_type __sep, ios_base& __io, char_type* __new, > char_type* __cs, int& __len) const; > > void > _M_pad(char_type __fill, streamsize __w, ios_base& __io, > char_type* __new, const char_type* __cs, int& __len) const; > > > virtual > ~num_put() { } ># 2534 "/usr/include/c++/13/bits/locale_facets.h" 3 > virtual iter_type > do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const; > > virtual iter_type > do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const > { return _M_insert_int(__s, __io, __fill, __v); } > > virtual iter_type > do_put(iter_type __s, ios_base& __io, char_type __fill, > unsigned long __v) const > { return _M_insert_int(__s, __io, __fill, __v); } > > > virtual iter_type > do_put(iter_type __s, ios_base& __io, char_type __fill, > long long __v) const > { return _M_insert_int(__s, __io, __fill, __v); } > > virtual iter_type > do_put(iter_type __s, ios_base& __io, char_type __fill, > unsigned long long __v) const > { return _M_insert_int(__s, __io, __fill, __v); } > > > virtual iter_type > do_put(iter_type, ios_base&, char_type, double) const; > > > > > > > virtual iter_type > do_put(iter_type, ios_base&, char_type, long double) const; > > > virtual iter_type > do_put(iter_type, ios_base&, char_type, const void*) const; ># 2586 "/usr/include/c++/13/bits/locale_facets.h" 3 > }; > > template <typename _CharT, typename _OutIter> > locale::id num_put<_CharT, _OutIter>::id; > > > > > > > > > > template<typename _CharT> > inline bool > isspace(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); } > > > template<typename _CharT> > inline bool > isprint(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); } > > > template<typename _CharT> > inline bool > iscntrl(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); } > > > template<typename _CharT> > inline bool > isupper(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); } > > > template<typename _CharT> > inline bool > islower(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); } > > > template<typename _CharT> > inline bool > isalpha(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); } > > > template<typename _CharT> > inline bool > isdigit(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); } > > > template<typename _CharT> > inline bool > ispunct(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); } > > > template<typename _CharT> > inline bool > isxdigit(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); } > > > template<typename _CharT> > inline bool > isalnum(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); } > > > template<typename _CharT> > inline bool > isgraph(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); } > > > > template<typename _CharT> > inline bool > isblank(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c); } > > > > template<typename _CharT> > inline _CharT > toupper(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).toupper(__c); } > > > template<typename _CharT> > inline _CharT > tolower(_CharT __c, const locale& __loc) > { return use_facet<ctype<_CharT> >(__loc).tolower(__c); } > > >} > ># 1 "/usr/include/c++/13/bits/locale_facets.tcc" 1 3 ># 33 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > ># 34 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > template<typename _Facet> > struct __use_cache > { > const _Facet* > operator() (const locale& __loc) const; > }; > > > template<typename _CharT> > struct __use_cache<__numpunct_cache<_CharT> > > { > const __numpunct_cache<_CharT>* > operator() (const locale& __loc) const > { > const size_t __i = numpunct<_CharT>::id._M_id(); > const locale::facet** __caches = __loc._M_impl->_M_caches; > if (!__caches[__i]) > { > __numpunct_cache<_CharT>* __tmp = 0; > try > { > __tmp = new __numpunct_cache<_CharT>; > __tmp->_M_cache(__loc); > } > catch(...) > { > delete __tmp; > throw; > } > __loc._M_impl->_M_install_cache(__tmp, __i); > } > return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]); > } > }; > > template<typename _CharT> > void > __numpunct_cache<_CharT>::_M_cache(const locale& __loc) > { > const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); > > char* __grouping = 0; > _CharT* __truename = 0; > _CharT* __falsename = 0; > try > { > const string& __g = __np.grouping(); > _M_grouping_size = __g.size(); > __grouping = new char[_M_grouping_size]; > __g.copy(__grouping, _M_grouping_size); > _M_use_grouping = (_M_grouping_size > && static_cast<signed char>(__grouping[0]) > 0 > && (__grouping[0] > != __gnu_cxx::__numeric_traits<char>::__max)); > > const basic_string<_CharT>& __tn = __np.truename(); > _M_truename_size = __tn.size(); > __truename = new _CharT[_M_truename_size]; > __tn.copy(__truename, _M_truename_size); > > const basic_string<_CharT>& __fn = __np.falsename(); > _M_falsename_size = __fn.size(); > __falsename = new _CharT[_M_falsename_size]; > __fn.copy(__falsename, _M_falsename_size); > > _M_decimal_point = __np.decimal_point(); > _M_thousands_sep = __np.thousands_sep(); > > const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); > __ct.widen(__num_base::_S_atoms_out, > __num_base::_S_atoms_out > + __num_base::_S_oend, _M_atoms_out); > __ct.widen(__num_base::_S_atoms_in, > __num_base::_S_atoms_in > + __num_base::_S_iend, _M_atoms_in); > > _M_grouping = __grouping; > _M_truename = __truename; > _M_falsename = __falsename; > _M_allocated = true; > } > catch(...) > { > delete [] __grouping; > delete [] __truename; > delete [] __falsename; > throw; > } > } ># 139 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > __attribute__ ((__pure__)) bool > __verify_grouping(const char* __grouping, size_t __grouping_size, > const string& __grouping_tmp) throw (); > > > > template<typename _CharT, typename _InIter> > __attribute ((__abi_tag__ ("cxx11"))) > _InIter > num_get<_CharT, _InIter>:: > _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, > ios_base::iostate& __err, string& __xtrc) const > { > typedef char_traits<_CharT> __traits_type; > typedef __numpunct_cache<_CharT> __cache_type; > __use_cache<__cache_type> __uc; > const locale& __loc = __io._M_getloc(); > const __cache_type* __lc = __uc(__loc); > const _CharT* __lit = __lc->_M_atoms_in; > char_type __c = char_type(); > > > bool __testeof = __beg == __end; > > > if (!__testeof) > { > __c = *__beg; > const bool __plus = __c == __lit[__num_base::_S_iplus]; > if ((__plus || __c == __lit[__num_base::_S_iminus]) > && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) > && !(__c == __lc->_M_decimal_point)) > { > __xtrc += __plus ? '+' : '-'; > if (++__beg != __end) > __c = *__beg; > else > __testeof = true; > } > } > > > bool __found_mantissa = false; > int __sep_pos = 0; > while (!__testeof) > { > if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) > || __c == __lc->_M_decimal_point) > break; > else if (__c == __lit[__num_base::_S_izero]) > { > if (!__found_mantissa) > { > __xtrc += '0'; > __found_mantissa = true; > } > ++__sep_pos; > > if (++__beg != __end) > __c = *__beg; > else > __testeof = true; > } > else > break; > } > > > bool __found_dec = false; > bool __found_sci = false; > string __found_grouping; > if (__lc->_M_use_grouping) > __found_grouping.reserve(32); > const char_type* __lit_zero = __lit + __num_base::_S_izero; > > if (!__lc->_M_allocated) > > while (!__testeof) > { > const int __digit = _M_find(__lit_zero, 10, __c); > if (__digit != -1) > { > __xtrc += '0' + __digit; > __found_mantissa = true; > } > else if (__c == __lc->_M_decimal_point > && !__found_dec && !__found_sci) > { > __xtrc += '.'; > __found_dec = true; > } > else if ((__c == __lit[__num_base::_S_ie] > || __c == __lit[__num_base::_S_iE]) > && !__found_sci && __found_mantissa) > { > > __xtrc += 'e'; > __found_sci = true; > > > if (++__beg != __end) > { > __c = *__beg; > const bool __plus = __c == __lit[__num_base::_S_iplus]; > if (__plus || __c == __lit[__num_base::_S_iminus]) > __xtrc += __plus ? '+' : '-'; > else > continue; > } > else > { > __testeof = true; > break; > } > } > else > break; > > if (++__beg != __end) > __c = *__beg; > else > __testeof = true; > } > else > while (!__testeof) > { > > > if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) > { > if (!__found_dec && !__found_sci) > { > > > if (__sep_pos) > { > __found_grouping += static_cast<char>(__sep_pos); > __sep_pos = 0; > } > else > { > > > __xtrc.clear(); > break; > } > } > else > break; > } > else if (__c == __lc->_M_decimal_point) > { > if (!__found_dec && !__found_sci) > { > > > > if (__found_grouping.size()) > __found_grouping += static_cast<char>(__sep_pos); > __xtrc += '.'; > __found_dec = true; > } > else > break; > } > else > { > const char_type* __q = > __traits_type::find(__lit_zero, 10, __c); > if (__q) > { > __xtrc += '0' + (__q - __lit_zero); > __found_mantissa = true; > ++__sep_pos; > } > else if ((__c == __lit[__num_base::_S_ie] > || __c == __lit[__num_base::_S_iE]) > && !__found_sci && __found_mantissa) > { > > if (__found_grouping.size() && !__found_dec) > __found_grouping += static_cast<char>(__sep_pos); > __xtrc += 'e'; > __found_sci = true; > > > if (++__beg != __end) > { > __c = *__beg; > const bool __plus = __c == __lit[__num_base::_S_iplus]; > if ((__plus || __c == __lit[__num_base::_S_iminus]) > && !(__lc->_M_use_grouping > && __c == __lc->_M_thousands_sep) > && !(__c == __lc->_M_decimal_point)) > __xtrc += __plus ? '+' : '-'; > else > continue; > } > else > { > __testeof = true; > break; > } > } > else > break; > } > > if (++__beg != __end) > __c = *__beg; > else > __testeof = true; > } > > > > if (__found_grouping.size()) > { > > if (!__found_dec && !__found_sci) > __found_grouping += static_cast<char>(__sep_pos); > > if (!std::__verify_grouping(__lc->_M_grouping, > __lc->_M_grouping_size, > __found_grouping)) > __err = ios_base::failbit; > } > > return __beg; > } > > template<typename _CharT, typename _InIter> > template<typename _ValueT> > __attribute ((__abi_tag__ ("cxx11"))) > _InIter > num_get<_CharT, _InIter>:: > _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, > ios_base::iostate& __err, _ValueT& __v) const > { > typedef char_traits<_CharT> __traits_type; > using __gnu_cxx::__add_unsigned; > typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; > typedef __numpunct_cache<_CharT> __cache_type; > __use_cache<__cache_type> __uc; > const locale& __loc = __io._M_getloc(); > const __cache_type* __lc = __uc(__loc); > const _CharT* __lit = __lc->_M_atoms_in; > char_type __c = char_type(); > > > const ios_base::fmtflags __basefield = __io.flags() > & ios_base::basefield; > const bool __oct = __basefield == ios_base::oct; > int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); > > > bool __testeof = __beg == __end; > > > bool __negative = false; > if (!__testeof) > { > __c = *__beg; > __negative = __c == __lit[__num_base::_S_iminus]; > if ((__negative || __c == __lit[__num_base::_S_iplus]) > && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) > && !(__c == __lc->_M_decimal_point)) > { > if (++__beg != __end) > __c = *__beg; > else > __testeof = true; > } > } > > > > bool __found_zero = false; > int __sep_pos = 0; > while (!__testeof) > { > if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) > || __c == __lc->_M_decimal_point) > break; > else if (__c == __lit[__num_base::_S_izero] > && (!__found_zero || __base == 10)) > { > __found_zero = true; > ++__sep_pos; > if (__basefield == 0) > __base = 8; > if (__base == 8) > __sep_pos = 0; > } > else if (__found_zero > && (__c == __lit[__num_base::_S_ix] > || __c == __lit[__num_base::_S_iX])) > { > if (__basefield == 0) > __base = 16; > if (__base == 16) > { > __found_zero = false; > __sep_pos = 0; > } > else > break; > } > else > break; > > if (++__beg != __end) > { > __c = *__beg; > if (!__found_zero) > break; > } > else > __testeof = true; > } > > > > const size_t __len = (__base == 16 ? __num_base::_S_iend > - __num_base::_S_izero : __base); > > > typedef __gnu_cxx::__numeric_traits<_ValueT> __num_traits; > string __found_grouping; > if (__lc->_M_use_grouping) > __found_grouping.reserve(32); > bool __testfail = false; > bool __testoverflow = false; > const __unsigned_type __max = > (__negative && __num_traits::__is_signed) > ? -static_cast<__unsigned_type>(__num_traits::__min) > : __num_traits::__max; > const __unsigned_type __smax = __max / __base; > __unsigned_type __result = 0; > int __digit = 0; > const char_type* __lit_zero = __lit + __num_base::_S_izero; > > if (!__lc->_M_allocated) > > while (!__testeof) > { > __digit = _M_find(__lit_zero, __len, __c); > if (__digit == -1) > break; > > if (__result > __smax) > __testoverflow = true; > else > { > __result *= __base; > __testoverflow |= __result > __max - __digit; > __result += __digit; > ++__sep_pos; > } > > if (++__beg != __end) > __c = *__beg; > else > __testeof = true; > } > else > while (!__testeof) > { > > > if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) > { > > > if (__sep_pos) > { > __found_grouping += static_cast<char>(__sep_pos); > __sep_pos = 0; > } > else > { > __testfail = true; > break; > } > } > else if (__c == __lc->_M_decimal_point) > break; > else > { > const char_type* __q = > __traits_type::find(__lit_zero, __len, __c); > if (!__q) > break; > > __digit = __q - __lit_zero; > if (__digit > 15) > __digit -= 6; > if (__result > __smax) > __testoverflow = true; > else > { > __result *= __base; > __testoverflow |= __result > __max - __digit; > __result += __digit; > ++__sep_pos; > } > } > > if (++__beg != __end) > __c = *__beg; > else > __testeof = true; > } > > > > if (__found_grouping.size()) > { > > __found_grouping += static_cast<char>(__sep_pos); > > if (!std::__verify_grouping(__lc->_M_grouping, > __lc->_M_grouping_size, > __found_grouping)) > __err = ios_base::failbit; > } > > > > if ((!__sep_pos && !__found_zero && !__found_grouping.size()) > || __testfail) > { > __v = 0; > __err = ios_base::failbit; > } > else if (__testoverflow) > { > if (__negative && __num_traits::__is_signed) > __v = __num_traits::__min; > else > __v = __num_traits::__max; > __err = ios_base::failbit; > } > else > __v = __negative ? -__result : __result; > > if (__testeof) > __err |= ios_base::eofbit; > return __beg; > } > > > > template<typename _CharT, typename _InIter> > _InIter > num_get<_CharT, _InIter>:: > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, bool& __v) const > { > if (!(__io.flags() & ios_base::boolalpha)) > { > > > > long __l = -1; > __beg = _M_extract_int(__beg, __end, __io, __err, __l); > if (__l == 0 || __l == 1) > __v = bool(__l); > else > { > > > __v = true; > __err = ios_base::failbit; > if (__beg == __end) > __err |= ios_base::eofbit; > } > } > else > { > > typedef __numpunct_cache<_CharT> __cache_type; > __use_cache<__cache_type> __uc; > const locale& __loc = __io._M_getloc(); > const __cache_type* __lc = __uc(__loc); > > bool __testf = true; > bool __testt = true; > bool __donef = __lc->_M_falsename_size == 0; > bool __donet = __lc->_M_truename_size == 0; > bool __testeof = false; > size_t __n = 0; > while (!__donef || !__donet) > { > if (__beg == __end) > { > __testeof = true; > break; > } > > const char_type __c = *__beg; > > if (!__donef) > __testf = __c == __lc->_M_falsename[__n]; > > if (!__testf && __donet) > break; > > if (!__donet) > __testt = __c == __lc->_M_truename[__n]; > > if (!__testt && __donef) > break; > > if (!__testt && !__testf) > break; > > ++__n; > ++__beg; > > __donef = !__testf || __n >= __lc->_M_falsename_size; > __donet = !__testt || __n >= __lc->_M_truename_size; > } > if (__testf && __n == __lc->_M_falsename_size && __n) > { > __v = false; > if (__testt && __n == __lc->_M_truename_size) > __err = ios_base::failbit; > else > __err = __testeof ? ios_base::eofbit : ios_base::goodbit; > } > else if (__testt && __n == __lc->_M_truename_size && __n) > { > __v = true; > __err = __testeof ? ios_base::eofbit : ios_base::goodbit; > } > else > { > > > __v = false; > __err = ios_base::failbit; > if (__testeof) > __err |= ios_base::eofbit; > } > } > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > num_get<_CharT, _InIter>:: > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, float& __v) const > { > string __xtrc; > __xtrc.reserve(32); > __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); > std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > num_get<_CharT, _InIter>:: > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, double& __v) const > { > string __xtrc; > __xtrc.reserve(32); > __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); > std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } ># 735 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > template<typename _CharT, typename _InIter> > _InIter > num_get<_CharT, _InIter>:: > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, long double& __v) const > { > string __xtrc; > __xtrc.reserve(32); > __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); > std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > num_get<_CharT, _InIter>:: > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, void*& __v) const > { > > typedef ios_base::fmtflags fmtflags; > const fmtflags __fmt = __io.flags(); > __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); > > typedef __gnu_cxx::__conditional_type<(sizeof(void*) > <= sizeof(unsigned long)), > unsigned long, unsigned long long>::__type _UIntPtrType; > > _UIntPtrType __ul; > __beg = _M_extract_int(__beg, __end, __io, __err, __ul); > > > __io.flags(__fmt); > > __v = reinterpret_cast<void*>(__ul); > return __beg; > } ># 795 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > template<typename _CharT, typename _OutIter> > void > num_put<_CharT, _OutIter>:: > _M_pad(_CharT __fill, streamsize __w, ios_base& __io, > _CharT* __new, const _CharT* __cs, int& __len) const > { > > > __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, > __cs, __w, __len); > __len = static_cast<int>(__w); > } > > > > template<typename _CharT, typename _ValueT> > int > __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, > ios_base::fmtflags __flags, bool __dec) > { > _CharT* __buf = __bufend; > if (__builtin_expect(__dec, true)) > { > > do > { > *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; > __v /= 10; > } > while (__v != 0); > } > else if ((__flags & ios_base::basefield) == ios_base::oct) > { > > do > { > *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; > __v >>= 3; > } > while (__v != 0); > } > else > { > > const bool __uppercase = __flags & ios_base::uppercase; > const int __case_offset = __uppercase ? __num_base::_S_oudigits > : __num_base::_S_odigits; > do > { > *--__buf = __lit[(__v & 0xf) + __case_offset]; > __v >>= 4; > } > while (__v != 0); > } > return __bufend - __buf; > } > > > > template<typename _CharT, typename _OutIter> > void > num_put<_CharT, _OutIter>:: > _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, > ios_base&, _CharT* __new, _CharT* __cs, int& __len) const > { > _CharT* __p = std::__add_grouping(__new, __sep, __grouping, > __grouping_size, __cs, __cs + __len); > __len = __p - __new; > } > > template<typename _CharT, typename _OutIter> > template<typename _ValueT> > _OutIter > num_put<_CharT, _OutIter>:: > _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, > _ValueT __v) const > { > using __gnu_cxx::__add_unsigned; > typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; > typedef __numpunct_cache<_CharT> __cache_type; > __use_cache<__cache_type> __uc; > const locale& __loc = __io._M_getloc(); > const __cache_type* __lc = __uc(__loc); > const _CharT* __lit = __lc->_M_atoms_out; > const ios_base::fmtflags __flags = __io.flags(); > > > const int __ilen = 5 * sizeof(_ValueT); > _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) > * __ilen)); > > > > const ios_base::fmtflags __basefield = __flags & ios_base::basefield; > const bool __dec = (__basefield != ios_base::oct > && __basefield != ios_base::hex); > const __unsigned_type __u = ((__v > 0 || !__dec) > ? __unsigned_type(__v) > : -__unsigned_type(__v)); > int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); > __cs += __ilen - __len; > > > if (__lc->_M_use_grouping) > { > > > _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) > * (__len + 1) > * 2)); > _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, > __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); > __cs = __cs2 + 2; > } > > > if (__builtin_expect(__dec, true)) > { > > if (__v >= 0) > { > if (bool(__flags & ios_base::showpos) > && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) > *--__cs = __lit[__num_base::_S_oplus], ++__len; > } > else > *--__cs = __lit[__num_base::_S_ominus], ++__len; > } > else if (bool(__flags & ios_base::showbase) && __v) > { > if (__basefield == ios_base::oct) > *--__cs = __lit[__num_base::_S_odigits], ++__len; > else > { > > const bool __uppercase = __flags & ios_base::uppercase; > *--__cs = __lit[__num_base::_S_ox + __uppercase]; > > *--__cs = __lit[__num_base::_S_odigits]; > __len += 2; > } > } > > > const streamsize __w = __io.width(); > if (__w > static_cast<streamsize>(__len)) > { > _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) > * __w)); > _M_pad(__fill, __w, __io, __cs3, __cs, __len); > __cs = __cs3; > } > __io.width(0); > > > > return std::__write(__s, __cs, __len); > } > > template<typename _CharT, typename _OutIter> > void > num_put<_CharT, _OutIter>:: > _M_group_float(const char* __grouping, size_t __grouping_size, > _CharT __sep, const _CharT* __p, _CharT* __new, > _CharT* __cs, int& __len) const > { > > > > const int __declen = __p ? __p - __cs : __len; > _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, > __grouping_size, > __cs, __cs + __declen); > > > int __newlen = __p2 - __new; > if (__p) > { > char_traits<_CharT>::copy(__p2, __p, __len - __declen); > __newlen += __len - __declen; > } > __len = __newlen; > } ># 989 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > template<typename _CharT, typename _OutIter> > template<typename _ValueT> > _OutIter > num_put<_CharT, _OutIter>:: > _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, > _ValueT __v) const > { > typedef __numpunct_cache<_CharT> __cache_type; > __use_cache<__cache_type> __uc; > const locale& __loc = __io._M_getloc(); > const __cache_type* __lc = __uc(__loc); > > > const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); > > const int __max_digits = > __gnu_cxx::__numeric_traits<_ValueT>::__digits10; > > > int __len; > > char __fbuf[16]; > __num_base::_S_format_float(__io, __fbuf, __mod); > > > > const bool __use_prec = > (__io.flags() & ios_base::floatfield) != ios_base::floatfield; > > > > int __cs_size = __max_digits * 3; > char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); > if (__use_prec) > __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, > __fbuf, __prec, __v); > else > __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, > __fbuf, __v); > > > if (__len >= __cs_size) > { > __cs_size = __len + 1; > __cs = static_cast<char*>(__builtin_alloca(__cs_size)); > if (__use_prec) > __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, > __fbuf, __prec, __v); > else > __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, > __fbuf, __v); > } ># 1062 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) > * __len)); > __ctype.widen(__cs, __cs + __len, __ws); > > > _CharT* __wp = 0; > const char* __p = char_traits<char>::find(__cs, __len, '.'); > if (__p) > { > __wp = __ws + (__p - __cs); > *__wp = __lc->_M_decimal_point; > } > > > > > if (__lc->_M_use_grouping > && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' > && __cs[1] >= '0' && __cs[2] >= '0'))) > { > > > _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) > * __len * 2)); > > streamsize __off = 0; > if (__cs[0] == '-' || __cs[0] == '+') > { > __off = 1; > __ws2[0] = __ws[0]; > __len -= 1; > } > > _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, > __lc->_M_thousands_sep, __wp, __ws2 + __off, > __ws + __off, __len); > __len += __off; > > __ws = __ws2; > } > > > const streamsize __w = __io.width(); > if (__w > static_cast<streamsize>(__len)) > { > _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) > * __w)); > _M_pad(__fill, __w, __io, __ws3, __ws, __len); > __ws = __ws3; > } > __io.width(0); > > > > return std::__write(__s, __ws, __len); > } > > template<typename _CharT, typename _OutIter> > _OutIter > num_put<_CharT, _OutIter>:: > do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const > { > const ios_base::fmtflags __flags = __io.flags(); > if ((__flags & ios_base::boolalpha) == 0) > { > const long __l = __v; > __s = _M_insert_int(__s, __io, __fill, __l); > } > else > { > typedef __numpunct_cache<_CharT> __cache_type; > __use_cache<__cache_type> __uc; > const locale& __loc = __io._M_getloc(); > const __cache_type* __lc = __uc(__loc); > > const _CharT* __name = __v ? __lc->_M_truename > : __lc->_M_falsename; > int __len = __v ? __lc->_M_truename_size > : __lc->_M_falsename_size; > > const streamsize __w = __io.width(); > if (__w > static_cast<streamsize>(__len)) > { > const streamsize __plen = __w - __len; > _CharT* __ps > = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) > * __plen)); > > char_traits<_CharT>::assign(__ps, __plen, __fill); > __io.width(0); > > if ((__flags & ios_base::adjustfield) == ios_base::left) > { > __s = std::__write(__s, __name, __len); > __s = std::__write(__s, __ps, __plen); > } > else > { > __s = std::__write(__s, __ps, __plen); > __s = std::__write(__s, __name, __len); > } > return __s; > } > __io.width(0); > __s = std::__write(__s, __name, __len); > } > return __s; > } > > template<typename _CharT, typename _OutIter> > _OutIter > num_put<_CharT, _OutIter>:: > do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const > { return _M_insert_float(__s, __io, __fill, char(), __v); } ># 1187 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > template<typename _CharT, typename _OutIter> > _OutIter > num_put<_CharT, _OutIter>:: > do_put(iter_type __s, ios_base& __io, char_type __fill, > long double __v) const > { return _M_insert_float(__s, __io, __fill, 'L', __v); } > > template<typename _CharT, typename _OutIter> > _OutIter > num_put<_CharT, _OutIter>:: > do_put(iter_type __s, ios_base& __io, char_type __fill, > const void* __v) const > { > const ios_base::fmtflags __flags = __io.flags(); > const ios_base::fmtflags __fmt = ~(ios_base::basefield > | ios_base::uppercase); > __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); > > typedef __gnu_cxx::__conditional_type<(sizeof(const void*) > <= sizeof(unsigned long)), > unsigned long, unsigned long long>::__type _UIntPtrType; > > __s = _M_insert_int(__s, __io, __fill, > reinterpret_cast<_UIntPtrType>(__v)); > __io.flags(__flags); > return __s; > } ># 1224 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > ># 1233 "/usr/include/c++/13/bits/locale_facets.tcc" 3 > template<typename _CharT, typename _Traits> > void > __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, > _CharT* __news, const _CharT* __olds, > streamsize __newlen, streamsize __oldlen) > { > const size_t __plen = static_cast<size_t>(__newlen - __oldlen); > const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; > > > if (__adjust == ios_base::left) > { > _Traits::copy(__news, __olds, __oldlen); > _Traits::assign(__news + __oldlen, __plen, __fill); > return; > } > > size_t __mod = 0; > if (__adjust == ios_base::internal) > { > > > > const locale& __loc = __io._M_getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > if (__ctype.widen('-') == __olds[0] > || __ctype.widen('+') == __olds[0]) > { > __news[0] = __olds[0]; > __mod = 1; > ++__news; > } > else if (__ctype.widen('0') == __olds[0] > && __oldlen > 1 > && (__ctype.widen('x') == __olds[1] > || __ctype.widen('X') == __olds[1])) > { > __news[0] = __olds[0]; > __news[1] = __olds[1]; > __mod = 2; > __news += 2; > } > > } > _Traits::assign(__news, __plen, __fill); > _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); > } > > template<typename _CharT> > _CharT* > __add_grouping(_CharT* __s, _CharT __sep, > const char* __gbeg, size_t __gsize, > const _CharT* __first, const _CharT* __last) > { > size_t __idx = 0; > size_t __ctr = 0; > > while (__last - __first > __gbeg[__idx] > && static_cast<signed char>(__gbeg[__idx]) > 0 > && __gbeg[__idx] != __gnu_cxx::__numeric_traits<char>::__max) > { > __last -= __gbeg[__idx]; > __idx < __gsize - 1 ? ++__idx : ++__ctr; > } > > while (__first != __last) > *__s++ = *__first++; > > while (__ctr--) > { > *__s++ = __sep; > for (char __i = __gbeg[__idx]; __i > 0; --__i) > *__s++ = *__first++; > } > > while (__idx--) > { > *__s++ = __sep; > for (char __i = __gbeg[__idx]; __i > 0; --__i) > *__s++ = *__first++; > } > > return __s; > } > > > > > 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&); > > > > >} ># 2688 "/usr/include/c++/13/bits/locale_facets.h" 2 3 ># 38 "/usr/include/c++/13/bits/basic_ios.h" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Facet> > inline const _Facet& > __check_facet(const _Facet* __f) > { > if (!__f) > __throw_bad_cast(); > return *__f; > } ># 66 "/usr/include/c++/13/bits/basic_ios.h" 3 > 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: ># 117 "/usr/include/c++/13/bits/basic_ios.h" 3 > explicit operator bool() const > { return !this->fail(); } > > > > > > bool > operator!() const > { return this->fail(); } ># 136 "/usr/include/c++/13/bits/basic_ios.h" 3 > iostate > rdstate() const > { return _M_streambuf_state; } ># 147 "/usr/include/c++/13/bits/basic_ios.h" 3 > void > clear(iostate __state = goodbit); > > > > > > > > void > setstate(iostate __state) > { this->clear(this->rdstate() | __state); } > > > > > void > _M_setstate(iostate __state) > { > > > _M_streambuf_state |= __state; > if (this->exceptions() & __state) > throw; > } > > > > > > > > bool > good() const > { return this->rdstate() == 0; } > > > > > > > > bool > eof() const > { return (this->rdstate() & eofbit) != 0; } ># 200 "/usr/include/c++/13/bits/basic_ios.h" 3 > bool > fail() const > { return (this->rdstate() & (badbit | failbit)) != 0; } > > > > > > > > bool > bad() const > { return (this->rdstate() & badbit) != 0; } ># 221 "/usr/include/c++/13/bits/basic_ios.h" 3 > iostate > exceptions() const > { return _M_exception; } ># 256 "/usr/include/c++/13/bits/basic_ios.h" 3 > void > exceptions(iostate __except) > { > _M_exception = __except; > this->clear(_M_streambuf_state); > } > > > > > > > > explicit > basic_ios(basic_streambuf<_CharT, _Traits>* __sb) > : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), > _M_ctype(0), _M_num_put(0), _M_num_get(0) > { this->init(__sb); } > > > > > > > > virtual > ~basic_ios() { } ># 294 "/usr/include/c++/13/bits/basic_ios.h" 3 > basic_ostream<_CharT, _Traits>* > tie() const > { return _M_tie; } ># 306 "/usr/include/c++/13/bits/basic_ios.h" 3 > basic_ostream<_CharT, _Traits>* > tie(basic_ostream<_CharT, _Traits>* __tiestr) > { > basic_ostream<_CharT, _Traits>* __old = _M_tie; > _M_tie = __tiestr; > return __old; > } > > > > > > > > basic_streambuf<_CharT, _Traits>* > rdbuf() const > { return _M_streambuf; } ># 346 "/usr/include/c++/13/bits/basic_ios.h" 3 > basic_streambuf<_CharT, _Traits>* > rdbuf(basic_streambuf<_CharT, _Traits>* __sb); ># 360 "/usr/include/c++/13/bits/basic_ios.h" 3 > basic_ios& > copyfmt(const basic_ios& __rhs); > > > > > > > > char_type > fill() const > { > if (!_M_fill_init) > { > _M_fill = this->widen(' '); > _M_fill_init = true; > } > return _M_fill; > } ># 389 "/usr/include/c++/13/bits/basic_ios.h" 3 > char_type > fill(char_type __ch) > { > char_type __old = this->fill(); > _M_fill = __ch; > return __old; > } ># 409 "/usr/include/c++/13/bits/basic_ios.h" 3 > locale > imbue(const locale& __loc); ># 429 "/usr/include/c++/13/bits/basic_ios.h" 3 > char > narrow(char_type __c, char __dfault) const > { return __check_facet(_M_ctype).narrow(__c, __dfault); } ># 448 "/usr/include/c++/13/bits/basic_ios.h" 3 > char_type > widen(char __c) const > { return __check_facet(_M_ctype).widen(__c); } > > protected: > > > > > > > > basic_ios() > : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), > _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) > { } > > > > > > > > void > init(basic_streambuf<_CharT, _Traits>* __sb); > > > basic_ios(const basic_ios&) = delete; > basic_ios& operator=(const basic_ios&) = delete; > > void > move(basic_ios& __rhs) > { > ios_base::_M_move(__rhs); > _M_cache_locale(_M_ios_locale); > this->tie(__rhs.tie(nullptr)); > _M_fill = __rhs._M_fill; > _M_fill_init = __rhs._M_fill_init; > _M_streambuf = nullptr; > } > > void > move(basic_ios&& __rhs) > { this->move(__rhs); } > > void > swap(basic_ios& __rhs) noexcept > { > ios_base::_M_swap(__rhs); > _M_cache_locale(_M_ios_locale); > __rhs._M_cache_locale(__rhs._M_ios_locale); > std::swap(_M_tie, __rhs._M_tie); > std::swap(_M_fill, __rhs._M_fill); > std::swap(_M_fill_init, __rhs._M_fill_init); > } > > void > set_rdbuf(basic_streambuf<_CharT, _Traits>* __sb) > { _M_streambuf = __sb; } > > > void > _M_cache_locale(const locale& __loc); > }; > > >} > ># 1 "/usr/include/c++/13/bits/basic_ios.tcc" 1 3 ># 33 "/usr/include/c++/13/bits/basic_ios.tcc" 3 > ># 34 "/usr/include/c++/13/bits/basic_ios.tcc" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _CharT, typename _Traits> > void > basic_ios<_CharT, _Traits>::clear(iostate __state) > { > if (this->rdbuf()) > _M_streambuf_state = __state; > else > _M_streambuf_state = __state | badbit; > if (this->exceptions() & this->rdstate()) > __throw_ios_failure(("basic_ios::clear")); > } > > template<typename _CharT, typename _Traits> > basic_streambuf<_CharT, _Traits>* > basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) > { > basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; > _M_streambuf = __sb; > this->clear(); > return __old; > } > > template<typename _CharT, typename _Traits> > basic_ios<_CharT, _Traits>& > basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) > { > > > if (this != std::__addressof(__rhs)) > { > > > > > _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? > _M_local_word : new _Words[__rhs._M_word_size]; > > > _Callback_list* __cb = __rhs._M_callbacks; > if (__cb) > __cb->_M_add_reference(); > _M_call_callbacks(erase_event); > if (_M_word != _M_local_word) > { > delete [] _M_word; > _M_word = 0; > } > _M_dispose_callbacks(); > > > _M_callbacks = __cb; > for (int __i = 0; __i < __rhs._M_word_size; ++__i) > __words[__i] = __rhs._M_word[__i]; > _M_word = __words; > _M_word_size = __rhs._M_word_size; > > this->flags(__rhs.flags()); > this->width(__rhs.width()); > this->precision(__rhs.precision()); > this->tie(__rhs.tie()); > this->fill(__rhs.fill()); > _M_ios_locale = __rhs.getloc(); > _M_cache_locale(_M_ios_locale); > > _M_call_callbacks(copyfmt_event); > > > this->exceptions(__rhs.exceptions()); > } > return *this; > } > > > template<typename _CharT, typename _Traits> > locale > basic_ios<_CharT, _Traits>::imbue(const locale& __loc) > { > locale __old(this->getloc()); > ios_base::imbue(__loc); > _M_cache_locale(__loc); > if (this->rdbuf() != 0) > this->rdbuf()->pubimbue(__loc); > return __old; > } > > template<typename _CharT, typename _Traits> > void > basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) > { > > ios_base::_M_init(); > > > _M_cache_locale(_M_ios_locale); ># 146 "/usr/include/c++/13/bits/basic_ios.tcc" 3 > _M_fill = _CharT(); > _M_fill_init = false; > > _M_tie = 0; > _M_exception = goodbit; > _M_streambuf = __sb; > _M_streambuf_state = __sb ? goodbit : badbit; > } > > template<typename _CharT, typename _Traits> > void > basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) > { > _M_ctype = std::__try_use_facet<__ctype_type>(__loc); > _M_num_put = std::__try_use_facet<__num_put_type>(__loc); > _M_num_get = std::__try_use_facet<__num_get_type>(__loc); > } > > > > > extern template class basic_ios<char>; > > > extern template class basic_ios<wchar_t>; > > > > >} ># 517 "/usr/include/c++/13/bits/basic_ios.h" 2 3 ># 47 "/usr/include/c++/13/ios" 2 3 ># 41 "/usr/include/c++/13/ostream" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 59 "/usr/include/c++/13/ostream" 3 > 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; ># 85 "/usr/include/c++/13/ostream" 3 > explicit > basic_ostream(__streambuf_type* __sb) > { this->init(__sb); } > > > > > > > virtual > ~basic_ostream() { } > > > class sentry; > friend class sentry; ># 109 "/usr/include/c++/13/ostream" 3 > __ostream_type& > operator<<(__ostream_type& (*__pf)(__ostream_type&)) > { > > > > return __pf(*this); > } > > __ostream_type& > operator<<(__ios_type& (*__pf)(__ios_type&)) > { > > > > __pf(*this); > return *this; > } > > __ostream_type& > operator<<(ios_base& (*__pf) (ios_base&)) > { > > > > __pf(*this); > return *this; > } ># 167 "/usr/include/c++/13/ostream" 3 > __ostream_type& > operator<<(long __n) > { return _M_insert(__n); } > > __ostream_type& > operator<<(unsigned long __n) > { return _M_insert(__n); } > > __ostream_type& > operator<<(bool __n) > { return _M_insert(__n); } > > __ostream_type& > operator<<(short __n); > > __ostream_type& > operator<<(unsigned short __n) > { > > > return _M_insert(static_cast<unsigned long>(__n)); > } > > __ostream_type& > operator<<(int __n); > > __ostream_type& > operator<<(unsigned int __n) > { > > > return _M_insert(static_cast<unsigned long>(__n)); > } > > > __ostream_type& > operator<<(long long __n) > { return _M_insert(__n); } > > __ostream_type& > operator<<(unsigned long long __n) > { return _M_insert(__n); } ># 221 "/usr/include/c++/13/ostream" 3 > __ostream_type& > operator<<(double __f) > { return _M_insert(__f); } > > __ostream_type& > operator<<(float __f) > { > > > return _M_insert(static_cast<double>(__f)); > } > > __ostream_type& > operator<<(long double __f) > { return _M_insert(__f); } ># 291 "/usr/include/c++/13/ostream" 3 > __ostream_type& > operator<<(const void* __p) > { return _M_insert(__p); } > > > __ostream_type& > operator<<(nullptr_t) > { return *this << "nullptr"; } ># 329 "/usr/include/c++/13/ostream" 3 > __ostream_type& > operator<<(__streambuf_type* __sb); ># 362 "/usr/include/c++/13/ostream" 3 > __ostream_type& > put(char_type __c); ># 381 "/usr/include/c++/13/ostream" 3 > __ostream_type& > write(const char_type* __s, streamsize __n); ># 394 "/usr/include/c++/13/ostream" 3 > __ostream_type& > flush(); ># 404 "/usr/include/c++/13/ostream" 3 > pos_type > tellp(); ># 415 "/usr/include/c++/13/ostream" 3 > __ostream_type& > seekp(pos_type); ># 427 "/usr/include/c++/13/ostream" 3 > __ostream_type& > seekp(off_type, ios_base::seekdir); > > protected: > basic_ostream() > { this->init(0); } > > > > basic_ostream(basic_iostream<_CharT, _Traits>&) { } > > basic_ostream(const basic_ostream&) = delete; > > basic_ostream(basic_ostream&& __rhs) > : __ios_type() > { __ios_type::move(__rhs); } > > > > basic_ostream& operator=(const basic_ostream&) = delete; > > basic_ostream& > operator=(basic_ostream&& __rhs) > { > swap(__rhs); > return *this; > } > > void > swap(basic_ostream& __rhs) > { __ios_type::swap(__rhs); } > > > template<typename _ValueT> > __ostream_type& > _M_insert(_ValueT __v); > > private: > > void > _M_write(const char_type* __s, streamsize __n) > { std::__ostream_insert(*this, __s, __n); } > > }; ># 479 "/usr/include/c++/13/ostream" 3 > template <typename _CharT, typename _Traits> > class basic_ostream<_CharT, _Traits>::sentry > { > > bool _M_ok; > basic_ostream<_CharT, _Traits>& _M_os; > > public: ># 498 "/usr/include/c++/13/ostream" 3 > explicit > sentry(basic_ostream<_CharT, _Traits>& __os); > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > > > > > > > > ~sentry() > { > > if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) > { > > if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) > _M_os.setstate(ios_base::badbit); > } > } >#pragma GCC diagnostic pop ># 530 "/usr/include/c++/13/ostream" 3 > explicit > > operator bool() const > { return _M_ok; } > }; ># 552 "/usr/include/c++/13/ostream" 3 > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) > { > if (__out.width() != 0) > return __ostream_insert(__out, &__c, 1); > __out.put(__c); > return __out; > } > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) > { return (__out << __out.widen(__c)); } > > > template<typename _Traits> > inline basic_ostream<char, _Traits>& > operator<<(basic_ostream<char, _Traits>& __out, char __c) > { > if (__out.width() != 0) > return __ostream_insert(__out, &__c, 1); > __out.put(__c); > return __out; > } > > > template<typename _Traits> > inline basic_ostream<char, _Traits>& > operator<<(basic_ostream<char, _Traits>& __out, signed char __c) > { return (__out << static_cast<char>(__c)); } > > template<typename _Traits> > inline basic_ostream<char, _Traits>& > operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) > { return (__out << static_cast<char>(__c)); } ># 643 "/usr/include/c++/13/ostream" 3 > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) > { > if (!__s) > __out.setstate(ios_base::badbit); > else > __ostream_insert(__out, __s, > static_cast<streamsize>(_Traits::length(__s))); > return __out; > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits> & > operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); > > > template<typename _Traits> > inline basic_ostream<char, _Traits>& > operator<<(basic_ostream<char, _Traits>& __out, const char* __s) > { > if (!__s) > __out.setstate(ios_base::badbit); > else > __ostream_insert(__out, __s, > static_cast<streamsize>(_Traits::length(__s))); > return __out; > } > > > template<typename _Traits> > inline basic_ostream<char, _Traits>& > operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) > { return (__out << reinterpret_cast<const char*>(__s)); } > > template<typename _Traits> > inline basic_ostream<char, _Traits> & > operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) > { return (__out << reinterpret_cast<const char*>(__s)); } ># 733 "/usr/include/c++/13/ostream" 3 > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > endl(basic_ostream<_CharT, _Traits>& __os) > { return flush(__os.put(__os.widen('\n'))); } ># 745 "/usr/include/c++/13/ostream" 3 > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > ends(basic_ostream<_CharT, _Traits>& __os) > { return __os.put(_CharT()); } > > > > > > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > flush(basic_ostream<_CharT, _Traits>& __os) > { return __os.flush(); } ># 777 "/usr/include/c++/13/ostream" 3 > template<typename _Tp> > using _Require_derived_from_ios_base > = _Require<is_class<_Tp>, __not_<is_same<_Tp, ios_base>>, > is_convertible<typename add_pointer<_Tp>::type, ios_base*>>; > > template<typename _Os, typename _Tp, > typename = _Require_derived_from_ios_base<_Os>, > typename > = decltype(std::declval<_Os&>() << std::declval<const _Tp&>())> > using __rvalue_stream_insertion_t = _Os&&; ># 799 "/usr/include/c++/13/ostream" 3 > template<typename _Ostream, typename _Tp> > inline __rvalue_stream_insertion_t<_Ostream, _Tp> > operator<<(_Ostream&& __os, const _Tp& __x) > { > __os << __x; > return std::move(__os); > } ># 877 "/usr/include/c++/13/ostream" 3 > >} > ># 1 "/usr/include/c++/13/bits/ostream.tcc" 1 3 ># 37 "/usr/include/c++/13/bits/ostream.tcc" 3 > ># 38 "/usr/include/c++/13/bits/ostream.tcc" 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>::sentry:: > sentry(basic_ostream<_CharT, _Traits>& __os) > : _M_ok(false), _M_os(__os) > { > > if (__os.tie() && __os.good()) > __os.tie()->flush(); > > if (__os.good()) > _M_ok = true; > else if (__os.bad()) > __os.setstate(ios_base::failbit); > } > > template<typename _CharT, typename _Traits> > template<typename _ValueT> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > _M_insert(_ValueT __v) > { > sentry __cerb(*this); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > > const __num_put_type& __np = __check_facet(this->_M_num_put); > > > > > if (__np.put(*this, *this, this->fill(), __v).failed()) > __err |= ios_base::badbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > operator<<(short __n) > { > > > const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; > if (__fmt == ios_base::oct || __fmt == ios_base::hex) > return _M_insert(static_cast<long>(static_cast<unsigned short>(__n))); > else > return _M_insert(static_cast<long>(__n)); > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > operator<<(int __n) > { > > > const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; > if (__fmt == ios_base::oct || __fmt == ios_base::hex) > return _M_insert(static_cast<long>(static_cast<unsigned int>(__n))); > else > return _M_insert(static_cast<long>(__n)); > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > operator<<(__streambuf_type* __sbin) > { > ios_base::iostate __err = ios_base::goodbit; > sentry __cerb(*this); > if (__cerb && __sbin) > { > try > { > if (!__copy_streambufs(__sbin, this->rdbuf())) > __err |= ios_base::failbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::failbit); } > } > else if (!__sbin) > __err |= ios_base::badbit; > if (__err) > this->setstate(__err); > return *this; > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > put(char_type __c) > { > > > > > > > sentry __cerb(*this); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > const int_type __put = this->rdbuf()->sputc(__c); > if (traits_type::eq_int_type(__put, traits_type::eof())) > __err |= ios_base::badbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > write(const _CharT* __s, streamsize __n) > { > > > > > > > > sentry __cerb(*this); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > if (this->rdbuf()->sputn(__s, __n) != __n) > __err = ios_base::badbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(ios_base::badbit); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > flush() > { > > > > > > if (__streambuf_type* __buf = this->rdbuf()) > { > sentry __cerb(*this); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > if (this->rdbuf()->pubsync() == -1) > __err |= ios_base::badbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > } > return *this; > } > > template<typename _CharT, typename _Traits> > typename basic_ostream<_CharT, _Traits>::pos_type > basic_ostream<_CharT, _Traits>:: > tellp() > { > sentry __cerb(*this); > pos_type __ret = pos_type(-1); > if (!this->fail()) > __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); > return __ret; > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > seekp(pos_type __pos) > { > sentry __cerb(*this); > if (!this->fail()) > { > > > const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::out); > > > if (__p == pos_type(off_type(-1))) > this->setstate(ios_base::failbit); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > basic_ostream<_CharT, _Traits>:: > seekp(off_type __off, ios_base::seekdir __dir) > { > sentry __cerb(*this); > if (!this->fail()) > { > > > const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, > ios_base::out); > > > if (__p == pos_type(off_type(-1))) > this->setstate(ios_base::failbit); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) > { > if (!__s) > __out.setstate(ios_base::badbit); > else > { > > > const size_t __clen = char_traits<char>::length(__s); > try > { > struct __ptr_guard > { > _CharT *__p; > __ptr_guard (_CharT *__ip): __p(__ip) { } > ~__ptr_guard() { delete[] __p; } > _CharT* __get() { return __p; } > } __pg (new _CharT[__clen]); > > _CharT *__ws = __pg.__get(); > for (size_t __i = 0; __i < __clen; ++__i) > __ws[__i] = __out.widen(__s[__i]); > __ostream_insert(__out, __ws, __clen); > } > catch(__cxxabiv1::__forced_unwind&) > { > __out._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { __out._M_setstate(ios_base::badbit); } > } > return __out; > } > > > > > extern template class basic_ostream<char>; > extern template ostream& endl(ostream&); > extern template ostream& ends(ostream&); > extern template ostream& flush(ostream&); > extern template ostream& operator<<(ostream&, char); > extern template ostream& operator<<(ostream&, unsigned char); > extern template ostream& operator<<(ostream&, signed char); > extern template ostream& operator<<(ostream&, const char*); > extern template ostream& operator<<(ostream&, const unsigned char*); > extern template ostream& operator<<(ostream&, const signed char*); > > extern template ostream& ostream::_M_insert(long); > extern template ostream& ostream::_M_insert(unsigned long); > extern template ostream& ostream::_M_insert(bool); > > extern template ostream& ostream::_M_insert(long long); > extern template ostream& ostream::_M_insert(unsigned long long); > > extern template ostream& ostream::_M_insert(double); > extern template ostream& ostream::_M_insert(long double); > extern template ostream& ostream::_M_insert(const void*); > > > extern template class basic_ostream<wchar_t>; > extern template wostream& endl(wostream&); > extern template wostream& ends(wostream&); > extern template wostream& flush(wostream&); > extern template wostream& operator<<(wostream&, wchar_t); > extern template wostream& operator<<(wostream&, char); > extern template wostream& operator<<(wostream&, const wchar_t*); > extern template wostream& operator<<(wostream&, const char*); > > extern template wostream& wostream::_M_insert(long); > extern template wostream& wostream::_M_insert(unsigned long); > extern template wostream& wostream::_M_insert(bool); > > extern template wostream& wostream::_M_insert(long long); > extern template wostream& wostream::_M_insert(unsigned long long); > > extern template wostream& wostream::_M_insert(double); > extern template wostream& wostream::_M_insert(long double); > extern template wostream& wostream::_M_insert(const void*); > > > > >} ># 881 "/usr/include/c++/13/ostream" 2 3 ># 42 "/usr/include/c++/13/iostream" 2 3 ># 1 "/usr/include/c++/13/istream" 1 3 ># 36 "/usr/include/c++/13/istream" 3 > ># 37 "/usr/include/c++/13/istream" 3 > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 59 "/usr/include/c++/13/istream" 3 > 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: > > > > > > > > explicit > basic_istream(__streambuf_type* __sb) > : _M_gcount(streamsize(0)) > { this->init(__sb); } > > > > > > > virtual > ~basic_istream() > { _M_gcount = streamsize(0); } > > > class sentry; > friend class sentry; ># 121 "/usr/include/c++/13/istream" 3 > __istream_type& > operator>>(__istream_type& (*__pf)(__istream_type&)) > { return __pf(*this); } > > __istream_type& > operator>>(__ios_type& (*__pf)(__ios_type&)) > { > __pf(*this); > return *this; > } > > __istream_type& > operator>>(ios_base& (*__pf)(ios_base&)) > { > __pf(*this); > return *this; > } ># 169 "/usr/include/c++/13/istream" 3 > __istream_type& > operator>>(bool& __n) > { return _M_extract(__n); } > > __istream_type& > operator>>(short& __n); > > __istream_type& > operator>>(unsigned short& __n) > { return _M_extract(__n); } > > __istream_type& > operator>>(int& __n); > > __istream_type& > operator>>(unsigned int& __n) > { return _M_extract(__n); } > > __istream_type& > operator>>(long& __n) > { return _M_extract(__n); } > > __istream_type& > operator>>(unsigned long& __n) > { return _M_extract(__n); } > > > __istream_type& > operator>>(long long& __n) > { return _M_extract(__n); } > > __istream_type& > operator>>(unsigned long long& __n) > { return _M_extract(__n); } ># 215 "/usr/include/c++/13/istream" 3 > __istream_type& > operator>>(float& __f) > { return _M_extract(__f); } > > __istream_type& > operator>>(double& __f) > { return _M_extract(__f); } > > __istream_type& > operator>>(long double& __f) > { return _M_extract(__f); } ># 324 "/usr/include/c++/13/istream" 3 > __istream_type& > operator>>(void*& __p) > { return _M_extract(__p); } ># 348 "/usr/include/c++/13/istream" 3 > __istream_type& > operator>>(__streambuf_type* __sb); ># 358 "/usr/include/c++/13/istream" 3 > streamsize > gcount() const > { return _M_gcount; } ># 391 "/usr/include/c++/13/istream" 3 > int_type > get(); ># 405 "/usr/include/c++/13/istream" 3 > __istream_type& > get(char_type& __c); ># 432 "/usr/include/c++/13/istream" 3 > __istream_type& > get(char_type* __s, streamsize __n, char_type __delim); ># 443 "/usr/include/c++/13/istream" 3 > __istream_type& > get(char_type* __s, streamsize __n) > { return this->get(__s, __n, this->widen('\n')); } ># 466 "/usr/include/c++/13/istream" 3 > __istream_type& > get(__streambuf_type& __sb, char_type __delim); ># 476 "/usr/include/c++/13/istream" 3 > __istream_type& > get(__streambuf_type& __sb) > { return this->get(__sb, this->widen('\n')); } ># 505 "/usr/include/c++/13/istream" 3 > __istream_type& > getline(char_type* __s, streamsize __n, char_type __delim); ># 516 "/usr/include/c++/13/istream" 3 > __istream_type& > getline(char_type* __s, streamsize __n) > { return this->getline(__s, __n, this->widen('\n')); } ># 540 "/usr/include/c++/13/istream" 3 > __istream_type& > ignore(streamsize __n, int_type __delim); > > __istream_type& > ignore(streamsize __n); > > __istream_type& > ignore(); ># 557 "/usr/include/c++/13/istream" 3 > int_type > peek(); ># 575 "/usr/include/c++/13/istream" 3 > __istream_type& > read(char_type* __s, streamsize __n); ># 594 "/usr/include/c++/13/istream" 3 > streamsize > readsome(char_type* __s, streamsize __n); ># 611 "/usr/include/c++/13/istream" 3 > __istream_type& > putback(char_type __c); ># 627 "/usr/include/c++/13/istream" 3 > __istream_type& > unget(); ># 645 "/usr/include/c++/13/istream" 3 > int > sync(); ># 660 "/usr/include/c++/13/istream" 3 > pos_type > tellg(); ># 675 "/usr/include/c++/13/istream" 3 > __istream_type& > seekg(pos_type); ># 691 "/usr/include/c++/13/istream" 3 > __istream_type& > seekg(off_type, ios_base::seekdir); > > > protected: > basic_istream() > : _M_gcount(streamsize(0)) > { this->init(0); } > > > basic_istream(const basic_istream&) = delete; > > basic_istream(basic_istream&& __rhs) > : __ios_type(), _M_gcount(__rhs._M_gcount) > { > __ios_type::move(__rhs); > __rhs._M_gcount = 0; > } > > > > basic_istream& operator=(const basic_istream&) = delete; > > basic_istream& > operator=(basic_istream&& __rhs) > { > swap(__rhs); > return *this; > } > > void > swap(basic_istream& __rhs) > { > __ios_type::swap(__rhs); > std::swap(_M_gcount, __rhs._M_gcount); > } > > > template<typename _ValueT> > __istream_type& > _M_extract(_ValueT& __v); > }; > > > template<> > basic_istream<char>& > basic_istream<char>:: > getline(char_type* __s, streamsize __n, char_type __delim); > > template<> > basic_istream<char>& > basic_istream<char>:: > ignore(streamsize __n); > > template<> > basic_istream<char>& > basic_istream<char>:: > ignore(streamsize __n, int_type __delim); > > > template<> > basic_istream<wchar_t>& > basic_istream<wchar_t>:: > getline(char_type* __s, streamsize __n, char_type __delim); > > template<> > basic_istream<wchar_t>& > basic_istream<wchar_t>:: > ignore(streamsize __n); > > template<> > basic_istream<wchar_t>& > basic_istream<wchar_t>:: > ignore(streamsize __n, int_type __delim); ># 775 "/usr/include/c++/13/istream" 3 > 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; ># 811 "/usr/include/c++/13/istream" 3 > explicit > sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); ># 822 "/usr/include/c++/13/istream" 3 > explicit > > operator bool() const > { return _M_ok; } > }; ># 840 "/usr/include/c++/13/istream" 3 > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); > > template<class _Traits> > inline basic_istream<char, _Traits>& > operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) > { return (__in >> reinterpret_cast<char&>(__c)); } > > template<class _Traits> > inline basic_istream<char, _Traits>& > operator>>(basic_istream<char, _Traits>& __in, signed char& __c) > { return (__in >> reinterpret_cast<char&>(__c)); } > > > > template<typename _CharT, typename _Traits> > void > __istream_extract(basic_istream<_CharT, _Traits>&, _CharT*, streamsize); > > void __istream_extract(istream&, char*, streamsize); ># 890 "/usr/include/c++/13/istream" 3 > template<typename _CharT, typename _Traits> > __attribute__((__nonnull__(2), __access__(__write_only__, 2))) > inline basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) > { ># 924 "/usr/include/c++/13/istream" 3 > { > > streamsize __n = __gnu_cxx::__numeric_traits<streamsize>::__max; > __n /= sizeof(_CharT); > std::__istream_extract(__in, __s, __n); > } > return __in; > } > > template<class _Traits> > __attribute__((__nonnull__(2), __access__(__write_only__, 2))) > inline basic_istream<char, _Traits>& > operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) > { return __in >> reinterpret_cast<char*>(__s); } > > template<class _Traits> > __attribute__((__nonnull__(2), __access__(__write_only__, 2))) > inline basic_istream<char, _Traits>& > operator>>(basic_istream<char, _Traits>& __in, signed char* __s) > { return __in >> reinterpret_cast<char*>(__s); } ># 979 "/usr/include/c++/13/istream" 3 > 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; > > > > > > > > explicit > basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) > : __istream_type(__sb), __ostream_type(__sb) { } > > > > > virtual > ~basic_iostream() { } > > protected: > basic_iostream() > : __istream_type(), __ostream_type() { } > > > basic_iostream(const basic_iostream&) = delete; > > basic_iostream(basic_iostream&& __rhs) > : __istream_type(std::move(__rhs)), __ostream_type(*this) > { } > > > > basic_iostream& operator=(const basic_iostream&) = delete; > > basic_iostream& > operator=(basic_iostream&& __rhs) > { > swap(__rhs); > return *this; > } > > void > swap(basic_iostream& __rhs) > { __istream_type::swap(__rhs); } > > }; ># 1062 "/usr/include/c++/13/istream" 3 > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > ws(basic_istream<_CharT, _Traits>& __is); ># 1078 "/usr/include/c++/13/istream" 3 > template<typename _Is, typename _Tp, > typename = _Require_derived_from_ios_base<_Is>, > typename = decltype(std::declval<_Is&>() >> std::declval<_Tp>())> > using __rvalue_stream_extraction_t = _Is&&; ># 1094 "/usr/include/c++/13/istream" 3 > template<typename _Istream, typename _Tp> > inline __rvalue_stream_extraction_t<_Istream, _Tp> > operator>>(_Istream&& __is, _Tp&& __x) > { > __is >> std::forward<_Tp>(__x); > return std::move(__is); > } > > > >} > ># 1 "/usr/include/c++/13/bits/istream.tcc" 1 3 ># 37 "/usr/include/c++/13/bits/istream.tcc" 3 > ># 38 "/usr/include/c++/13/bits/istream.tcc" 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>::sentry:: > sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) > { > ios_base::iostate __err = ios_base::goodbit; > if (__in.good()) > { > try > { > if (__in.tie()) > __in.tie()->flush(); > if (!__noskip && bool(__in.flags() & ios_base::skipws)) > { > const __int_type __eof = traits_type::eof(); > __streambuf_type* __sb = __in.rdbuf(); > __int_type __c = __sb->sgetc(); > > const __ctype_type& __ct = __check_facet(__in._M_ctype); > while (!traits_type::eq_int_type(__c, __eof) > && __ct.is(ctype_base::space, > traits_type::to_char_type(__c))) > __c = __sb->snextc(); > > > > > if (traits_type::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > } > } > catch(__cxxabiv1::__forced_unwind&) > { > __in._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { __in._M_setstate(ios_base::badbit); } > } > > if (__in.good() && __err == ios_base::goodbit) > _M_ok = true; > else > { > __err |= ios_base::failbit; > __in.setstate(__err); > } > } > > template<typename _CharT, typename _Traits> > template<typename _ValueT> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > _M_extract(_ValueT& __v) > { > sentry __cerb(*this, false); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > > const __num_get_type& __ng = __check_facet(this->_M_num_get); > > > > > __ng.get(*this, 0, *this, __err, __v); > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > operator>>(short& __n) > { > > > sentry __cerb(*this, false); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > long __l; > > const __num_get_type& __ng = __check_facet(this->_M_num_get); > > > > > __ng.get(*this, 0, *this, __err, __l); > > > > if (__l < __gnu_cxx::__numeric_traits<short>::__min) > { > __err |= ios_base::failbit; > __n = __gnu_cxx::__numeric_traits<short>::__min; > } > else if (__l > __gnu_cxx::__numeric_traits<short>::__max) > { > __err |= ios_base::failbit; > __n = __gnu_cxx::__numeric_traits<short>::__max; > } > else > __n = short(__l); > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > operator>>(int& __n) > { > > > sentry __cerb(*this, false); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > long __l; > > const __num_get_type& __ng = __check_facet(this->_M_num_get); > > > > > __ng.get(*this, 0, *this, __err, __l); > > > > if (__l < __gnu_cxx::__numeric_traits<int>::__min) > { > __err |= ios_base::failbit; > __n = __gnu_cxx::__numeric_traits<int>::__min; > } > else if (__l > __gnu_cxx::__numeric_traits<int>::__max) > { > __err |= ios_base::failbit; > __n = __gnu_cxx::__numeric_traits<int>::__max; > } > else > __n = int(__l); > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > operator>>(__streambuf_type* __sbout) > { > ios_base::iostate __err = ios_base::goodbit; > sentry __cerb(*this, false); > if (__cerb && __sbout) > { > try > { > bool __ineof; > if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) > __err |= ios_base::failbit; > if (__ineof) > __err |= ios_base::eofbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::failbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::failbit); } > } > else if (!__sbout) > __err |= ios_base::failbit; > if (__err) > this->setstate(__err); > return *this; > } > > template<typename _CharT, typename _Traits> > typename basic_istream<_CharT, _Traits>::int_type > basic_istream<_CharT, _Traits>:: > get(void) > { > const int_type __eof = traits_type::eof(); > int_type __c = __eof; > _M_gcount = 0; > ios_base::iostate __err = ios_base::goodbit; > sentry __cerb(*this, true); > if (__cerb) > { > try > { > __c = this->rdbuf()->sbumpc(); > > if (!traits_type::eq_int_type(__c, __eof)) > _M_gcount = 1; > else > __err |= ios_base::eofbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > } > if (!_M_gcount) > __err |= ios_base::failbit; > if (__err) > this->setstate(__err); > return __c; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > get(char_type& __c) > { > _M_gcount = 0; > ios_base::iostate __err = ios_base::goodbit; > sentry __cerb(*this, true); > if (__cerb) > { > try > { > const int_type __cb = this->rdbuf()->sbumpc(); > > if (!traits_type::eq_int_type(__cb, traits_type::eof())) > { > _M_gcount = 1; > __c = traits_type::to_char_type(__cb); > } > else > __err |= ios_base::eofbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > } > if (!_M_gcount) > __err |= ios_base::failbit; > if (__err) > this->setstate(__err); > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > get(char_type* __s, streamsize __n, char_type __delim) > { > _M_gcount = 0; > ios_base::iostate __err = ios_base::goodbit; > sentry __cerb(*this, true); > if (__cerb) > { > try > { > const int_type __idelim = traits_type::to_int_type(__delim); > const int_type __eof = traits_type::eof(); > __streambuf_type* __sb = this->rdbuf(); > int_type __c = __sb->sgetc(); > > while (_M_gcount + 1 < __n > && !traits_type::eq_int_type(__c, __eof) > && !traits_type::eq_int_type(__c, __idelim)) > { > *__s++ = traits_type::to_char_type(__c); > ++_M_gcount; > __c = __sb->snextc(); > } > if (traits_type::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > } > > > if (__n > 0) > *__s = char_type(); > if (!_M_gcount) > __err |= ios_base::failbit; > if (__err) > this->setstate(__err); > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > get(__streambuf_type& __sb, char_type __delim) > { > _M_gcount = 0; > ios_base::iostate __err = ios_base::goodbit; > sentry __cerb(*this, true); > if (__cerb) > { > try > { > const int_type __idelim = traits_type::to_int_type(__delim); > const int_type __eof = traits_type::eof(); > __streambuf_type* __this_sb = this->rdbuf(); > int_type __c = __this_sb->sgetc(); > char_type __c2 = traits_type::to_char_type(__c); > unsigned long long __gcount = 0; > > while (!traits_type::eq_int_type(__c, __eof) > && !traits_type::eq_int_type(__c, __idelim) > && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) > { > ++__gcount; > __c = __this_sb->snextc(); > __c2 = traits_type::to_char_type(__c); > } > if (traits_type::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > > > if (__gcount <= __gnu_cxx::__numeric_traits<streamsize>::__max) > _M_gcount = __gcount; > else > _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > } > if (!_M_gcount) > __err |= ios_base::failbit; > if (__err) > this->setstate(__err); > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > getline(char_type* __s, streamsize __n, char_type __delim) > { > _M_gcount = 0; > ios_base::iostate __err = ios_base::goodbit; > sentry __cerb(*this, true); > if (__cerb) > { > try > { > const int_type __idelim = traits_type::to_int_type(__delim); > const int_type __eof = traits_type::eof(); > __streambuf_type* __sb = this->rdbuf(); > int_type __c = __sb->sgetc(); > > while (_M_gcount + 1 < __n > && !traits_type::eq_int_type(__c, __eof) > && !traits_type::eq_int_type(__c, __idelim)) > { > *__s++ = traits_type::to_char_type(__c); > __c = __sb->snextc(); > ++_M_gcount; > } > if (traits_type::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > else > { > if (traits_type::eq_int_type(__c, __idelim)) > { > __sb->sbumpc(); > ++_M_gcount; > } > else > __err |= ios_base::failbit; > } > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > } > > > if (__n > 0) > *__s = char_type(); > if (!_M_gcount) > __err |= ios_base::failbit; > if (__err) > this->setstate(__err); > return *this; > } > > > > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > ignore(void) > { > _M_gcount = 0; > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > const int_type __eof = traits_type::eof(); > __streambuf_type* __sb = this->rdbuf(); > > if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) > __err |= ios_base::eofbit; > else > _M_gcount = 1; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > ignore(streamsize __n) > { > _M_gcount = 0; > sentry __cerb(*this, true); > if (__cerb && __n > 0) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > const int_type __eof = traits_type::eof(); > __streambuf_type* __sb = this->rdbuf(); > int_type __c = __sb->sgetc(); ># 545 "/usr/include/c++/13/bits/istream.tcc" 3 > bool __large_ignore = false; > while (true) > { > while (_M_gcount < __n > && !traits_type::eq_int_type(__c, __eof)) > { > ++_M_gcount; > __c = __sb->snextc(); > } > if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max > && !traits_type::eq_int_type(__c, __eof)) > { > _M_gcount = > __gnu_cxx::__numeric_traits<streamsize>::__min; > __large_ignore = true; > } > else > break; > } > > if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max) > { > if (__large_ignore) > _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; > > if (traits_type::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > } > else if (_M_gcount < __n) > { > if (traits_type::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > } > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > ignore(streamsize __n, int_type __delim) > { > _M_gcount = 0; > sentry __cerb(*this, true); > if (__cerb && __n > 0) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > const int_type __eof = traits_type::eof(); > __streambuf_type* __sb = this->rdbuf(); > int_type __c = __sb->sgetc(); > > > bool __large_ignore = false; > while (true) > { > while (_M_gcount < __n > && !traits_type::eq_int_type(__c, __eof) > && !traits_type::eq_int_type(__c, __delim)) > { > ++_M_gcount; > __c = __sb->snextc(); > } > if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max > && !traits_type::eq_int_type(__c, __eof) > && !traits_type::eq_int_type(__c, __delim)) > { > _M_gcount = > __gnu_cxx::__numeric_traits<streamsize>::__min; > __large_ignore = true; > } > else > break; > } > > if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max) > { > if (__large_ignore) > _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; > > if (traits_type::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > else > { > if (_M_gcount != __n) > ++_M_gcount; > __sb->sbumpc(); > } > } > else if (_M_gcount < __n) > { > if (traits_type::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > else > { > ++_M_gcount; > __sb->sbumpc(); > } > } > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > typename basic_istream<_CharT, _Traits>::int_type > basic_istream<_CharT, _Traits>:: > peek(void) > { > int_type __c = traits_type::eof(); > _M_gcount = 0; > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > __c = this->rdbuf()->sgetc(); > if (traits_type::eq_int_type(__c, traits_type::eof())) > __err |= ios_base::eofbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return __c; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > read(char_type* __s, streamsize __n) > { > _M_gcount = 0; > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > _M_gcount = this->rdbuf()->sgetn(__s, __n); > if (_M_gcount != __n) > __err |= (ios_base::eofbit | ios_base::failbit); > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > streamsize > basic_istream<_CharT, _Traits>:: > readsome(char_type* __s, streamsize __n) > { > _M_gcount = 0; > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > > const streamsize __num = this->rdbuf()->in_avail(); > if (__num > 0) > _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); > else if (__num == -1) > __err |= ios_base::eofbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return _M_gcount; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > putback(char_type __c) > { > > > _M_gcount = 0; > > this->clear(this->rdstate() & ~ios_base::eofbit); > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > const int_type __eof = traits_type::eof(); > __streambuf_type* __sb = this->rdbuf(); > if (!__sb > || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) > __err |= ios_base::badbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > unget(void) > { > > > _M_gcount = 0; > > this->clear(this->rdstate() & ~ios_base::eofbit); > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > const int_type __eof = traits_type::eof(); > __streambuf_type* __sb = this->rdbuf(); > if (!__sb > || traits_type::eq_int_type(__sb->sungetc(), __eof)) > __err |= ios_base::badbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > int > basic_istream<_CharT, _Traits>:: > sync(void) > { > > > int __ret = -1; > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > __streambuf_type* __sb = this->rdbuf(); > if (__sb) > { > if (__sb->pubsync() == -1) > __err |= ios_base::badbit; > else > __ret = 0; > } > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return __ret; > } > > template<typename _CharT, typename _Traits> > typename basic_istream<_CharT, _Traits>::pos_type > basic_istream<_CharT, _Traits>:: > tellg(void) > { > > > pos_type __ret = pos_type(-1); > sentry __cerb(*this, true); > if (__cerb) > { > try > { > if (!this->fail()) > __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, > ios_base::in); > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > } > return __ret; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > seekg(pos_type __pos) > { > > > > this->clear(this->rdstate() & ~ios_base::eofbit); > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > if (!this->fail()) > { > > const pos_type __p = this->rdbuf()->pubseekpos(__pos, > ios_base::in); > > > if (__p == pos_type(off_type(-1))) > __err |= ios_base::failbit; > } > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > basic_istream<_CharT, _Traits>:: > seekg(off_type __off, ios_base::seekdir __dir) > { > > > > this->clear(this->rdstate() & ~ios_base::eofbit); > sentry __cerb(*this, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > if (!this->fail()) > { > > const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, > ios_base::in); > > > if (__p == pos_type(off_type(-1))) > __err |= ios_base::failbit; > } > } > catch(__cxxabiv1::__forced_unwind&) > { > this->_M_setstate(ios_base::badbit); > throw; > } > catch(...) > { this->_M_setstate(ios_base::badbit); } > if (__err) > this->setstate(__err); > } > return *this; > } > > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) > { > typedef basic_istream<_CharT, _Traits> __istream_type; > typedef typename __istream_type::int_type __int_type; > > typename __istream_type::sentry __cerb(__in, false); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > const __int_type __cb = __in.rdbuf()->sbumpc(); > if (!_Traits::eq_int_type(__cb, _Traits::eof())) > __c = _Traits::to_char_type(__cb); > else > __err |= (ios_base::eofbit | ios_base::failbit); > } > catch(__cxxabiv1::__forced_unwind&) > { > __in._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { __in._M_setstate(ios_base::badbit); } > if (__err) > __in.setstate(__err); > } > return __in; > } > > template<typename _CharT, typename _Traits> > void > __istream_extract(basic_istream<_CharT, _Traits>& __in, _CharT* __s, > streamsize __num) > { > typedef basic_istream<_CharT, _Traits> __istream_type; > typedef basic_streambuf<_CharT, _Traits> __streambuf_type; > typedef typename _Traits::int_type int_type; > typedef _CharT char_type; > typedef ctype<_CharT> __ctype_type; > > streamsize __extracted = 0; > ios_base::iostate __err = ios_base::goodbit; > typename __istream_type::sentry __cerb(__in, false); > if (__cerb) > { > try > { > > streamsize __width = __in.width(); > if (0 < __width && __width < __num) > __num = __width; > > const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); > > const int_type __eof = _Traits::eof(); > __streambuf_type* __sb = __in.rdbuf(); > int_type __c = __sb->sgetc(); > > while (__extracted < __num - 1 > && !_Traits::eq_int_type(__c, __eof) > && !__ct.is(ctype_base::space, > _Traits::to_char_type(__c))) > { > *__s++ = _Traits::to_char_type(__c); > ++__extracted; > __c = __sb->snextc(); > } > > if (__extracted < __num - 1 > && _Traits::eq_int_type(__c, __eof)) > __err |= ios_base::eofbit; > > > > *__s = char_type(); > __in.width(0); > } > catch(__cxxabiv1::__forced_unwind&) > { > __in._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { __in._M_setstate(ios_base::badbit); } > } > if (!__extracted) > __err |= ios_base::failbit; > if (__err) > __in.setstate(__err); > } > > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > ws(basic_istream<_CharT, _Traits>& __in) > { > typedef basic_istream<_CharT, _Traits> __istream_type; > typedef basic_streambuf<_CharT, _Traits> __streambuf_type; > typedef typename __istream_type::int_type __int_type; > typedef ctype<_CharT> __ctype_type; > > > > typename __istream_type::sentry __cerb(__in, true); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); > const __int_type __eof = _Traits::eof(); > __streambuf_type* __sb = __in.rdbuf(); > __int_type __c = __sb->sgetc(); > > while (true) > { > if (_Traits::eq_int_type(__c, __eof)) > { > __err = ios_base::eofbit; > break; > } > if (!__ct.is(ctype_base::space, _Traits::to_char_type(__c))) > break; > __c = __sb->snextc(); > } > } > catch(const __cxxabiv1::__forced_unwind&) > { > __in._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { > __in._M_setstate(ios_base::badbit); > } > if (__err) > __in.setstate(__err); > } > return __in; > } > > > > > extern template class basic_istream<char>; > extern template istream& ws(istream&); > extern template istream& operator>>(istream&, char&); > extern template istream& operator>>(istream&, unsigned char&); > extern template istream& operator>>(istream&, signed char&); > > extern template istream& istream::_M_extract(unsigned short&); > extern template istream& istream::_M_extract(unsigned int&); > extern template istream& istream::_M_extract(long&); > extern template istream& istream::_M_extract(unsigned long&); > extern template istream& istream::_M_extract(bool&); > > extern template istream& istream::_M_extract(long long&); > extern template istream& istream::_M_extract(unsigned long long&); > > extern template istream& istream::_M_extract(float&); > extern template istream& istream::_M_extract(double&); > extern template istream& istream::_M_extract(long double&); > extern template istream& istream::_M_extract(void*&); > > extern template class basic_iostream<char>; > > > extern template class basic_istream<wchar_t>; > extern template wistream& ws(wistream&); > extern template wistream& operator>>(wistream&, wchar_t&); > extern template void __istream_extract(wistream&, wchar_t*, streamsize); > > extern template wistream& wistream::_M_extract(unsigned short&); > extern template wistream& wistream::_M_extract(unsigned int&); > extern template wistream& wistream::_M_extract(long&); > extern template wistream& wistream::_M_extract(unsigned long&); > extern template wistream& wistream::_M_extract(bool&); > > extern template wistream& wistream::_M_extract(long long&); > extern template wistream& wistream::_M_extract(unsigned long long&); > > extern template wistream& wistream::_M_extract(float&); > extern template wistream& wistream::_M_extract(double&); > extern template wistream& wistream::_M_extract(long double&); > extern template wistream& wistream::_M_extract(void*&); > > extern template class basic_iostream<wchar_t>; > > > > >} ># 1107 "/usr/include/c++/13/istream" 2 3 ># 43 "/usr/include/c++/13/iostream" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 62 "/usr/include/c++/13/iostream" 3 > extern istream cin; > extern ostream cout; > extern ostream cerr; > extern ostream clog; > > > extern wistream wcin; > extern wostream wcout; > extern wostream wcerr; > extern wostream wclog; ># 82 "/usr/include/c++/13/iostream" 3 > >} ># 4 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 2 ># 1 "/usr/include/c++/13/fstream" 1 3 ># 36 "/usr/include/c++/13/fstream" 3 > ># 37 "/usr/include/c++/13/fstream" 3 > > > > > ># 1 "/usr/include/c++/13/bits/codecvt.h" 1 3 ># 39 "/usr/include/c++/13/bits/codecvt.h" 3 > ># 40 "/usr/include/c++/13/bits/codecvt.h" 3 > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > class codecvt_base > { > public: > enum result > { > ok, > partial, > error, > noconv > }; > }; ># 70 "/usr/include/c++/13/bits/codecvt.h" 3 > 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; ># 118 "/usr/include/c++/13/bits/codecvt.h" 3 > 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 > { > return this->do_out(__state, __from, __from_end, __from_next, > __to, __to_end, __to_next); > } ># 157 "/usr/include/c++/13/bits/codecvt.h" 3 > result > unshift(state_type& __state, extern_type* __to, extern_type* __to_end, > extern_type*& __to_next) const > { return this->do_unshift(__state, __to,__to_end,__to_next); } ># 198 "/usr/include/c++/13/bits/codecvt.h" 3 > 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 > { > return this->do_in(__state, __from, __from_end, __from_next, > __to, __to_end, __to_next); > } > > int > encoding() const throw() > { return this->do_encoding(); } > > bool > always_noconv() const throw() > { return this->do_always_noconv(); } > > int > length(state_type& __state, const extern_type* __from, > const extern_type* __end, size_t __max) const > { return this->do_length(__state, __from, __end, __max); } > > int > max_length() const throw() > { return this->do_max_length(); } > > protected: > explicit > __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } > > virtual > ~__codecvt_abstract_base() { } ># 239 "/usr/include/c++/13/bits/codecvt.h" 3 > 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; > }; ># 276 "/usr/include/c++/13/bits/codecvt.h" 3 > 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) > : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs), > _M_c_locale_codecvt(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) > : __codecvt_abstract_base<char16_t, char, 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, 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) > : __codecvt_abstract_base<char32_t, char, 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(); > }; ># 698 "/usr/include/c++/13/bits/codecvt.h" 3 > 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) > : codecvt<_InternT, _ExternT, _StateT>(__refs) > { > if (__builtin_strcmp(__s, "C") != 0 > && __builtin_strcmp(__s, "POSIX") != 0) > { > this->_S_destroy_c_locale(this->_M_c_locale_codecvt); > this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); > } > } > > > explicit > codecvt_byname(const string& __s, size_t __refs = 0) > : codecvt_byname(__s.c_str(), __refs) { } > > > 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) > : codecvt<char16_t, char, 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, char, mbstate_t> > : public codecvt<char32_t, char, mbstate_t> > { > public: > explicit > codecvt_byname(const char*, size_t __refs = 0) > : codecvt<char32_t, char, mbstate_t>(__refs) { } > > explicit > codecvt_byname(const string& __s, size_t __refs = 0) > : codecvt_byname(__s.c_str(), __refs) { } > > protected: > virtual > ~codecvt_byname() { } > }; ># 805 "/usr/include/c++/13/bits/codecvt.h" 3 > 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>; ># 840 "/usr/include/c++/13/bits/codecvt.h" 3 > >} ># 43 "/usr/include/c++/13/fstream" 2 3 ># 1 "/usr/include/c++/13/cstdio" 1 3 ># 39 "/usr/include/c++/13/cstdio" 3 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 44 "/usr/include/c++/13/fstream" 2 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/basic_file.h" 1 3 ># 37 "/usr/include/c++/13/x86_64-redhat-linux/bits/basic_file.h" 3 > ># 38 "/usr/include/c++/13/x86_64-redhat-linux/bits/basic_file.h" 3 > > ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++io.h" 1 3 ># 35 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++io.h" 3 ># 1 "/usr/include/c++/13/cstdio" 1 3 ># 39 "/usr/include/c++/13/cstdio" 3 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 36 "/usr/include/c++/13/x86_64-redhat-linux/bits/c++io.h" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > > typedef __gthread_mutex_t __c_lock; > > > > typedef FILE __c_file; > > >} ># 41 "/usr/include/c++/13/x86_64-redhat-linux/bits/basic_file.h" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _CharT> > class __basic_file; > > > template<> > class __basic_file<char> > { > > __c_file* _M_cfile; > > > bool _M_cfile_created; > > public: > __basic_file(__c_lock* __lock = 0) throw (); > > > __basic_file(__basic_file&& __rv, __c_lock* = 0) noexcept > : _M_cfile(__rv._M_cfile), _M_cfile_created(__rv._M_cfile_created) > { > __rv._M_cfile = nullptr; > __rv._M_cfile_created = false; > } > > __basic_file& operator=(const __basic_file&) = delete; > __basic_file& operator=(__basic_file&&) = delete; > > void > swap(__basic_file& __f) noexcept > { > std::swap(_M_cfile, __f._M_cfile); > std::swap(_M_cfile_created, __f._M_cfile_created); > } > > > __basic_file* > open(const char* __name, ios_base::openmode __mode, int __prot = 0664); > > > > > > > __basic_file* > sys_open(__c_file* __file, ios_base::openmode); > > __basic_file* > sys_open(int __fd, ios_base::openmode __mode) throw (); > > __basic_file* > close(); > > __attribute__ ((__pure__)) bool > is_open() const throw (); > > __attribute__ ((__pure__)) int > fd() throw (); > > __attribute__ ((__pure__)) __c_file* > file() throw (); > > ~__basic_file(); > > streamsize > xsputn(const char* __s, streamsize __n); > > streamsize > xsputn_2(const char* __s1, streamsize __n1, > const char* __s2, streamsize __n2); > > streamsize > xsgetn(char* __s, streamsize __n); > > streamoff > seekoff(streamoff __off, ios_base::seekdir __way) throw (); > > int > sync(); > > streamsize > showmanyc(); > }; > > >} ># 45 "/usr/include/c++/13/fstream" 2 3 ># 54 "/usr/include/c++/13/fstream" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > template<typename _Path, typename _Result = _Path, typename _Path2 > = decltype(std::declval<_Path&>().make_preferred().filename())> > using _If_fs_path = enable_if_t<is_same_v<_Path, _Path2>, _Result>; ># 86 "/usr/include/c++/13/fstream" 3 > template<typename _CharT, typename _Traits> > class basic_filebuf : public basic_streambuf<_CharT, _Traits> > { > > template<typename _Tp> > using __chk_state = __and_<is_copy_assignable<_Tp>, > is_copy_constructible<_Tp>, > is_default_constructible<_Tp>>; > > static_assert(__chk_state<typename _Traits::state_type>::value, > "state_type must be CopyAssignable, CopyConstructible" > " and DefaultConstructible"); > > static_assert(is_same<typename _Traits::pos_type, > fpos<typename _Traits::state_type>>::value, > "pos_type must be fpos<state_type>"); > > 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; > typedef basic_filebuf<char_type, traits_type> __filebuf_type; > typedef __basic_file<char> __file_type; > typedef typename traits_type::state_type __state_type; > typedef codecvt<char_type, char, __state_type> __codecvt_type; > > friend class ios_base; > > protected: > > > __c_lock _M_lock; > > > __file_type _M_file; > > > ios_base::openmode _M_mode; > > > __state_type _M_state_beg; > > > > > __state_type _M_state_cur; > > > > __state_type _M_state_last; > > > char_type* _M_buf; > > > > > > > size_t _M_buf_size; > > > bool _M_buf_allocated; ># 162 "/usr/include/c++/13/fstream" 3 > bool _M_reading; > bool _M_writing; > > > > > > > > char_type _M_pback; > char_type* _M_pback_cur_save; > char_type* _M_pback_end_save; > bool _M_pback_init; > > > > const __codecvt_type* _M_codecvt; > > > > > > > char* _M_ext_buf; > > > > > streamsize _M_ext_buf_size; > > > > > > > const char* _M_ext_next; > char* _M_ext_end; > > > > > > > void > _M_create_pback() > { > if (!_M_pback_init) > { > _M_pback_cur_save = this->gptr(); > _M_pback_end_save = this->egptr(); > this->setg(&_M_pback, &_M_pback, &_M_pback + 1); > _M_pback_init = true; > } > } > > > > > > > void > _M_destroy_pback() throw() > { > if (_M_pback_init) > { > > _M_pback_cur_save += this->gptr() != this->eback(); > this->setg(_M_buf, _M_pback_cur_save, _M_pback_end_save); > _M_pback_init = false; > } > } > > public: > > > > > > > > basic_filebuf(); > > > basic_filebuf(const basic_filebuf&) = delete; > basic_filebuf(basic_filebuf&&); > > > > > > virtual > ~basic_filebuf() > { > try > { this->close(); } > catch(...) > { } > } > > > basic_filebuf& operator=(const basic_filebuf&) = delete; > basic_filebuf& operator=(basic_filebuf&&); > void swap(basic_filebuf&); > > > > > > > bool > is_open() const throw() > { return _M_file.is_open(); } ># 316 "/usr/include/c++/13/fstream" 3 > __filebuf_type* > open(const char* __s, ios_base::openmode __mode); ># 337 "/usr/include/c++/13/fstream" 3 > __filebuf_type* > open(const std::string& __s, ios_base::openmode __mode) > { return open(__s.c_str(), __mode); } ># 348 "/usr/include/c++/13/fstream" 3 > template<typename _Path> > _If_fs_path<_Path, __filebuf_type*> > open(const _Path& __s, ios_base::openmode __mode) > { return open(__s.c_str(), __mode); } ># 367 "/usr/include/c++/13/fstream" 3 > __filebuf_type* > close(); > > protected: > void > _M_allocate_internal_buffer(); > > void > _M_destroy_internal_buffer() throw(); > > > virtual streamsize > showmanyc(); > > > > > > > virtual int_type > underflow(); > > virtual int_type > pbackfail(int_type __c = _Traits::eof()); ># 399 "/usr/include/c++/13/fstream" 3 > virtual int_type > overflow(int_type __c = _Traits::eof()); > > > > bool > _M_convert_to_external(char_type*, streamsize); ># 419 "/usr/include/c++/13/fstream" 3 > virtual __streambuf_type* > setbuf(char_type* __s, streamsize __n); > > virtual pos_type > seekoff(off_type __off, ios_base::seekdir __way, > ios_base::openmode __mode = ios_base::in | ios_base::out); > > virtual pos_type > seekpos(pos_type __pos, > ios_base::openmode __mode = ios_base::in | ios_base::out); > > > pos_type > _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state); > > int > _M_get_ext_pos(__state_type &__state); > > virtual int > sync(); > > virtual void > imbue(const locale& __loc); > > virtual streamsize > xsgetn(char_type* __s, streamsize __n); > > virtual streamsize > xsputn(const char_type* __s, streamsize __n); > > > bool > _M_terminate_output(); ># 465 "/usr/include/c++/13/fstream" 3 > void > _M_set_buffer(streamsize __off) > { > const bool __testin = _M_mode & ios_base::in; > const bool __testout = (_M_mode & ios_base::out > || _M_mode & ios_base::app); > > if (__testin && __off > 0) > this->setg(_M_buf, _M_buf, _M_buf + __off); > else > this->setg(_M_buf, _M_buf, _M_buf); > > if (__testout && __off == 0 && _M_buf_size > 1 ) > this->setp(_M_buf, _M_buf + _M_buf_size - 1); > else > this->setp(0, 0); > } > }; ># 498 "/usr/include/c++/13/fstream" 3 > template<typename _CharT, typename _Traits> > class basic_ifstream : public basic_istream<_CharT, _Traits> > { > 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_filebuf<char_type, traits_type> __filebuf_type; > typedef basic_istream<char_type, traits_type> __istream_type; > > private: > __filebuf_type _M_filebuf; > > public: ># 525 "/usr/include/c++/13/fstream" 3 > basic_ifstream() : __istream_type(), _M_filebuf() > { this->init(&_M_filebuf); } ># 535 "/usr/include/c++/13/fstream" 3 > explicit > basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) > : __istream_type(), _M_filebuf() > { > this->init(&_M_filebuf); > this->open(__s, __mode); > } ># 568 "/usr/include/c++/13/fstream" 3 > explicit > basic_ifstream(const std::string& __s, > ios_base::openmode __mode = ios_base::in) > : __istream_type(), _M_filebuf() > { > this->init(&_M_filebuf); > this->open(__s, __mode); > } ># 585 "/usr/include/c++/13/fstream" 3 > template<typename _Path, typename _Require = _If_fs_path<_Path>> > basic_ifstream(const _Path& __s, > ios_base::openmode __mode = ios_base::in) > : basic_ifstream(__s.c_str(), __mode) > { } > > > basic_ifstream(const basic_ifstream&) = delete; > > basic_ifstream(basic_ifstream&& __rhs) > : __istream_type(std::move(__rhs)), > _M_filebuf(std::move(__rhs._M_filebuf)) > { __istream_type::set_rdbuf(&_M_filebuf); } ># 606 "/usr/include/c++/13/fstream" 3 > ~basic_ifstream() > { } > > > > > basic_ifstream& > operator=(const basic_ifstream&) = delete; > > basic_ifstream& > operator=(basic_ifstream&& __rhs) > { > __istream_type::operator=(std::move(__rhs)); > _M_filebuf = std::move(__rhs._M_filebuf); > return *this; > } > > void > swap(basic_ifstream& __rhs) > { > __istream_type::swap(__rhs); > _M_filebuf.swap(__rhs._M_filebuf); > } ># 638 "/usr/include/c++/13/fstream" 3 > __filebuf_type* > rdbuf() const > { return const_cast<__filebuf_type*>(&_M_filebuf); } > > > > > > bool > is_open() > { return _M_filebuf.is_open(); } > > > > bool > is_open() const > { return _M_filebuf.is_open(); } ># 664 "/usr/include/c++/13/fstream" 3 > void > open(const char* __s, ios_base::openmode __mode = ios_base::in) > { > if (!_M_filebuf.open(__s, __mode | ios_base::in)) > this->setstate(ios_base::failbit); > else > > > this->clear(); > } ># 703 "/usr/include/c++/13/fstream" 3 > void > open(const std::string& __s, ios_base::openmode __mode = ios_base::in) > { > if (!_M_filebuf.open(__s, __mode | ios_base::in)) > this->setstate(ios_base::failbit); > else > > > this->clear(); > } ># 723 "/usr/include/c++/13/fstream" 3 > template<typename _Path> > _If_fs_path<_Path, void> > open(const _Path& __s, ios_base::openmode __mode = ios_base::in) > { open(__s.c_str(), __mode); } ># 736 "/usr/include/c++/13/fstream" 3 > void > close() > { > if (!_M_filebuf.close()) > this->setstate(ios_base::failbit); > } > }; ># 759 "/usr/include/c++/13/fstream" 3 > template<typename _CharT, typename _Traits> > class basic_ofstream : public basic_ostream<_CharT,_Traits> > { > 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_filebuf<char_type, traits_type> __filebuf_type; > typedef basic_ostream<char_type, traits_type> __ostream_type; > > private: > __filebuf_type _M_filebuf; > > public: ># 786 "/usr/include/c++/13/fstream" 3 > basic_ofstream(): __ostream_type(), _M_filebuf() > { this->init(&_M_filebuf); } ># 796 "/usr/include/c++/13/fstream" 3 > explicit > basic_ofstream(const char* __s, > ios_base::openmode __mode = ios_base::out) > : __ostream_type(), _M_filebuf() > { > this->init(&_M_filebuf); > this->open(__s, __mode); > } ># 831 "/usr/include/c++/13/fstream" 3 > explicit > basic_ofstream(const std::string& __s, > ios_base::openmode __mode = ios_base::out) > : __ostream_type(), _M_filebuf() > { > this->init(&_M_filebuf); > this->open(__s, __mode); > } ># 848 "/usr/include/c++/13/fstream" 3 > template<typename _Path, typename _Require = _If_fs_path<_Path>> > basic_ofstream(const _Path& __s, > ios_base::openmode __mode = ios_base::out) > : basic_ofstream(__s.c_str(), __mode) > { } > > > basic_ofstream(const basic_ofstream&) = delete; > > basic_ofstream(basic_ofstream&& __rhs) > : __ostream_type(std::move(__rhs)), > _M_filebuf(std::move(__rhs._M_filebuf)) > { __ostream_type::set_rdbuf(&_M_filebuf); } ># 869 "/usr/include/c++/13/fstream" 3 > ~basic_ofstream() > { } > > > > > basic_ofstream& > operator=(const basic_ofstream&) = delete; > > basic_ofstream& > operator=(basic_ofstream&& __rhs) > { > __ostream_type::operator=(std::move(__rhs)); > _M_filebuf = std::move(__rhs._M_filebuf); > return *this; > } > > void > swap(basic_ofstream& __rhs) > { > __ostream_type::swap(__rhs); > _M_filebuf.swap(__rhs._M_filebuf); > } ># 901 "/usr/include/c++/13/fstream" 3 > __filebuf_type* > rdbuf() const > { return const_cast<__filebuf_type*>(&_M_filebuf); } > > > > > > bool > is_open() > { return _M_filebuf.is_open(); } > > > > bool > is_open() const > { return _M_filebuf.is_open(); } ># 927 "/usr/include/c++/13/fstream" 3 > void > open(const char* __s, ios_base::openmode __mode = ios_base::out) > { > if (!_M_filebuf.open(__s, __mode | ios_base::out)) > this->setstate(ios_base::failbit); > else > > > this->clear(); > } ># 966 "/usr/include/c++/13/fstream" 3 > void > open(const std::string& __s, ios_base::openmode __mode = ios_base::out) > { > if (!_M_filebuf.open(__s, __mode | ios_base::out)) > this->setstate(ios_base::failbit); > else > > > this->clear(); > } ># 986 "/usr/include/c++/13/fstream" 3 > template<typename _Path> > _If_fs_path<_Path, void> > open(const _Path& __s, ios_base::openmode __mode = ios_base::out) > { open(__s.c_str(), __mode); } ># 999 "/usr/include/c++/13/fstream" 3 > void > close() > { > if (!_M_filebuf.close()) > this->setstate(ios_base::failbit); > } > }; ># 1022 "/usr/include/c++/13/fstream" 3 > template<typename _CharT, typename _Traits> > class basic_fstream : public basic_iostream<_CharT, _Traits> > { > 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_filebuf<char_type, traits_type> __filebuf_type; > typedef basic_ios<char_type, traits_type> __ios_type; > typedef basic_iostream<char_type, traits_type> __iostream_type; > > private: > __filebuf_type _M_filebuf; > > public: ># 1050 "/usr/include/c++/13/fstream" 3 > basic_fstream() > : __iostream_type(), _M_filebuf() > { this->init(&_M_filebuf); } > > > > > > > explicit > basic_fstream(const char* __s, > ios_base::openmode __mode = ios_base::in | ios_base::out) > : __iostream_type(0), _M_filebuf() > { > this->init(&_M_filebuf); > this->open(__s, __mode); > } ># 1089 "/usr/include/c++/13/fstream" 3 > explicit > basic_fstream(const std::string& __s, > ios_base::openmode __mode = ios_base::in | ios_base::out) > : __iostream_type(0), _M_filebuf() > { > this->init(&_M_filebuf); > this->open(__s, __mode); > } > > > > > > > > template<typename _Path, typename _Require = _If_fs_path<_Path>> > basic_fstream(const _Path& __s, > ios_base::openmode __mode = ios_base::in | ios_base::out) > : basic_fstream(__s.c_str(), __mode) > { } > > > basic_fstream(const basic_fstream&) = delete; > > basic_fstream(basic_fstream&& __rhs) > : __iostream_type(std::move(__rhs)), > _M_filebuf(std::move(__rhs._M_filebuf)) > { __iostream_type::set_rdbuf(&_M_filebuf); } ># 1125 "/usr/include/c++/13/fstream" 3 > ~basic_fstream() > { } > > > > > basic_fstream& > operator=(const basic_fstream&) = delete; > > basic_fstream& > operator=(basic_fstream&& __rhs) > { > __iostream_type::operator=(std::move(__rhs)); > _M_filebuf = std::move(__rhs._M_filebuf); > return *this; > } > > void > swap(basic_fstream& __rhs) > { > __iostream_type::swap(__rhs); > _M_filebuf.swap(__rhs._M_filebuf); > } ># 1157 "/usr/include/c++/13/fstream" 3 > __filebuf_type* > rdbuf() const > { return const_cast<__filebuf_type*>(&_M_filebuf); } > > > > > > bool > is_open() > { return _M_filebuf.is_open(); } > > > > bool > is_open() const > { return _M_filebuf.is_open(); } ># 1183 "/usr/include/c++/13/fstream" 3 > void > open(const char* __s, > ios_base::openmode __mode = ios_base::in | ios_base::out) > { > if (!_M_filebuf.open(__s, __mode)) > this->setstate(ios_base::failbit); > else > > > this->clear(); > } ># 1224 "/usr/include/c++/13/fstream" 3 > void > open(const std::string& __s, > ios_base::openmode __mode = ios_base::in | ios_base::out) > { > if (!_M_filebuf.open(__s, __mode)) > this->setstate(ios_base::failbit); > else > > > this->clear(); > } ># 1245 "/usr/include/c++/13/fstream" 3 > template<typename _Path> > _If_fs_path<_Path, void> > open(const _Path& __s, > ios_base::openmode __mode = ios_base::in | ios_base::out) > { open(__s.c_str(), __mode); } ># 1259 "/usr/include/c++/13/fstream" 3 > void > close() > { > if (!_M_filebuf.close()) > this->setstate(ios_base::failbit); > } > }; > > > > template <class _CharT, class _Traits> > inline void > swap(basic_filebuf<_CharT, _Traits>& __x, > basic_filebuf<_CharT, _Traits>& __y) > { __x.swap(__y); } > > > template <class _CharT, class _Traits> > inline void > swap(basic_ifstream<_CharT, _Traits>& __x, > basic_ifstream<_CharT, _Traits>& __y) > { __x.swap(__y); } > > > template <class _CharT, class _Traits> > inline void > swap(basic_ofstream<_CharT, _Traits>& __x, > basic_ofstream<_CharT, _Traits>& __y) > { __x.swap(__y); } > > > template <class _CharT, class _Traits> > inline void > swap(basic_fstream<_CharT, _Traits>& __x, > basic_fstream<_CharT, _Traits>& __y) > { __x.swap(__y); } > > > >} > ># 1 "/usr/include/c++/13/bits/fstream.tcc" 1 3 ># 37 "/usr/include/c++/13/bits/fstream.tcc" 3 > ># 38 "/usr/include/c++/13/bits/fstream.tcc" 3 > > > ># 1 "/usr/include/c++/13/cerrno" 1 3 ># 39 "/usr/include/c++/13/cerrno" 3 > ># 40 "/usr/include/c++/13/cerrno" 3 ># 42 "/usr/include/c++/13/bits/fstream.tcc" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _CharT, typename _Traits> > void > basic_filebuf<_CharT, _Traits>:: > _M_allocate_internal_buffer() > { > > > if (!_M_buf_allocated && !_M_buf) > { > _M_buf = new char_type[_M_buf_size]; > _M_buf_allocated = true; > } > } > > template<typename _CharT, typename _Traits> > void > basic_filebuf<_CharT, _Traits>:: > _M_destroy_internal_buffer() throw() > { > if (_M_buf_allocated) > { > delete [] _M_buf; > _M_buf = 0; > _M_buf_allocated = false; > } > delete [] _M_ext_buf; > _M_ext_buf = 0; > _M_ext_buf_size = 0; > _M_ext_next = 0; > _M_ext_end = 0; > } > > template<typename _CharT, typename _Traits> > basic_filebuf<_CharT, _Traits>:: > basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock), > _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(), > _M_state_last(), _M_buf(0), _M_buf_size(8192), > _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(), > _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false), > _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0), > _M_ext_end(0) > { > _M_codecvt = std::__try_use_facet<__codecvt_type>(this->_M_buf_locale); > } > > > template<typename _CharT, typename _Traits> > basic_filebuf<_CharT, _Traits>:: > basic_filebuf(basic_filebuf&& __rhs) > : __streambuf_type(__rhs), > _M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock), > _M_mode(std::__exchange(__rhs._M_mode, ios_base::openmode(0))), > _M_state_beg(std::move(__rhs._M_state_beg)), > _M_state_cur(std::move(__rhs._M_state_cur)), > _M_state_last(std::move(__rhs._M_state_last)), > _M_buf(std::__exchange(__rhs._M_buf, nullptr)), > _M_buf_size(std::__exchange(__rhs._M_buf_size, 1)), > _M_buf_allocated(std::__exchange(__rhs._M_buf_allocated, false)), > _M_reading(std::__exchange(__rhs._M_reading, false)), > _M_writing(std::__exchange(__rhs._M_writing, false)), > _M_pback(__rhs._M_pback), > _M_pback_cur_save(std::__exchange(__rhs._M_pback_cur_save, nullptr)), > _M_pback_end_save(std::__exchange(__rhs._M_pback_end_save, nullptr)), > _M_pback_init(std::__exchange(__rhs._M_pback_init, false)), > _M_codecvt(__rhs._M_codecvt), > _M_ext_buf(std::__exchange(__rhs._M_ext_buf, nullptr)), > _M_ext_buf_size(std::__exchange(__rhs._M_ext_buf_size, 0)), > _M_ext_next(std::__exchange(__rhs._M_ext_next, nullptr)), > _M_ext_end(std::__exchange(__rhs._M_ext_end, nullptr)) > { > __rhs._M_set_buffer(-1); > __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg; > } > > template<typename _CharT, typename _Traits> > basic_filebuf<_CharT, _Traits>& > basic_filebuf<_CharT, _Traits>:: > operator=(basic_filebuf&& __rhs) > { > this->close(); > __streambuf_type::operator=(__rhs); > _M_file.swap(__rhs._M_file); > _M_mode = std::__exchange(__rhs._M_mode, ios_base::openmode(0)); > _M_state_beg = std::move(__rhs._M_state_beg); > _M_state_cur = std::move(__rhs._M_state_cur); > _M_state_last = std::move(__rhs._M_state_last); > _M_buf = std::__exchange(__rhs._M_buf, nullptr); > _M_buf_size = std::__exchange(__rhs._M_buf_size, 1); > _M_buf_allocated = std::__exchange(__rhs._M_buf_allocated, false); > _M_ext_buf = std::__exchange(__rhs._M_ext_buf, nullptr); > _M_ext_buf_size = std::__exchange(__rhs._M_ext_buf_size, 0); > _M_ext_next = std::__exchange(__rhs._M_ext_next, nullptr); > _M_ext_end = std::__exchange(__rhs._M_ext_end, nullptr); > _M_reading = std::__exchange(__rhs._M_reading, false); > _M_writing = std::__exchange(__rhs._M_writing, false); > _M_pback_cur_save = std::__exchange(__rhs._M_pback_cur_save, nullptr); > _M_pback_end_save = std::__exchange(__rhs._M_pback_end_save, nullptr); > _M_pback_init = std::__exchange(__rhs._M_pback_init, false); > __rhs._M_set_buffer(-1); > __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg; > return *this; > } > > template<typename _CharT, typename _Traits> > void > basic_filebuf<_CharT, _Traits>:: > swap(basic_filebuf& __rhs) > { > __streambuf_type::swap(__rhs); > _M_file.swap(__rhs._M_file); > std::swap(_M_mode, __rhs._M_mode); > std::swap(_M_state_beg, __rhs._M_state_beg); > std::swap(_M_state_cur, __rhs._M_state_cur); > std::swap(_M_state_last, __rhs._M_state_last); > std::swap(_M_buf, __rhs._M_buf); > std::swap(_M_buf_size, __rhs._M_buf_size); > std::swap(_M_buf_allocated, __rhs._M_buf_allocated); > std::swap(_M_ext_buf, __rhs._M_ext_buf); > std::swap(_M_ext_buf_size, __rhs._M_ext_buf_size); > std::swap(_M_ext_next, __rhs._M_ext_next); > std::swap(_M_ext_end, __rhs._M_ext_end); > std::swap(_M_reading, __rhs._M_reading); > std::swap(_M_writing, __rhs._M_writing); > std::swap(_M_pback_cur_save, __rhs._M_pback_cur_save); > std::swap(_M_pback_end_save, __rhs._M_pback_end_save); > std::swap(_M_pback_init, __rhs._M_pback_init); > } > > > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::__filebuf_type* > basic_filebuf<_CharT, _Traits>:: > open(const char* __s, ios_base::openmode __mode) > { > __filebuf_type *__ret = 0; > if (!this->is_open()) > { > _M_file.open(__s, __mode); > if (this->is_open()) > { > _M_allocate_internal_buffer(); > _M_mode = __mode; > > > _M_reading = false; > _M_writing = false; > _M_set_buffer(-1); > > > _M_state_last = _M_state_cur = _M_state_beg; > > > if ((__mode & ios_base::ate) > && this->seekoff(0, ios_base::end, __mode) > == pos_type(off_type(-1))) > this->close(); > else > __ret = this; > } > } > return __ret; > } ># 246 "/usr/include/c++/13/bits/fstream.tcc" 3 > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::__filebuf_type* > basic_filebuf<_CharT, _Traits>:: > close() > { > if (!this->is_open()) > return 0; > > bool __testfail = false; > { > > struct __close_sentry > { > basic_filebuf *__fb; > __close_sentry (basic_filebuf *__fbi): __fb(__fbi) { } > ~__close_sentry () > { > __fb->_M_mode = ios_base::openmode(0); > __fb->_M_pback_init = false; > __fb->_M_destroy_internal_buffer(); > __fb->_M_reading = false; > __fb->_M_writing = false; > __fb->_M_set_buffer(-1); > __fb->_M_state_last = __fb->_M_state_cur = __fb->_M_state_beg; > } > } __cs (this); > > try > { > if (!_M_terminate_output()) > __testfail = true; > } > catch(...) > { > _M_file.close(); > throw; > } > } > > if (!_M_file.close()) > __testfail = true; > > if (__testfail) > return 0; > else > return this; > } > > template<typename _CharT, typename _Traits> > streamsize > basic_filebuf<_CharT, _Traits>:: > showmanyc() > { > streamsize __ret = -1; > const bool __testin = _M_mode & ios_base::in; > if (__testin && this->is_open()) > { > > > __ret = this->egptr() - this->gptr(); > > > > > > > > if (__check_facet(_M_codecvt).encoding() >= 0) > > __ret += _M_file.showmanyc() / _M_codecvt->max_length(); > } > return __ret; > } > > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::int_type > basic_filebuf<_CharT, _Traits>:: > underflow() > { > int_type __ret = traits_type::eof(); > const bool __testin = _M_mode & ios_base::in; > if (__testin) > { > if (_M_writing) > { > if (overflow() == traits_type::eof()) > return __ret; > _M_set_buffer(-1); > _M_writing = false; > } > > > > _M_destroy_pback(); > > if (this->gptr() < this->egptr()) > return traits_type::to_int_type(*this->gptr()); > > > const size_t __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1; > > > bool __got_eof = false; > > streamsize __ilen = 0; > codecvt_base::result __r = codecvt_base::ok; > if (__check_facet(_M_codecvt).always_noconv()) > { > __ilen = _M_file.xsgetn(reinterpret_cast<char*>(this->eback()), > __buflen); > if (__ilen == 0) > __got_eof = true; > } > else > { > > > const int __enc = _M_codecvt->encoding(); > streamsize __blen; > streamsize __rlen; > if (__enc > 0) > __blen = __rlen = __buflen * __enc; > else > { > __blen = __buflen + _M_codecvt->max_length() - 1; > __rlen = __buflen; > } > const streamsize __remainder = _M_ext_end - _M_ext_next; > __rlen = __rlen > __remainder ? __rlen - __remainder : 0; > > > > if (_M_reading && this->egptr() == this->eback() && __remainder) > __rlen = 0; > > > > if (_M_ext_buf_size < __blen) > { > char* __buf = new char[__blen]; > if (__remainder) > __builtin_memcpy(__buf, _M_ext_next, __remainder); > > delete [] _M_ext_buf; > _M_ext_buf = __buf; > _M_ext_buf_size = __blen; > } > else if (__remainder) > __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder); > > _M_ext_next = _M_ext_buf; > _M_ext_end = _M_ext_buf + __remainder; > _M_state_last = _M_state_cur; > > do > { > if (__rlen > 0) > { > > > > if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size) > { > __throw_ios_failure(("basic_filebuf::underflow " "codecvt::max_length() " "is not valid") > > ); > } > streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen); > if (__elen == 0) > __got_eof = true; > else if (__elen == -1) > break; > _M_ext_end += __elen; > } > > char_type* __iend = this->eback(); > if (_M_ext_next < _M_ext_end) > __r = _M_codecvt->in(_M_state_cur, _M_ext_next, > _M_ext_end, _M_ext_next, > this->eback(), > this->eback() + __buflen, __iend); > if (__r == codecvt_base::noconv) > { > size_t __avail = _M_ext_end - _M_ext_buf; > __ilen = std::min(__avail, __buflen); > traits_type::copy(this->eback(), > reinterpret_cast<char_type*> > (_M_ext_buf), __ilen); > _M_ext_next = _M_ext_buf + __ilen; > } > else > __ilen = __iend - this->eback(); > > > > > if (__r == codecvt_base::error) > break; > > __rlen = 1; > } > while (__ilen == 0 && !__got_eof); > } > > if (__ilen > 0) > { > _M_set_buffer(__ilen); > _M_reading = true; > __ret = traits_type::to_int_type(*this->gptr()); > } > else if (__got_eof) > { > > > > _M_set_buffer(-1); > _M_reading = false; > > > if (__r == codecvt_base::partial) > __throw_ios_failure(("basic_filebuf::underflow " "incomplete character in file") > ); > } > else if (__r == codecvt_base::error) > __throw_ios_failure(("basic_filebuf::underflow " "invalid byte sequence in file") > ); > else > __throw_ios_failure(("basic_filebuf::underflow " "error reading the file") > , (*__errno_location ())); > } > return __ret; > } > > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::int_type > basic_filebuf<_CharT, _Traits>:: > pbackfail(int_type __i) > { > int_type __ret = traits_type::eof(); > const bool __testin = _M_mode & ios_base::in; > if (__testin) > { > if (_M_writing) > { > if (overflow() == traits_type::eof()) > return __ret; > _M_set_buffer(-1); > _M_writing = false; > } > > > const bool __testpb = _M_pback_init; > const bool __testeof = traits_type::eq_int_type(__i, __ret); > int_type __tmp; > if (this->eback() < this->gptr()) > { > this->gbump(-1); > __tmp = traits_type::to_int_type(*this->gptr()); > } > else if (this->seekoff(-1, ios_base::cur) != pos_type(off_type(-1))) > { > __tmp = this->underflow(); > if (traits_type::eq_int_type(__tmp, __ret)) > return __ret; > } > else > { > > > > > > return __ret; > } > > > > if (!__testeof && traits_type::eq_int_type(__i, __tmp)) > __ret = __i; > else if (__testeof) > __ret = traits_type::not_eof(__i); > else if (!__testpb) > { > _M_create_pback(); > _M_reading = true; > *this->gptr() = traits_type::to_char_type(__i); > __ret = __i; > } > } > return __ret; > } > > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::int_type > basic_filebuf<_CharT, _Traits>:: > overflow(int_type __c) > { > int_type __ret = traits_type::eof(); > const bool __testeof = traits_type::eq_int_type(__c, __ret); > const bool __testout = (_M_mode & ios_base::out > || _M_mode & ios_base::app); > if (__testout) > { > if (_M_reading) > { > _M_destroy_pback(); > const int __gptr_off = _M_get_ext_pos(_M_state_last); > if (_M_seek(__gptr_off, ios_base::cur, _M_state_last) > == pos_type(off_type(-1))) > return __ret; > } > if (this->pbase() < this->pptr()) > { > > if (!__testeof) > { > *this->pptr() = traits_type::to_char_type(__c); > this->pbump(1); > } > > > > if (_M_convert_to_external(this->pbase(), > this->pptr() - this->pbase())) > { > _M_set_buffer(0); > __ret = traits_type::not_eof(__c); > } > } > else if (_M_buf_size > 1) > { > > > > _M_set_buffer(0); > _M_writing = true; > if (!__testeof) > { > *this->pptr() = traits_type::to_char_type(__c); > this->pbump(1); > } > __ret = traits_type::not_eof(__c); > } > else > { > > char_type __conv = traits_type::to_char_type(__c); > if (__testeof || _M_convert_to_external(&__conv, 1)) > { > _M_writing = true; > __ret = traits_type::not_eof(__c); > } > } > } > return __ret; > } > > template<typename _CharT, typename _Traits> > bool > basic_filebuf<_CharT, _Traits>:: > _M_convert_to_external(_CharT* __ibuf, streamsize __ilen) > { > > streamsize __elen; > streamsize __plen; > if (__check_facet(_M_codecvt).always_noconv()) > { > __elen = _M_file.xsputn(reinterpret_cast<char*>(__ibuf), __ilen); > __plen = __ilen; > } > else > { > > > streamsize __blen = __ilen * _M_codecvt->max_length(); > char* __buf = static_cast<char*>(__builtin_alloca(__blen)); > > char* __bend; > const char_type* __iend; > codecvt_base::result __r; > __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen, > __iend, __buf, __buf + __blen, __bend); > > if (__r == codecvt_base::ok || __r == codecvt_base::partial) > __blen = __bend - __buf; > else if (__r == codecvt_base::noconv) > { > > __buf = reinterpret_cast<char*>(__ibuf); > __blen = __ilen; > } > else > __throw_ios_failure(("basic_filebuf::_M_convert_to_external " "conversion error") > ); > > __elen = _M_file.xsputn(__buf, __blen); > __plen = __blen; > > > if (__r == codecvt_base::partial && __elen == __plen) > { > const char_type* __iresume = __iend; > streamsize __rlen = this->pptr() - __iend; > __r = _M_codecvt->out(_M_state_cur, __iresume, > __iresume + __rlen, __iend, __buf, > __buf + __blen, __bend); > if (__r != codecvt_base::error) > { > __rlen = __bend - __buf; > __elen = _M_file.xsputn(__buf, __rlen); > __plen = __rlen; > } > else > __throw_ios_failure(("basic_filebuf::_M_convert_to_external " "conversion error") > ); > } > } > return __elen == __plen; > } > > template<typename _CharT, typename _Traits> > streamsize > basic_filebuf<_CharT, _Traits>:: > xsgetn(_CharT* __s, streamsize __n) > { > > streamsize __ret = 0; > if (_M_pback_init) > { > if (__n > 0 && this->gptr() == this->eback()) > { > *__s++ = *this->gptr(); > this->gbump(1); > __ret = 1; > --__n; > } > _M_destroy_pback(); > } > else if (_M_writing) > { > if (overflow() == traits_type::eof()) > return __ret; > _M_set_buffer(-1); > _M_writing = false; > } > > > > > const bool __testin = _M_mode & ios_base::in; > const streamsize __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1; > > if (__n > __buflen && __check_facet(_M_codecvt).always_noconv() > && __testin) > { > > const streamsize __avail = this->egptr() - this->gptr(); > if (__avail != 0) > { > traits_type::copy(__s, this->gptr(), __avail); > __s += __avail; > this->setg(this->eback(), this->gptr() + __avail, this->egptr()); > __ret += __avail; > __n -= __avail; > } > > > > streamsize __len; > for (;;) > { > __len = _M_file.xsgetn(reinterpret_cast<char*>(__s), __n); > if (__len == -1) > __throw_ios_failure(("basic_filebuf::xsgetn " "error reading the file") > , (*__errno_location ())); > if (__len == 0) > break; > > __n -= __len; > __ret += __len; > if (__n == 0) > break; > > __s += __len; > } > > if (__n == 0) > { > > _M_reading = true; > } > else if (__len == 0) > { > > > > _M_set_buffer(-1); > _M_reading = false; > } > } > else > __ret += __streambuf_type::xsgetn(__s, __n); > > return __ret; > } > > template<typename _CharT, typename _Traits> > streamsize > basic_filebuf<_CharT, _Traits>:: > xsputn(const _CharT* __s, streamsize __n) > { > streamsize __ret = 0; > > > > const bool __testout = (_M_mode & ios_base::out > || _M_mode & ios_base::app); > if (__check_facet(_M_codecvt).always_noconv() > && __testout && !_M_reading) > { > streamsize __bufavail = this->epptr() - this->pptr(); > > > if (!_M_writing && _M_buf_size > 1) > __bufavail = _M_buf_size - 1; > > if (__n >= __bufavail) > { > const streamsize __buffill = this->pptr() - this->pbase(); > const char* __buf = reinterpret_cast<const char*>(this->pbase()); > __ret = _M_file.xsputn_2(__buf, __buffill, > reinterpret_cast<const char*>(__s), > __n); > if (__ret == __buffill + __n) > { > _M_set_buffer(0); > _M_writing = true; > } > if (__ret > __buffill) > __ret -= __buffill; > else > __ret = 0; > } > else > __ret = __streambuf_type::xsputn(__s, __n); > } > else > __ret = __streambuf_type::xsputn(__s, __n); > return __ret; > } > > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::__streambuf_type* > basic_filebuf<_CharT, _Traits>:: > setbuf(char_type* __s, streamsize __n) > { > if (!this->is_open()) > { > if (__s == 0 && __n == 0) > _M_buf_size = 1; > else if (__s && __n > 0) > { ># 816 "/usr/include/c++/13/bits/fstream.tcc" 3 > _M_buf = __s; > _M_buf_size = __n; > } > } > return this; > } > > > > > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::pos_type > basic_filebuf<_CharT, _Traits>:: > seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode) > { > int __width = 0; > if (_M_codecvt) > __width = _M_codecvt->encoding(); > if (__width < 0) > __width = 0; > > pos_type __ret = pos_type(off_type(-1)); > const bool __testfail = __off != 0 && __width <= 0; > if (this->is_open() && !__testfail) > { > > > > > bool __no_movement = __way == ios_base::cur && __off == 0 > && (!_M_writing || _M_codecvt->always_noconv()); > > > if (!__no_movement) > _M_destroy_pback(); > > > > > > > __state_type __state = _M_state_beg; > off_type __computed_off = __off * __width; > if (_M_reading && __way == ios_base::cur) > { > __state = _M_state_last; > __computed_off += _M_get_ext_pos(__state); > } > if (!__no_movement) > __ret = _M_seek(__computed_off, __way, __state); > else > { > if (_M_writing) > __computed_off = this->pptr() - this->pbase(); > > off_type __file_off = _M_file.seekoff(0, ios_base::cur); > if (__file_off != off_type(-1)) > { > __ret = __file_off + __computed_off; > __ret.state(__state); > } > } > } > return __ret; > } > > > > > > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::pos_type > basic_filebuf<_CharT, _Traits>:: > seekpos(pos_type __pos, ios_base::openmode) > { > pos_type __ret = pos_type(off_type(-1)); > if (this->is_open()) > { > > _M_destroy_pback(); > __ret = _M_seek(off_type(__pos), ios_base::beg, __pos.state()); > } > return __ret; > } > > template<typename _CharT, typename _Traits> > typename basic_filebuf<_CharT, _Traits>::pos_type > basic_filebuf<_CharT, _Traits>:: > _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state) > { > pos_type __ret = pos_type(off_type(-1)); > if (_M_terminate_output()) > { > off_type __file_off = _M_file.seekoff(__off, __way); > if (__file_off != off_type(-1)) > { > _M_reading = false; > _M_writing = false; > _M_ext_next = _M_ext_end = _M_ext_buf; > _M_set_buffer(-1); > _M_state_cur = __state; > __ret = __file_off; > __ret.state(_M_state_cur); > } > } > return __ret; > } > > > > > template<typename _CharT, typename _Traits> > int basic_filebuf<_CharT, _Traits>:: > _M_get_ext_pos(__state_type& __state) > { > if (_M_codecvt->always_noconv()) > return this->gptr() - this->egptr(); > else > { > > > > const int __gptr_off = > _M_codecvt->length(__state, _M_ext_buf, _M_ext_next, > this->gptr() - this->eback()); > return _M_ext_buf + __gptr_off - _M_ext_end; > } > } > > template<typename _CharT, typename _Traits> > bool > basic_filebuf<_CharT, _Traits>:: > _M_terminate_output() > { > > bool __testvalid = true; > if (this->pbase() < this->pptr()) > { > const int_type __tmp = this->overflow(); > if (traits_type::eq_int_type(__tmp, traits_type::eof())) > __testvalid = false; > } > > > if (_M_writing && !__check_facet(_M_codecvt).always_noconv() > && __testvalid) > { > > > > const size_t __blen = 128; > char __buf[__blen]; > codecvt_base::result __r; > streamsize __ilen = 0; > > do > { > char* __next; > __r = _M_codecvt->unshift(_M_state_cur, __buf, > __buf + __blen, __next); > if (__r == codecvt_base::error) > __testvalid = false; > else if (__r == codecvt_base::ok || > __r == codecvt_base::partial) > { > __ilen = __next - __buf; > if (__ilen > 0) > { > const streamsize __elen = _M_file.xsputn(__buf, __ilen); > if (__elen != __ilen) > __testvalid = false; > } > } > } > while (__r == codecvt_base::partial && __ilen > 0 && __testvalid); > > if (__testvalid) > { > > > > > const int_type __tmp = this->overflow(); > if (traits_type::eq_int_type(__tmp, traits_type::eof())) > __testvalid = false; > } > } > return __testvalid; > } > > template<typename _CharT, typename _Traits> > int > basic_filebuf<_CharT, _Traits>:: > sync() > { > > > int __ret = 0; > if (this->pbase() < this->pptr()) > { > const int_type __tmp = this->overflow(); > if (traits_type::eq_int_type(__tmp, traits_type::eof())) > __ret = -1; > } > return __ret; > } > > template<typename _CharT, typename _Traits> > void > basic_filebuf<_CharT, _Traits>:: > imbue(const locale& __loc) > { > bool __testvalid = true; > > const __codecvt_type* const _M_codecvt_tmp > = __try_use_facet<__codecvt_type>(__loc); > > if (this->is_open()) > { > > if ((_M_reading || _M_writing) > && __check_facet(_M_codecvt).encoding() == -1) > __testvalid = false; > else > { > if (_M_reading) > { > if (__check_facet(_M_codecvt).always_noconv()) > { > if (_M_codecvt_tmp > && !__check_facet(_M_codecvt_tmp).always_noconv()) > __testvalid = this->seekoff(0, ios_base::cur, _M_mode) > != pos_type(off_type(-1)); > } > else > { > > _M_ext_next = _M_ext_buf > + _M_codecvt->length(_M_state_last, _M_ext_buf, > _M_ext_next, > this->gptr() - this->eback()); > const streamsize __remainder = _M_ext_end - _M_ext_next; > if (__remainder) > __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder); > > _M_ext_next = _M_ext_buf; > _M_ext_end = _M_ext_buf + __remainder; > _M_set_buffer(-1); > _M_state_last = _M_state_cur = _M_state_beg; > } > } > else if (_M_writing && (__testvalid = _M_terminate_output())) > _M_set_buffer(-1); > } > } > > if (__testvalid) > _M_codecvt = _M_codecvt_tmp; > else > _M_codecvt = 0; > } > > > > > extern template class basic_filebuf<char>; > extern template class basic_ifstream<char>; > extern template class basic_ofstream<char>; > extern template class basic_fstream<char>; > > > extern template class basic_filebuf<wchar_t>; > extern template class basic_ifstream<wchar_t>; > extern template class basic_ofstream<wchar_t>; > extern template class basic_fstream<wchar_t>; > > > > >} ># 1301 "/usr/include/c++/13/fstream" 2 3 ># 5 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 2 ># 1 "/usr/include/c++/13/regex" 1 3 ># 32 "/usr/include/c++/13/regex" 3 > ># 33 "/usr/include/c++/13/regex" 3 > > > > > > > ># 1 "/usr/include/c++/13/bitset" 1 3 ># 45 "/usr/include/c++/13/bitset" 3 > ># 46 "/usr/include/c++/13/bitset" 3 ># 68 "/usr/include/c++/13/bitset" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 82 "/usr/include/c++/13/bitset" 3 > template<size_t _Nw> > struct _Base_bitset > { > typedef unsigned long _WordT; > > > _WordT _M_w[_Nw]; > > constexpr _Base_bitset() noexcept > : _M_w() { } > > > constexpr _Base_bitset(unsigned long long __val) noexcept > : _M_w{ _WordT(__val) > > > > } { } > > > > > > > static constexpr size_t > _S_whichword(size_t __pos) noexcept > { return __pos / (8 * 8); } > > static constexpr size_t > _S_whichbyte(size_t __pos) noexcept > { return (__pos % (8 * 8)) / 8; } > > static constexpr size_t > _S_whichbit(size_t __pos) noexcept > { return __pos % (8 * 8); } > > static constexpr _WordT > _S_maskbit(size_t __pos) noexcept > { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } > > constexpr _WordT& > _M_getword(size_t __pos) noexcept > { return _M_w[_S_whichword(__pos)]; } > > constexpr _WordT > _M_getword(size_t __pos) const noexcept > { return _M_w[_S_whichword(__pos)]; } > > > constexpr const _WordT* > _M_getdata() const noexcept > { return _M_w; } > > > _WordT& > _M_hiword() noexcept > { return _M_w[_Nw - 1]; } > > constexpr _WordT > _M_hiword() const noexcept > { return _M_w[_Nw - 1]; } > > void > _M_do_and(const _Base_bitset<_Nw>& __x) noexcept > { > for (size_t __i = 0; __i < _Nw; __i++) > _M_w[__i] &= __x._M_w[__i]; > } > > constexpr void > _M_do_or(const _Base_bitset<_Nw>& __x) noexcept > { > for (size_t __i = 0; __i < _Nw; __i++) > _M_w[__i] |= __x._M_w[__i]; > } > > constexpr void > _M_do_xor(const _Base_bitset<_Nw>& __x) noexcept > { > for (size_t __i = 0; __i < _Nw; __i++) > _M_w[__i] ^= __x._M_w[__i]; > } > > 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 > { > for (size_t __i = 0; __i < _Nw; __i++) > _M_w[__i] = ~_M_w[__i]; > } > > constexpr void > _M_do_set() noexcept > { > for (size_t __i = 0; __i < _Nw; __i++) > _M_w[__i] = ~static_cast<_WordT>(0); > } > > constexpr void > _M_do_reset() noexcept > { > > if (__builtin_is_constant_evaluated()) > { > for (_WordT& __w : _M_w) > __w = 0; > return; > } > > __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); > } > > constexpr bool > _M_is_equal(const _Base_bitset<_Nw>& __x) const noexcept > { > for (size_t __i = 0; __i < _Nw; ++__i) > if (_M_w[__i] != __x._M_w[__i]) > return false; > return true; > } > > template<size_t _Nb> > constexpr bool > _M_are_all() const noexcept > { > for (size_t __i = 0; __i < _Nw - 1; __i++) > if (_M_w[__i] != ~static_cast<_WordT>(0)) > return false; > return _M_hiword() == (~static_cast<_WordT>(0) > >> (_Nw * (8 * 8) > - _Nb)); > } > > constexpr bool > _M_is_any() const noexcept > { > for (size_t __i = 0; __i < _Nw; __i++) > if (_M_w[__i] != static_cast<_WordT>(0)) > return true; > return false; > } > > constexpr size_t > _M_do_count() const noexcept > { > size_t __result = 0; > for (size_t __i = 0; __i < _Nw; __i++) > __result += __builtin_popcountl(_M_w[__i]); > return __result; > } > > 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<size_t _Nw> > constexpr void > _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) noexcept > { > if (__builtin_expect(__shift != 0, 1)) > { > const size_t __wshift = __shift / (8 * 8); > const size_t __offset = __shift % (8 * 8); > > if (__offset == 0) > for (size_t __n = _Nw - 1; __n >= __wshift; --__n) > _M_w[__n] = _M_w[__n - __wshift]; > else > { > const size_t __sub_offset = ((8 * 8) > - __offset); > for (size_t __n = _Nw - 1; __n > __wshift; --__n) > _M_w[__n] = ((_M_w[__n - __wshift] << __offset) > | (_M_w[__n - __wshift - 1] >> __sub_offset)); > _M_w[__wshift] = _M_w[0] << __offset; > } > > std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0)); > } > } > > template<size_t _Nw> > constexpr void > _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) noexcept > { > if (__builtin_expect(__shift != 0, 1)) > { > const size_t __wshift = __shift / (8 * 8); > const size_t __offset = __shift % (8 * 8); > const size_t __limit = _Nw - __wshift - 1; > > if (__offset == 0) > for (size_t __n = 0; __n <= __limit; ++__n) > _M_w[__n] = _M_w[__n + __wshift]; > else > { > const size_t __sub_offset = ((8 * 8) > - __offset); > for (size_t __n = 0; __n < __limit; ++__n) > _M_w[__n] = ((_M_w[__n + __wshift] >> __offset) > | (_M_w[__n + __wshift + 1] << __sub_offset)); > _M_w[__limit] = _M_w[_Nw-1] >> __offset; > } > > std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0)); > } > } > > template<size_t _Nw> > constexpr unsigned long > _Base_bitset<_Nw>::_M_do_to_ulong() const > { > for (size_t __i = 1; __i < _Nw; ++__i) > if (_M_w[__i]) > __throw_overflow_error(("_Base_bitset::_M_do_to_ulong")); > return _M_w[0]; > } > > > template<size_t _Nw> > constexpr unsigned long long > _Base_bitset<_Nw>::_M_do_to_ullong() const > { > const bool __dw = sizeof(unsigned long long) > sizeof(unsigned long); > for (size_t __i = 1 + __dw; __i < _Nw; ++__i) > if (_M_w[__i]) > __throw_overflow_error(("_Base_bitset::_M_do_to_ullong")); > > if (__dw) > return _M_w[0] + (static_cast<unsigned long long>(_M_w[1]) > << (8 * 8)); > return _M_w[0]; > } > > > template<size_t _Nw> > constexpr size_t > _Base_bitset<_Nw>:: > _M_do_find_first(size_t __not_found) const noexcept > { > for (size_t __i = 0; __i < _Nw; __i++) > { > _WordT __thisword = _M_w[__i]; > if (__thisword != static_cast<_WordT>(0)) > return (__i * (8 * 8) > + __builtin_ctzl(__thisword)); > } > > return __not_found; > } > > template<size_t _Nw> > constexpr size_t > _Base_bitset<_Nw>:: > _M_do_find_next(size_t __prev, size_t __not_found) const noexcept > { > > ++__prev; > > > if (__prev >= _Nw * (8 * 8)) > return __not_found; > > > size_t __i = _S_whichword(__prev); > _WordT __thisword = _M_w[__i]; > > > __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev); > > if (__thisword != static_cast<_WordT>(0)) > return (__i * (8 * 8) > + __builtin_ctzl(__thisword)); > > > __i++; > for (; __i < _Nw; __i++) > { > __thisword = _M_w[__i]; > if (__thisword != static_cast<_WordT>(0)) > return (__i * (8 * 8) > + __builtin_ctzl(__thisword)); > } > > return __not_found; > } > > > > > > > template<> > struct _Base_bitset<1> > { > typedef unsigned long _WordT; > _WordT _M_w; > > constexpr _Base_bitset() noexcept > : _M_w(0) > { } > > > constexpr _Base_bitset(unsigned long long __val) noexcept > > > > : _M_w(__val) > { } > > static constexpr size_t > _S_whichword(size_t __pos) noexcept > { return __pos / (8 * 8); } > > static constexpr size_t > _S_whichbyte(size_t __pos) noexcept > { return (__pos % (8 * 8)) / 8; } > > static constexpr size_t > _S_whichbit(size_t __pos) noexcept > { return __pos % (8 * 8); } > > static constexpr _WordT > _S_maskbit(size_t __pos) noexcept > { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } > > constexpr _WordT& > _M_getword(size_t) noexcept > { return _M_w; } > > constexpr _WordT > _M_getword(size_t) const noexcept > { return _M_w; } > > > constexpr const _WordT* > _M_getdata() const noexcept > { return &_M_w; } > > > constexpr _WordT& > _M_hiword() noexcept > { return _M_w; } > > constexpr _WordT > _M_hiword() const noexcept > { return _M_w; } > > constexpr void > _M_do_and(const _Base_bitset<1>& __x) noexcept > { _M_w &= __x._M_w; } > > constexpr void > _M_do_or(const _Base_bitset<1>& __x) noexcept > { _M_w |= __x._M_w; } > > constexpr void > _M_do_xor(const _Base_bitset<1>& __x) noexcept > { _M_w ^= __x._M_w; } > > constexpr void > _M_do_left_shift(size_t __shift) noexcept > { _M_w <<= __shift; } > > constexpr void > _M_do_right_shift(size_t __shift) noexcept > { _M_w >>= __shift; } > > constexpr void > _M_do_flip() noexcept > { _M_w = ~_M_w; } > > constexpr void > _M_do_set() noexcept > { _M_w = ~static_cast<_WordT>(0); } > > constexpr void > _M_do_reset() noexcept > { _M_w = 0; } > > constexpr bool > _M_is_equal(const _Base_bitset<1>& __x) const noexcept > { return _M_w == __x._M_w; } > > template<size_t _Nb> > constexpr bool > _M_are_all() const noexcept > { return _M_w == (~static_cast<_WordT>(0) > >> ((8 * 8) - _Nb)); } > > constexpr bool > _M_is_any() const noexcept > { return _M_w != 0; } > > constexpr size_t > _M_do_count() const noexcept > { return __builtin_popcountl(_M_w); } > > constexpr unsigned long > _M_do_to_ulong() const noexcept > { return _M_w; } > > > constexpr unsigned long long > _M_do_to_ullong() const noexcept > { return _M_w; } > > > constexpr size_t > _M_do_find_first(size_t __not_found) const noexcept > { > if (_M_w != 0) > return __builtin_ctzl(_M_w); > else > return __not_found; > } > > > constexpr size_t > _M_do_find_next(size_t __prev, size_t __not_found) const > noexcept > { > ++__prev; > if (__prev >= ((size_t) (8 * 8))) > return __not_found; > > _WordT __x = _M_w >> __prev; > if (__x != 0) > return __builtin_ctzl(__x) + __prev; > else > return __not_found; > } > }; > > > > > > > template<> > struct _Base_bitset<0> > { > typedef unsigned long _WordT; > > constexpr _Base_bitset() noexcept > { } > > > constexpr _Base_bitset(unsigned long long) noexcept > > > > { } > > static constexpr size_t > _S_whichword(size_t __pos) noexcept > { return __pos / (8 * 8); } > > static constexpr size_t > _S_whichbyte(size_t __pos) noexcept > { return (__pos % (8 * 8)) / 8; } > > static constexpr size_t > _S_whichbit(size_t __pos) noexcept > { return __pos % (8 * 8); } > > static constexpr _WordT > _S_maskbit(size_t __pos) noexcept > { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } > > > > > > > > __attribute__((__noreturn__)) > _WordT& > _M_getword(size_t) noexcept > { __throw_out_of_range(("_Base_bitset::_M_getword")); } > > constexpr _WordT > _M_getword(size_t) const noexcept > { return 0; } > > constexpr _WordT > _M_hiword() const noexcept > { return 0; } > > constexpr void > _M_do_and(const _Base_bitset<0>&) noexcept > { } > > constexpr void > _M_do_or(const _Base_bitset<0>&) noexcept > { } > > constexpr void > _M_do_xor(const _Base_bitset<0>&) noexcept > { } > > constexpr void > _M_do_left_shift(size_t) noexcept > { } > > constexpr void > _M_do_right_shift(size_t) 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<0>&) const noexcept > { return true; } > > template<size_t _Nb> > constexpr bool > _M_are_all() const noexcept > { return true; } > > constexpr bool > _M_is_any() const noexcept > { return false; } > > constexpr size_t > _M_do_count() const noexcept > { return 0; } > > constexpr unsigned long > _M_do_to_ulong() const noexcept > { return 0; } > > > constexpr unsigned long long > _M_do_to_ullong() const noexcept > { return 0; } > > > > > constexpr size_t > _M_do_find_first(size_t) const noexcept > { return 0; } > > constexpr size_t > _M_do_find_next(size_t, size_t) const noexcept > { return 0; } > }; > > > > template<size_t _Extrabits> > struct _Sanitize > { > typedef unsigned long _WordT; > > static constexpr void > _S_do_sanitize(_WordT& __val) noexcept > { __val &= ~((~static_cast<_WordT>(0)) << _Extrabits); } > }; > > template<> > struct _Sanitize<0> > { > typedef unsigned long _WordT; > > static constexpr void > _S_do_sanitize(_WordT) noexcept { } > }; > > > template<size_t _Nb, bool = (_Nb < (8 * 8))> > struct _Sanitize_val > { > static constexpr unsigned long long > _S_do_sanitize_val(unsigned long long __val) > { return __val; } > }; > > template<size_t _Nb> > struct _Sanitize_val<_Nb, true> > { > static constexpr unsigned long long > _S_do_sanitize_val(unsigned long long __val) > { return __val & ~((~static_cast<unsigned long long>(0)) << _Nb); } > }; > > namespace __bitset > { > > template<typename _CharT> > using __string = std::basic_string<_CharT>; ># 730 "/usr/include/c++/13/bitset" 3 > } ># 796 "/usr/include/c++/13/bitset" 3 > 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; > > > template<class _CharT, class _Traits, class _Alloc> > > void > _M_check_initial_position(const std::basic_string<_CharT, _Traits, _Alloc>& __s, > size_t __position) const > { > if (__position > __s.size()) > __throw_out_of_range_fmt(("bitset::bitset: __position " "(which is %zu) > __s.size() " "(which is %zu)") > > , > __position, __s.size()); > } > > > > void _M_check(size_t __position, const char *__s) const > { > if (__position >= _Nb) > __throw_out_of_range_fmt(("%s: __position (which is %zu) " ">= _Nb (which is %zu)") > , > __s, __position, _Nb); > } > > > void > _M_do_sanitize() noexcept > { > typedef _Sanitize<_Nb % (8 * 8)> __sanitize_type; > __sanitize_type::_S_do_sanitize(this->_M_hiword()); > } > > > friend struct std::hash<bitset>; > > > public: ># 853 "/usr/include/c++/13/bitset" 3 > class reference > { > friend class bitset; > > _WordT* _M_wp; > size_t _M_bpos; > > > reference(); > > public: > > reference(bitset& __b, size_t __pos) noexcept > { > _M_wp = &__b._M_getword(__pos); > _M_bpos = _Base::_S_whichbit(__pos); > } > > > reference(const reference&) = default; > > > > > > ~reference() noexcept > { } > > > > reference& > operator=(bool __x) noexcept > { > if (__x) > *_M_wp |= _Base::_S_maskbit(_M_bpos); > else > *_M_wp &= ~_Base::_S_maskbit(_M_bpos); > return *this; > } > > > > reference& > operator=(const reference& __j) noexcept > { > if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos))) > *_M_wp |= _Base::_S_maskbit(_M_bpos); > else > *_M_wp &= ~_Base::_S_maskbit(_M_bpos); > return *this; > } > > > > bool > operator~() const noexcept > { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; } > > > > operator bool() const noexcept > { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; } > > > > reference& > flip() noexcept > { > *_M_wp ^= _Base::_S_maskbit(_M_bpos); > return *this; > } > }; > friend class reference; > > > > constexpr bitset() noexcept > { } > > > > constexpr bitset(unsigned long long __val) noexcept > : _Base(_Sanitize_val<_Nb>::_S_do_sanitize_val(__val)) { } ># 952 "/usr/include/c++/13/bitset" 3 > template<class _CharT, class _Traits, class _Alloc> > > explicit > bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, > size_t __position = 0) > : _Base() > { > _M_check_initial_position(__s, __position); > _M_copy_from_string(__s, __position, > std::basic_string<_CharT, _Traits, _Alloc>::npos, > _CharT('0'), _CharT('1')); > } ># 975 "/usr/include/c++/13/bitset" 3 > template<class _CharT, class _Traits, class _Alloc> > > bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, > size_t __position, size_t __n) > : _Base() > { > _M_check_initial_position(__s, __position); > _M_copy_from_string(__s, __position, __n, _CharT('0'), _CharT('1')); > } > > > > template<class _CharT, class _Traits, class _Alloc> > > bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, > size_t __position, size_t __n, > _CharT __zero, _CharT __one = _CharT('1')) > : _Base() > { > _M_check_initial_position(__s, __position); > _M_copy_from_string(__s, __position, __n, __zero, __one); > } ># 1009 "/usr/include/c++/13/bitset" 3 > template<typename _CharT> > [[__gnu__::__nonnull__]] > > explicit > bitset(const _CharT* __str, > typename __bitset::__string<_CharT>::size_type __n > = __bitset::__string<_CharT>::npos, > _CharT __zero = _CharT('0'), _CharT __one = _CharT('1')) > : _Base() > { > > if (!__str) > __throw_logic_error(("bitset::bitset(const _CharT*, ...)")); > > using _Traits = typename __bitset::__string<_CharT>::traits_type; > > if (__n == __bitset::__string<_CharT>::npos) > __n = _Traits::length(__str); > _M_copy_from_ptr<_CharT, _Traits>(__str, __n, 0, __n, __zero, __one); > } ># 1039 "/usr/include/c++/13/bitset" 3 > > bitset<_Nb>& > operator&=(const bitset<_Nb>& __rhs) noexcept > { > this->_M_do_and(__rhs); > return *this; > } > > > bitset<_Nb>& > operator|=(const bitset<_Nb>& __rhs) noexcept > { > this->_M_do_or(__rhs); > return *this; > } > > > bitset<_Nb>& > operator^=(const bitset<_Nb>& __rhs) noexcept > { > this->_M_do_xor(__rhs); > return *this; > } ># 1071 "/usr/include/c++/13/bitset" 3 > > bitset<_Nb>& > operator<<=(size_t __position) noexcept > { > if (__builtin_expect(__position < _Nb, 1)) > { > this->_M_do_left_shift(__position); > this->_M_do_sanitize(); > } > else > this->_M_do_reset(); > return *this; > } > > > bitset<_Nb>& > operator>>=(size_t __position) noexcept > { > if (__builtin_expect(__position < _Nb, 1)) > { > this->_M_do_right_shift(__position); > this->_M_do_sanitize(); > } > else > this->_M_do_reset(); > return *this; > } ># 1106 "/usr/include/c++/13/bitset" 3 > > bitset<_Nb>& > _Unchecked_set(size_t __pos) noexcept > { > this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); > return *this; > } > > > bitset<_Nb>& > _Unchecked_set(size_t __pos, int __val) noexcept > { > if (__val) > this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); > else > this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); > return *this; > } > > > bitset<_Nb>& > _Unchecked_reset(size_t __pos) noexcept > { > this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); > return *this; > } > > > bitset<_Nb>& > _Unchecked_flip(size_t __pos) noexcept > { > this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos); > return *this; > } > > constexpr bool > _Unchecked_test(size_t __pos) const noexcept > { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos)) > != static_cast<_WordT>(0)); } > > > > > > > > bitset<_Nb>& > set() noexcept > { > this->_M_do_set(); > this->_M_do_sanitize(); > return *this; > } > > > > > > > > > bitset<_Nb>& > set(size_t __position, bool __val = true) > { > this->_M_check(__position, ("bitset::set")); > return _Unchecked_set(__position, __val); > } > > > > > > bitset<_Nb>& > reset() noexcept > { > this->_M_do_reset(); > return *this; > } ># 1192 "/usr/include/c++/13/bitset" 3 > > bitset<_Nb>& > reset(size_t __position) > { > this->_M_check(__position, ("bitset::reset")); > return _Unchecked_reset(__position); > } > > > > > > bitset<_Nb>& > flip() noexcept > { > this->_M_do_flip(); > this->_M_do_sanitize(); > return *this; > } > > > > > > > > bitset<_Nb>& > flip(size_t __position) > { > this->_M_check(__position, ("bitset::flip")); > return _Unchecked_flip(__position); > } > > > > bitset<_Nb> > operator~() const noexcept > { return bitset<_Nb>(*this).flip(); } ># 1246 "/usr/include/c++/13/bitset" 3 > > reference > operator[](size_t __position) > { return reference(*this, __position); } > > constexpr bool > operator[](size_t __position) const > { return _Unchecked_test(__position); } ># 1262 "/usr/include/c++/13/bitset" 3 > > unsigned long > to_ulong() const > { return this->_M_do_to_ulong(); } > > > > unsigned long long > to_ullong() const > { return this->_M_do_to_ullong(); } ># 1283 "/usr/include/c++/13/bitset" 3 > template<class _CharT, class _Traits, class _Alloc> > > std::basic_string<_CharT, _Traits, _Alloc> > to_string() const > { > std::basic_string<_CharT, _Traits, _Alloc> __result; > _M_copy_to_string(__result, _CharT('0'), _CharT('1')); > return __result; > } > > > > template<class _CharT, class _Traits, class _Alloc> > > std::basic_string<_CharT, _Traits, _Alloc> > to_string(_CharT __zero, _CharT __one = _CharT('1')) const > { > std::basic_string<_CharT, _Traits, _Alloc> __result; > _M_copy_to_string(__result, __zero, __one); > return __result; > } > > > > template<class _CharT, class _Traits> > > std::basic_string<_CharT, _Traits, std::allocator<_CharT> > > to_string() const > { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); } > > > > template<class _CharT, class _Traits> > > std::basic_string<_CharT, _Traits, std::allocator<_CharT> > > to_string(_CharT __zero, _CharT __one = _CharT('1')) const > { return to_string<_CharT, _Traits, > std::allocator<_CharT> >(__zero, __one); } > > template<class _CharT> > > std::basic_string<_CharT, std::char_traits<_CharT>, > std::allocator<_CharT> > > to_string() const > { > return to_string<_CharT, std::char_traits<_CharT>, > std::allocator<_CharT> >(); > } > > template<class _CharT> > > std::basic_string<_CharT, std::char_traits<_CharT>, > std::allocator<_CharT> > > to_string(_CharT __zero, _CharT __one = _CharT('1')) const > { > return to_string<_CharT, std::char_traits<_CharT>, > std::allocator<_CharT> >(__zero, __one); > } > > > std::basic_string<char, std::char_traits<char>, std::allocator<char> > > to_string() const > { > return to_string<char, std::char_traits<char>, > std::allocator<char> >(); > } > > > std::basic_string<char, std::char_traits<char>, std::allocator<char> > > to_string(char __zero, char __one = '1') const > { > return to_string<char, std::char_traits<char>, > std::allocator<char> >(__zero, __one); > } > > > > > size_t > count() const noexcept > { return this->_M_do_count(); } > > > constexpr size_t > size() const noexcept > { return _Nb; } > > > > > bool > operator==(const bitset<_Nb>& __rhs) const noexcept > { return this->_M_is_equal(__rhs); } > > > > bool > operator!=(const bitset<_Nb>& __rhs) const noexcept > { return !this->_M_is_equal(__rhs); } ># 1391 "/usr/include/c++/13/bitset" 3 > > bool > test(size_t __position) const > { > this->_M_check(__position, ("bitset::test")); > return _Unchecked_test(__position); > } > > > > > > > > > bool > all() const noexcept > { return this->template _M_are_all<_Nb>(); } > > > > > > > bool > any() const noexcept > { return this->_M_is_any(); } > > > > > > > bool > none() const noexcept > { return !this->_M_is_any(); } > > > > > bitset<_Nb> > operator<<(size_t __position) const noexcept > { return bitset<_Nb>(*this) <<= __position; } > > > bitset<_Nb> > operator>>(size_t __position) const noexcept > { return bitset<_Nb>(*this) >>= __position; } ># 1447 "/usr/include/c++/13/bitset" 3 > > size_t > _Find_first() const noexcept > { return this->_M_do_find_first(_Nb); } ># 1459 "/usr/include/c++/13/bitset" 3 > > size_t > _Find_next(size_t __prev) const noexcept > { return this->_M_do_find_next(__prev, _Nb); } > > private: > > template<class _CharT, class _Traits> > > void > _M_copy_from_ptr(const _CharT*, size_t, size_t, size_t, > _CharT, _CharT); > > > template<class _CharT, class _Traits, class _Alloc> > > void > _M_copy_from_string(const std::basic_string<_CharT, > _Traits, _Alloc>& __s, size_t __pos, size_t __n, > _CharT __zero, _CharT __one) > { _M_copy_from_ptr<_CharT, _Traits>(__s.data(), __s.size(), __pos, __n, > __zero, __one); } > > template<class _CharT, class _Traits, class _Alloc> > > void > _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&, > _CharT, _CharT) const; > > template<class _CharT, class _Traits, size_t _Nb2> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>&, bitset<_Nb2>&); > > 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> > template<class _CharT, class _Traits> > > void > bitset<_Nb>:: > _M_copy_from_ptr(const _CharT* __s, size_t __len, > size_t __pos, size_t __n, _CharT __zero, _CharT __one) > { > reset(); > const size_t __nbits = std::min(_Nb, std::min(__n, size_t(__len - __pos))); > for (size_t __i = __nbits; __i > 0; --__i) > { > const _CharT __c = __s[__pos + __nbits - __i]; > if (_Traits::eq(__c, __zero)) > ; > else if (_Traits::eq(__c, __one)) > _Unchecked_set(__i - 1); > else > __throw_invalid_argument(("bitset::_M_copy_from_ptr")); > } > } > > > template<size_t _Nb> > template<class _CharT, class _Traits, class _Alloc> > > void > bitset<_Nb>:: > _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>& __s, > _CharT __zero, _CharT __one) const > { > __s.assign(_Nb, __zero); > size_t __n = this->_Find_first(); > while (__n < _Nb) > { > __s[_Nb - __n - 1] = __one; > __n = _Find_next(__n); > } > } ># 1550 "/usr/include/c++/13/bitset" 3 > template<size_t _Nb> > > inline bitset<_Nb> > operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept > { > bitset<_Nb> __result(__x); > __result &= __y; > return __result; > } > > template<size_t _Nb> > > inline bitset<_Nb> > operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept > { > bitset<_Nb> __result(__x); > __result |= __y; > return __result; > } > > template <size_t _Nb> > > inline bitset<_Nb> > operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept > { > bitset<_Nb> __result(__x); > __result ^= __y; > return __result; > } ># 1591 "/usr/include/c++/13/bitset" 3 > template<class _CharT, class _Traits, size_t _Nb> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) > { > typedef typename _Traits::char_type char_type; > typedef std::basic_istream<_CharT, _Traits> __istream_type; > typedef typename __istream_type::ios_base __ios_base; > > struct _Buffer > { > static constexpr bool _S_use_alloca() { return _Nb <= 256; } > > explicit _Buffer(_CharT* __p) : _M_ptr(__p) { } > > ~_Buffer() > { > if constexpr (!_S_use_alloca()) > delete[] _M_ptr; > } > > _CharT* const _M_ptr; > }; > _CharT* __ptr; > if constexpr (_Buffer::_S_use_alloca()) > __ptr = (_CharT*)__builtin_alloca(_Nb); > else > __ptr = new _CharT[_Nb]; > const _Buffer __buf(__ptr); > > > > const char_type __zero = __is.widen('0'); > const char_type __one = __is.widen('1'); > > typename __ios_base::iostate __state = __ios_base::goodbit; > typename __istream_type::sentry __sentry(__is); > if (__sentry) > { > try > { > for (size_t __i = _Nb; __i > 0; --__i) > { > static typename _Traits::int_type __eof = _Traits::eof(); > > typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc(); > if (_Traits::eq_int_type(__c1, __eof)) > { > __state |= __ios_base::eofbit; > break; > } > else > { > const char_type __c2 = _Traits::to_char_type(__c1); > if (_Traits::eq(__c2, __zero)) > *__ptr++ = __zero; > else if (_Traits::eq(__c2, __one)) > *__ptr++ = __one; > else if (_Traits:: > eq_int_type(__is.rdbuf()->sputbackc(__c2), > __eof)) > { > __state |= __ios_base::failbit; > break; > } > } > } > } > catch(__cxxabiv1::__forced_unwind&) > { > __is._M_setstate(__ios_base::badbit); > throw; > } > catch(...) > { __is._M_setstate(__ios_base::badbit); } > } > > if constexpr (_Nb) > { > if (size_t __len = __ptr - __buf._M_ptr) > __x.template _M_copy_from_ptr<_CharT, _Traits>(__buf._M_ptr, __len, > 0, __len, > __zero, __one); > else > __state |= __ios_base::failbit; > } > if (__state) > __is.setstate(__state); > return __is; > } > > template <class _CharT, class _Traits, size_t _Nb> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const bitset<_Nb>& __x) > { > std::basic_string<_CharT, _Traits> __tmp; > > > > const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__os.getloc()); > __x._M_copy_to_string(__tmp, __ct.widen('0'), __ct.widen('1')); > return __os << __tmp; > } > > > > >} > > > > > > > >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 > { > const size_t __clength = (_Nb + 8 - 1) / 8; > return std::_Hash_impl::hash(__b._M_getdata(), __clength); > } > }; > > template<> > struct hash<std::bitset<0>> > : public __hash_base<size_t, std::bitset<0>> > { > size_t > operator()(const std::bitset<0>&) const noexcept > { return 0; } > }; > > >} ># 41 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/locale" 1 3 ># 36 "/usr/include/c++/13/locale" 3 > ># 37 "/usr/include/c++/13/locale" 3 > > > > > > ># 1 "/usr/include/c++/13/bits/locale_facets_nonio.h" 1 3 ># 37 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > ># 38 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > ># 1 "/usr/include/c++/13/ctime" 1 3 ># 39 "/usr/include/c++/13/ctime" 3 > ># 40 "/usr/include/c++/13/ctime" 3 ># 58 "/usr/include/c++/13/ctime" 3 >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; >} ># 40 "/usr/include/c++/13/bits/locale_facets_nonio.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 52 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > 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) : facet(__refs), > _M_date_format(0), _M_date_era_format(0), _M_time_format(0), > _M_time_era_format(0), _M_date_time_format(0), > _M_date_time_era_format(0), _M_am(0), _M_pm(0), > _M_am_pm_format(0), _M_day1(0), _M_day2(0), _M_day3(0), > _M_day4(0), _M_day5(0), _M_day6(0), _M_day7(0), > _M_aday1(0), _M_aday2(0), _M_aday3(0), _M_aday4(0), > _M_aday5(0), _M_aday6(0), _M_aday7(0), _M_month01(0), > _M_month02(0), _M_month03(0), _M_month04(0), _M_month05(0), > _M_month06(0), _M_month07(0), _M_month08(0), _M_month09(0), > _M_month10(0), _M_month11(0), _M_month12(0), _M_amonth01(0), > _M_amonth02(0), _M_amonth03(0), _M_amonth04(0), > _M_amonth05(0), _M_amonth06(0), _M_amonth07(0), > _M_amonth08(0), _M_amonth09(0), _M_amonth10(0), > _M_amonth11(0), _M_amonth12(0), _M_allocated(false) > { } > > ~__timepunct_cache(); > > private: > __timepunct_cache& > operator=(const __timepunct_cache&); > > explicit > __timepunct_cache(const __timepunct_cache&); > }; > > template<typename _CharT> > __timepunct_cache<_CharT>::~__timepunct_cache() > { > if (_M_allocated) > { > > } > } > > > 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); ># 206 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); > > > > void > _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, > const tm* __tm) const throw (); > > void > _M_date_formats(const _CharT** __date) const > { > > __date[0] = _M_data->_M_date_format; > __date[1] = _M_data->_M_date_era_format; > } > > void > _M_time_formats(const _CharT** __time) const > { > > __time[0] = _M_data->_M_time_format; > __time[1] = _M_data->_M_time_era_format; > } > > void > _M_date_time_formats(const _CharT** __dt) const > { > > __dt[0] = _M_data->_M_date_time_format; > __dt[1] = _M_data->_M_date_time_era_format; > } > > > void > _M_am_pm_format(const _CharT*) const > { } > > > void > _M_am_pm_format(const _CharT** __ampm_format) const > { > __ampm_format[0] = _M_data->_M_am_pm_format; > } > > void > _M_am_pm(const _CharT** __ampm) const > { > __ampm[0] = _M_data->_M_am; > __ampm[1] = _M_data->_M_pm; > } > > void > _M_days(const _CharT** __days) const > { > __days[0] = _M_data->_M_day1; > __days[1] = _M_data->_M_day2; > __days[2] = _M_data->_M_day3; > __days[3] = _M_data->_M_day4; > __days[4] = _M_data->_M_day5; > __days[5] = _M_data->_M_day6; > __days[6] = _M_data->_M_day7; > } > > void > _M_days_abbreviated(const _CharT** __days) const > { > __days[0] = _M_data->_M_aday1; > __days[1] = _M_data->_M_aday2; > __days[2] = _M_data->_M_aday3; > __days[3] = _M_data->_M_aday4; > __days[4] = _M_data->_M_aday5; > __days[5] = _M_data->_M_aday6; > __days[6] = _M_data->_M_aday7; > } > > void > _M_months(const _CharT** __months) const > { > __months[0] = _M_data->_M_month01; > __months[1] = _M_data->_M_month02; > __months[2] = _M_data->_M_month03; > __months[3] = _M_data->_M_month04; > __months[4] = _M_data->_M_month05; > __months[5] = _M_data->_M_month06; > __months[6] = _M_data->_M_month07; > __months[7] = _M_data->_M_month08; > __months[8] = _M_data->_M_month09; > __months[9] = _M_data->_M_month10; > __months[10] = _M_data->_M_month11; > __months[11] = _M_data->_M_month12; > } > > void > _M_months_abbreviated(const _CharT** __months) const > { > __months[0] = _M_data->_M_amonth01; > __months[1] = _M_data->_M_amonth02; > __months[2] = _M_data->_M_amonth03; > __months[3] = _M_data->_M_amonth04; > __months[4] = _M_data->_M_amonth05; > __months[5] = _M_data->_M_amonth06; > __months[6] = _M_data->_M_amonth07; > __months[7] = _M_data->_M_amonth08; > __months[8] = _M_data->_M_amonth09; > __months[9] = _M_data->_M_amonth10; > __months[10] = _M_data->_M_amonth11; > __months[11] = _M_data->_M_amonth12; > } > > protected: > virtual > ~__timepunct(); > > > 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<char>::_M_put(char*, size_t, const char*, const tm*) const throw (); > > > template<> > void > __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc); > > template<> > void > __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*, > const tm*) const throw (); > > > >} > > ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/time_members.h" 1 3 ># 37 "/usr/include/c++/13/x86_64-redhat-linux/bits/time_members.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _CharT> > __timepunct<_CharT>::__timepunct(size_t __refs) > : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), > _M_name_timepunct(_S_get_c_name()) > { _M_initialize_timepunct(); } > > template<typename _CharT> > __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) > : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0), > _M_name_timepunct(_S_get_c_name()) > { _M_initialize_timepunct(); } > > template<typename _CharT> > __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, > size_t __refs) > : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), > _M_name_timepunct(0) > { > if (__builtin_strcmp(__s, _S_get_c_name()) != 0) > { > const size_t __len = __builtin_strlen(__s) + 1; > char* __tmp = new char[__len]; > __builtin_memcpy(__tmp, __s, __len); > _M_name_timepunct = __tmp; > } > else > _M_name_timepunct = _S_get_c_name(); > > try > { _M_initialize_timepunct(__cloc); } > catch(...) > { > if (_M_name_timepunct != _S_get_c_name()) > delete [] _M_name_timepunct; > throw; > } > } > > template<typename _CharT> > __timepunct<_CharT>::~__timepunct() > { > if (_M_name_timepunct != _S_get_c_name()) > delete [] _M_name_timepunct; > delete _M_data; > _S_destroy_c_locale(_M_c_locale_timepunct); > } > > >} ># 353 "/usr/include/c++/13/bits/locale_facets_nonio.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > struct __time_get_state > { > > void > _M_finalize_state(tm* __tm); > > 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 { ># 397 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > 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; ># 418 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > time_get(size_t __refs = 0) > : facet (__refs) { } ># 435 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > dateorder > date_order() const > { return this->do_date_order(); } ># 459 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > get_time(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { return this->do_get_time(__beg, __end, __io, __err, __tm); } ># 484 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > get_date(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { return this->do_get_date(__beg, __end, __io, __err, __tm); } ># 512 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > get_weekday(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } ># 541 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > get_monthname(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } ># 567 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > get_year(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { return this->do_get_year(__beg, __end, __io, __err, __tm); } ># 588 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > inline > iter_type get(iter_type __s, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm, char __format, > char __modifier = 0) const > { > return this->do_get(__s, __end, __io, __err, __tm, __format, > __modifier); > } ># 615 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type get(iter_type __s, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm, const char_type* __fmt, > const char_type* __fmtend) const; > > > protected: > > virtual > ~time_get() { } ># 635 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual dateorder > do_date_order() const; ># 653 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_get_time(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const; ># 672 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_get_date(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const; ># 691 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_get_weekday(iter_type __beg, iter_type __end, ios_base&, > ios_base::iostate& __err, tm* __tm) const; ># 710 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_get_monthname(iter_type __beg, iter_type __end, ios_base&, > ios_base::iostate& __err, tm* __tm) const; ># 729 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_get_year(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const; ># 752 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > 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; > > > > iter_type > _M_extract_num(iter_type __beg, iter_type __end, int& __member, > int __min, int __max, size_t __len, > ios_base& __io, ios_base::iostate& __err) const; > > > iter_type > _M_extract_name(iter_type __beg, iter_type __end, int& __member, > const _CharT** __names, size_t __indexlen, > ios_base& __io, ios_base::iostate& __err) const; > > > iter_type > _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, > const _CharT** __names, size_t __indexlen, > ios_base& __io, ios_base::iostate& __err) const; > > > iter_type > _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm, > const _CharT* __format) const; > > > > iter_type > _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm, > const _CharT* __format, > __time_get_state &__state) 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; > > explicit > time_get_byname(const char*, size_t __refs = 0) > : time_get<_CharT, _InIter>(__refs) { } > > > explicit > time_get_byname(const string& __s, size_t __refs = 0) > : time_get_byname(__s.c_str(), __refs) { } > > > protected: > virtual > ~time_get_byname() { } > }; > >} ># 834 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > template<typename _CharT, typename _OutIter> > class time_put : public locale::facet > { > public: > > > > typedef _CharT char_type; > typedef _OutIter iter_type; > > > > static locale::id id; ># 855 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > time_put(size_t __refs = 0) > : facet(__refs) { } ># 874 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, > const _CharT* __beg, const _CharT* __end) const; ># 894 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > put(iter_type __s, ios_base& __io, char_type __fill, > const tm* __tm, char __format, char __mod = 0) const > { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } > > protected: > > virtual > ~time_put() > { } ># 921 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, > char __format, char __mod) const; > }; > > 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; > > explicit > time_put_byname(const char*, size_t __refs = 0) > : time_put<_CharT, _OutIter>(__refs) > { } > > > explicit > time_put_byname(const string& __s, size_t __refs = 0) > : time_put_byname(__s.c_str(), __refs) { } > > > protected: > virtual > ~time_put_byname() { } > }; ># 966 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > 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; > > > > __attribute__ ((__const__)) static pattern > _S_construct_pattern(char __precedes, char __space, char __posn) throw (); > }; > > 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; > > __moneypunct_cache(size_t __refs = 0) : facet(__refs), > _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false), > _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), > _M_curr_symbol(0), _M_curr_symbol_size(0), > _M_positive_sign(0), _M_positive_sign_size(0), > _M_negative_sign(0), _M_negative_sign_size(0), > _M_frac_digits(0), > _M_pos_format(money_base::pattern()), > _M_neg_format(money_base::pattern()), _M_allocated(false) > { } > > ~__moneypunct_cache(); > > void > _M_cache(const locale& __loc); > > private: > __moneypunct_cache& > operator=(const __moneypunct_cache&); > > explicit > __moneypunct_cache(const __moneypunct_cache&); > }; > > template<typename _CharT, bool _Intl> > __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() > { > if (_M_allocated) > { > delete [] _M_grouping; > delete [] _M_curr_symbol; > delete [] _M_positive_sign; > delete [] _M_negative_sign; > } > } > >namespace __cxx11 { ># 1061 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > 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; ># 1090 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > moneypunct(size_t __refs = 0) > : facet(__refs), _M_data(0) > { _M_initialize_moneypunct(); } ># 1103 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > moneypunct(__cache_type* __cache, size_t __refs = 0) > : facet(__refs), _M_data(__cache) > { _M_initialize_moneypunct(); } ># 1118 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) > : facet(__refs), _M_data(0) > { _M_initialize_moneypunct(__cloc, __s); } ># 1132 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > char_type > decimal_point() const > { return this->do_decimal_point(); } ># 1145 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > char_type > thousands_sep() const > { return this->do_thousands_sep(); } ># 1175 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > string > grouping() const > { return this->do_grouping(); } ># 1188 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > string_type > curr_symbol() const > { return this->do_curr_symbol(); } ># 1205 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > string_type > positive_sign() const > { return this->do_positive_sign(); } ># 1222 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > string_type > negative_sign() const > { return this->do_negative_sign(); } ># 1238 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > int > frac_digits() const > { return this->do_frac_digits(); } ># 1274 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > pattern > pos_format() const > { return this->do_pos_format(); } > > pattern > neg_format() const > { return this->do_neg_format(); } > > > protected: > > virtual > ~moneypunct(); ># 1296 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual char_type > do_decimal_point() const > { return _M_data->_M_decimal_point; } ># 1308 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual char_type > do_thousands_sep() const > { return _M_data->_M_thousands_sep; } ># 1321 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual string > do_grouping() const > { return _M_data->_M_grouping; } ># 1334 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual string_type > do_curr_symbol() const > { return _M_data->_M_curr_symbol; } ># 1347 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual string_type > do_positive_sign() const > { return _M_data->_M_positive_sign; } ># 1360 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual string_type > do_negative_sign() const > { return _M_data->_M_negative_sign; } ># 1374 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual int > do_frac_digits() const > { return _M_data->_M_frac_digits; } ># 1388 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual pattern > do_pos_format() const > { return _M_data->_M_pos_format; } ># 1402 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual pattern > do_neg_format() const > { return _M_data->_M_neg_format; } > > > void > _M_initialize_moneypunct(__c_locale __cloc = 0, > const char* __name = 0); > }; > > template<typename _CharT, bool _Intl> > locale::id moneypunct<_CharT, _Intl>::id; > > template<typename _CharT, bool _Intl> > const bool moneypunct<_CharT, _Intl>::intl; > > template<> > moneypunct<char, true>::~moneypunct(); > > template<> > moneypunct<char, false>::~moneypunct(); > > template<> > void > moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*); > > template<> > void > moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*); > > > template<> > moneypunct<wchar_t, true>::~moneypunct(); > > template<> > moneypunct<wchar_t, false>::~moneypunct(); > > template<> > void > moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale, > const char*); > > template<> > void > moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale, > const char*); > > > > 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; > > explicit > moneypunct_byname(const char* __s, size_t __refs = 0) > : moneypunct<_CharT, _Intl>(__refs) > { > if (__builtin_strcmp(__s, "C") != 0 > && __builtin_strcmp(__s, "POSIX") != 0) > { > __c_locale __tmp; > this->_S_create_c_locale(__tmp, __s); > this->_M_initialize_moneypunct(__tmp); > this->_S_destroy_c_locale(__tmp); > } > } > > > explicit > moneypunct_byname(const string& __s, size_t __refs = 0) > : moneypunct_byname(__s.c_str(), __refs) { } > > > protected: > virtual > ~moneypunct_byname() { } > }; > > template<typename _CharT, bool _Intl> > const bool moneypunct_byname<_CharT, _Intl>::intl; > >} > >namespace __cxx11 { ># 1505 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > 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; ># 1527 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > money_get(size_t __refs = 0) : facet(__refs) { } ># 1557 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, > ios_base::iostate& __err, long double& __units) const > { return this->do_get(__s, __end, __intl, __io, __err, __units); } ># 1588 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, > ios_base::iostate& __err, string_type& __digits) const > { return this->do_get(__s, __end, __intl, __io, __err, __digits); } > > protected: > > virtual > ~money_get() { } ># 1612 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, > ios_base::iostate& __err, long double& __units) const; ># 1624 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, > ios_base::iostate& __err, string_type& __digits) const; ># 1644 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > template<bool _Intl> > iter_type > _M_extract(iter_type __s, iter_type __end, ios_base& __io, > ios_base::iostate& __err, string& __digits) const; > }; > > template<typename _CharT, typename _InIter> > locale::id money_get<_CharT, _InIter>::id; ># 1666 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > 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; ># 1687 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > money_put(size_t __refs = 0) : facet(__refs) { } ># 1707 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > put(iter_type __s, bool __intl, ios_base& __io, > char_type __fill, long double __units) const > { return this->do_put(__s, __intl, __io, __fill, __units); } ># 1730 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > iter_type > put(iter_type __s, bool __intl, ios_base& __io, > char_type __fill, const string_type& __digits) const > { return this->do_put(__s, __intl, __io, __fill, __digits); } > > protected: > > virtual > ~money_put() { } ># 1765 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, > long double __units) const; ># 1789 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual iter_type > do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, > const string_type& __digits) const; ># 1809 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > template<bool _Intl> > iter_type > _M_insert(iter_type __s, ios_base& __io, char_type __fill, > const string_type& __digits) const; > }; > > template<typename _CharT, typename _OutIter> > locale::id money_put<_CharT, _OutIter>::id; > >} > > > > > > struct messages_base > { > typedef int catalog; > }; > >namespace __cxx11 { ># 1852 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > 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; ># 1880 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > messages(size_t __refs = 0); ># 1894 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > explicit > messages(__c_locale __cloc, const char* __s, size_t __refs = 0); ># 1907 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > catalog > open(const basic_string<char>& __s, const locale& __loc) const > { return this->do_open(__s, __loc); } ># 1925 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > catalog > open(const basic_string<char>&, const locale&, const char*) const; ># 1943 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > string_type > get(catalog __c, int __set, int __msgid, const string_type& __s) const > { return this->do_get(__c, __set, __msgid, __s); } ># 1954 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > void > close(catalog __c) const > { return this->do_close(__c); } > > protected: > > virtual > ~messages(); ># 1974 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual catalog > do_open(const basic_string<char>&, const locale&) const; ># 1993 "/usr/include/c++/13/bits/locale_facets_nonio.h" 3 > virtual string_type > do_get(catalog, int, int, const string_type& __dfault) const; > > > > > > > virtual void > do_close(catalog) const; > > > char* > _M_convert_to_char(const string_type& __msg) const > { > > return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str())); > } > > > string_type > _M_convert_from_char(char*) const > { > > return string_type(); > } > }; > > template<typename _CharT> > locale::id messages<_CharT>::id; > > > template<> > string > messages<char>::do_get(catalog, int, int, const string&) const; > > > template<> > wstring > messages<wchar_t>::do_get(catalog, int, int, const wstring&) const; > > > > 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) > : messages_byname(__s.c_str(), __refs) { } > > > protected: > virtual > ~messages_byname() > { } > }; > >} > > >} > > ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/messages_members.h" 1 3 ># 36 "/usr/include/c++/13/x86_64-redhat-linux/bits/messages_members.h" 3 ># 1 "/usr/include/libintl.h" 1 3 4 ># 34 "/usr/include/libintl.h" 3 4 >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); ># 121 "/usr/include/libintl.h" 3 4 >} ># 37 "/usr/include/c++/13/x86_64-redhat-linux/bits/messages_members.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _CharT> > messages<_CharT>::messages(size_t __refs) > : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), > _M_name_messages(_S_get_c_name()) > { } > > template<typename _CharT> > messages<_CharT>::messages(__c_locale __cloc, const char* __s, > size_t __refs) > : facet(__refs), _M_c_locale_messages(0), _M_name_messages(0) > { > if (__builtin_strcmp(__s, _S_get_c_name()) != 0) > { > const size_t __len = __builtin_strlen(__s) + 1; > char* __tmp = new char[__len]; > __builtin_memcpy(__tmp, __s, __len); > _M_name_messages = __tmp; > } > else > _M_name_messages = _S_get_c_name(); > > > _M_c_locale_messages = _S_clone_c_locale(__cloc); > } > > template<typename _CharT> > typename messages<_CharT>::catalog > messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, > const char* __dir) const > { > bindtextdomain(__s.c_str(), __dir); > return this->do_open(__s, __loc); > } > > > template<typename _CharT> > messages<_CharT>::~messages() > { > if (_M_name_messages != _S_get_c_name()) > delete [] _M_name_messages; > _S_destroy_c_locale(_M_c_locale_messages); > } > > template<typename _CharT> > typename messages<_CharT>::catalog > messages<_CharT>::do_open(const basic_string<char>& __s, > const locale&) const > { > > > textdomain(__s.c_str()); > return 0; > } > > template<typename _CharT> > void > messages<_CharT>::do_close(catalog) const > { } > > > template<typename _CharT> > messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) > : messages<_CharT>(__refs) > { > if (this->_M_name_messages != locale::facet::_S_get_c_name()) > { > delete [] this->_M_name_messages; > if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0) > { > const size_t __len = __builtin_strlen(__s) + 1; > char* __tmp = new char[__len]; > __builtin_memcpy(__tmp, __s, __len); > this->_M_name_messages = __tmp; > } > else > this->_M_name_messages = locale::facet::_S_get_c_name(); > } > > if (__builtin_strcmp(__s, "C") != 0 > && __builtin_strcmp(__s, "POSIX") != 0) > { > this->_S_destroy_c_locale(this->_M_c_locale_messages); > this->_S_create_c_locale(this->_M_c_locale_messages, __s); > } > } > > > template<> > typename messages<char>::catalog > messages<char>::do_open(const basic_string<char>&, > const locale&) const; > > template<> > void > messages<char>::do_close(catalog) const; > > > template<> > typename messages<wchar_t>::catalog > messages<wchar_t>::do_open(const basic_string<char>&, > const locale&) const; > > template<> > void > messages<wchar_t>::do_close(catalog) const; > > > >} ># 2065 "/usr/include/c++/13/bits/locale_facets_nonio.h" 2 3 > > > > ># 1 "/usr/include/c++/13/bits/locale_facets_nonio.tcc" 1 3 ># 33 "/usr/include/c++/13/bits/locale_facets_nonio.tcc" 3 > ># 34 "/usr/include/c++/13/bits/locale_facets_nonio.tcc" 3 > >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 > { > const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); > const locale::facet** __caches = __loc._M_impl->_M_caches; > if (!__caches[__i]) > { > __moneypunct_cache<_CharT, _Intl>* __tmp = 0; > try > { > __tmp = new __moneypunct_cache<_CharT, _Intl>; > __tmp->_M_cache(__loc); > } > catch(...) > { > delete __tmp; > throw; > } > __loc._M_impl->_M_install_cache(__tmp, __i); > } > return static_cast< > const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); > } > }; > > template<typename _CharT, bool _Intl> > void > __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) > { > const moneypunct<_CharT, _Intl>& __mp = > use_facet<moneypunct<_CharT, _Intl> >(__loc); > > struct _Scoped_str > { > size_t _M_len; > _CharT* _M_str; > > explicit > _Scoped_str(const basic_string<_CharT>& __str) > : _M_len(__str.size()), _M_str(new _CharT[_M_len]) > { __str.copy(_M_str, _M_len); } > > ~_Scoped_str() { delete[] _M_str; } > > void > _M_release(const _CharT*& __p, size_t& __n) > { > __p = _M_str; > __n = _M_len; > _M_str = 0; > } > }; > > _Scoped_str __curr_symbol(__mp.curr_symbol()); > _Scoped_str __positive_sign(__mp.positive_sign()); > _Scoped_str __negative_sign(__mp.negative_sign()); > > const string& __g = __mp.grouping(); > const size_t __g_size = __g.size(); > char* const __grouping = new char[__g_size]; > __g.copy(__grouping, __g_size); > > > > _M_grouping = __grouping; > _M_grouping_size = __g_size; > _M_use_grouping = (__g_size > && static_cast<signed char>(__grouping[0]) > 0 > && (__grouping[0] > != __gnu_cxx::__numeric_traits<char>::__max)); > > _M_decimal_point = __mp.decimal_point(); > _M_thousands_sep = __mp.thousands_sep(); > > __curr_symbol._M_release(_M_curr_symbol, _M_curr_symbol_size); > __positive_sign._M_release(_M_positive_sign, _M_positive_sign_size); > __negative_sign._M_release(_M_negative_sign, _M_negative_sign_size); > > _M_frac_digits = __mp.frac_digits(); > _M_pos_format = __mp.pos_format(); > _M_neg_format = __mp.neg_format(); > > const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); > __ct.widen(money_base::_S_atoms, > money_base::_S_atoms + money_base::_S_end, _M_atoms); > > _M_allocated = true; > } > >namespace __cxx11 { > > template<typename _CharT, typename _InIter> > template<bool _Intl> > _InIter > money_get<_CharT, _InIter>:: > _M_extract(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, string& __units) const > { > typedef char_traits<_CharT> __traits_type; > typedef typename string_type::size_type size_type; > typedef money_base::part part; > typedef __moneypunct_cache<_CharT, _Intl> __cache_type; > > const locale& __loc = __io._M_getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > __use_cache<__cache_type> __uc; > const __cache_type* __lc = __uc(__loc); > const char_type* __lit = __lc->_M_atoms; > > > bool __negative = false; > > size_type __sign_size = 0; > > const bool __mandatory_sign = (__lc->_M_positive_sign_size > && __lc->_M_negative_sign_size); > > string __grouping_tmp; > if (__lc->_M_use_grouping) > __grouping_tmp.reserve(32); > > int __last_pos = 0; > > int __n = 0; > > bool __testvalid = true; > > bool __testdecfound = false; > > > string __res; > __res.reserve(32); > > const char_type* __lit_zero = __lit + money_base::_S_zero; > const money_base::pattern __p = __lc->_M_neg_format; > for (int __i = 0; __i < 4 && __testvalid; ++__i) > { > const part __which = static_cast<part>(__p.field[__i]); > switch (__which) > { > case money_base::symbol: > > > > > if (__io.flags() & ios_base::showbase || __sign_size > 1 > || __i == 0 > || (__i == 1 && (__mandatory_sign > || (static_cast<part>(__p.field[0]) > == money_base::sign) > || (static_cast<part>(__p.field[2]) > == money_base::space))) > || (__i == 2 && ((static_cast<part>(__p.field[3]) > == money_base::value) > || (__mandatory_sign > && (static_cast<part>(__p.field[3]) > == money_base::sign))))) > { > const size_type __len = __lc->_M_curr_symbol_size; > size_type __j = 0; > for (; __beg != __end && __j < __len > && *__beg == __lc->_M_curr_symbol[__j]; > ++__beg, (void)++__j); > if (__j != __len > && (__j || __io.flags() & ios_base::showbase)) > __testvalid = false; > } > break; > case money_base::sign: > > if (__lc->_M_positive_sign_size && __beg != __end > && *__beg == __lc->_M_positive_sign[0]) > { > __sign_size = __lc->_M_positive_sign_size; > ++__beg; > } > else if (__lc->_M_negative_sign_size && __beg != __end > && *__beg == __lc->_M_negative_sign[0]) > { > __negative = true; > __sign_size = __lc->_M_negative_sign_size; > ++__beg; > } > else if (__lc->_M_positive_sign_size > && !__lc->_M_negative_sign_size) > > > __negative = true; > else if (__mandatory_sign) > __testvalid = false; > break; > case money_base::value: > > > for (; __beg != __end; ++__beg) > { > const char_type __c = *__beg; > const char_type* __q = __traits_type::find(__lit_zero, > 10, __c); > if (__q != 0) > { > __res += money_base::_S_atoms[__q - __lit]; > ++__n; > } > else if (__c == __lc->_M_decimal_point > && !__testdecfound) > { > if (__lc->_M_frac_digits <= 0) > break; > > __last_pos = __n; > __n = 0; > __testdecfound = true; > } > else if (__lc->_M_use_grouping > && __c == __lc->_M_thousands_sep > && !__testdecfound) > { > if (__n) > { > > __grouping_tmp += static_cast<char>(__n); > __n = 0; > } > else > { > __testvalid = false; > break; > } > } > else > break; > } > if (__res.empty()) > __testvalid = false; > break; > case money_base::space: > > if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) > ++__beg; > else > __testvalid = false; > > case money_base::none: > > if (__i != 3) > for (; __beg != __end > && __ctype.is(ctype_base::space, *__beg); ++__beg); > break; > } > } > > > if (__sign_size > 1 && __testvalid) > { > const char_type* __sign = __negative ? __lc->_M_negative_sign > : __lc->_M_positive_sign; > size_type __i = 1; > for (; __beg != __end && __i < __sign_size > && *__beg == __sign[__i]; ++__beg, (void)++__i); > > if (__i != __sign_size) > __testvalid = false; > } > > if (__testvalid) > { > > if (__res.size() > 1) > { > const size_type __first = __res.find_first_not_of('0'); > const bool __only_zeros = __first == string::npos; > if (__first) > __res.erase(0, __only_zeros ? __res.size() - 1 : __first); > } > > > if (__negative && __res[0] != '0') > __res.insert(__res.begin(), '-'); > > > if (__grouping_tmp.size()) > { > > __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos > : __n); > if (!std::__verify_grouping(__lc->_M_grouping, > __lc->_M_grouping_size, > __grouping_tmp)) > __err |= ios_base::failbit; > } > > > if (__testdecfound && __n != __lc->_M_frac_digits) > __testvalid = false; > } > > > if (!__testvalid) > __err |= ios_base::failbit; > else > __units.swap(__res); > > > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } ># 368 "/usr/include/c++/13/bits/locale_facets_nonio.tcc" 3 > template<typename _CharT, typename _InIter> > _InIter > money_get<_CharT, _InIter>:: > do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, > ios_base::iostate& __err, long double& __units) const > { > string __str; > __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str) > : _M_extract<false>(__beg, __end, __io, __err, __str); > std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > money_get<_CharT, _InIter>:: > do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, > ios_base::iostate& __err, string_type& __digits) const > { > typedef typename string::size_type size_type; > > const locale& __loc = __io._M_getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > string __str; > __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str) > : _M_extract<false>(__beg, __end, __io, __err, __str); > const size_type __len = __str.size(); > if (__len) > { > __digits.resize(__len); > __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); > } > return __beg; > } ># 420 "/usr/include/c++/13/bits/locale_facets_nonio.tcc" 3 > template<typename _CharT, typename _OutIter> > template<bool _Intl> > _OutIter > money_put<_CharT, _OutIter>:: > _M_insert(iter_type __s, ios_base& __io, char_type __fill, > const string_type& __digits) const > { > typedef typename string_type::size_type size_type; > typedef money_base::part part; > typedef __moneypunct_cache<_CharT, _Intl> __cache_type; > > const locale& __loc = __io._M_getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > __use_cache<__cache_type> __uc; > const __cache_type* __lc = __uc(__loc); > const char_type* __lit = __lc->_M_atoms; > > > > const char_type* __beg = __digits.data(); > > money_base::pattern __p; > const char_type* __sign; > size_type __sign_size; > if (!(*__beg == __lit[money_base::_S_minus])) > { > __p = __lc->_M_pos_format; > __sign = __lc->_M_positive_sign; > __sign_size = __lc->_M_positive_sign_size; > } > else > { > __p = __lc->_M_neg_format; > __sign = __lc->_M_negative_sign; > __sign_size = __lc->_M_negative_sign_size; > if (__digits.size()) > ++__beg; > } > > > size_type __len = __ctype.scan_not(ctype_base::digit, __beg, > __beg + __digits.size()) - __beg; > if (__len) > { > > > > string_type __value; > __value.reserve(2 * __len); > > > > long __paddec = __len - __lc->_M_frac_digits; > if (__paddec > 0) > { > if (__lc->_M_frac_digits < 0) > __paddec = __len; > if (__lc->_M_grouping_size) > { > __value.assign(2 * __paddec, char_type()); > _CharT* __vend = > std::__add_grouping(&__value[0], __lc->_M_thousands_sep, > __lc->_M_grouping, > __lc->_M_grouping_size, > __beg, __beg + __paddec); > __value.erase(__vend - &__value[0]); > } > else > __value.assign(__beg, __paddec); > } > > > if (__lc->_M_frac_digits > 0) > { > __value += __lc->_M_decimal_point; > if (__paddec >= 0) > __value.append(__beg + __paddec, __lc->_M_frac_digits); > else > { > > __value.append(-__paddec, __lit[money_base::_S_zero]); > __value.append(__beg, __len); > } > } > > > const ios_base::fmtflags __f = __io.flags() > & ios_base::adjustfield; > __len = __value.size() + __sign_size; > __len += ((__io.flags() & ios_base::showbase) > ? __lc->_M_curr_symbol_size : 0); > > string_type __res; > __res.reserve(2 * __len); > > const size_type __width = static_cast<size_type>(__io.width()); > const bool __testipad = (__f == ios_base::internal > && __len < __width); > > for (int __i = 0; __i < 4; ++__i) > { > const part __which = static_cast<part>(__p.field[__i]); > switch (__which) > { > case money_base::symbol: > if (__io.flags() & ios_base::showbase) > __res.append(__lc->_M_curr_symbol, > __lc->_M_curr_symbol_size); > break; > case money_base::sign: > > > > if (__sign_size) > __res += __sign[0]; > break; > case money_base::value: > __res += __value; > break; > case money_base::space: > > > > if (__testipad) > __res.append(__width - __len, __fill); > else > __res += __fill; > break; > case money_base::none: > if (__testipad) > __res.append(__width - __len, __fill); > break; > } > } > > > if (__sign_size > 1) > __res.append(__sign + 1, __sign_size - 1); > > > __len = __res.size(); > if (__width > __len) > { > if (__f == ios_base::left) > > __res.append(__width - __len, __fill); > else > > __res.insert(0, __width - __len, __fill); > __len = __width; > } > > > __s = std::__write(__s, __res.data(), __len); > } > __io.width(0); > return __s; > } ># 590 "/usr/include/c++/13/bits/locale_facets_nonio.tcc" 3 > template<typename _CharT, typename _OutIter> > _OutIter > money_put<_CharT, _OutIter>:: > do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, > long double __units) const > { > const locale __loc = __io.getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > > int __cs_size = 64; > char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); > > > int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, > "%.*Lf", 0, __units); > > if (__len >= __cs_size) > { > __cs_size = __len + 1; > __cs = static_cast<char*>(__builtin_alloca(__cs_size)); > __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, > "%.*Lf", 0, __units); > } ># 622 "/usr/include/c++/13/bits/locale_facets_nonio.tcc" 3 > string_type __digits(__len, char_type()); > __ctype.widen(__cs, __cs + __len, &__digits[0]); > return __intl ? _M_insert<true>(__s, __io, __fill, __digits) > : _M_insert<false>(__s, __io, __fill, __digits); > } > > template<typename _CharT, typename _OutIter> > _OutIter > money_put<_CharT, _OutIter>:: > do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, > const string_type& __digits) const > { return __intl ? _M_insert<true>(__s, __io, __fill, __digits) > : _M_insert<false>(__s, __io, __fill, __digits); } ># 674 "/usr/include/c++/13/bits/locale_facets_nonio.tcc" 3 >} > > > > > template<typename _CharT, typename _InIter> > time_base::dateorder > time_get<_CharT, _InIter>::do_date_order() const > { return time_base::no_order; } > > > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm, > const _CharT* __format, > __time_get_state &__state) const > { > const locale& __loc = __io._M_getloc(); > const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > const size_t __len = char_traits<_CharT>::length(__format); > > ios_base::iostate __tmperr = ios_base::goodbit; > size_t __i = 0; > for (; __beg != __end && __i < __len && !__tmperr; ++__i) > { > if (__ctype.narrow(__format[__i], 0) == '%') > { > > char __c = __ctype.narrow(__format[++__i], 0); > int __mem = 0; > if (__c == 'E' || __c == 'O') > __c = __ctype.narrow(__format[++__i], 0); > switch (__c) > { > const char* __cs; > _CharT __wcs[10]; > case 'a': > case 'A': > > const char_type* __days[14]; > __tp._M_days(&__days[0]); > __tp._M_days_abbreviated(&__days[7]); > __beg = _M_extract_name(__beg, __end, __mem, __days, > 14, __io, __tmperr); > if (!__tmperr) > { > __tm->tm_wday = __mem % 7; > __state._M_have_wday = 1; > } > break; > case 'h': > case 'b': > case 'B': > > const char_type* __months[24]; > __tp._M_months(&__months[0]); > __tp._M_months_abbreviated(&__months[12]); > __beg = _M_extract_name(__beg, __end, __mem, > __months, 24, __io, __tmperr); > if (!__tmperr) > { > __tm->tm_mon = __mem % 12; > __state._M_have_mon = 1; > __state._M_want_xday = 1; > } > break; > case 'c': > > const char_type* __dt[2]; > __tp._M_date_time_formats(__dt); > __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, > __tm, __dt[0], __state); > if (!__tmperr) > __state._M_want_xday = 1; > break; > case 'C': > > __beg = _M_extract_num(__beg, __end, __mem, 0, 99, 2, > __io, __tmperr); > if (!__tmperr) > { > __state._M_century = __mem; > __state._M_have_century = 1; > __state._M_want_xday = 1; > } > break; > case 'd': > case 'e': > > if (__ctype.is(ctype_base::space, *__beg)) > ++__beg; > __beg = _M_extract_num(__beg, __end, __mem, 1, 31, 2, > __io, __tmperr); > if (!__tmperr) > { > __tm->tm_mday = __mem; > __state._M_have_mday = 1; > __state._M_want_xday = 1; > } > break; > case 'D': > > __cs = "%m/%d/%y"; > __ctype.widen(__cs, __cs + 9, __wcs); > __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, > __tm, __wcs, __state); > if (!__tmperr) > __state._M_want_xday = 1; > break; > case 'H': > > __beg = _M_extract_num(__beg, __end, __mem, 0, 23, 2, > __io, __tmperr); > if (!__tmperr) > { > __tm->tm_hour = __mem; > __state._M_have_I = 0; > } > break; > case 'I': > > __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, > __io, __tmperr); > if (!__tmperr) > { > __tm->tm_hour = __mem % 12; > __state._M_have_I = 1; > } > break; > case 'j': > > __beg = _M_extract_num(__beg, __end, __mem, 1, 366, 3, > __io, __tmperr); > if (!__tmperr) > { > __tm->tm_yday = __mem - 1; > __state._M_have_yday = 1; > } > break; > case 'm': > > __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, > __io, __tmperr); > if (!__tmperr) > { > __tm->tm_mon = __mem - 1; > __state._M_have_mon = 1; > } > break; > case 'M': > > __beg = _M_extract_num(__beg, __end, __mem, 0, 59, 2, > __io, __tmperr); > if (!__tmperr) > __tm->tm_min = __mem; > break; > case 'n': > case 't': > while (__beg != __end > && __ctype.is(ctype_base::space, *__beg)) > ++__beg; > break; > case 'p': > > const char_type* __ampm[2]; > __tp._M_am_pm(&__ampm[0]); > if (!__ampm[0][0] || !__ampm[1][0]) > break; > __beg = _M_extract_name(__beg, __end, __mem, __ampm, > 2, __io, __tmperr); > if (!__tmperr && __mem) > __state._M_is_pm = 1; > break; > case 'r': > > const char_type* __ampm_format; > __tp._M_am_pm_format(&__ampm_format); > __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, > __tm, __ampm_format, __state); > break; > case 'R': > > __cs = "%H:%M"; > __ctype.widen(__cs, __cs + 6, __wcs); > __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, > __tm, __wcs, __state); > break; > case 'S': > > > > __beg = _M_extract_num(__beg, __end, __mem, 0, 60, 2, > > > > __io, __tmperr); > if (!__tmperr) > __tm->tm_sec = __mem; > break; > case 'T': > > __cs = "%H:%M:%S"; > __ctype.widen(__cs, __cs + 9, __wcs); > __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, > __tm, __wcs, __state); > break; > case 'U': > > __beg = _M_extract_num(__beg, __end, __mem, 0, 53, 2, > __io, __tmperr); > if (!__tmperr) > { > __state._M_week_no = __mem; > __state._M_have_uweek = 1; > } > break; > case 'w': > > __beg = _M_extract_num(__beg, __end, __mem, 0, 6, 1, > __io, __tmperr); > if (!__tmperr) > { > __tm->tm_wday = __mem; > __state._M_have_wday = 1; > } > break; > case 'W': > > __beg = _M_extract_num(__beg, __end, __mem, 0, 53, 2, > __io, __tmperr); > if (!__tmperr) > { > __state._M_week_no = __mem; > __state._M_have_wweek = 1; > } > break; > case 'x': > > const char_type* __dates[2]; > __tp._M_date_formats(__dates); > __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, > __tm, __dates[0], __state); > break; > case 'X': > > const char_type* __times[2]; > __tp._M_time_formats(__times); > __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, > __tm, __times[0], __state); > break; > case 'y': > > __beg = _M_extract_num(__beg, __end, __mem, 0, 99, 2, > __io, __tmperr); > if (!__tmperr) > { > __state._M_want_century = 1; > __state._M_want_xday = 1; > > > __c = 0; > if (__beg != __end) > __c = __ctype.narrow(*__beg, '*'); > if (__c >= '0' && __c <= '9') > { > ++__beg; > __mem = __mem * 10 + (__c - '0'); > if (__beg != __end) > { > __c = __ctype.narrow(*__beg, '*'); > if (__c >= '0' && __c <= '9') > { > ++__beg; > __mem = __mem * 10 + (__c - '0'); > } > } > __mem -= 1900; > __state._M_want_century = 0; > } > > > else if (__mem < 69) > __mem += 100; > __tm->tm_year = __mem; > } > break; > case 'Y': > > __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, > __io, __tmperr); > if (!__tmperr) > { > __tm->tm_year = __mem - 1900; > __state._M_want_century = 0; > __state._M_want_xday = 1; > } > break; > case 'Z': > > if (__ctype.is(ctype_base::upper, *__beg)) > { > int __tmp; > __beg = _M_extract_name(__beg, __end, __tmp, > __timepunct_cache<_CharT>::_S_timezones, > 14, __io, __tmperr); > > > if (__beg != __end && !__tmperr && __tmp == 0 > && (*__beg == __ctype.widen('-') > || *__beg == __ctype.widen('+'))) > { > __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, > __io, __tmperr); > __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, > __io, __tmperr); > } > } > else > __tmperr |= ios_base::failbit; > break; > case '%': > if (*__beg == __ctype.widen('%')) > ++__beg; > else > __tmperr |= ios_base::failbit; > break; > default: > > __tmperr |= ios_base::failbit; > } > } > else if (__ctype.is(ctype_base::space, __format[__i])) > { > > while (__beg != __end > && __ctype.is(ctype_base::space, *__beg)) > ++__beg; > } > else > { > > > if (__ctype.tolower(__format[__i]) == __ctype.tolower(*__beg) > || __ctype.toupper(__format[__i]) == __ctype.toupper(*__beg)) > ++__beg; > else > __tmperr |= ios_base::failbit; > } > } > > if (__tmperr || __i != __len) > __err |= ios_base::failbit; > > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm, > const _CharT* __format) const > { > __time_get_state __state = __time_get_state(); > return _M_extract_via_format(__beg, __end, __io, __err, __tm, > __format, __state); > } > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > _M_extract_num(iter_type __beg, iter_type __end, int& __member, > int __min, int __max, size_t __len, > ios_base& __io, ios_base::iostate& __err) const > { > const locale& __loc = __io._M_getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > size_t __i = 0; > int __value = 0; > for (; __beg != __end && __i < __len; ++__beg, (void)++__i) > { > const char __c = __ctype.narrow(*__beg, '*'); > if (__c >= '0' && __c <= '9') > { > __value = __value * 10 + (__c - '0'); > if (__value > __max) > break; > } > else > break; > } > if (__i && __value >= __min && __value <= __max) > __member = __value; > else > __err |= ios_base::failbit; > > return __beg; > } > > > > > > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > _M_extract_name(iter_type __beg, iter_type __end, int& __member, > const _CharT** __names, size_t __indexlen, > ios_base& __io, ios_base::iostate& __err) const > { > typedef char_traits<_CharT> __traits_type; > const locale& __loc = __io._M_getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > size_t* __matches > = static_cast<size_t*>(__builtin_alloca(2 * sizeof(size_t) > * __indexlen)); > size_t* __lengths = __matches + __indexlen; > size_t __nmatches = 0; > size_t __pos = 0; > bool __testvalid = true; > const char_type* __name; > bool __begupdated = false; > > > if (__beg != __end) > { > const char_type __c = *__beg; > > const char_type __cl = __ctype.tolower(__c); > const char_type __cu = __ctype.toupper(__c); > for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) > if (__cl == __ctype.tolower(__names[__i1][0]) > || __cu == __ctype.toupper(__names[__i1][0])) > { > __lengths[__nmatches] > = __traits_type::length(__names[__i1]); > __matches[__nmatches++] = __i1; > } > } > > while (__nmatches > 1) > { > > size_t __minlen = __lengths[0]; > for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) > __minlen = std::min(__minlen, __lengths[__i2]); > ++__pos; > ++__beg; > if (__pos == __minlen) > { > > > > > > > bool __match_longer = false; > > if (__beg != __end) > { > > const char_type __cl = __ctype.tolower(*__beg); > const char_type __cu = __ctype.toupper(*__beg); > for (size_t __i3 = 0; __i3 < __nmatches; ++__i3) > { > __name = __names[__matches[__i3]]; > if (__lengths[__i3] > __pos > && (__ctype.tolower(__name[__pos]) == __cl > || __ctype.toupper(__name[__pos]) == __cu)) > { > __match_longer = true; > break; > } > } > } > for (size_t __i4 = 0; __i4 < __nmatches;) > if (__match_longer == (__lengths[__i4] == __pos)) > { > __matches[__i4] = __matches[--__nmatches]; > __lengths[__i4] = __lengths[__nmatches]; > } > else > ++__i4; > if (__match_longer) > { > __minlen = __lengths[0]; > for (size_t __i5 = 1; __i5 < __nmatches; ++__i5) > __minlen = std::min(__minlen, __lengths[__i5]); > } > else > { > > > if (__nmatches == 2 && (__indexlen & 1) == 0) > { > if (__matches[0] < __indexlen / 2) > { > if (__matches[1] == __matches[0] + __indexlen / 2) > __nmatches = 1; > } > else if (__matches[1] == __matches[0] - __indexlen / 2) > { > __matches[0] = __matches[1]; > __lengths[0] = __lengths[1]; > __nmatches = 1; > } > } > __begupdated = true; > break; > } > } > if (__pos < __minlen && __beg != __end) > { > > const char_type __cl = __ctype.tolower(*__beg); > const char_type __cu = __ctype.toupper(*__beg); > for (size_t __i6 = 0; __i6 < __nmatches;) > { > __name = __names[__matches[__i6]]; > if (__ctype.tolower(__name[__pos]) != __cl > && __ctype.toupper(__name[__pos]) != __cu) > { > __matches[__i6] = __matches[--__nmatches]; > __lengths[__i6] = __lengths[__nmatches]; > } > else > ++__i6; > } > } > else > break; > } > > if (__nmatches == 1) > { > > if (!__begupdated) > { > ++__beg; > ++__pos; > } > __name = __names[__matches[0]]; > const size_t __len = __lengths[0]; > while (__pos < __len > && __beg != __end > > && (__ctype.tolower(__name[__pos]) == __ctype.tolower(*__beg) > || (__ctype.toupper(__name[__pos]) > == __ctype.toupper(*__beg)))) > ++__beg, (void)++__pos; > > if (__len == __pos) > __member = __matches[0]; > else > __testvalid = false; > } > else > __testvalid = false; > if (!__testvalid) > __err |= ios_base::failbit; > > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, > const _CharT** __names, size_t __indexlen, > ios_base& __io, ios_base::iostate& __err) const > { > typedef char_traits<_CharT> __traits_type; > const locale& __loc = __io._M_getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > int* __matches = static_cast<int*>(__builtin_alloca(2 * sizeof(int) > * __indexlen)); > size_t __nmatches = 0; > size_t* __matches_lengths = 0; > size_t __pos = 0; > > if (__beg != __end) > { > const char_type __c = *__beg; > for (size_t __i = 0; __i < 2 * __indexlen; ++__i) > if (__c == __names[__i][0] > || __c == __ctype.toupper(__names[__i][0])) > __matches[__nmatches++] = __i; > } > > if (__nmatches) > { > ++__beg; > ++__pos; > > __matches_lengths > = static_cast<size_t*>(__builtin_alloca(sizeof(size_t) > * __nmatches)); > for (size_t __i = 0; __i < __nmatches; ++__i) > __matches_lengths[__i] > = __traits_type::length(__names[__matches[__i]]); > } > > for (; __beg != __end; ++__beg, (void)++__pos) > { > size_t __nskipped = 0; > const char_type __c = *__beg; > for (size_t __i = 0; __i < __nmatches;) > { > const char_type* __name = __names[__matches[__i]]; > if (__pos >= __matches_lengths[__i]) > ++__nskipped, ++__i; > else if (!(__name[__pos] == __c)) > { > --__nmatches; > __matches[__i] = __matches[__nmatches]; > __matches_lengths[__i] = __matches_lengths[__nmatches]; > } > else > ++__i; > } > if (__nskipped == __nmatches) > break; > } > > if ((__nmatches == 1 && __matches_lengths[0] == __pos) > || (__nmatches == 2 && (__matches_lengths[0] == __pos > || __matches_lengths[1] == __pos))) > __member = (__matches[0] >= (int)__indexlen > ? __matches[0] - (int)__indexlen : __matches[0]); > else > __err |= ios_base::failbit; > > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > do_get_time(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { > const locale& __loc = __io._M_getloc(); > const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); > const char_type* __times[2]; > __tp._M_time_formats(__times); > __time_get_state __state = __time_get_state(); > __beg = _M_extract_via_format(__beg, __end, __io, __err, > __tm, __times[0], __state); > __state._M_finalize_state(__tm); > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > do_get_date(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { > const locale& __loc = __io._M_getloc(); > const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); > const char_type* __dates[2]; > __tp._M_date_formats(__dates); > __time_get_state __state = __time_get_state(); > __beg = _M_extract_via_format(__beg, __end, __io, __err, > __tm, __dates[0], __state); > __state._M_finalize_state(__tm); > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { > const locale& __loc = __io._M_getloc(); > const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); > const char_type* __days[14]; > __tp._M_days_abbreviated(__days); > __tp._M_days(__days + 7); > int __tmpwday; > ios_base::iostate __tmperr = ios_base::goodbit; > > __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7, > __io, __tmperr); > if (!__tmperr) > __tm->tm_wday = __tmpwday; > else > __err |= ios_base::failbit; > > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > do_get_monthname(iter_type __beg, iter_type __end, > ios_base& __io, ios_base::iostate& __err, tm* __tm) const > { > const locale& __loc = __io._M_getloc(); > const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); > const char_type* __months[24]; > __tp._M_months_abbreviated(__months); > __tp._M_months(__months + 12); > int __tmpmon; > ios_base::iostate __tmperr = ios_base::goodbit; > > __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12, > __io, __tmperr); > if (!__tmperr) > __tm->tm_mon = __tmpmon; > else > __err |= ios_base::failbit; > > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } > > template<typename _CharT, typename _InIter> > _InIter > time_get<_CharT, _InIter>:: > do_get_year(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm) const > { > int __tmpyear; > ios_base::iostate __tmperr = ios_base::goodbit; > const locale& __loc = __io._M_getloc(); > const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); > > __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 99, 2, > __io, __tmperr); > if (!__tmperr) > { > char __c = 0; > if (__beg != __end) > __c = __ctype.narrow(*__beg, '*'); > > > > if (__c >= '0' && __c <= '9') > { > ++__beg; > __tmpyear = __tmpyear * 10 + (__c - '0'); > if (__beg != __end) > { > __c = __ctype.narrow(*__beg, '*'); > if (__c >= '0' && __c <= '9') > { > ++__beg; > __tmpyear = __tmpyear * 10 + (__c - '0'); > } > } > __tmpyear -= 1900; > } > else if (__tmpyear < 69) > __tmpyear += 100; > __tm->tm_year = __tmpyear; > } > else > __err |= ios_base::failbit; > > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } > > > template<typename _CharT, typename _InIter> > inline > _InIter > time_get<_CharT, _InIter>:: > get(iter_type __s, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm, const char_type* __fmt, > const char_type* __fmtend) const > { > const locale& __loc = __io._M_getloc(); > ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); > __err = ios_base::goodbit; > bool __use_state = false; > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wpmf-conversions" > > > > > > > if ((void*)(this->*(&time_get::do_get)) == (void*)(&time_get::do_get)) > __use_state = true; >#pragma GCC diagnostic pop > > __time_get_state __state = __time_get_state(); > while (__fmt != __fmtend && > __err == ios_base::goodbit) > { > if (__s == __end) > { > __err = ios_base::eofbit | ios_base::failbit; > break; > } > else if (__ctype.narrow(*__fmt, 0) == '%') > { > const char_type* __fmt_start = __fmt; > char __format; > char __mod = 0; > if (++__fmt == __fmtend) > { > __err = ios_base::failbit; > break; > } > const char __c = __ctype.narrow(*__fmt, 0); > if (__c != 'E' && __c != 'O') > __format = __c; > else if (++__fmt != __fmtend) > { > __mod = __c; > __format = __ctype.narrow(*__fmt, 0); > } > else > { > __err = ios_base::failbit; > break; > } > if (__use_state) > { > char_type __new_fmt[4]; > __new_fmt[0] = __fmt_start[0]; > __new_fmt[1] = __fmt_start[1]; > if (__mod) > { > __new_fmt[2] = __fmt_start[2]; > __new_fmt[3] = char_type(); > } > else > __new_fmt[2] = char_type(); > __s = _M_extract_via_format(__s, __end, __io, __err, __tm, > __new_fmt, __state); > if (__s == __end) > __err |= ios_base::eofbit; > } > else > __s = this->do_get(__s, __end, __io, __err, __tm, __format, > __mod); > ++__fmt; > } > else if (__ctype.is(ctype_base::space, *__fmt)) > { > ++__fmt; > while (__fmt != __fmtend && > __ctype.is(ctype_base::space, *__fmt)) > ++__fmt; > > while (__s != __end && > __ctype.is(ctype_base::space, *__s)) > ++__s; > } > > else if (__ctype.tolower(*__s) == __ctype.tolower(*__fmt) || > __ctype.toupper(*__s) == __ctype.toupper(*__fmt)) > { > ++__s; > ++__fmt; > } > else > { > __err = ios_base::failbit; > break; > } > } > if (__use_state) > __state._M_finalize_state(__tm); > return __s; > } > > template<typename _CharT, typename _InIter> > inline > _InIter > time_get<_CharT, _InIter>:: > do_get(iter_type __beg, iter_type __end, ios_base& __io, > ios_base::iostate& __err, tm* __tm, > char __format, char __mod) const > { > const locale& __loc = __io._M_getloc(); > ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); > __err = ios_base::goodbit; > > char_type __fmt[4]; > __fmt[0] = __ctype.widen('%'); > if (!__mod) > { > __fmt[1] = __format; > __fmt[2] = char_type(); > } > else > { > __fmt[1] = __mod; > __fmt[2] = __format; > __fmt[3] = char_type(); > } > > __time_get_state __state = __time_get_state(); > __beg = _M_extract_via_format(__beg, __end, __io, __err, __tm, __fmt, > __state); > __state._M_finalize_state(__tm); > if (__beg == __end) > __err |= ios_base::eofbit; > return __beg; > } > > > > template<typename _CharT, typename _OutIter> > _OutIter > time_put<_CharT, _OutIter>:: > put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, > const _CharT* __beg, const _CharT* __end) const > { > const locale& __loc = __io._M_getloc(); > ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); > for (; __beg != __end; ++__beg) > if (__ctype.narrow(*__beg, 0) != '%') > { > *__s = *__beg; > ++__s; > } > else if (++__beg != __end) > { > char __format; > char __mod = 0; > const char __c = __ctype.narrow(*__beg, 0); > if (__c != 'E' && __c != 'O') > __format = __c; > else if (++__beg != __end) > { > __mod = __c; > __format = __ctype.narrow(*__beg, 0); > } > else > break; > __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); > } > else > break; > return __s; > } > > template<typename _CharT, typename _OutIter> > _OutIter > time_put<_CharT, _OutIter>:: > do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, > char __format, char __mod) const > { > const locale& __loc = __io._M_getloc(); > ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); > __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); > > > > const size_t __maxlen = 128; > char_type __res[__maxlen]; > > > > > > > char_type __fmt[4]; > __fmt[0] = __ctype.widen('%'); > if (!__mod) > { > __fmt[1] = __format; > __fmt[2] = char_type(); > } > else > { > __fmt[1] = __mod; > __fmt[2] = __format; > __fmt[3] = char_type(); > } > > __tp._M_put(__res, __maxlen, __fmt, __tm); > > > return std::__write(__s, __res, char_traits<char_type>::length(__res)); > } > > > > > > 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&); > > > > >} ># 2070 "/usr/include/c++/13/bits/locale_facets_nonio.h" 2 3 ># 44 "/usr/include/c++/13/locale" 2 3 > ># 1 "/usr/include/c++/13/bits/locale_conv.h" 1 3 ># 42 "/usr/include/c++/13/bits/locale_conv.h" 3 >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) > { > if (__first == __last) > { > __outstr.clear(); > __count = 0; > return true; > } > > size_t __outchars = 0; > auto __next = __first; > const auto __maxlen = __cvt.max_length() + 1; > > codecvt_base::result __result; > do > { > __outstr.resize(__outstr.size() + (__last - __next) * __maxlen); > auto __outnext = &__outstr.front() + __outchars; > auto const __outlast = &__outstr.back() + 1; > __result = (__cvt.*__fn)(__state, __next, __last, __next, > __outnext, __outlast, __outnext); > __outchars = __outnext - &__outstr.front(); > } > while (__result == codecvt_base::partial && __next != __last > && ptrdiff_t(__outstr.size() - __outchars) < __maxlen); > > if (__result == codecvt_base::error) > { > __count = __next - __first; > return false; > } > > > > if constexpr (is_same<typename _Codecvt::intern_type, > typename _Codecvt::extern_type>()) > if (__result == codecvt_base::noconv) > { > __outstr.assign(__first, __last); > __count = __last - __first; > return true; > } > > __outstr.resize(__outchars); > __count = __next - __first; > return true; > } > > > template<typename _CharT, typename _Traits, typename _Alloc, typename _State> > inline 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) > { > using _Codecvt = codecvt<_CharT, char, _State>; > using _ConvFn > = codecvt_base::result > (_Codecvt::*)(_State&, const char*, const char*, const char*&, > _CharT*, _CharT*, _CharT*&) const; > _ConvFn __fn = &codecvt<_CharT, char, _State>::in; > return __do_str_codecvt(__first, __last, __outstr, __cvt, __state, > __count, __fn); > } > > > template<typename _CharT, typename _Traits, typename _Alloc, typename _State> > inline 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 __n; > return __str_codecvt_in(__first, __last, __outstr, __cvt, __state, __n); > } > > > template<typename _CharT, typename _Traits, typename _Alloc, typename _State> > inline bool > __str_codecvt_in_all(const char* __first, const char* __last, > basic_string<_CharT, _Traits, _Alloc>& __outstr, > const codecvt<_CharT, char, _State>& __cvt) > { > _State __state = {}; > size_t __n; > return __str_codecvt_in(__first, __last, __outstr, __cvt, __state, __n) > && (__n == size_t(__last - __first)); > } > > > template<typename _CharT, typename _Traits, typename _Alloc, typename _State> > inline 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) > { > using _Codecvt = codecvt<_CharT, char, _State>; > using _ConvFn > = codecvt_base::result > (_Codecvt::*)(_State&, const _CharT*, const _CharT*, const _CharT*&, > char*, char*, char*&) const; > _ConvFn __fn = &codecvt<_CharT, char, _State>::out; > return __do_str_codecvt(__first, __last, __outstr, __cvt, __state, > __count, __fn); > } > > > template<typename _CharT, typename _Traits, typename _Alloc, typename _State> > inline 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 __n; > return __str_codecvt_out(__first, __last, __outstr, __cvt, __state, __n); > } > > > template<typename _CharT, typename _Traits, typename _Alloc, typename _State> > inline bool > __str_codecvt_out_all(const _CharT* __first, const _CharT* __last, > basic_string<char, _Traits, _Alloc>& __outstr, > const codecvt<_CharT, char, _State>& __cvt) > { > _State __state = {}; > size_t __n; > return __str_codecvt_out(__first, __last, __outstr, __cvt, __state, __n) > && (__n == size_t(__last - __first)); > } ># 223 "/usr/include/c++/13/bits/locale_conv.h" 3 > namespace __detail > { > template<typename _Tp> > struct _Scoped_ptr > { > __attribute__((__nonnull__(2))) > explicit > _Scoped_ptr(_Tp* __ptr) noexcept > : _M_ptr(__ptr) > { } > > _Scoped_ptr(_Tp* __ptr, const char* __msg) > : _M_ptr(__ptr) > { > if (!__ptr) > __throw_logic_error(__msg); > } > > ~_Scoped_ptr() { delete _M_ptr; } > > _Scoped_ptr(const _Scoped_ptr&) = delete; > _Scoped_ptr& operator=(const _Scoped_ptr&) = delete; > > __attribute__((__returns_nonnull__)) > _Tp* operator->() const noexcept { return _M_ptr; } > > _Tp& operator*() const noexcept { return *_M_ptr; } > > 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() : _M_cvt(new _Codecvt()) { } > > > > > > > > explicit > wstring_convert(_Codecvt* __pcvt) : _M_cvt(__pcvt, "wstring_convert") > { } ># 291 "/usr/include/c++/13/bits/locale_conv.h" 3 > wstring_convert(_Codecvt* __pcvt, state_type __state) > : _M_cvt(__pcvt, "wstring_convert"), > _M_state(__state), _M_with_cvtstate(true) > { } > > > > > > > explicit > wstring_convert(const byte_string& __byte_err, > const wide_string& __wide_err = wide_string()) > : _M_cvt(new _Codecvt), > _M_byte_err_string(__byte_err), _M_wide_err_string(__wide_err), > _M_with_strings(true) > { } > > ~wstring_convert() = default; > > > > wstring_convert(const wstring_convert&) = delete; > wstring_convert& operator=(const wstring_convert&) = delete; > > > wide_string > from_bytes(char __byte) > { > char __bytes[2] = { __byte }; > return from_bytes(__bytes, __bytes+1); > } > > wide_string > from_bytes(const char* __ptr) > { return from_bytes(__ptr, __ptr+char_traits<char>::length(__ptr)); } > > wide_string > from_bytes(const byte_string& __str) > { > auto __ptr = __str.data(); > return from_bytes(__ptr, __ptr + __str.size()); > } > > wide_string > from_bytes(const char* __first, const char* __last) > { > if (!_M_with_cvtstate) > _M_state = state_type(); > wide_string __out{ _M_wide_err_string.get_allocator() }; > if (__str_codecvt_in(__first, __last, __out, *_M_cvt, _M_state, > _M_count)) > return __out; > if (_M_with_strings) > return _M_wide_err_string; > __throw_range_error("wstring_convert::from_bytes"); > } > > > > byte_string > to_bytes(_Elem __wchar) > { > _Elem __wchars[2] = { __wchar }; > return to_bytes(__wchars, __wchars+1); > } > > byte_string > to_bytes(const _Elem* __ptr) > { > return to_bytes(__ptr, __ptr+wide_string::traits_type::length(__ptr)); > } > > byte_string > to_bytes(const wide_string& __wstr) > { > auto __ptr = __wstr.data(); > return to_bytes(__ptr, __ptr + __wstr.size()); > } > > byte_string > to_bytes(const _Elem* __first, const _Elem* __last) > { > if (!_M_with_cvtstate) > _M_state = state_type(); > byte_string __out{ _M_byte_err_string.get_allocator() }; > if (__str_codecvt_out(__first, __last, __out, *_M_cvt, _M_state, > _M_count)) > return __out; > if (_M_with_strings) > return _M_byte_err_string; > __throw_range_error("wstring_convert::to_bytes"); > } > > > > > > size_t converted() const noexcept { return _M_count; } > > > state_type state() const { return _M_state; } > > 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() : wbuffer_convert(nullptr) { } ># 427 "/usr/include/c++/13/bits/locale_conv.h" 3 > explicit > wbuffer_convert(streambuf* __bytebuf, _Codecvt* __pcvt = new _Codecvt, > state_type __state = state_type()) > : _M_buf(__bytebuf), _M_cvt(__pcvt, "wbuffer_convert"), > _M_state(__state), _M_always_noconv(_M_cvt->always_noconv()) > { > if (_M_buf) > { > this->setp(_M_put_area, _M_put_area + _S_buffer_length); > this->setg(_M_get_area + _S_putback_length, > _M_get_area + _S_putback_length, > _M_get_area + _S_putback_length); > } > } > > ~wbuffer_convert() = default; > > > > wbuffer_convert(const wbuffer_convert&) = delete; > wbuffer_convert& operator=(const wbuffer_convert&) = delete; > > streambuf* rdbuf() const noexcept { return _M_buf; } > > streambuf* > rdbuf(streambuf *__bytebuf) noexcept > { > auto __prev = _M_buf; > _M_buf = __bytebuf; > return __prev; > } > > > state_type state() const noexcept { return _M_state; } > > protected: > int > sync() > { return _M_buf && _M_conv_put() && !_M_buf->pubsync() ? 0 : -1; } > > typename _Wide_streambuf::int_type > overflow(typename _Wide_streambuf::int_type __out) > { > if (!_M_buf || !_M_conv_put()) > return _Tr::eof(); > else if (!_Tr::eq_int_type(__out, _Tr::eof())) > return this->sputc(__out); > return _Tr::not_eof(__out); > } > > typename _Wide_streambuf::int_type > underflow() > { > if (!_M_buf) > return _Tr::eof(); > > if (this->gptr() < this->egptr() || (_M_buf && _M_conv_get())) > return _Tr::to_int_type(*this->gptr()); > else > return _Tr::eof(); > } > > streamsize > xsputn(const typename _Wide_streambuf::char_type* __s, streamsize __n) > { > if (!_M_buf || __n == 0) > return 0; > streamsize __done = 0; > do > { > auto __nn = std::min<streamsize>(this->epptr() - this->pptr(), > __n - __done); > _Tr::copy(this->pptr(), __s + __done, __nn); > this->pbump(__nn); > __done += __nn; > } while (__done < __n && _M_conv_put()); > return __done; > } > > private: > > bool > _M_conv_get() > { > const streamsize __pb1 = this->gptr() - this->eback(); > const streamsize __pb2 = _S_putback_length; > const streamsize __npb = std::min(__pb1, __pb2); > > _Tr::move(_M_get_area + _S_putback_length - __npb, > this->gptr() - __npb, __npb); > > streamsize __nbytes = sizeof(_M_get_buf) - _M_unconv; > __nbytes = std::min(__nbytes, _M_buf->in_avail()); > if (__nbytes < 1) > __nbytes = 1; > __nbytes = _M_buf->sgetn(_M_get_buf + _M_unconv, __nbytes); > if (__nbytes < 1) > return false; > __nbytes += _M_unconv; > > > > _Elem* __outbuf = _M_get_area + _S_putback_length; > _Elem* __outnext = __outbuf; > const char* __bnext = _M_get_buf; > > codecvt_base::result __result; > if (_M_always_noconv) > __result = codecvt_base::noconv; > else > { > _Elem* __outend = _M_get_area + _S_buffer_length; > > __result = _M_cvt->in(_M_state, > __bnext, __bnext + __nbytes, __bnext, > __outbuf, __outend, __outnext); > } > > if (__result == codecvt_base::noconv) > { > > auto __get_buf = reinterpret_cast<const _Elem*>(_M_get_buf); > _Tr::copy(__outbuf, __get_buf, __nbytes); > _M_unconv = 0; > return true; > } > > if ((_M_unconv = _M_get_buf + __nbytes - __bnext)) > char_traits<char>::move(_M_get_buf, __bnext, _M_unconv); > > this->setg(__outbuf, __outbuf, __outnext); > > return __result != codecvt_base::error; > } > > > bool > _M_put(...) > { return false; } > > bool > _M_put(const char* __p, streamsize __n) > { > if (_M_buf->sputn(__p, __n) < __n) > return false; > return true; > } > > > bool > _M_conv_put() > { > _Elem* const __first = this->pbase(); > const _Elem* const __last = this->pptr(); > const streamsize __pending = __last - __first; > > if (_M_always_noconv) > return _M_put(__first, __pending); > > char __outbuf[2 * _S_buffer_length]; > > const _Elem* __next = __first; > const _Elem* __start; > do > { > __start = __next; > char* __outnext = __outbuf; > char* const __outlast = __outbuf + sizeof(__outbuf); > auto __result = _M_cvt->out(_M_state, __next, __last, __next, > __outnext, __outlast, __outnext); > if (__result == codecvt_base::error) > return false; > else if (__result == codecvt_base::noconv) > return _M_put(__next, __pending); > > if (!_M_put(__outbuf, __outnext - __outbuf)) > return false; > } > while (__next != __last && __next != __start); > > if (__next != __last) > _Tr::move(__first, __next, __last - __next); > > this->pbump(__first - __next); > return __next != __first; > } > > 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; > }; > > > > >} ># 46 "/usr/include/c++/13/locale" 2 3 ># 42 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/sstream" 1 3 ># 36 "/usr/include/c++/13/sstream" 3 > ># 37 "/usr/include/c++/13/sstream" 3 ># 55 "/usr/include/c++/13/sstream" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > >namespace __cxx11 { ># 78 "/usr/include/c++/13/sstream" 3 > 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: ># 121 "/usr/include/c++/13/sstream" 3 > basic_stringbuf() > : __streambuf_type(), _M_mode(ios_base::in | ios_base::out), _M_string() > { } ># 132 "/usr/include/c++/13/sstream" 3 > explicit > basic_stringbuf(ios_base::openmode __mode) > : __streambuf_type(), _M_mode(__mode), _M_string() > { } ># 145 "/usr/include/c++/13/sstream" 3 > explicit > basic_stringbuf(const __string_type& __str, > ios_base::openmode __mode = ios_base::in | ios_base::out) > : __streambuf_type(), _M_mode(), > _M_string(__str.data(), __str.size(), __str.get_allocator()) > { _M_stringbuf_init(__mode); } > > > basic_stringbuf(const basic_stringbuf&) = delete; > > basic_stringbuf(basic_stringbuf&& __rhs) > : basic_stringbuf(std::move(__rhs), __xfer_bufptrs(__rhs, this)) > { __rhs._M_sync(const_cast<char_type*>(__rhs._M_string.data()), 0, 0); } ># 209 "/usr/include/c++/13/sstream" 3 > basic_stringbuf& > operator=(const basic_stringbuf&) = delete; > > basic_stringbuf& > operator=(basic_stringbuf&& __rhs) > { > __xfer_bufptrs __st{__rhs, this}; > const __streambuf_type& __base = __rhs; > __streambuf_type::operator=(__base); > this->pubimbue(__rhs.getloc()); > _M_mode = __rhs._M_mode; > _M_string = std::move(__rhs._M_string); > __rhs._M_sync(const_cast<char_type*>(__rhs._M_string.data()), 0, 0); > return *this; > } > > void > swap(basic_stringbuf& __rhs) noexcept(_Noexcept_swap::value) > { > __xfer_bufptrs __l_st{*this, std::__addressof(__rhs)}; > __xfer_bufptrs __r_st{__rhs, this}; > __streambuf_type& __base = __rhs; > __streambuf_type::swap(__base); > __rhs.pubimbue(this->pubimbue(__rhs.getloc())); > std::swap(_M_mode, __rhs._M_mode); > std::swap(_M_string, __rhs._M_string); > } ># 248 "/usr/include/c++/13/sstream" 3 > __string_type > str() const > { > __string_type __ret(_M_string.get_allocator()); > if (char_type* __hi = _M_high_mark()) > __ret.assign(this->pbase(), __hi); > else > __ret = _M_string; > return __ret; > } ># 304 "/usr/include/c++/13/sstream" 3 > void > str(const __string_type& __s) > { > > > _M_string.assign(__s.data(), __s.size()); > _M_stringbuf_init(_M_mode); > } ># 333 "/usr/include/c++/13/sstream" 3 > protected: > > void > _M_stringbuf_init(ios_base::openmode __mode) > { > _M_mode = __mode; > __size_type __len = 0; > if (_M_mode & (ios_base::ate | ios_base::app)) > __len = _M_string.size(); > _M_sync(const_cast<char_type*>(_M_string.data()), 0, __len); > } > > virtual streamsize > showmanyc() > { > streamsize __ret = -1; > if (_M_mode & ios_base::in) > { > _M_update_egptr(); > __ret = this->egptr() - this->gptr(); > } > return __ret; > } > > virtual int_type > underflow(); > > virtual int_type > pbackfail(int_type __c = traits_type::eof()); > > virtual int_type > overflow(int_type __c = traits_type::eof()); ># 377 "/usr/include/c++/13/sstream" 3 > virtual __streambuf_type* > setbuf(char_type* __s, streamsize __n) > { > if (__s && __n >= 0) > { > > > > > > > _M_string.clear(); > > > _M_sync(__s, __n, 0); > } > return this; > } > > virtual pos_type > seekoff(off_type __off, ios_base::seekdir __way, > ios_base::openmode __mode = ios_base::in | ios_base::out); > > virtual pos_type > seekpos(pos_type __sp, > ios_base::openmode __mode = ios_base::in | ios_base::out); > > > > > void > _M_sync(char_type* __base, __size_type __i, __size_type __o); > > > > void > _M_update_egptr() > { > if (char_type* __pptr = this->pptr()) > { > char_type* __egptr = this->egptr(); > if (!__egptr || __pptr > __egptr) > { > if (_M_mode & ios_base::in) > this->setg(this->eback(), this->gptr(), __pptr); > else > this->setg(__pptr, __pptr, __pptr); > } > } > } > > > > void > _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off); > > private: > > > > > __attribute__((__always_inline__)) > char_type* > _M_high_mark() const noexcept > { > if (char_type* __pptr = this->pptr()) > { > char_type* __egptr = this->egptr(); > if (!__egptr || __pptr > __egptr) > return __pptr; > else > return __egptr; > } > return 0; > } > > > > > > struct __xfer_bufptrs > { > __xfer_bufptrs(const basic_stringbuf& __from, basic_stringbuf* __to) > : _M_to{__to}, _M_goff{-1, -1, -1}, _M_poff{-1, -1, -1} > { > const _CharT* const __str = __from._M_string.data(); > const _CharT* __end = nullptr; > if (__from.eback()) > { > _M_goff[0] = __from.eback() - __str; > _M_goff[1] = __from.gptr() - __str; > _M_goff[2] = __from.egptr() - __str; > __end = __from.egptr(); > } > if (__from.pbase()) > { > _M_poff[0] = __from.pbase() - __str; > _M_poff[1] = __from.pptr() - __from.pbase(); > _M_poff[2] = __from.epptr() - __str; > if (!__end || __from.pptr() > __end) > __end = __from.pptr(); > } > > > if (__end) > { > > > auto& __mut_from = const_cast<basic_stringbuf&>(__from); > __mut_from._M_string._M_length(__end - __str); > } > } > > ~__xfer_bufptrs() > { > char_type* __str = const_cast<char_type*>(_M_to->_M_string.data()); > if (_M_goff[0] != -1) > _M_to->setg(__str+_M_goff[0], __str+_M_goff[1], __str+_M_goff[2]); > if (_M_poff[0] != -1) > _M_to->_M_pbump(__str+_M_poff[0], __str+_M_poff[2], _M_poff[1]); > } > > basic_stringbuf* _M_to; > off_type _M_goff[3]; > off_type _M_poff[3]; > }; ># 513 "/usr/include/c++/13/sstream" 3 > basic_stringbuf(basic_stringbuf&& __rhs, __xfer_bufptrs&&) > : __streambuf_type(static_cast<const __streambuf_type&>(__rhs)), > _M_mode(__rhs._M_mode), _M_string(std::move(__rhs._M_string)) > { } ># 528 "/usr/include/c++/13/sstream" 3 > }; ># 546 "/usr/include/c++/13/sstream" 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: ># 580 "/usr/include/c++/13/sstream" 3 > basic_istringstream() > : __istream_type(), _M_stringbuf(ios_base::in) > { this->init(&_M_stringbuf); } ># 596 "/usr/include/c++/13/sstream" 3 > explicit > basic_istringstream(ios_base::openmode __mode) > : __istream_type(), _M_stringbuf(__mode | ios_base::in) > { this->init(&_M_stringbuf); } ># 614 "/usr/include/c++/13/sstream" 3 > explicit > basic_istringstream(const __string_type& __str, > ios_base::openmode __mode = ios_base::in) > : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) > { this->init(&_M_stringbuf); } > > > > > > > > ~basic_istringstream() > { } > > > basic_istringstream(const basic_istringstream&) = delete; > > basic_istringstream(basic_istringstream&& __rhs) > : __istream_type(std::move(__rhs)), > _M_stringbuf(std::move(__rhs._M_stringbuf)) > { __istream_type::set_rdbuf(&_M_stringbuf); } ># 671 "/usr/include/c++/13/sstream" 3 > basic_istringstream& > operator=(const basic_istringstream&) = delete; > > basic_istringstream& > operator=(basic_istringstream&& __rhs) > { > __istream_type::operator=(std::move(__rhs)); > _M_stringbuf = std::move(__rhs._M_stringbuf); > return *this; > } > > void > swap(basic_istringstream& __rhs) > { > __istream_type::swap(__rhs); > _M_stringbuf.swap(__rhs._M_stringbuf); > } ># 697 "/usr/include/c++/13/sstream" 3 > __stringbuf_type* > rdbuf() const > { return const_cast<__stringbuf_type*>(&_M_stringbuf); } > > > > > > __string_type > str() const > { return _M_stringbuf.str(); } ># 735 "/usr/include/c++/13/sstream" 3 > void > str(const __string_type& __s) > { _M_stringbuf.str(__s); } ># 752 "/usr/include/c++/13/sstream" 3 > }; ># 770 "/usr/include/c++/13/sstream" 3 > 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: ># 804 "/usr/include/c++/13/sstream" 3 > basic_ostringstream() > : __ostream_type(), _M_stringbuf(ios_base::out) > { this->init(&_M_stringbuf); } ># 820 "/usr/include/c++/13/sstream" 3 > explicit > basic_ostringstream(ios_base::openmode __mode) > : __ostream_type(), _M_stringbuf(__mode | ios_base::out) > { this->init(&_M_stringbuf); } ># 838 "/usr/include/c++/13/sstream" 3 > explicit > basic_ostringstream(const __string_type& __str, > ios_base::openmode __mode = ios_base::out) > : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) > { this->init(&_M_stringbuf); } > > > > > > > > ~basic_ostringstream() > { } > > > basic_ostringstream(const basic_ostringstream&) = delete; > > basic_ostringstream(basic_ostringstream&& __rhs) > : __ostream_type(std::move(__rhs)), > _M_stringbuf(std::move(__rhs._M_stringbuf)) > { __ostream_type::set_rdbuf(&_M_stringbuf); } ># 895 "/usr/include/c++/13/sstream" 3 > basic_ostringstream& > operator=(const basic_ostringstream&) = delete; > > basic_ostringstream& > operator=(basic_ostringstream&& __rhs) > { > __ostream_type::operator=(std::move(__rhs)); > _M_stringbuf = std::move(__rhs._M_stringbuf); > return *this; > } > > void > swap(basic_ostringstream& __rhs) > { > __ostream_type::swap(__rhs); > _M_stringbuf.swap(__rhs._M_stringbuf); > } ># 921 "/usr/include/c++/13/sstream" 3 > __stringbuf_type* > rdbuf() const > { return const_cast<__stringbuf_type*>(&_M_stringbuf); } > > > > > > __string_type > str() const > { return _M_stringbuf.str(); } ># 959 "/usr/include/c++/13/sstream" 3 > void > str(const __string_type& __s) > { _M_stringbuf.str(__s); } ># 976 "/usr/include/c++/13/sstream" 3 > }; ># 994 "/usr/include/c++/13/sstream" 3 > 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: ># 1028 "/usr/include/c++/13/sstream" 3 > basic_stringstream() > : __iostream_type(), _M_stringbuf(ios_base::out | ios_base::in) > { this->init(&_M_stringbuf); } ># 1042 "/usr/include/c++/13/sstream" 3 > explicit > basic_stringstream(ios_base::openmode __m) > : __iostream_type(), _M_stringbuf(__m) > { this->init(&_M_stringbuf); } ># 1058 "/usr/include/c++/13/sstream" 3 > explicit > basic_stringstream(const __string_type& __str, > ios_base::openmode __m = ios_base::out | ios_base::in) > : __iostream_type(), _M_stringbuf(__str, __m) > { this->init(&_M_stringbuf); } > > > > > > > > ~basic_stringstream() > { } > > > basic_stringstream(const basic_stringstream&) = delete; > > basic_stringstream(basic_stringstream&& __rhs) > : __iostream_type(std::move(__rhs)), > _M_stringbuf(std::move(__rhs._M_stringbuf)) > { __iostream_type::set_rdbuf(&_M_stringbuf); } ># 1117 "/usr/include/c++/13/sstream" 3 > basic_stringstream& > operator=(const basic_stringstream&) = delete; > > basic_stringstream& > operator=(basic_stringstream&& __rhs) > { > __iostream_type::operator=(std::move(__rhs)); > _M_stringbuf = std::move(__rhs._M_stringbuf); > return *this; > } > > void > swap(basic_stringstream& __rhs) > { > __iostream_type::swap(__rhs); > _M_stringbuf.swap(__rhs._M_stringbuf); > } ># 1143 "/usr/include/c++/13/sstream" 3 > __stringbuf_type* > rdbuf() const > { return const_cast<__stringbuf_type*>(&_M_stringbuf); } > > > > > > __string_type > str() const > { return _M_stringbuf.str(); } ># 1181 "/usr/include/c++/13/sstream" 3 > void > str(const __string_type& __s) > { _M_stringbuf.str(__s); } ># 1198 "/usr/include/c++/13/sstream" 3 > }; > > > > template <class _CharT, class _Traits, class _Allocator> > inline void > swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x, > basic_stringbuf<_CharT, _Traits, _Allocator>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > > template <class _CharT, class _Traits, class _Allocator> > inline void > swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, > basic_istringstream<_CharT, _Traits, _Allocator>& __y) > { __x.swap(__y); } > > > template <class _CharT, class _Traits, class _Allocator> > inline void > swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, > basic_ostringstream<_CharT, _Traits, _Allocator>& __y) > { __x.swap(__y); } > > > template <class _CharT, class _Traits, class _Allocator> > inline void > swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, > basic_stringstream<_CharT, _Traits, _Allocator>& __y) > { __x.swap(__y); } > > >} > >} > > > > ># 1 "/usr/include/c++/13/bits/sstream.tcc" 1 3 ># 37 "/usr/include/c++/13/bits/sstream.tcc" 3 > ># 38 "/usr/include/c++/13/bits/sstream.tcc" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template <class _CharT, class _Traits, class _Alloc> > typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type > basic_stringbuf<_CharT, _Traits, _Alloc>:: > pbackfail(int_type __c) > { > int_type __ret = traits_type::eof(); > if (this->eback() < this->gptr()) > { > > > const bool __testeof = traits_type::eq_int_type(__c, __ret); > if (!__testeof) > { > const bool __testeq = traits_type::eq(traits_type:: > to_char_type(__c), > this->gptr()[-1]); > const bool __testout = this->_M_mode & ios_base::out; > if (__testeq || __testout) > { > this->gbump(-1); > if (!__testeq) > *this->gptr() = traits_type::to_char_type(__c); > __ret = __c; > } > } > else > { > this->gbump(-1); > __ret = traits_type::not_eof(__c); > } > } > return __ret; > } > > template <class _CharT, class _Traits, class _Alloc> > typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type > basic_stringbuf<_CharT, _Traits, _Alloc>:: > overflow(int_type __c) > { > const bool __testout = this->_M_mode & ios_base::out; > if (__builtin_expect(!__testout, false)) > return traits_type::eof(); > > const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); > if (__builtin_expect(__testeof, false)) > return traits_type::not_eof(__c); > > const __size_type __capacity = _M_string.capacity(); > > > if (size_t(this->epptr() - this->pbase()) < __capacity) > { > > char_type* __base = const_cast<char_type*>(_M_string.data()); > _M_pbump(__base, __base + __capacity, this->pptr() - this->pbase()); > if (_M_mode & ios_base::in) > { > const __size_type __nget = this->gptr() - this->eback(); > const __size_type __eget = this->egptr() - this->eback(); > this->setg(__base, __base + __nget, __base + __eget + 1); > } > *this->pptr() = traits_type::to_char_type(__c); > this->pbump(1); > return __c; > } > > > const __size_type __max_size = _M_string.max_size(); > const bool __testput = this->pptr() < this->epptr(); > if (__builtin_expect(!__testput && __capacity == __max_size, false)) > return traits_type::eof(); > > > > const char_type __conv = traits_type::to_char_type(__c); > if (!__testput) > { ># 129 "/usr/include/c++/13/bits/sstream.tcc" 3 > const __size_type __opt_len = std::max(__size_type(2 * __capacity), > __size_type(512)); > const __size_type __len = std::min(__opt_len, __max_size); > __string_type __tmp(_M_string.get_allocator()); > __tmp.reserve(__len); > if (this->pbase()) > __tmp.assign(this->pbase(), this->epptr() - this->pbase()); > __tmp.push_back(__conv); > _M_string.swap(__tmp); > _M_sync(const_cast<char_type*>(_M_string.data()), > this->gptr() - this->eback(), this->pptr() - this->pbase()); > } > else > *this->pptr() = __conv; > this->pbump(1); > return __c; > } > > template <class _CharT, class _Traits, class _Alloc> > typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type > basic_stringbuf<_CharT, _Traits, _Alloc>:: > underflow() > { > int_type __ret = traits_type::eof(); > const bool __testin = this->_M_mode & ios_base::in; > if (__testin) > { > > _M_update_egptr(); > > if (this->gptr() < this->egptr()) > __ret = traits_type::to_int_type(*this->gptr()); > } > return __ret; > } > > template <class _CharT, class _Traits, class _Alloc> > typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type > basic_stringbuf<_CharT, _Traits, _Alloc>:: > seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) > { > pos_type __ret = pos_type(off_type(-1)); > bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; > bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; > const bool __testboth = __testin && __testout && __way != ios_base::cur; > __testin &= !(__mode & ios_base::out); > __testout &= !(__mode & ios_base::in); > > > > const char_type* __beg = __testin ? this->eback() : this->pbase(); > if ((__beg || !__off) && (__testin || __testout || __testboth)) > { > _M_update_egptr(); > > off_type __newoffi = __off; > off_type __newoffo = __newoffi; > if (__way == ios_base::cur) > { > __newoffi += this->gptr() - __beg; > __newoffo += this->pptr() - __beg; > } > else if (__way == ios_base::end) > __newoffo = __newoffi += this->egptr() - __beg; > > if ((__testin || __testboth) > && __newoffi >= 0 > && this->egptr() - __beg >= __newoffi) > { > this->setg(this->eback(), this->eback() + __newoffi, > this->egptr()); > __ret = pos_type(__newoffi); > } > if ((__testout || __testboth) > && __newoffo >= 0 > && this->egptr() - __beg >= __newoffo) > { > _M_pbump(this->pbase(), this->epptr(), __newoffo); > __ret = pos_type(__newoffo); > } > } > return __ret; > } > > template <class _CharT, class _Traits, class _Alloc> > typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type > basic_stringbuf<_CharT, _Traits, _Alloc>:: > seekpos(pos_type __sp, ios_base::openmode __mode) > { > pos_type __ret = pos_type(off_type(-1)); > const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; > const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; > > const char_type* __beg = __testin ? this->eback() : this->pbase(); > if ((__beg || !off_type(__sp)) && (__testin || __testout)) > { > _M_update_egptr(); > > const off_type __pos(__sp); > const bool __testpos = (0 <= __pos > && __pos <= this->egptr() - __beg); > if (__testpos) > { > if (__testin) > this->setg(this->eback(), this->eback() + __pos, > this->egptr()); > if (__testout) > _M_pbump(this->pbase(), this->epptr(), __pos); > __ret = __sp; > } > } > return __ret; > } > > template <class _CharT, class _Traits, class _Alloc> > void > basic_stringbuf<_CharT, _Traits, _Alloc>:: > _M_sync(char_type* __base, __size_type __i, __size_type __o) > { > const bool __testin = _M_mode & ios_base::in; > const bool __testout = _M_mode & ios_base::out; > char_type* __endg = __base + _M_string.size(); > char_type* __endp = __base + _M_string.capacity(); > > if (__base != _M_string.data()) > { > > __endg += __i; > __i = 0; > __endp = __endg; > } > > if (__testin) > this->setg(__base, __base + __i, __endg); > if (__testout) > { > _M_pbump(__base, __endp, __o); > > > > if (!__testin) > this->setg(__endg, __endg, __endg); > } > } > > template <class _CharT, class _Traits, class _Alloc> > void > basic_stringbuf<_CharT, _Traits, _Alloc>:: > _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off) > { > this->setp(__pbeg, __pend); > while (__off > __gnu_cxx::__numeric_traits<int>::__max) > { > this->pbump(__gnu_cxx::__numeric_traits<int>::__max); > __off -= __gnu_cxx::__numeric_traits<int>::__max; > } > this->pbump(__off); > } > > > > > 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>; > > > > >} ># 1239 "/usr/include/c++/13/sstream" 2 3 ># 43 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/stack" 1 3 ># 58 "/usr/include/c++/13/stack" 3 > ># 59 "/usr/include/c++/13/stack" 3 > > > ># 1 "/usr/include/c++/13/deque" 1 3 ># 58 "/usr/include/c++/13/deque" 3 > ># 59 "/usr/include/c++/13/deque" 3 > > > > > > ># 1 "/usr/include/c++/13/bits/stl_uninitialized.h" 1 3 ># 70 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 81 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<typename _ValueType, typename _Tp> > constexpr bool > __check_constructible() > { > > > > > > static_assert(is_constructible<_ValueType, _Tp>::value, > "result type must be constructible from input type"); > > return true; > } ># 110 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<typename _InputIterator, typename _ForwardIterator> > > _ForwardIterator > __do_uninit_copy(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result) > { > _ForwardIterator __cur = __result; > try > { > for (; __first != __last; ++__first, (void)++__cur) > std::_Construct(std::__addressof(*__cur), *__first); > return __cur; > } > catch(...) > { > std::_Destroy(__result, __cur); > throw; > } > } > > template<bool _TrivialValueTypes> > struct __uninitialized_copy > { > template<typename _InputIterator, typename _ForwardIterator> > static _ForwardIterator > __uninit_copy(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result) > { return std::__do_uninit_copy(__first, __last, __result); } > }; > > template<> > struct __uninitialized_copy<true> > { > template<typename _InputIterator, typename _ForwardIterator> > static _ForwardIterator > __uninit_copy(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result) > { return std::copy(__first, __last, __result); } > }; ># 161 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<typename _InputIterator, typename _ForwardIterator> > inline _ForwardIterator > uninitialized_copy(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result) > { > typedef typename iterator_traits<_InputIterator>::value_type > _ValueType1; > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType2; > > > > > const bool __can_memmove = __is_trivial(_ValueType1); > > > > > using _From = decltype(*__first); > > const bool __assignable > = __is_trivial(_ValueType2) && __is_assignable(_ValueType2&, _From) && std::__check_constructible<_ValueType2, _From>(); > > return std::__uninitialized_copy<__can_memmove && __assignable>:: > __uninit_copy(__first, __last, __result); > } > > > > template<typename _ForwardIterator, typename _Tp> > void > __do_uninit_fill(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __x) > { > _ForwardIterator __cur = __first; > try > { > for (; __cur != __last; ++__cur) > std::_Construct(std::__addressof(*__cur), __x); > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > > template<bool _TrivialValueType> > struct __uninitialized_fill > { > template<typename _ForwardIterator, typename _Tp> > static void > __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __x) > { std::__do_uninit_fill(__first, __last, __x); } > }; > > template<> > struct __uninitialized_fill<true> > { > template<typename _ForwardIterator, typename _Tp> > static void > __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __x) > { std::fill(__first, __last, __x); } > }; ># 239 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<typename _ForwardIterator, typename _Tp> > inline void > uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __x) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > > > const bool __can_fill > = __is_trivial(_ValueType) && __is_assignable(_ValueType&, const _Tp&) && std::__check_constructible<_ValueType, const _Tp&>(); > > std::__uninitialized_fill<__can_fill>:: > __uninit_fill(__first, __last, __x); > } > > > > template<typename _ForwardIterator, typename _Size, typename _Tp> > > _ForwardIterator > __do_uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) > { > _ForwardIterator __cur = __first; > try > { > for (; __n > 0; --__n, (void) ++__cur) > std::_Construct(std::__addressof(*__cur), __x); > return __cur; > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > > 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) > { return std::__do_uninit_fill_n(__first, __n, __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) > { return std::fill_n(__first, __n, __x); } > }; ># 310 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<typename _ForwardIterator, typename _Size, typename _Tp> > inline _ForwardIterator > uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > > > const bool __can_fill > = __is_trivial(_ValueType) && __is_assignable(_ValueType&, const _Tp&) && std::__check_constructible<_ValueType, const _Tp&>() > > > > && __is_integer<_Size>::__value; > > return __uninitialized_fill_n<__can_fill>:: > __uninit_fill_n(__first, __n, __x); > } ># 340 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<typename _InputIterator, typename _ForwardIterator, > typename _Allocator> > > _ForwardIterator > __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result, _Allocator& __alloc) > { > _ForwardIterator __cur = __result; > try > { > typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; > for (; __first != __last; ++__first, (void)++__cur) > __traits::construct(__alloc, std::__addressof(*__cur), *__first); > return __cur; > } > catch(...) > { > std::_Destroy(__result, __cur, __alloc); > throw; > } > } > > > template<typename _InputIterator, typename _ForwardIterator, typename _Tp> > > inline _ForwardIterator > __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result, allocator<_Tp>&) > { > > > > > return std::uninitialized_copy(__first, __last, __result); > } > > > template<typename _InputIterator, typename _ForwardIterator, > typename _Allocator> > > inline _ForwardIterator > __uninitialized_move_a(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result, _Allocator& __alloc) > { > return std::__uninitialized_copy_a(std::make_move_iterator(__first), > std::make_move_iterator(__last), > __result, __alloc); > } > > template<typename _InputIterator, typename _ForwardIterator, > typename _Allocator> > > inline _ForwardIterator > __uninitialized_move_if_noexcept_a(_InputIterator __first, > _InputIterator __last, > _ForwardIterator __result, > _Allocator& __alloc) > { > return std::__uninitialized_copy_a > (std::__make_move_if_noexcept_iterator(__first), > std::__make_move_if_noexcept_iterator(__last), __result, __alloc); > } > > template<typename _ForwardIterator, typename _Tp, typename _Allocator> > > void > __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __x, _Allocator& __alloc) > { > _ForwardIterator __cur = __first; > try > { > typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; > for (; __cur != __last; ++__cur) > __traits::construct(__alloc, std::__addressof(*__cur), __x); > } > catch(...) > { > std::_Destroy(__first, __cur, __alloc); > throw; > } > } > > > template<typename _ForwardIterator, typename _Tp, typename _Tp2> > > inline void > __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __x, allocator<_Tp2>&) > { > > > > > std::uninitialized_fill(__first, __last, __x); > } > > > template<typename _ForwardIterator, typename _Size, typename _Tp, > typename _Allocator> > > _ForwardIterator > __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, > const _Tp& __x, _Allocator& __alloc) > { > _ForwardIterator __cur = __first; > try > { > typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; > for (; __n > 0; --__n, (void) ++__cur) > __traits::construct(__alloc, std::__addressof(*__cur), __x); > return __cur; > } > catch(...) > { > std::_Destroy(__first, __cur, __alloc); > throw; > } > } > > > template<typename _ForwardIterator, typename _Size, typename _Tp, > typename _Tp2> > > inline _ForwardIterator > __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, > const _Tp& __x, allocator<_Tp2>&) > { > > > > > return std::uninitialized_fill_n(__first, __n, __x); > } ># 485 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _ForwardIterator, typename _Allocator> > inline _ForwardIterator > __uninitialized_copy_move(_InputIterator1 __first1, > _InputIterator1 __last1, > _InputIterator2 __first2, > _InputIterator2 __last2, > _ForwardIterator __result, > _Allocator& __alloc) > { > _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, > __result, > __alloc); > try > { > return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); > } > catch(...) > { > std::_Destroy(__result, __mid, __alloc); > throw; > } > } > > > > > > template<typename _InputIterator1, typename _InputIterator2, > typename _ForwardIterator, typename _Allocator> > inline _ForwardIterator > __uninitialized_move_copy(_InputIterator1 __first1, > _InputIterator1 __last1, > _InputIterator2 __first2, > _InputIterator2 __last2, > _ForwardIterator __result, > _Allocator& __alloc) > { > _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, > __result, > __alloc); > try > { > return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); > } > catch(...) > { > std::_Destroy(__result, __mid, __alloc); > throw; > } > } > > > > > template<typename _ForwardIterator, typename _Tp, typename _InputIterator, > typename _Allocator> > inline _ForwardIterator > __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, > const _Tp& __x, _InputIterator __first, > _InputIterator __last, _Allocator& __alloc) > { > std::__uninitialized_fill_a(__result, __mid, __x, __alloc); > try > { > return std::__uninitialized_move_a(__first, __last, __mid, __alloc); > } > catch(...) > { > std::_Destroy(__result, __mid, __alloc); > throw; > } > } > > > > > template<typename _InputIterator, typename _ForwardIterator, typename _Tp, > typename _Allocator> > inline void > __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, > _ForwardIterator __first2, > _ForwardIterator __last2, const _Tp& __x, > _Allocator& __alloc) > { > _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, > __first2, > __alloc); > try > { > std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); > } > catch(...) > { > std::_Destroy(__first2, __mid2, __alloc); > throw; > } > } ># 592 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<bool _TrivialValueType> > struct __uninitialized_default_1 > { > template<typename _ForwardIterator> > static void > __uninit_default(_ForwardIterator __first, _ForwardIterator __last) > { > _ForwardIterator __cur = __first; > try > { > for (; __cur != __last; ++__cur) > std::_Construct(std::__addressof(*__cur)); > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > }; > > template<> > struct __uninitialized_default_1<true> > { > template<typename _ForwardIterator> > static void > __uninit_default(_ForwardIterator __first, _ForwardIterator __last) > { > if (__first == __last) > return; > > typename iterator_traits<_ForwardIterator>::value_type* __val > = std::__addressof(*__first); > std::_Construct(__val); > if (++__first != __last) > std::fill(__first, __last, *__val); > } > }; > > template<bool _TrivialValueType> > struct __uninitialized_default_n_1 > { > template<typename _ForwardIterator, typename _Size> > > static _ForwardIterator > __uninit_default_n(_ForwardIterator __first, _Size __n) > { > _ForwardIterator __cur = __first; > try > { > for (; __n > 0; --__n, (void) ++__cur) > std::_Construct(std::__addressof(*__cur)); > return __cur; > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > }; > > template<> > struct __uninitialized_default_n_1<true> > { > template<typename _ForwardIterator, typename _Size> > > static _ForwardIterator > __uninit_default_n(_ForwardIterator __first, _Size __n) > { > if (__n > 0) > { > typename iterator_traits<_ForwardIterator>::value_type* __val > = std::__addressof(*__first); > std::_Construct(__val); > ++__first; > __first = std::fill_n(__first, __n - 1, *__val); > } > return __first; > } > }; > > > > template<typename _ForwardIterator> > inline void > __uninitialized_default(_ForwardIterator __first, > _ForwardIterator __last) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > const bool __assignable = is_copy_assignable<_ValueType>::value; > > std::__uninitialized_default_1<__is_trivial(_ValueType) > && __assignable>:: > __uninit_default(__first, __last); > } > > > > template<typename _ForwardIterator, typename _Size> > > inline _ForwardIterator > __uninitialized_default_n(_ForwardIterator __first, _Size __n) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > constexpr bool __can_fill > = __and_<is_integral<_Size>, is_copy_assignable<_ValueType>>::value; > > return __uninitialized_default_n_1<__is_trivial(_ValueType) > && __can_fill>:: > __uninit_default_n(__first, __n); > } > > > > > > template<typename _ForwardIterator, typename _Allocator> > void > __uninitialized_default_a(_ForwardIterator __first, > _ForwardIterator __last, > _Allocator& __alloc) > { > _ForwardIterator __cur = __first; > try > { > typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; > for (; __cur != __last; ++__cur) > __traits::construct(__alloc, std::__addressof(*__cur)); > } > catch(...) > { > std::_Destroy(__first, __cur, __alloc); > throw; > } > } > > > template<typename _ForwardIterator, typename _Tp> > inline void > __uninitialized_default_a(_ForwardIterator __first, > _ForwardIterator __last, > allocator<_Tp>&) > { std::__uninitialized_default(__first, __last); } > > > > > > template<typename _ForwardIterator, typename _Size, typename _Allocator> > _ForwardIterator > __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, > _Allocator& __alloc) > { > _ForwardIterator __cur = __first; > try > { > typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; > for (; __n > 0; --__n, (void) ++__cur) > __traits::construct(__alloc, std::__addressof(*__cur)); > return __cur; > } > catch(...) > { > std::_Destroy(__first, __cur, __alloc); > throw; > } > } > > > > > template<typename _ForwardIterator, typename _Size, typename _Tp> > > inline _ForwardIterator > __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, > allocator<_Tp>&) > { return std::__uninitialized_default_n(__first, __n); } > > > template<bool _TrivialValueType> > struct __uninitialized_default_novalue_1 > { > template<typename _ForwardIterator> > static void > __uninit_default_novalue(_ForwardIterator __first, > _ForwardIterator __last) > { > _ForwardIterator __cur = __first; > try > { > for (; __cur != __last; ++__cur) > std::_Construct_novalue(std::__addressof(*__cur)); > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > }; > > template<> > struct __uninitialized_default_novalue_1<true> > { > template<typename _ForwardIterator> > static void > __uninit_default_novalue(_ForwardIterator __first, > _ForwardIterator __last) > { > } > }; > > template<bool _TrivialValueType> > struct __uninitialized_default_novalue_n_1 > { > template<typename _ForwardIterator, typename _Size> > static _ForwardIterator > __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) > { > _ForwardIterator __cur = __first; > try > { > for (; __n > 0; --__n, (void) ++__cur) > std::_Construct_novalue(std::__addressof(*__cur)); > return __cur; > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > }; > > template<> > struct __uninitialized_default_novalue_n_1<true> > { > template<typename _ForwardIterator, typename _Size> > static _ForwardIterator > __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) > { return std::next(__first, __n); } > }; > > > > template<typename _ForwardIterator> > inline void > __uninitialized_default_novalue(_ForwardIterator __first, > _ForwardIterator __last) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > std::__uninitialized_default_novalue_1< > is_trivially_default_constructible<_ValueType>::value>:: > __uninit_default_novalue(__first, __last); > } > > > > template<typename _ForwardIterator, typename _Size> > inline _ForwardIterator > __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > return __uninitialized_default_novalue_n_1< > is_trivially_default_constructible<_ValueType>::value>:: > __uninit_default_novalue_n(__first, __n); > } > > template<typename _InputIterator, typename _Size, > typename _ForwardIterator> > _ForwardIterator > __uninitialized_copy_n(_InputIterator __first, _Size __n, > _ForwardIterator __result, input_iterator_tag) > { > _ForwardIterator __cur = __result; > try > { > for (; __n > 0; --__n, (void) ++__first, ++__cur) > std::_Construct(std::__addressof(*__cur), *__first); > return __cur; > } > catch(...) > { > std::_Destroy(__result, __cur); > throw; > } > } > > template<typename _RandomAccessIterator, typename _Size, > typename _ForwardIterator> > inline _ForwardIterator > __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, > _ForwardIterator __result, > random_access_iterator_tag) > { return std::uninitialized_copy(__first, __first + __n, __result); } > > template<typename _InputIterator, typename _Size, > typename _ForwardIterator> > pair<_InputIterator, _ForwardIterator> > __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, > _ForwardIterator __result, input_iterator_tag) > { > _ForwardIterator __cur = __result; > try > { > for (; __n > 0; --__n, (void) ++__first, ++__cur) > std::_Construct(std::__addressof(*__cur), *__first); > return {__first, __cur}; > } > catch(...) > { > std::_Destroy(__result, __cur); > throw; > } > } > > template<typename _RandomAccessIterator, typename _Size, > typename _ForwardIterator> > inline pair<_RandomAccessIterator, _ForwardIterator> > __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, > _ForwardIterator __result, > random_access_iterator_tag) > { > auto __second_res = uninitialized_copy(__first, __first + __n, __result); > auto __first_res = std::next(__first, __n); > return {__first_res, __second_res}; > } ># 941 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template<typename _InputIterator, typename _Size, typename _ForwardIterator> > inline _ForwardIterator > uninitialized_copy_n(_InputIterator __first, _Size __n, > _ForwardIterator __result) > { return std::__uninitialized_copy_n(__first, __n, __result, > std::__iterator_category(__first)); } > > > template<typename _InputIterator, typename _Size, typename _ForwardIterator> > inline pair<_InputIterator, _ForwardIterator> > __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, > _ForwardIterator __result) > { > return > std::__uninitialized_copy_n_pair(__first, __n, __result, > std::__iterator_category(__first)); > } ># 970 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template <typename _ForwardIterator> > inline void > uninitialized_default_construct(_ForwardIterator __first, > _ForwardIterator __last) > { > __uninitialized_default_novalue(__first, __last); > } ># 985 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template <typename _ForwardIterator, typename _Size> > inline _ForwardIterator > uninitialized_default_construct_n(_ForwardIterator __first, _Size __count) > { > return __uninitialized_default_novalue_n(__first, __count); > } > > > > > > > > template <typename _ForwardIterator> > inline void > uninitialized_value_construct(_ForwardIterator __first, > _ForwardIterator __last) > { > return __uninitialized_default(__first, __last); > } ># 1013 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template <typename _ForwardIterator, typename _Size> > inline _ForwardIterator > uninitialized_value_construct_n(_ForwardIterator __first, _Size __count) > { > return __uninitialized_default_n(__first, __count); > } ># 1028 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template <typename _InputIterator, typename _ForwardIterator> > inline _ForwardIterator > uninitialized_move(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result) > { > return std::uninitialized_copy > (std::make_move_iterator(__first), > std::make_move_iterator(__last), __result); > } ># 1046 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > template <typename _InputIterator, typename _Size, typename _ForwardIterator> > inline pair<_InputIterator, _ForwardIterator> > uninitialized_move_n(_InputIterator __first, _Size __count, > _ForwardIterator __result) > { > auto __res = std::__uninitialized_copy_n_pair > (std::make_move_iterator(__first), > __count, __result); > return {__res.first.base(), __res.second}; > } > > > > > > template<typename _Tp, typename _Up, typename _Allocator> > > inline 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)))) > { > typedef std::allocator_traits<_Allocator> __traits; > __traits::construct(__alloc, __dest, std::move(*__orig)); > __traits::destroy(__alloc, std::__addressof(*__orig)); > } > > > > template<typename _Tp, typename = void> > struct __is_bitwise_relocatable > : is_trivial<_Tp> { }; > > template <typename _InputIterator, typename _ForwardIterator, > typename _Allocator> > > inline _ForwardIterator > __relocate_a_1(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result, _Allocator& __alloc) > noexcept(noexcept(std::__relocate_object_a(std::addressof(*__result), > std::addressof(*__first), > __alloc))) > { > typedef typename iterator_traits<_InputIterator>::value_type > _ValueType; > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType2; > static_assert(std::is_same<_ValueType, _ValueType2>::value, > "relocation is only possible for values of the same type"); > _ForwardIterator __cur = __result; > for (; __first != __last; ++__first, (void)++__cur) > std::__relocate_object_a(std::__addressof(*__cur), > std::__addressof(*__first), __alloc); > return __cur; > } > > > template <typename _Tp, typename _Up> > > inline __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 > { > ptrdiff_t __count = __last - __first; > if (__count > 0) > { ># 1126 "/usr/include/c++/13/bits/stl_uninitialized.h" 3 > __builtin_memmove(__result, __first, __count * sizeof(_Tp)); > } > return __result + __count; > } > > > template <typename _InputIterator, typename _ForwardIterator, > typename _Allocator> > > inline _ForwardIterator > __relocate_a(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result, _Allocator& __alloc) > noexcept(noexcept(__relocate_a_1(std::__niter_base(__first), > std::__niter_base(__last), > std::__niter_base(__result), __alloc))) > { > return std::__relocate_a_1(std::__niter_base(__first), > std::__niter_base(__last), > std::__niter_base(__result), __alloc); > } > > > > > > > >} ># 66 "/usr/include/c++/13/deque" 2 3 ># 1 "/usr/include/c++/13/bits/stl_deque.h" 1 3 ># 72 "/usr/include/c++/13/bits/stl_deque.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > ># 95 "/usr/include/c++/13/bits/stl_deque.h" 3 > constexpr inline size_t > __deque_buf_size(size_t __size) > { return (__size < 512 > ? size_t(512 / __size) : size_t(1)); } ># 112 "/usr/include/c++/13/bits/stl_deque.h" 3 > 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 > { return __deque_buf_size(sizeof(_Tp)); } > > typedef std::random_access_iterator_tag iterator_category; > typedef _Tp value_type; > typedef _Ptr pointer; > typedef _Ref reference; > typedef size_t size_type; > typedef ptrdiff_t difference_type; > typedef _Deque_iterator _Self; > > _Elt_pointer _M_cur; > _Elt_pointer _M_first; > _Elt_pointer _M_last; > _Map_pointer _M_node; > > _Deque_iterator(_Elt_pointer __x, _Map_pointer __y) noexcept > : _M_cur(__x), _M_first(*__y), > _M_last(*__y + _S_buffer_size()), _M_node(__y) { } > > _Deque_iterator() noexcept > : _M_cur(), _M_first(), _M_last(), _M_node() { } ># 161 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename _Iter, > typename = _Require<is_same<_Self, const_iterator>, > is_same<_Iter, iterator>>> > _Deque_iterator(const _Iter& __x) noexcept > : _M_cur(__x._M_cur), _M_first(__x._M_first), > _M_last(__x._M_last), _M_node(__x._M_node) { } > > _Deque_iterator(const _Deque_iterator& __x) noexcept > : _M_cur(__x._M_cur), _M_first(__x._M_first), > _M_last(__x._M_last), _M_node(__x._M_node) { } > > _Deque_iterator& operator=(const _Deque_iterator&) = default; > > > iterator > _M_const_cast() const noexcept > { return iterator(_M_cur, _M_node); } > > [[__nodiscard__]] > reference > operator*() const noexcept > { return *_M_cur; } > > [[__nodiscard__]] > pointer > operator->() const noexcept > { return _M_cur; } > > _Self& > operator++() noexcept > { > ++_M_cur; > if (_M_cur == _M_last) > { > _M_set_node(_M_node + 1); > _M_cur = _M_first; > } > return *this; > } > > _Self > operator++(int) noexcept > { > _Self __tmp = *this; > ++*this; > return __tmp; > } > > _Self& > operator--() noexcept > { > if (_M_cur == _M_first) > { > _M_set_node(_M_node - 1); > _M_cur = _M_last; > } > --_M_cur; > return *this; > } > > _Self > operator--(int) noexcept > { > _Self __tmp = *this; > --*this; > return __tmp; > } > > _Self& > operator+=(difference_type __n) noexcept > { > const difference_type __offset = __n + (_M_cur - _M_first); > if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) > _M_cur += __n; > else > { > const difference_type __node_offset = > __offset > 0 ? __offset / difference_type(_S_buffer_size()) > : -difference_type((-__offset - 1) > / _S_buffer_size()) - 1; > _M_set_node(_M_node + __node_offset); > _M_cur = _M_first + (__offset - __node_offset > * difference_type(_S_buffer_size())); > } > return *this; > } > > _Self& > operator-=(difference_type __n) noexcept > { return *this += -__n; } > > [[__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; } ># 296 "/usr/include/c++/13/bits/stl_deque.h" 3 > [[__nodiscard__]] > friend bool > operator!=(const _Self& __x, const _Self& __y) noexcept > { return !(__x == __y); } > > template<typename _RefR, typename _PtrR> > [[__nodiscard__]] > friend bool > operator!=(const _Self& __x, > const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) > noexcept > { return !(__x == __y); } > > [[__nodiscard__]] > friend bool > operator<(const _Self& __x, const _Self& __y) noexcept > { > return (__x._M_node == __y._M_node) > ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); > } > > template<typename _RefR, typename _PtrR> > [[__nodiscard__]] > friend bool > operator<(const _Self& __x, > const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) > noexcept > { > return (__x._M_node == __y._M_node) > ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); > } > > [[__nodiscard__]] > friend bool > operator>(const _Self& __x, const _Self& __y) noexcept > { return __y < __x; } > > template<typename _RefR, typename _PtrR> > [[__nodiscard__]] > friend bool > operator>(const _Self& __x, > const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) > noexcept > { return __y < __x; } > > [[__nodiscard__]] > friend bool > operator<=(const _Self& __x, const _Self& __y) noexcept > { return !(__y < __x); } > > template<typename _RefR, typename _PtrR> > [[__nodiscard__]] > friend bool > operator<=(const _Self& __x, > const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) > noexcept > { return !(__y < __x); } > > [[__nodiscard__]] > friend bool > operator>=(const _Self& __x, const _Self& __y) noexcept > { return !(__x < __y); } > > template<typename _RefR, typename _PtrR> > [[__nodiscard__]] > friend bool > operator>=(const _Self& __x, > const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) > noexcept > { return !(__x < __y); } > > > [[__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; } > }; ># 429 "/usr/include/c++/13/bits/stl_deque.h" 3 > 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) > : _M_impl() > { _M_initialize_map(__num_elements); } > > _Deque_base(const allocator_type& __a, size_t __num_elements) > : _M_impl(__a) > { _M_initialize_map(__num_elements); } > > _Deque_base(const allocator_type& __a) > : _M_impl(__a) > { } > > > _Deque_base(_Deque_base&& __x) > : _M_impl(std::move(__x._M_get_Tp_allocator())) > { > _M_initialize_map(0); > if (__x._M_impl._M_map) > this->_M_impl._M_swap_data(__x._M_impl); > } > > _Deque_base(_Deque_base&& __x, const allocator_type& __a) > : _M_impl(std::move(__x._M_impl), _Tp_alloc_type(__a)) > { __x._M_initialize_map(0); } > > _Deque_base(_Deque_base&& __x, const allocator_type& __a, size_t __n) > : _M_impl(__a) > { > if (__x.get_allocator() == __a) > { > if (__x._M_impl._M_map) > { > _M_initialize_map(0); > this->_M_impl._M_swap_data(__x._M_impl); > } > } > else > { > _M_initialize_map(__n); > } > } > > > ~_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() noexcept > : _M_map(), _M_map_size(), _M_start(), _M_finish() > { } > > > _Deque_impl_data(const _Deque_impl_data&) = default; > _Deque_impl_data& > operator=(const _Deque_impl_data&) = default; > > _Deque_impl_data(_Deque_impl_data&& __x) noexcept > : _Deque_impl_data(__x) > { __x = _Deque_impl_data(); } > > > void > _M_swap_data(_Deque_impl_data& __x) noexcept > { > > > std::swap(*this, __x); > } > }; > > > > > struct _Deque_impl > : public _Tp_alloc_type, public _Deque_impl_data > { > _Deque_impl() noexcept(is_nothrow_default_constructible<_Tp_alloc_type>::value) > > : _Tp_alloc_type() > { } > > _Deque_impl(const _Tp_alloc_type& __a) noexcept > : _Tp_alloc_type(__a) > { } > > > _Deque_impl(_Deque_impl&&) = default; > > _Deque_impl(_Tp_alloc_type&& __a) noexcept > : _Tp_alloc_type(std::move(__a)) > { } > > _Deque_impl(_Deque_impl&& __d, _Tp_alloc_type&& __a) > : _Tp_alloc_type(std::move(__a)), _Deque_impl_data(std::move(__d)) > { } > > }; > > _Tp_alloc_type& > _M_get_Tp_allocator() noexcept > { return this->_M_impl; } > > const _Tp_alloc_type& > _M_get_Tp_allocator() const noexcept > { return this->_M_impl; } > > _Map_alloc_type > _M_get_map_allocator() const noexcept > { return _Map_alloc_type(_M_get_Tp_allocator()); } > > _Ptr > _M_allocate_node() > { > typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; > return _Traits::allocate(_M_impl, __deque_buf_size(sizeof(_Tp))); > } > > void > _M_deallocate_node(_Ptr __p) noexcept > { > typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; > _Traits::deallocate(_M_impl, __p, __deque_buf_size(sizeof(_Tp))); > } > > _Map_pointer > _M_allocate_map(size_t __n) > { > _Map_alloc_type __map_alloc = _M_get_map_allocator(); > return _Map_alloc_traits::allocate(__map_alloc, __n); > } > > void > _M_deallocate_map(_Map_pointer __p, size_t __n) noexcept > { > _Map_alloc_type __map_alloc = _M_get_map_allocator(); > _Map_alloc_traits::deallocate(__map_alloc, __p, __n); > } > > 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> > _Deque_base<_Tp, _Alloc>:: > ~_Deque_base() noexcept > { > if (this->_M_impl._M_map) > { > _M_destroy_nodes(this->_M_impl._M_start._M_node, > this->_M_impl._M_finish._M_node + 1); > _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); > } > } ># 636 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename _Tp, typename _Alloc> > void > _Deque_base<_Tp, _Alloc>:: > _M_initialize_map(size_t __num_elements) > { > const size_t __num_nodes = (__num_elements / __deque_buf_size(sizeof(_Tp)) > + 1); > > this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, > size_t(__num_nodes + 2)); > this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); > > > > > > > _Map_pointer __nstart = (this->_M_impl._M_map > + (this->_M_impl._M_map_size - __num_nodes) / 2); > _Map_pointer __nfinish = __nstart + __num_nodes; > > try > { _M_create_nodes(__nstart, __nfinish); } > catch(...) > { > _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); > this->_M_impl._M_map = _Map_pointer(); > this->_M_impl._M_map_size = 0; > throw; > } > > this->_M_impl._M_start._M_set_node(__nstart); > this->_M_impl._M_finish._M_set_node(__nfinish - 1); > this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; > this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first > + __num_elements > % __deque_buf_size(sizeof(_Tp))); > } > > template<typename _Tp, typename _Alloc> > void > _Deque_base<_Tp, _Alloc>:: > _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish) > { > _Map_pointer __cur; > try > { > for (__cur = __nstart; __cur < __nfinish; ++__cur) > *__cur = this->_M_allocate_node(); > } > catch(...) > { > _M_destroy_nodes(__nstart, __cur); > throw; > } > } > > template<typename _Tp, typename _Alloc> > void > _Deque_base<_Tp, _Alloc>:: > _M_destroy_nodes(_Map_pointer __nstart, > _Map_pointer __nfinish) noexcept > { > for (_Map_pointer __n = __nstart; __n < __nfinish; ++__n) > _M_deallocate_node(*__n); > } ># 787 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename _Tp, typename _Alloc = std::allocator<_Tp> > > class deque : protected _Deque_base<_Tp, _Alloc> > { ># 800 "/usr/include/c++/13/bits/stl_deque.h" 3 > static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, > "std::deque must have a non-const, non-volatile value_type"); > > 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 > { return __deque_buf_size(sizeof(_Tp)); } > > > 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; ># 864 "/usr/include/c++/13/bits/stl_deque.h" 3 > explicit > deque(const allocator_type& __a) > : _Base(__a, 0) { } ># 877 "/usr/include/c++/13/bits/stl_deque.h" 3 > explicit > deque(size_type __n, const allocator_type& __a = allocator_type()) > : _Base(__a, _S_check_init_len(__n, __a)) > { _M_default_initialize(); } ># 890 "/usr/include/c++/13/bits/stl_deque.h" 3 > deque(size_type __n, const value_type& __value, > const allocator_type& __a = allocator_type()) > : _Base(__a, _S_check_init_len(__n, __a)) > { _M_fill_initialize(__value); } ># 917 "/usr/include/c++/13/bits/stl_deque.h" 3 > deque(const deque& __x) > : _Base(_Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()), > __x.size()) > { std::__uninitialized_copy_a(__x.begin(), __x.end(), > this->_M_impl._M_start, > _M_get_Tp_allocator()); } ># 933 "/usr/include/c++/13/bits/stl_deque.h" 3 > deque(deque&&) = default; > > > deque(const deque& __x, const __type_identity_t<allocator_type>& __a) > : _Base(__a, __x.size()) > { std::__uninitialized_copy_a(__x.begin(), __x.end(), > this->_M_impl._M_start, > _M_get_Tp_allocator()); } > > > deque(deque&& __x, const __type_identity_t<allocator_type>& __a) > : deque(std::move(__x), __a, typename _Alloc_traits::is_always_equal{}) > { } > > private: > deque(deque&& __x, const allocator_type& __a, true_type) > : _Base(std::move(__x), __a) > { } > > deque(deque&& __x, const allocator_type& __a, false_type) > : _Base(std::move(__x), __a, __x.size()) > { > if (__x.get_allocator() != __a && !__x.empty()) > { > std::__uninitialized_move_a(__x.begin(), __x.end(), > this->_M_impl._M_start, > _M_get_Tp_allocator()); > __x.clear(); > } > } > > public: ># 976 "/usr/include/c++/13/bits/stl_deque.h" 3 > deque(initializer_list<value_type> __l, > const allocator_type& __a = allocator_type()) > : _Base(__a) > { > _M_range_initialize(__l.begin(), __l.end(), > random_access_iterator_tag()); > } ># 1001 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > deque(_InputIterator __first, _InputIterator __last, > const allocator_type& __a = allocator_type()) > : _Base(__a) > { > _M_range_initialize(__first, __last, > std::__iterator_category(__first)); > } ># 1027 "/usr/include/c++/13/bits/stl_deque.h" 3 > ~deque() > { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } ># 1039 "/usr/include/c++/13/bits/stl_deque.h" 3 > deque& > operator=(const deque& __x); ># 1051 "/usr/include/c++/13/bits/stl_deque.h" 3 > deque& > operator=(deque&& __x) noexcept(_Alloc_traits::_S_always_equal()) > { > using __always_equal = typename _Alloc_traits::is_always_equal; > _M_move_assign1(std::move(__x), __always_equal{}); > return *this; > } ># 1070 "/usr/include/c++/13/bits/stl_deque.h" 3 > deque& > operator=(initializer_list<value_type> __l) > { > _M_assign_aux(__l.begin(), __l.end(), > random_access_iterator_tag()); > return *this; > } ># 1089 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > assign(size_type __n, const value_type& __val) > { _M_fill_assign(__n, __val); } ># 1106 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > void > assign(_InputIterator __first, _InputIterator __last) > { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } ># 1133 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > assign(initializer_list<value_type> __l) > { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } > > > > [[__nodiscard__]] > allocator_type > get_allocator() const noexcept > { return _Base::get_allocator(); } > > > > > > > [[__nodiscard__]] > iterator > begin() noexcept > { return this->_M_impl._M_start; } > > > > > > [[__nodiscard__]] > const_iterator > begin() const noexcept > { return this->_M_impl._M_start; } > > > > > > > [[__nodiscard__]] > iterator > end() noexcept > { return this->_M_impl._M_finish; } > > > > > > > [[__nodiscard__]] > const_iterator > end() const noexcept > { return this->_M_impl._M_finish; } > > > > > > > [[__nodiscard__]] > reverse_iterator > rbegin() noexcept > { return reverse_iterator(this->_M_impl._M_finish); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > rbegin() const noexcept > { return const_reverse_iterator(this->_M_impl._M_finish); } > > > > > > > [[__nodiscard__]] > reverse_iterator > rend() noexcept > { return reverse_iterator(this->_M_impl._M_start); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > rend() const noexcept > { return const_reverse_iterator(this->_M_impl._M_start); } > > > > > > > [[__nodiscard__]] > const_iterator > cbegin() const noexcept > { return this->_M_impl._M_start; } > > > > > > > [[__nodiscard__]] > const_iterator > cend() const noexcept > { return this->_M_impl._M_finish; } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > crbegin() const noexcept > { return const_reverse_iterator(this->_M_impl._M_finish); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > crend() const noexcept > { return const_reverse_iterator(this->_M_impl._M_start); } > > > > > [[__nodiscard__]] > size_type > size() const noexcept > { return this->_M_impl._M_finish - this->_M_impl._M_start; } > > > [[__nodiscard__]] > size_type > max_size() const noexcept > { return _S_max_size(_M_get_Tp_allocator()); } ># 1287 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > resize(size_type __new_size) > { > const size_type __len = size(); > if (__new_size > __len) > _M_default_append(__new_size - __len); > else if (__new_size < __len) > _M_erase_at_end(this->_M_impl._M_start > + difference_type(__new_size)); > } ># 1309 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > resize(size_type __new_size, const value_type& __x) ># 1326 "/usr/include/c++/13/bits/stl_deque.h" 3 > { > const size_type __len = size(); > if (__new_size > __len) > _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); > else if (__new_size < __len) > _M_erase_at_end(this->_M_impl._M_start > + difference_type(__new_size)); > } > > > > void > shrink_to_fit() noexcept > { _M_shrink_to_fit(); } > > > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return this->_M_impl._M_finish == this->_M_impl._M_start; } ># 1362 "/usr/include/c++/13/bits/stl_deque.h" 3 > [[__nodiscard__]] > reference > operator[](size_type __n) noexcept > { > ; > return this->_M_impl._M_start[difference_type(__n)]; > } ># 1381 "/usr/include/c++/13/bits/stl_deque.h" 3 > [[__nodiscard__]] > const_reference > operator[](size_type __n) const noexcept > { > ; > return this->_M_impl._M_start[difference_type(__n)]; > } > > protected: > > void > _M_range_check(size_type __n) const > { > if (__n >= this->size()) > __throw_out_of_range_fmt(("deque::_M_range_check: __n " "(which is %zu)>= this->size() " "(which is %zu)") > > , > __n, this->size()); > } > > public: ># 1413 "/usr/include/c++/13/bits/stl_deque.h" 3 > reference > at(size_type __n) > { > _M_range_check(__n); > return (*this)[__n]; > } ># 1431 "/usr/include/c++/13/bits/stl_deque.h" 3 > const_reference > at(size_type __n) const > { > _M_range_check(__n); > return (*this)[__n]; > } > > > > > > [[__nodiscard__]] > reference > front() noexcept > { > ; > return *begin(); > } > > > > > > [[__nodiscard__]] > const_reference > front() const noexcept > { > ; > return *begin(); > } > > > > > > [[__nodiscard__]] > reference > back() noexcept > { > ; > iterator __tmp = end(); > --__tmp; > return *__tmp; > } > > > > > > [[__nodiscard__]] > const_reference > back() const noexcept > { > ; > const_iterator __tmp = end(); > --__tmp; > return *__tmp; > } ># 1500 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > push_front(const value_type& __x) > { > if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) > { > _Alloc_traits::construct(this->_M_impl, > this->_M_impl._M_start._M_cur - 1, > __x); > --this->_M_impl._M_start._M_cur; > } > else > _M_push_front_aux(__x); > } > > > void > push_front(value_type&& __x) > { emplace_front(std::move(__x)); } > > template<typename... _Args> > > reference > > > > emplace_front(_Args&&... __args); ># 1537 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > push_back(const value_type& __x) > { > if (this->_M_impl._M_finish._M_cur > != this->_M_impl._M_finish._M_last - 1) > { > _Alloc_traits::construct(this->_M_impl, > this->_M_impl._M_finish._M_cur, __x); > ++this->_M_impl._M_finish._M_cur; > } > else > _M_push_back_aux(__x); > } > > > void > push_back(value_type&& __x) > { emplace_back(std::move(__x)); } > > template<typename... _Args> > > reference > > > > emplace_back(_Args&&... __args); ># 1573 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > pop_front() noexcept > { > ; > if (this->_M_impl._M_start._M_cur > != this->_M_impl._M_start._M_last - 1) > { > _Alloc_traits::destroy(_M_get_Tp_allocator(), > this->_M_impl._M_start._M_cur); > ++this->_M_impl._M_start._M_cur; > } > else > _M_pop_front_aux(); > } ># 1596 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > pop_back() noexcept > { > ; > if (this->_M_impl._M_finish._M_cur > != this->_M_impl._M_finish._M_first) > { > --this->_M_impl._M_finish._M_cur; > _Alloc_traits::destroy(_M_get_Tp_allocator(), > this->_M_impl._M_finish._M_cur); > } > else > _M_pop_back_aux(); > } ># 1621 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename... _Args> > iterator > emplace(const_iterator __position, _Args&&... __args); ># 1634 "/usr/include/c++/13/bits/stl_deque.h" 3 > iterator > insert(const_iterator __position, const value_type& __x); ># 1660 "/usr/include/c++/13/bits/stl_deque.h" 3 > iterator > insert(const_iterator __position, value_type&& __x) > { return emplace(__position, std::move(__x)); } ># 1674 "/usr/include/c++/13/bits/stl_deque.h" 3 > iterator > insert(const_iterator __p, initializer_list<value_type> __l) > { > auto __offset = __p - cbegin(); > _M_range_insert_aux(__p._M_const_cast(), __l.begin(), __l.end(), > std::random_access_iterator_tag()); > return begin() + __offset; > } ># 1693 "/usr/include/c++/13/bits/stl_deque.h" 3 > iterator > insert(const_iterator __position, size_type __n, const value_type& __x) > { > difference_type __offset = __position - cbegin(); > _M_fill_insert(__position._M_const_cast(), __n, __x); > return begin() + __offset; > } ># 1727 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > iterator > insert(const_iterator __position, _InputIterator __first, > _InputIterator __last) > { > difference_type __offset = __position - cbegin(); > _M_range_insert_aux(__position._M_const_cast(), __first, __last, > std::__iterator_category(__first)); > return begin() + __offset; > } ># 1773 "/usr/include/c++/13/bits/stl_deque.h" 3 > iterator > > erase(const_iterator __position) > > > > { return _M_erase(__position._M_const_cast()); } ># 1797 "/usr/include/c++/13/bits/stl_deque.h" 3 > iterator > > erase(const_iterator __first, const_iterator __last) > > > > { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } ># 1816 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > swap(deque& __x) noexcept > { > > do { if (std::__is_constant_evaluated() && !bool(_Alloc_traits::propagate_on_container_swap::value || _M_get_Tp_allocator() == __x._M_get_Tp_allocator())) __builtin_unreachable(); } while (false) > ; > > _M_impl._M_swap_data(__x._M_impl); > _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), > __x._M_get_Tp_allocator()); > } > > > > > > > > void > clear() noexcept > { _M_erase_at_end(begin()); } > > protected: ># 1866 "/usr/include/c++/13/bits/stl_deque.h" 3 > static size_t > _S_check_init_len(size_t __n, const allocator_type& __a) > { > if (__n > _S_max_size(__a)) > __throw_length_error( > ("cannot create std::deque larger than max_size()")); > return __n; > } > > static size_type > _S_max_size(const _Tp_alloc_type& __a) noexcept > { > const size_t __diffmax = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max; > const size_t __allocmax = _Alloc_traits::max_size(__a); > return (std::min)(__diffmax, __allocmax); > } ># 1895 "/usr/include/c++/13/bits/stl_deque.h" 3 > 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); ># 1917 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > _M_fill_initialize(const value_type& __value); > > > > void > _M_default_initialize(); ># 1948 "/usr/include/c++/13/bits/stl_deque.h" 3 > 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) > { > const size_type __len = std::distance(__first, __last); > if (__len > size()) > { > _ForwardIterator __mid = __first; > std::advance(__mid, size()); > std::copy(__first, __mid, begin()); > _M_range_insert_aux(end(), __mid, __last, > std::__iterator_category(__first)); > } > else > _M_erase_at_end(std::copy(__first, __last, begin())); > } > > > > void > _M_fill_assign(size_type __n, const value_type& __val) > { > if (__n > size()) > { > std::fill(begin(), end(), __val); > _M_fill_insert(end(), __n - size(), __val); > } > else > { > _M_erase_at_end(begin() + difference_type(__n)); > std::fill(begin(), end(), __val); > } > } ># 1996 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename... _Args> > void _M_push_back_aux(_Args&&... __args); > > template<typename... _Args> > void _M_push_front_aux(_Args&&... __args); > > > void _M_pop_back_aux(); > > void _M_pop_front_aux(); ># 2035 "/usr/include/c++/13/bits/stl_deque.h" 3 > 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&) > { _M_destroy_data_aux(__first, __last); } > > void > _M_destroy_data(iterator __first, iterator __last, > const std::allocator<_Tp>&) > { > if (!__has_trivial_destructor(value_type)) > _M_destroy_data_aux(__first, __last); > } > > > void > _M_erase_at_begin(iterator __pos) > { > _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); > _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); > this->_M_impl._M_start = __pos; > } > > > > void > _M_erase_at_end(iterator __pos) > { > _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); > _M_destroy_nodes(__pos._M_node + 1, > this->_M_impl._M_finish._M_node + 1); > this->_M_impl._M_finish = __pos; > } > > iterator > _M_erase(iterator __pos); > > iterator > _M_erase(iterator __first, iterator __last); > > > > void > _M_default_append(size_type __n); > > bool > _M_shrink_to_fit(); > > > > > iterator > _M_reserve_elements_at_front(size_type __n) > { > const size_type __vacancies = this->_M_impl._M_start._M_cur > - this->_M_impl._M_start._M_first; > if (__n > __vacancies) > _M_new_elements_at_front(__n - __vacancies); > return this->_M_impl._M_start - difference_type(__n); > } > > iterator > _M_reserve_elements_at_back(size_type __n) > { > const size_type __vacancies = (this->_M_impl._M_finish._M_last > - this->_M_impl._M_finish._M_cur) - 1; > if (__n > __vacancies) > _M_new_elements_at_back(__n - __vacancies); > return this->_M_impl._M_finish + difference_type(__n); > } > > void > _M_new_elements_at_front(size_type __new_elements); > > void > _M_new_elements_at_back(size_type __new_elements); ># 2167 "/usr/include/c++/13/bits/stl_deque.h" 3 > void > _M_reserve_map_at_back(size_type __nodes_to_add = 1) > { > if (__nodes_to_add + 1 > this->_M_impl._M_map_size > - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) > _M_reallocate_map(__nodes_to_add, false); > } > > void > _M_reserve_map_at_front(size_type __nodes_to_add = 1) > { > if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node > - this->_M_impl._M_map)) > _M_reallocate_map(__nodes_to_add, true); > } > > void > _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); > > > > > > void > _M_move_assign1(deque&& __x, true_type) noexcept > { > this->_M_impl._M_swap_data(__x._M_impl); > __x.clear(); > std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); > } > > > > > void > _M_move_assign1(deque&& __x, false_type) > { > if (_M_get_Tp_allocator() == __x._M_get_Tp_allocator()) > return _M_move_assign1(std::move(__x), true_type()); > > constexpr bool __move_storage = > _Alloc_traits::_S_propagate_on_move_assign(); > _M_move_assign2(std::move(__x), __bool_constant<__move_storage>()); > } > > > > template<typename... _Args> > void > _M_replace_map(_Args&&... __args) > { > > deque __newobj(std::forward<_Args>(__args)...); > > clear(); > _M_deallocate_node(*begin()._M_node); > _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); > this->_M_impl._M_map = nullptr; > this->_M_impl._M_map_size = 0; > > this->_M_impl._M_swap_data(__newobj._M_impl); > } > > > void > _M_move_assign2(deque&& __x, true_type) > { > > auto __alloc = __x._M_get_Tp_allocator(); > > > _M_replace_map(std::move(__x)); > > _M_get_Tp_allocator() = std::move(__alloc); > } > > > > void > _M_move_assign2(deque&& __x, false_type) > { > if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) > { > > > _M_replace_map(std::move(__x), __x.get_allocator()); > } > else > { > > > _M_assign_aux(std::make_move_iterator(__x.begin()), > std::make_move_iterator(__x.end()), > std::random_access_iterator_tag()); > __x.clear(); > } > } > > }; > > > 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>; ># 2287 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator==(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) > { return __x.size() == __y.size() > && std::equal(__x.begin(), __x.end(), __y.begin()); } ># 2327 "/usr/include/c++/13/bits/stl_deque.h" 3 > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) > { return std::lexicographical_compare(__x.begin(), __x.end(), > __y.begin(), __y.end()); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator!=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) > { return !(__x == __y); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) > { return __y < __x; } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) > { return !(__y < __x); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) > { return !(__x < __y); } > > > > template<typename _Tp, typename _Alloc> > inline void > swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > > > > > > > > template<class _Tp> > struct __is_bitwise_relocatable<std::deque<_Tp>> > : true_type { }; > > > >} ># 67 "/usr/include/c++/13/deque" 2 3 > > ># 1 "/usr/include/c++/13/bits/deque.tcc" 1 3 ># 61 "/usr/include/c++/13/bits/deque.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > template <typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_default_initialize() > { > _Map_pointer __cur; > try > { > for (__cur = this->_M_impl._M_start._M_node; > __cur < this->_M_impl._M_finish._M_node; > ++__cur) > std::__uninitialized_default_a(*__cur, *__cur + _S_buffer_size(), > _M_get_Tp_allocator()); > std::__uninitialized_default_a(this->_M_impl._M_finish._M_first, > this->_M_impl._M_finish._M_cur, > _M_get_Tp_allocator()); > } > catch(...) > { > std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), > _M_get_Tp_allocator()); > throw; > } > } > > > template <typename _Tp, typename _Alloc> > deque<_Tp, _Alloc>& > deque<_Tp, _Alloc>:: > operator=(const deque& __x) > { > if (std::__addressof(__x) != this) > { > > if (_Alloc_traits::_S_propagate_on_copy_assign()) > { > if (!_Alloc_traits::_S_always_equal() > && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) > { > > > _M_replace_map(__x, __x.get_allocator()); > std::__alloc_on_copy(_M_get_Tp_allocator(), > __x._M_get_Tp_allocator()); > return *this; > } > std::__alloc_on_copy(_M_get_Tp_allocator(), > __x._M_get_Tp_allocator()); > } > > const size_type __len = size(); > if (__len >= __x.size()) > _M_erase_at_end(std::copy(__x.begin(), __x.end(), > this->_M_impl._M_start)); > else > { > const_iterator __mid = __x.begin() + difference_type(__len); > std::copy(__x.begin(), __mid, this->_M_impl._M_start); > _M_range_insert_aux(this->_M_impl._M_finish, __mid, __x.end(), > std::random_access_iterator_tag()); > } > } > return *this; > } > > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > > typename deque<_Tp, _Alloc>::reference > > > > deque<_Tp, _Alloc>:: > emplace_front(_Args&&... __args) > { > if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) > { > _Alloc_traits::construct(this->_M_impl, > this->_M_impl._M_start._M_cur - 1, > std::forward<_Args>(__args)...); > --this->_M_impl._M_start._M_cur; > } > else > _M_push_front_aux(std::forward<_Args>(__args)...); > > return front(); > > } > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > > typename deque<_Tp, _Alloc>::reference > > > > deque<_Tp, _Alloc>:: > emplace_back(_Args&&... __args) > { > if (this->_M_impl._M_finish._M_cur > != this->_M_impl._M_finish._M_last - 1) > { > _Alloc_traits::construct(this->_M_impl, > this->_M_impl._M_finish._M_cur, > std::forward<_Args>(__args)...); > ++this->_M_impl._M_finish._M_cur; > } > else > _M_push_back_aux(std::forward<_Args>(__args)...); > > return back(); > > } > > > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > typename deque<_Tp, _Alloc>::iterator > deque<_Tp, _Alloc>:: > emplace(const_iterator __position, _Args&&... __args) > { > if (__position._M_cur == this->_M_impl._M_start._M_cur) > { > emplace_front(std::forward<_Args>(__args)...); > return this->_M_impl._M_start; > } > else if (__position._M_cur == this->_M_impl._M_finish._M_cur) > { > emplace_back(std::forward<_Args>(__args)...); > iterator __tmp = this->_M_impl._M_finish; > --__tmp; > return __tmp; > } > else > return _M_insert_aux(__position._M_const_cast(), > std::forward<_Args>(__args)...); > } > > > template <typename _Tp, typename _Alloc> > typename deque<_Tp, _Alloc>::iterator > deque<_Tp, _Alloc>:: > > insert(const_iterator __position, const value_type& __x) > > > > { > if (__position._M_cur == this->_M_impl._M_start._M_cur) > { > push_front(__x); > return this->_M_impl._M_start; > } > else if (__position._M_cur == this->_M_impl._M_finish._M_cur) > { > push_back(__x); > iterator __tmp = this->_M_impl._M_finish; > --__tmp; > return __tmp; > } > else > return _M_insert_aux(__position._M_const_cast(), __x); > } > > template <typename _Tp, typename _Alloc> > typename deque<_Tp, _Alloc>::iterator > deque<_Tp, _Alloc>:: > _M_erase(iterator __position) > { > iterator __next = __position; > ++__next; > const difference_type __index = __position - begin(); > if (static_cast<size_type>(__index) < (size() >> 1)) > { > if (__position != begin()) > std::move_backward(begin(), __position, __next); > pop_front(); > } > else > { > if (__next != end()) > std::move(__next, end(), __position); > pop_back(); > } > return begin() + __index; > } > > template <typename _Tp, typename _Alloc> > typename deque<_Tp, _Alloc>::iterator > deque<_Tp, _Alloc>:: > _M_erase(iterator __first, iterator __last) > { > if (__first == __last) > return __first; > else if (__first == begin() && __last == end()) > { > clear(); > return end(); > } > else > { > const difference_type __n = __last - __first; > const difference_type __elems_before = __first - begin(); > if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2) > { > if (__first != begin()) > std::move_backward(begin(), __first, __last); > _M_erase_at_begin(begin() + __n); > } > else > { > if (__last != end()) > std::move(__last, end(), __first); > _M_erase_at_end(end() - __n); > } > return begin() + __elems_before; > } > } > > template <typename _Tp, class _Alloc> > template <typename _InputIterator> > void > deque<_Tp, _Alloc>:: > _M_assign_aux(_InputIterator __first, _InputIterator __last, > std::input_iterator_tag) > { > iterator __cur = begin(); > for (; __first != __last && __cur != end(); ++__cur, (void)++__first) > *__cur = *__first; > if (__first == __last) > _M_erase_at_end(__cur); > else > _M_range_insert_aux(end(), __first, __last, > std::__iterator_category(__first)); > } > > template <typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) > { > if (__pos._M_cur == this->_M_impl._M_start._M_cur) > { > iterator __new_start = _M_reserve_elements_at_front(__n); > try > { > std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, > __x, _M_get_Tp_allocator()); > this->_M_impl._M_start = __new_start; > } > catch(...) > { > _M_destroy_nodes(__new_start._M_node, > this->_M_impl._M_start._M_node); > throw; > } > } > else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) > { > iterator __new_finish = _M_reserve_elements_at_back(__n); > try > { > std::__uninitialized_fill_a(this->_M_impl._M_finish, > __new_finish, __x, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = __new_finish; > } > catch(...) > { > _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, > __new_finish._M_node + 1); > throw; > } > } > else > _M_insert_aux(__pos, __n, __x); > } > > > template <typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_default_append(size_type __n) > { > if (__n) > { > iterator __new_finish = _M_reserve_elements_at_back(__n); > try > { > std::__uninitialized_default_a(this->_M_impl._M_finish, > __new_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = __new_finish; > } > catch(...) > { > _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, > __new_finish._M_node + 1); > throw; > } > } > } > > template <typename _Tp, typename _Alloc> > bool > deque<_Tp, _Alloc>:: > _M_shrink_to_fit() > { > const difference_type __front_capacity > = (this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first); > if (__front_capacity == 0) > return false; > > const difference_type __back_capacity > = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur); > if (__front_capacity + __back_capacity < _S_buffer_size()) > return false; > > return std::__shrink_to_fit_aux<deque>::_S_do_it(*this); > } > > > template <typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_fill_initialize(const value_type& __value) > { > _Map_pointer __cur; > try > { > for (__cur = this->_M_impl._M_start._M_node; > __cur < this->_M_impl._M_finish._M_node; > ++__cur) > std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), > __value, _M_get_Tp_allocator()); > std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, > this->_M_impl._M_finish._M_cur, > __value, _M_get_Tp_allocator()); > } > catch(...) > { > std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), > _M_get_Tp_allocator()); > throw; > } > } > > template <typename _Tp, typename _Alloc> > template <typename _InputIterator> > void > deque<_Tp, _Alloc>:: > _M_range_initialize(_InputIterator __first, _InputIterator __last, > std::input_iterator_tag) > { > this->_M_initialize_map(0); > try > { > for (; __first != __last; ++__first) > > emplace_back(*__first); > > > > } > catch(...) > { > clear(); > throw; > } > } > > template <typename _Tp, typename _Alloc> > template <typename _ForwardIterator> > void > deque<_Tp, _Alloc>:: > _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, > std::forward_iterator_tag) > { > const size_type __n = std::distance(__first, __last); > this->_M_initialize_map(_S_check_init_len(__n, _M_get_Tp_allocator())); > > _Map_pointer __cur_node; > try > { > for (__cur_node = this->_M_impl._M_start._M_node; > __cur_node < this->_M_impl._M_finish._M_node; > ++__cur_node) > { > if (__n < _S_buffer_size()) > __builtin_unreachable(); > > _ForwardIterator __mid = __first; > std::advance(__mid, _S_buffer_size()); > std::__uninitialized_copy_a(__first, __mid, *__cur_node, > _M_get_Tp_allocator()); > __first = __mid; > } > std::__uninitialized_copy_a(__first, __last, > this->_M_impl._M_finish._M_first, > _M_get_Tp_allocator()); > } > catch(...) > { > std::_Destroy(this->_M_impl._M_start, > iterator(*__cur_node, __cur_node), > _M_get_Tp_allocator()); > throw; > } > } > > > template<typename _Tp, typename _Alloc> > > template<typename... _Args> > void > deque<_Tp, _Alloc>:: > _M_push_back_aux(_Args&&... __args) > > > > > > { > if (size() == max_size()) > __throw_length_error( > ("cannot create std::deque larger than max_size()")); > > _M_reserve_map_at_back(); > *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); > try > { > > _Alloc_traits::construct(this->_M_impl, > this->_M_impl._M_finish._M_cur, > std::forward<_Args>(__args)...); > > > > this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node > + 1); > this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; > } > catch(...) > { > _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); > throw; > } > } > > > template<typename _Tp, typename _Alloc> > > template<typename... _Args> > void > deque<_Tp, _Alloc>:: > _M_push_front_aux(_Args&&... __args) > > > > > > { > if (size() == max_size()) > __throw_length_error( > ("cannot create std::deque larger than max_size()")); > > _M_reserve_map_at_front(); > *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); > try > { > this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node > - 1); > this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; > > _Alloc_traits::construct(this->_M_impl, > this->_M_impl._M_start._M_cur, > std::forward<_Args>(__args)...); > > > > } > catch(...) > { > ++this->_M_impl._M_start; > _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); > throw; > } > } > > > template <typename _Tp, typename _Alloc> > void deque<_Tp, _Alloc>:: > _M_pop_back_aux() > { > _M_deallocate_node(this->_M_impl._M_finish._M_first); > this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); > this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; > _Alloc_traits::destroy(_M_get_Tp_allocator(), > this->_M_impl._M_finish._M_cur); > } > > > > > > > template <typename _Tp, typename _Alloc> > void deque<_Tp, _Alloc>:: > _M_pop_front_aux() > { > _Alloc_traits::destroy(_M_get_Tp_allocator(), > this->_M_impl._M_start._M_cur); > _M_deallocate_node(this->_M_impl._M_start._M_first); > this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); > this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; > } > > template <typename _Tp, typename _Alloc> > template <typename _InputIterator> > void > deque<_Tp, _Alloc>:: > _M_range_insert_aux(iterator __pos, > _InputIterator __first, _InputIterator __last, > std::input_iterator_tag) > { std::copy(__first, __last, std::inserter(*this, __pos)); } > > template <typename _Tp, typename _Alloc> > template <typename _ForwardIterator> > void > deque<_Tp, _Alloc>:: > _M_range_insert_aux(iterator __pos, > _ForwardIterator __first, _ForwardIterator __last, > std::forward_iterator_tag) > { > const size_type __n = std::distance(__first, __last); > if (__pos._M_cur == this->_M_impl._M_start._M_cur) > { > iterator __new_start = _M_reserve_elements_at_front(__n); > try > { > std::__uninitialized_copy_a(__first, __last, __new_start, > _M_get_Tp_allocator()); > this->_M_impl._M_start = __new_start; > } > catch(...) > { > _M_destroy_nodes(__new_start._M_node, > this->_M_impl._M_start._M_node); > throw; > } > } > else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) > { > iterator __new_finish = _M_reserve_elements_at_back(__n); > try > { > std::__uninitialized_copy_a(__first, __last, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = __new_finish; > } > catch(...) > { > _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, > __new_finish._M_node + 1); > throw; > } > } > else > _M_insert_aux(__pos, __first, __last, __n); > } > > template<typename _Tp, typename _Alloc> > > template<typename... _Args> > typename deque<_Tp, _Alloc>::iterator > deque<_Tp, _Alloc>:: > _M_insert_aux(iterator __pos, _Args&&... __args) > { > value_type __x_copy(std::forward<_Args>(__args)...); > > > > > > > > difference_type __index = __pos - this->_M_impl._M_start; > if (static_cast<size_type>(__index) < size() / 2) > { > push_front(std::move(front())); > iterator __front1 = this->_M_impl._M_start; > ++__front1; > iterator __front2 = __front1; > ++__front2; > __pos = this->_M_impl._M_start + __index; > iterator __pos1 = __pos; > ++__pos1; > std::move(__front2, __pos1, __front1); > } > else > { > push_back(std::move(back())); > iterator __back1 = this->_M_impl._M_finish; > --__back1; > iterator __back2 = __back1; > --__back2; > __pos = this->_M_impl._M_start + __index; > std::move_backward(__pos, __back2, __back1); > } > *__pos = std::move(__x_copy); > return __pos; > } > > template <typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) > { > const difference_type __elems_before = __pos - this->_M_impl._M_start; > const size_type __length = this->size(); > value_type __x_copy = __x; > if (__elems_before < difference_type(__length / 2)) > { > iterator __new_start = _M_reserve_elements_at_front(__n); > iterator __old_start = this->_M_impl._M_start; > __pos = this->_M_impl._M_start + __elems_before; > try > { > if (__elems_before >= difference_type(__n)) > { > iterator __start_n = (this->_M_impl._M_start > + difference_type(__n)); > std::__uninitialized_move_a(this->_M_impl._M_start, > __start_n, __new_start, > _M_get_Tp_allocator()); > this->_M_impl._M_start = __new_start; > std::move(__start_n, __pos, __old_start); > std::fill(__pos - difference_type(__n), __pos, __x_copy); > } > else > { > std::__uninitialized_move_fill(this->_M_impl._M_start, > __pos, __new_start, > this->_M_impl._M_start, > __x_copy, > _M_get_Tp_allocator()); > this->_M_impl._M_start = __new_start; > std::fill(__old_start, __pos, __x_copy); > } > } > catch(...) > { > _M_destroy_nodes(__new_start._M_node, > this->_M_impl._M_start._M_node); > throw; > } > } > else > { > iterator __new_finish = _M_reserve_elements_at_back(__n); > iterator __old_finish = this->_M_impl._M_finish; > const difference_type __elems_after = > difference_type(__length) - __elems_before; > __pos = this->_M_impl._M_finish - __elems_after; > try > { > if (__elems_after > difference_type(__n)) > { > iterator __finish_n = (this->_M_impl._M_finish > - difference_type(__n)); > std::__uninitialized_move_a(__finish_n, > this->_M_impl._M_finish, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = __new_finish; > std::move_backward(__pos, __finish_n, __old_finish); > std::fill(__pos, __pos + difference_type(__n), __x_copy); > } > else > { > std::__uninitialized_fill_move(this->_M_impl._M_finish, > __pos + difference_type(__n), > __x_copy, __pos, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = __new_finish; > std::fill(__pos, __old_finish, __x_copy); > } > } > catch(...) > { > _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, > __new_finish._M_node + 1); > throw; > } > } > } > > template <typename _Tp, typename _Alloc> > template <typename _ForwardIterator> > void > deque<_Tp, _Alloc>:: > _M_insert_aux(iterator __pos, > _ForwardIterator __first, _ForwardIterator __last, > size_type __n) > { > const difference_type __elemsbefore = __pos - this->_M_impl._M_start; > const size_type __length = size(); > if (static_cast<size_type>(__elemsbefore) < __length / 2) > { > iterator __new_start = _M_reserve_elements_at_front(__n); > iterator __old_start = this->_M_impl._M_start; > __pos = this->_M_impl._M_start + __elemsbefore; > try > { > if (__elemsbefore >= difference_type(__n)) > { > iterator __start_n = (this->_M_impl._M_start > + difference_type(__n)); > std::__uninitialized_move_a(this->_M_impl._M_start, > __start_n, __new_start, > _M_get_Tp_allocator()); > this->_M_impl._M_start = __new_start; > std::move(__start_n, __pos, __old_start); > std::copy(__first, __last, __pos - difference_type(__n)); > } > else > { > _ForwardIterator __mid = __first; > std::advance(__mid, difference_type(__n) - __elemsbefore); > std::__uninitialized_move_copy(this->_M_impl._M_start, > __pos, __first, __mid, > __new_start, > _M_get_Tp_allocator()); > this->_M_impl._M_start = __new_start; > std::copy(__mid, __last, __old_start); > } > } > catch(...) > { > _M_destroy_nodes(__new_start._M_node, > this->_M_impl._M_start._M_node); > throw; > } > } > else > { > iterator __new_finish = _M_reserve_elements_at_back(__n); > iterator __old_finish = this->_M_impl._M_finish; > const difference_type __elemsafter = > difference_type(__length) - __elemsbefore; > __pos = this->_M_impl._M_finish - __elemsafter; > try > { > if (__elemsafter > difference_type(__n)) > { > iterator __finish_n = (this->_M_impl._M_finish > - difference_type(__n)); > std::__uninitialized_move_a(__finish_n, > this->_M_impl._M_finish, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = __new_finish; > std::move_backward(__pos, __finish_n, __old_finish); > std::copy(__first, __last, __pos); > } > else > { > _ForwardIterator __mid = __first; > std::advance(__mid, __elemsafter); > std::__uninitialized_copy_move(__mid, __last, __pos, > this->_M_impl._M_finish, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = __new_finish; > std::copy(__first, __mid, __pos); > } > } > catch(...) > { > _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, > __new_finish._M_node + 1); > throw; > } > } > } > > template<typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_destroy_data_aux(iterator __first, iterator __last) > { > for (_Map_pointer __node = __first._M_node + 1; > __node < __last._M_node; ++__node) > std::_Destroy(*__node, *__node + _S_buffer_size(), > _M_get_Tp_allocator()); > > if (__first._M_node != __last._M_node) > { > std::_Destroy(__first._M_cur, __first._M_last, > _M_get_Tp_allocator()); > std::_Destroy(__last._M_first, __last._M_cur, > _M_get_Tp_allocator()); > } > else > std::_Destroy(__first._M_cur, __last._M_cur, > _M_get_Tp_allocator()); > } > > template <typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_new_elements_at_front(size_type __new_elems) > { > if (this->max_size() - this->size() < __new_elems) > __throw_length_error(("deque::_M_new_elements_at_front")); > > const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) > / _S_buffer_size()); > _M_reserve_map_at_front(__new_nodes); > size_type __i; > try > { > for (__i = 1; __i <= __new_nodes; ++__i) > *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); > } > catch(...) > { > for (size_type __j = 1; __j < __i; ++__j) > _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); > throw; > } > } > > template <typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_new_elements_at_back(size_type __new_elems) > { > if (this->max_size() - this->size() < __new_elems) > __throw_length_error(("deque::_M_new_elements_at_back")); > > const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) > / _S_buffer_size()); > _M_reserve_map_at_back(__new_nodes); > size_type __i; > try > { > for (__i = 1; __i <= __new_nodes; ++__i) > *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); > } > catch(...) > { > for (size_type __j = 1; __j < __i; ++__j) > _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); > throw; > } > } > > template <typename _Tp, typename _Alloc> > void > deque<_Tp, _Alloc>:: > _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) > { > const size_type __old_num_nodes > = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; > const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; > > _Map_pointer __new_nstart; > if (this->_M_impl._M_map_size > 2 * __new_num_nodes) > { > __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size > - __new_num_nodes) / 2 > + (__add_at_front ? __nodes_to_add : 0); > if (__new_nstart < this->_M_impl._M_start._M_node) > std::copy(this->_M_impl._M_start._M_node, > this->_M_impl._M_finish._M_node + 1, > __new_nstart); > else > std::copy_backward(this->_M_impl._M_start._M_node, > this->_M_impl._M_finish._M_node + 1, > __new_nstart + __old_num_nodes); > } > else > { > size_type __new_map_size = this->_M_impl._M_map_size > + std::max(this->_M_impl._M_map_size, > __nodes_to_add) + 2; > > _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); > __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 > + (__add_at_front ? __nodes_to_add : 0); > std::copy(this->_M_impl._M_start._M_node, > this->_M_impl._M_finish._M_node + 1, > __new_nstart); > _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); > > this->_M_impl._M_map = __new_map; > this->_M_impl._M_map_size = __new_map_size; > } > > this->_M_impl._M_start._M_set_node(__new_nstart); > this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); > } > > > > > > 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) > { > typedef std::_Deque_iterator<_Tp, _Ref, _Ptr> _Iter; > if (__first._M_node != __last._M_node) > { > __result > = std::__copy_move_a1<_IsMove>(__first._M_cur, __first._M_last, > __result); > > for (typename _Iter::_Map_pointer __node = __first._M_node + 1; > __node != __last._M_node; ++__node) > __result > = std::__copy_move_a1<_IsMove>(*__node, > *__node + _Iter::_S_buffer_size(), > __result); > > return std::__copy_move_a1<_IsMove>(__last._M_first, __last._M_cur, > __result); > } > > return std::__copy_move_a1<_IsMove>(__first._M_cur, __last._M_cur, > __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) > { return __copy_move_dit<_IsMove>(__first, __last, __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) > { return __copy_move_dit<_IsMove>(__first, __last, __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) > { > typedef std::_Deque_iterator<_Tp, _Tp&, _Tp*> _Iter; > typedef typename _Iter::difference_type difference_type; > > difference_type __len = __last - __first; > while (__len > 0) > { > const difference_type __clen > = std::min(__len, __result._M_last - __result._M_cur); > std::__copy_move_a1<_IsMove>(__first, __first + __clen, > __result._M_cur); > > __first += __clen; > __result += __clen; > __len -= __clen; > } > > return __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) > { > if (__first == __last) > return __result; > > for (;;) > { > const std::ptrdiff_t __len = __result._M_last - __result._M_cur; > const std::ptrdiff_t __nb > = std::__copy_n_a(__first, __len, __result._M_cur, false) > - __result._M_cur; > __result += __nb; > > if (__nb != __len) > break; > } > > return __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) > { > if (__size == 0) > return __result; > > do > { > const _Size __len > = std::min<_Size>(__result._M_last - __result._M_cur, __size); > std::__copy_n_a(__it, __len, __result._M_cur, __strict); > __result += __len; > __size -= __len; > } > while (__size != 0); > return __result; > } > > 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) > { > typedef std::_Deque_iterator<_Tp, _Ref, _Ptr> _Iter; > if (__first._M_node != __last._M_node) > { > __result = std::__copy_move_backward_a1<_IsMove>( > __last._M_first, __last._M_cur, __result); > > for (typename _Iter::_Map_pointer __node = __last._M_node - 1; > __node != __first._M_node; --__node) > __result = std::__copy_move_backward_a1<_IsMove>( > *__node, *__node + _Iter::_S_buffer_size(), __result); > > return std::__copy_move_backward_a1<_IsMove>( > __first._M_cur, __first._M_last, __result); > } > > return std::__copy_move_backward_a1<_IsMove>( > __first._M_cur, __last._M_cur, __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) > { return __copy_move_backward_dit<_IsMove>(__first, __last, __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) > { return __copy_move_backward_dit<_IsMove>(__first, __last, __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) > { > typedef std::_Deque_iterator<_Tp, _Tp&, _Tp*> _Iter; > typedef typename _Iter::difference_type difference_type; > > difference_type __len = __last - __first; > while (__len > 0) > { > difference_type __rlen = __result._M_cur - __result._M_first; > _Tp* __rend = __result._M_cur; > if (!__rlen) > { > __rlen = _Iter::_S_buffer_size(); > __rend = *(__result._M_node - 1) + __rlen; > } > > const difference_type __clen = std::min(__len, __rlen); > std::__copy_move_backward_a1<_IsMove>(__last - __clen, __last, __rend); > > __last -= __clen; > __result -= __clen; > __len -= __clen; > } > > return __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) > { > typedef std::_Deque_iterator<_Tp, _Ref, _Ptr> _Iter; > if (__first1._M_node != __last1._M_node) > { > if (!std::__equal_aux1(__first1._M_cur, __first1._M_last, __first2)) > return false; > > __first2 += __first1._M_last - __first1._M_cur; > for (typename _Iter::_Map_pointer __node = __first1._M_node + 1; > __node != __last1._M_node; > __first2 += _Iter::_S_buffer_size(), ++__node) > if (!std::__equal_aux1(*__node, *__node + _Iter::_S_buffer_size(), > __first2)) > return false; > > return std::__equal_aux1(__last1._M_first, __last1._M_cur, __first2); > } > > return std::__equal_aux1(__first1._M_cur, __last1._M_cur, __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) > { return std::__equal_dit(__first1, __last1, __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) > { return std::__equal_dit(__first1, __last1, __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) > { > typedef std::_Deque_iterator<_Tp, _Ref, _Ptr> _Iter; > typedef typename _Iter::difference_type difference_type; > > difference_type __len = __last1 - __first1; > while (__len > 0) > { > const difference_type __clen > = std::min(__len, __first2._M_last - __first2._M_cur); > if (!std::__equal_aux1(__first1, __first1 + __clen, __first2._M_cur)) > return false; > > __first1 += __clen; > __len -= __clen; > __first2 += __clen; > } > > return true; > } > > 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) > { > const bool __simple = > (__is_memcmp_ordered_with<_Tp1, _Tp2>::__value > && __is_pointer<_Ptr>::__value > > > > > > > > ); > typedef std::__lexicographical_compare<__simple> _Lc; > > while (__first1._M_node != __last1._M_node) > { > const ptrdiff_t __len1 = __first1._M_last - __first1._M_cur; > const ptrdiff_t __len2 = __last2 - __first2; > const ptrdiff_t __len = std::min(__len1, __len2); > > if (int __ret = _Lc::__3way(__first1._M_cur, __first1._M_last, > __first2, __first2 + __len)) > return __ret; > > __first1 += __len; > __first2 += __len; > } > return _Lc::__3way(__first1._M_cur, __last1._M_cur, > __first2, __last2); > } > > template<typename _Tp1, typename _Ref1, typename _Ptr1, > typename _Tp2> > inline bool > __lexicographical_compare_aux1( > std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __first1, > std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __last1, > _Tp2* __first2, _Tp2* __last2) > { return std::__lex_cmp_dit(__first1, __last1, __first2, __last2) < 0; } > > template<typename _Tp1, > typename _Tp2, typename _Ref2, typename _Ptr2> > inline bool > __lexicographical_compare_aux1(_Tp1* __first1, _Tp1* __last1, > std::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __first2, > std::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __last2) > { return std::__lex_cmp_dit(__first2, __last2, __first1, __last1) > 0; } > > template<typename _Tp1, typename _Ref1, typename _Ptr1, > typename _Tp2, typename _Ref2, typename _Ptr2> > inline 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) > { > const bool __simple = > (__is_memcmp_ordered_with<_Tp1, _Tp2>::__value > && __is_pointer<_Ptr1>::__value > && __is_pointer<_Ptr2>::__value > > > > > > > > ); > typedef std::__lexicographical_compare<__simple> _Lc; > > while (__first1 != __last1) > { > const ptrdiff_t __len2 = __first2._M_node == __last2._M_node > ? __last2._M_cur - __first2._M_cur > : __first2._M_last - __first2._M_cur; > if (__len2 == 0) > return false; > const ptrdiff_t __len1 = __first1._M_node == __last1._M_node > ? __last1._M_cur - __first1._M_cur > : __first1._M_last - __first1._M_cur; > const ptrdiff_t __len = std::min(__len1, __len2); > if (int __ret = _Lc::__3way(__first1._M_cur, __first1._M_cur + __len, > __first2._M_cur, __first2._M_cur + __len)) > return __ret < 0; > > __first1 += __len; > __first2 += __len; > } > > return __last2 != __first2; > } > > >} ># 70 "/usr/include/c++/13/deque" 2 3 > > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > namespace pmr > { > template<typename _Tp> > using deque = std::deque<_Tp, polymorphic_allocator<_Tp>>; > } > >} ># 63 "/usr/include/c++/13/stack" 2 3 ># 1 "/usr/include/c++/13/bits/stl_stack.h" 1 3 ># 65 "/usr/include/c++/13/bits/stl_stack.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 98 "/usr/include/c++/13/bits/stl_stack.h" 3 > template<typename _Tp, typename _Sequence = deque<_Tp> > > class stack > { ># 111 "/usr/include/c++/13/bits/stl_stack.h" 3 > 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>&); ># 126 "/usr/include/c++/13/bits/stl_stack.h" 3 > 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: ># 160 "/usr/include/c++/13/bits/stl_stack.h" 3 > template<typename _Seq = _Sequence, typename _Requires = typename > enable_if<is_default_constructible<_Seq>::value>::type> > stack() > : c() { } > > explicit > stack(const _Sequence& __c) > : c(__c) { } > > explicit > stack(_Sequence&& __c) > : c(std::move(__c)) { } ># 183 "/usr/include/c++/13/bits/stl_stack.h" 3 > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > explicit > stack(const _Alloc& __a) > : c(__a) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > stack(const _Sequence& __c, const _Alloc& __a) > : c(__c, __a) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > stack(_Sequence&& __c, const _Alloc& __a) > : c(std::move(__c), __a) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > stack(const stack& __q, const _Alloc& __a) > : c(__q.c, __a) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > stack(stack&& __q, const _Alloc& __a) > : c(std::move(__q.c), __a) { } ># 216 "/usr/include/c++/13/bits/stl_stack.h" 3 > [[__nodiscard__]] bool > empty() const > { return c.empty(); } > > > [[__nodiscard__]] > size_type > size() const > { return c.size(); } > > > > > > [[__nodiscard__]] > reference > top() > { > ; > return c.back(); > } > > > > > > [[__nodiscard__]] > const_reference > top() const > { > ; > return c.back(); > } ># 259 "/usr/include/c++/13/bits/stl_stack.h" 3 > void > push(const value_type& __x) > { c.push_back(__x); } > > > void > push(value_type&& __x) > { c.push_back(std::move(__x)); } > > > template<typename... _Args> > decltype(auto) > emplace(_Args&&... __args) > { return c.emplace_back(std::forward<_Args>(__args)...); } ># 292 "/usr/include/c++/13/bits/stl_stack.h" 3 > void > pop() > { > ; > c.pop_back(); > } > > > void > swap(stack& __s) > > noexcept(__is_nothrow_swappable<_Sequence>::value) > > > > { > using std::swap; > swap(c, __s.c); > } > > }; > > > 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>; ># 353 "/usr/include/c++/13/bits/stl_stack.h" 3 > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) > { return __x.c == __y.c; } ># 372 "/usr/include/c++/13/bits/stl_stack.h" 3 > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) > { return __x.c < __y.c; } > > > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) > { return !(__x == __y); } > > > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) > { return __y < __x; } > > > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) > { return !(__y < __x); } > > > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) > { return !(__x < __y); } ># 415 "/usr/include/c++/13/bits/stl_stack.h" 3 > template<typename _Tp, typename _Seq> > inline > > > typename enable_if<__is_swappable<_Seq>::value>::type > > > > swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > template<typename _Tp, typename _Seq, typename _Alloc> > struct uses_allocator<stack<_Tp, _Seq>, _Alloc> > : public uses_allocator<_Seq, _Alloc>::type { }; > > > >} ># 64 "/usr/include/c++/13/stack" 2 3 ># 44 "/usr/include/c++/13/regex" 2 3 > > > ># 1 "/usr/include/c++/13/ext/aligned_buffer.h" 1 3 ># 32 "/usr/include/c++/13/ext/aligned_buffer.h" 3 > ># 33 "/usr/include/c++/13/ext/aligned_buffer.h" 3 > > > > > > > >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 > { return static_cast<void*>(&_M_storage); } > > const void* > _M_addr() const noexcept > { return static_cast<const void*>(&_M_storage); } > > _Tp* > _M_ptr() noexcept > { return static_cast<_Tp*>(_M_addr()); } > > const _Tp* > _M_ptr() const noexcept > { return static_cast<const _Tp*>(_M_addr()); } > }; > > > > > >#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 > { > return static_cast<void*>(&_M_storage); > } > > const void* > _M_addr() const noexcept > { > return static_cast<const void*>(&_M_storage); > } > > _Tp* > _M_ptr() noexcept > { return static_cast<_Tp*>(_M_addr()); } > > const _Tp* > _M_ptr() const noexcept > { return static_cast<const _Tp*>(_M_addr()); } > }; >#pragma GCC diagnostic pop > > >} ># 48 "/usr/include/c++/13/regex" 2 3 > ># 1 "/usr/include/c++/13/bits/shared_ptr.h" 1 3 ># 53 "/usr/include/c++/13/bits/shared_ptr.h" 3 ># 1 "/usr/include/c++/13/bits/shared_ptr_base.h" 1 3 ># 53 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 ># 1 "/usr/include/c++/13/bits/allocated_ptr.h" 1 3 ># 40 "/usr/include/c++/13/bits/allocated_ptr.h" 3 >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) noexcept > : _M_alloc(std::__addressof(__a)), _M_ptr(__ptr) > { } > > > template<typename _Ptr, > typename _Req = _Require<is_same<_Ptr, value_type*>>> > __allocated_ptr(_Alloc& __a, _Ptr __ptr) > : _M_alloc(std::__addressof(__a)), > _M_ptr(pointer_traits<pointer>::pointer_to(*__ptr)) > { } > > > __allocated_ptr(__allocated_ptr&& __gd) noexcept > : _M_alloc(__gd._M_alloc), _M_ptr(__gd._M_ptr) > { __gd._M_ptr = nullptr; } > > > ~__allocated_ptr() > { > if (_M_ptr != nullptr) > std::allocator_traits<_Alloc>::deallocate(*_M_alloc, _M_ptr, 1); > } > > > __allocated_ptr& > operator=(std::nullptr_t) noexcept > { > _M_ptr = nullptr; > return *this; > } > > > value_type* get() { return std::__to_address(_M_ptr); } > > private: > _Alloc* _M_alloc; > pointer _M_ptr; > }; > > > template<typename _Alloc> > __allocated_ptr<_Alloc> > __allocate_guarded(_Alloc& __a) > { > return { __a, std::allocator_traits<_Alloc>::allocate(__a, 1) }; > } > > > >} ># 54 "/usr/include/c++/13/bits/shared_ptr_base.h" 2 3 > > > > > ># 1 "/usr/include/c++/13/bits/unique_ptr.h" 1 3 ># 54 "/usr/include/c++/13/bits/unique_ptr.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > > ># 64 "/usr/include/c++/13/bits/unique_ptr.h" 3 >#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; > } > }; ># 112 "/usr/include/c++/13/bits/unique_ptr.h" 3 > template<typename _Tp> > struct default_delete<_Tp[]> > { > public: > > constexpr default_delete() noexcept = default; ># 128 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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) : _M_t() { _M_ptr() = __p; } > > template<typename _Del> > > __uniq_ptr_impl(pointer __p, _Del&& __d) > : _M_t(__p, std::forward<_Del>(__d)) { } > > > __uniq_ptr_impl(__uniq_ptr_impl&& __u) noexcept > : _M_t(std::move(__u._M_t)) > { __u._M_ptr() = nullptr; } > > > __uniq_ptr_impl& operator=(__uniq_ptr_impl&& __u) noexcept > { > reset(__u.release()); > _M_deleter() = std::forward<_Dp>(__u._M_deleter()); > return *this; > } > > > pointer& _M_ptr() noexcept { return std::get<0>(_M_t); } > > pointer _M_ptr() const noexcept { return std::get<0>(_M_t); } > > _Dp& _M_deleter() noexcept { return std::get<1>(_M_t); } > > const _Dp& _M_deleter() const noexcept { return std::get<1>(_M_t); } > > > void reset(pointer __p) noexcept > { > const pointer __old_p = _M_ptr(); > _M_ptr() = __p; > if (__old_p) > _M_deleter()(__old_p); > } > > > pointer release() noexcept > { > pointer __p = _M_ptr(); > _M_ptr() = nullptr; > return __p; > } > > > void > swap(__uniq_ptr_impl& __rhs) noexcept > { > using std::swap; > swap(this->_M_ptr(), __rhs._M_ptr()); > swap(this->_M_deleter(), __rhs._M_deleter()); > } > > 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() noexcept > : _M_t() > { } > > > > > > > > template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>> > > explicit > unique_ptr(pointer __p) noexcept > : _M_t(__p) > { } ># 329 "/usr/include/c++/13/bits/unique_ptr.h" 3 > template<typename _Del = deleter_type, > typename = _Require<is_copy_constructible<_Del>>> > > unique_ptr(pointer __p, const deleter_type& __d) noexcept > : _M_t(__p, __d) { } ># 342 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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) noexcept > : _M_t(__p, std::move(__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) noexcept > : _M_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) noexcept > : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) > { } > > >#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; ># 424 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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 > { > reset(); > return *this; > } > > > > > > typename add_lvalue_reference<element_type>::type > operator*() const noexcept(noexcept(*std::declval<pointer>())) > { > do { if (std::__is_constant_evaluated() && !bool(get() != pointer())) __builtin_unreachable(); } while (false); > return *get(); > } > > > > pointer > operator->() const noexcept > { > ; > return get(); > } > > > > pointer > get() const noexcept > { return _M_t._M_ptr(); } > > > > deleter_type& > get_deleter() noexcept > { return _M_t._M_deleter(); } > > > > const deleter_type& > get_deleter() const noexcept > { return _M_t._M_deleter(); } > > > > explicit operator bool() const noexcept > { return get() == pointer() ? false : true; } > > > > > > pointer > release() noexcept > { return _M_t.release(); } > > > > > > > > > void > reset(pointer __p = pointer()) noexcept > { > static_assert(__is_invocable<deleter_type&, pointer>::value, > "unique_ptr's deleter must be invocable with a pointer"); > _M_t.reset(std::move(__p)); > } > > > > void > swap(unique_ptr& __u) noexcept > { > static_assert(__is_swappable<_Dp>::value, "deleter must be swappable"); > _M_t.swap(__u._M_t); > } > > > unique_ptr(const unique_ptr&) = delete; > unique_ptr& operator=(const unique_ptr&) = delete; > }; ># 535 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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() noexcept > : _M_t() > { } ># 597 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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) noexcept > : _M_t(__p) > { } ># 616 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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) noexcept > : _M_t(__p, __d) { } ># 631 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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) noexcept > : _M_t(std::move(__p), std::move(__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) noexcept > : _M_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) noexcept > : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) > { } > > > > > > ~unique_ptr() > { > auto& __ptr = _M_t._M_ptr(); > if (__ptr != nullptr) > get_deleter()(__ptr); > __ptr = pointer(); > } > > > > > > > > unique_ptr& > operator=(unique_ptr&&) = default; ># 695 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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 > { > reset(); > return *this; > } > > > > > > typename std::add_lvalue_reference<element_type>::type > operator[](size_t __i) const > { > do { if (std::__is_constant_evaluated() && !bool(get() != pointer())) __builtin_unreachable(); } while (false); > return get()[__i]; > } > > > > pointer > get() const noexcept > { return _M_t._M_ptr(); } > > > > deleter_type& > get_deleter() noexcept > { return _M_t._M_deleter(); } > > > > const deleter_type& > get_deleter() const noexcept > { return _M_t._M_deleter(); } > > > > explicit operator bool() const noexcept > { return get() == pointer() ? false : true; } > > > > > > pointer > release() noexcept > { return _M_t.release(); } > > > > > > > > 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 > { _M_t.reset(std::move(__p)); } > > > void reset(nullptr_t = nullptr) noexcept > { reset(pointer()); } > > > > void > swap(unique_ptr& __u) noexcept > { > static_assert(__is_swappable<_Dp>::value, "deleter must be swappable"); > _M_t.swap(__u._M_t); > } > > > unique_ptr(const unique_ptr&) = delete; > unique_ptr& operator=(const unique_ptr&) = delete; > }; > > > > > > template<typename _Tp, typename _Dp> > inline > > > > typename enable_if<__is_swappable<_Dp>::value>::type > > > > swap(unique_ptr<_Tp, _Dp>& __x, > unique_ptr<_Tp, _Dp>& __y) noexcept > { __x.swap(__y); } > > > 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__]] > inline bool > operator==(const unique_ptr<_Tp, _Dp>& __x, > const unique_ptr<_Up, _Ep>& __y) > { return __x.get() == __y.get(); } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept > { return !__x; } > > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept > { return !__x; } > > > template<typename _Tp, typename _Dp, > typename _Up, typename _Ep> > [[__nodiscard__]] > inline bool > operator!=(const unique_ptr<_Tp, _Dp>& __x, > const unique_ptr<_Up, _Ep>& __y) > { return __x.get() != __y.get(); } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept > { return (bool)__x; } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept > { return (bool)__x; } > > > > template<typename _Tp, typename _Dp, > typename _Up, typename _Ep> > [[__nodiscard__]] > inline bool > operator<(const unique_ptr<_Tp, _Dp>& __x, > const unique_ptr<_Up, _Ep>& __y) > { > typedef typename > std::common_type<typename unique_ptr<_Tp, _Dp>::pointer, > typename unique_ptr<_Up, _Ep>::pointer>::type _CT; > return std::less<_CT>()(__x.get(), __y.get()); > } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) > { > return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(__x.get(), > nullptr); > } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) > { > return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(nullptr, > __x.get()); > } > > > template<typename _Tp, typename _Dp, > typename _Up, typename _Ep> > [[__nodiscard__]] > inline bool > operator<=(const unique_ptr<_Tp, _Dp>& __x, > const unique_ptr<_Up, _Ep>& __y) > { return !(__y < __x); } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) > { return !(nullptr < __x); } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) > { return !(__x < nullptr); } > > > template<typename _Tp, typename _Dp, > typename _Up, typename _Ep> > [[__nodiscard__]] > inline bool > operator>(const unique_ptr<_Tp, _Dp>& __x, > const unique_ptr<_Up, _Ep>& __y) > { return (__y < __x); } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) > { > return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(nullptr, > __x.get()); > } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) > { > return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(__x.get(), > nullptr); > } > > > template<typename _Tp, typename _Dp, > typename _Up, typename _Ep> > [[__nodiscard__]] > inline bool > operator>=(const unique_ptr<_Tp, _Dp>& __x, > const unique_ptr<_Up, _Ep>& __y) > { return !(__x < __y); } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] > inline bool > operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) > { return !(__x < nullptr); } > > > template<typename _Tp, typename _Dp> > [[__nodiscard__]] inline bool > operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) > { return !(nullptr < __x); } ># 1007 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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>()))) > { return hash<_Ptr>()(__u.get()); } > }; > > 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; >} ># 1067 "/usr/include/c++/13/bits/unique_ptr.h" 3 > template<typename _Tp, typename... _Args> > > inline __detail::__unique_ptr_t<_Tp> > make_unique(_Args&&... __args) > { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); } ># 1082 "/usr/include/c++/13/bits/unique_ptr.h" 3 > template<typename _Tp> > > inline __detail::__unique_ptr_array_t<_Tp> > make_unique(size_t __num) > { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]()); } > > > > > > > template<typename _Tp, typename... _Args> > __detail::__invalid_make_unique_t<_Tp> > make_unique(_Args&&...) = delete; ># 1155 "/usr/include/c++/13/bits/unique_ptr.h" 3 > 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 > { }; > } > > > >} ># 60 "/usr/include/c++/13/bits/shared_ptr_base.h" 2 3 > > ># 1 "/usr/include/c++/13/ext/concurrence.h" 1 3 ># 32 "/usr/include/c++/13/ext/concurrence.h" 3 > ># 33 "/usr/include/c++/13/ext/concurrence.h" 3 > > > > > > > >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() > { return "__gnu_cxx::__concurrence_lock_error"; } > }; > > class __concurrence_unlock_error : public std::exception > { > public: > virtual char const* > what() const throw() > { return "__gnu_cxx::__concurrence_unlock_error"; } > }; > > class __concurrence_broadcast_error : public std::exception > { > public: > virtual char const* > what() const throw() > { return "__gnu_cxx::__concurrence_broadcast_error"; } > }; > > class __concurrence_wait_error : public std::exception > { > public: > virtual char const* > what() const throw() > { return "__gnu_cxx::__concurrence_wait_error"; } > }; > > > inline void > __throw_concurrence_lock_error() > { (throw (__concurrence_lock_error())); } > > inline void > __throw_concurrence_unlock_error() > { (throw (__concurrence_unlock_error())); } > > > inline void > __throw_concurrence_broadcast_error() > { (throw (__concurrence_broadcast_error())); } > > inline void > __throw_concurrence_wait_error() > { (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() > { > > > > > } ># 144 "/usr/include/c++/13/ext/concurrence.h" 3 > void lock() > { > > if (__gthread_active_p()) > { > if (__gthread_mutex_lock(&_M_mutex) != 0) > __throw_concurrence_lock_error(); > } > > } > > void unlock() > { > > if (__gthread_active_p()) > { > if (__gthread_mutex_unlock(&_M_mutex) != 0) > __throw_concurrence_unlock_error(); > } > > } > > __gthread_mutex_t* gthread_mutex(void) > { return &_M_mutex; } > }; > > 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() > { > > > > > } ># 199 "/usr/include/c++/13/ext/concurrence.h" 3 > void lock() > { > > if (__gthread_active_p()) > { > if (__gthread_recursive_mutex_lock(&_M_mutex) != 0) > __throw_concurrence_lock_error(); > } > > } > > void unlock() > { > > if (__gthread_active_p()) > { > if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0) > __throw_concurrence_unlock_error(); > } > > } > > __gthread_recursive_mutex_t* gthread_recursive_mutex(void) > { return &_M_mutex; } > }; > > > > > 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) : _M_device(__name) > { _M_device.lock(); } > > ~__scoped_lock() throw() > { _M_device.unlock(); } > }; > > > class __cond > { > private: > > __gthread_cond_t _M_cond = { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }; > > > > > __cond(const __cond&); > __cond& operator=(const __cond&); > > public: > __cond() > { > > > > > } ># 277 "/usr/include/c++/13/ext/concurrence.h" 3 > void broadcast() > { > > if (__gthread_active_p()) > { > if (__gthread_cond_broadcast(&_M_cond) != 0) > __throw_concurrence_broadcast_error(); > } > > } > > void wait(__mutex *mutex) > { > > { > if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0) > __throw_concurrence_wait_error(); > } > > } > > void wait_recursive(__recursive_mutex *mutex) > { > > { > if (__gthread_cond_wait_recursive(&_M_cond, > mutex->gthread_recursive_mutex()) > != 0) > __throw_concurrence_wait_error(); > } > > } > }; > > > >} ># 63 "/usr/include/c++/13/bits/shared_ptr_base.h" 2 3 > > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > ># 75 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 >#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: > virtual char const* what() const noexcept; > > virtual ~bad_weak_ptr() noexcept; > }; > > > inline void > __throw_bad_weak_ptr() > { (throw (bad_weak_ptr())); } > > 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: > _Sp_counted_base() noexcept > : _M_use_count(1), _M_weak_count(1) { } > > virtual > ~_Sp_counted_base() noexcept > { } > > > > virtual void > _M_dispose() noexcept = 0; > > > virtual void > _M_destroy() noexcept > { delete this; } > > virtual void* > _M_get_deleter(const std::type_info&) noexcept = 0; > > > void > _M_add_ref_copy() > { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } > > > void > _M_add_ref_lock() > { > if (!_M_add_ref_lock_nothrow()) > __throw_bad_weak_ptr(); > } > > > bool > _M_add_ref_lock_nothrow() noexcept; > > > void > _M_release() noexcept; > > > void > _M_release_last_use() noexcept > { > ; > _M_dispose(); > > > > > if (_Mutex_base<_Lp>::_S_need_barriers) > { > __atomic_thread_fence (4); > } > > > ; > if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, > -1) == 1) > { > ; > _M_destroy(); > } > } > > > __attribute__((__noinline__)) > void > _M_release_last_use_cold() noexcept > { _M_release_last_use(); } > > > void > _M_weak_add_ref() noexcept > { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } > > > void > _M_weak_release() noexcept > { > > ; > if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) > { > ; > if (_Mutex_base<_Lp>::_S_need_barriers) > { > > > __atomic_thread_fence (4); > } > _M_destroy(); > } > } > > long > _M_get_use_count() const noexcept > { > > > return __atomic_load_n(&_M_use_count, 0); > } > > private: > _Sp_counted_base(_Sp_counted_base const&) = delete; > _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; > > _Atomic_word _M_use_count; > _Atomic_word _M_weak_count; > }; > > template<> > inline bool > _Sp_counted_base<_S_single>:: > _M_add_ref_lock_nothrow() noexcept > { > if (_M_use_count == 0) > return false; > ++_M_use_count; > return true; > } > > template<> > inline bool > _Sp_counted_base<_S_mutex>:: > _M_add_ref_lock_nothrow() noexcept > { > __gnu_cxx::__scoped_lock sentry(*this); > if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) > { > _M_use_count = 0; > return false; > } > return true; > } > > template<> > inline bool > _Sp_counted_base<_S_atomic>:: > _M_add_ref_lock_nothrow() noexcept > { > > _Atomic_word __count = _M_get_use_count(); > do > { > if (__count == 0) > return false; > > > } > while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, > true, 4, > 0)); > return true; > } > > template<> > inline void > _Sp_counted_base<_S_single>::_M_add_ref_copy() > { ++_M_use_count; } > > template<> > inline void > _Sp_counted_base<_S_single>::_M_release() noexcept > { > if (--_M_use_count == 0) > { > _M_dispose(); > if (--_M_weak_count == 0) > _M_destroy(); > } > } > > template<> > inline void > _Sp_counted_base<_S_mutex>::_M_release() noexcept > { > > ; > if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) > { > _M_release_last_use(); > } > } > > template<> > inline void > _Sp_counted_base<_S_atomic>::_M_release() noexcept > { > ; > > constexpr bool __lock_free > = __atomic_always_lock_free(sizeof(long long), 0) > && __atomic_always_lock_free(sizeof(_Atomic_word), 0); > constexpr bool __double_word > = sizeof(long long) == 2 * sizeof(_Atomic_word); > > > constexpr bool __aligned = __alignof(long long) <= alignof(void*); > if constexpr (__lock_free && __double_word && __aligned) > { > constexpr int __wordbits = 8 * sizeof(_Atomic_word); > constexpr int __shiftbits = __double_word ? __wordbits : 0; > constexpr long long __unique_ref = 1LL + (1LL << __shiftbits); > auto __both_counts = reinterpret_cast<long long*>(&_M_use_count); > > ; > if (__atomic_load_n(__both_counts, 2) == __unique_ref) > { > > > > > _M_weak_count = _M_use_count = 0; > ; > ; > _M_dispose(); > _M_destroy(); > return; > } > if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) > [[__unlikely__]] > { > _M_release_last_use_cold(); > return; > } > } > else > > if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) > { > _M_release_last_use(); > } > } > > template<> > inline void > _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept > { ++_M_weak_count; } > > template<> > inline void > _Sp_counted_base<_S_single>::_M_weak_release() noexcept > { > if (--_M_weak_count == 0) > _M_destroy(); > } > > template<> > inline long > _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept > { return _M_use_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 _Ptr, _Lock_policy _Lp> > class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> > { > public: > explicit > _Sp_counted_ptr(_Ptr __p) noexcept > : _M_ptr(__p) { } > > virtual void > _M_dispose() noexcept > { delete _M_ptr; } > > virtual void > _M_destroy() noexcept > { delete this; } > > virtual void* > _M_get_deleter(const std::type_info&) noexcept > { return nullptr; } > > _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; > _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; > > private: > _Ptr _M_ptr; > }; > > template<> > inline void > _Sp_counted_ptr<nullptr_t, _S_single>::_M_dispose() noexcept { } > > template<> > inline void > _Sp_counted_ptr<nullptr_t, _S_mutex>::_M_dispose() noexcept { } > > template<> > inline void > _Sp_counted_ptr<nullptr_t, _S_atomic>::_M_dispose() noexcept { } > > > > > > > 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 > { > explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { } > explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(std::move(__tp)) { } > > static _Tp& > _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); } > }; > > > template<int _Nm, typename _Tp> > struct _Sp_ebo_helper<_Nm, _Tp, false> > { > explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { } > explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(std::move(__tp)) { } > > static _Tp& > _S_get(_Sp_ebo_helper& __eboh) > { return __eboh._M_tp; } > > 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: > _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept > : _Del_base(std::move(__d)), _Alloc_base(__a), _M_ptr(__p) > { } > > _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); } > _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); } > > _Ptr _M_ptr; > }; > > public: > using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; > > > _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept > : _M_impl(__p, std::move(__d), _Alloc()) { } > > > _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept > : _M_impl(__p, std::move(__d), __a) { } > > ~_Sp_counted_deleter() noexcept { } > > virtual void > _M_dispose() noexcept > { _M_impl._M_del()(_M_impl._M_ptr); } > > virtual void > _M_destroy() noexcept > { > __allocator_type __a(_M_impl._M_alloc()); > __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; > this->~_Sp_counted_deleter(); > } > > virtual void* > _M_get_deleter(const type_info& __ti [[__gnu__::__unused__]]) noexcept > { > > > > return __ti == typeid(_Deleter) > ? std::__addressof(_M_impl._M_del()) > : nullptr; > > > > } > > private: > _Impl _M_impl; > }; > > > > struct _Sp_make_shared_tag > { > private: > template<typename _Tp, typename _Alloc, _Lock_policy _Lp> > friend class _Sp_counted_ptr_inplace; > > static const type_info& > _S_ti() noexcept __attribute__ ((__visibility__ ("default"))) > { > alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { }; > return reinterpret_cast<const type_info&>(__tag); > } > > static bool _S_eq(const type_info&) noexcept; > }; > > 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: > explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { } > > _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } > > __gnu_cxx::__aligned_buffer<_Tp> _M_storage; > }; > > public: > using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; > > > template<typename... _Args> > _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) > : _M_impl(__a) > { > > > allocator_traits<_Alloc>::construct(__a, _M_ptr(), > std::forward<_Args>(__args)...); > } > > ~_Sp_counted_ptr_inplace() noexcept { } > > virtual void > _M_dispose() noexcept > { > allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); > } > > > virtual void > _M_destroy() noexcept > { > __allocator_type __a(_M_impl._M_alloc()); > __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; > this->~_Sp_counted_ptr_inplace(); > } > > private: > friend class __shared_count<_Lp>; > > > > virtual void* > _M_get_deleter(const std::type_info& __ti) noexcept override > { > auto __ptr = const_cast<typename remove_cv<_Tp>::type*>(_M_ptr()); > > > > > if (&__ti == &_Sp_make_shared_tag::_S_ti() > || > > __ti == typeid(_Sp_make_shared_tag) > > > > ) > return __ptr; > return nullptr; > } > > _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); } > > _Impl _M_impl; > }; ># 886 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 > struct __sp_array_delete > { > template<typename _Yp> > void operator()(_Yp* __p) const { delete[] __p; } > }; > > 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>> { }; > > > > > > > public: > constexpr __shared_count() noexcept : _M_pi(0) > { } > > template<typename _Ptr> > explicit > __shared_count(_Ptr __p) : _M_pi(0) > { > try > { > _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); > } > catch(...) > { > delete __p; > throw; > } > } > > template<typename _Ptr> > __shared_count(_Ptr __p, false_type) > : __shared_count(__p) > { } > > template<typename _Ptr> > __shared_count(_Ptr __p, true_type) > : __shared_count(__p, __sp_array_delete{}, allocator<void>()) > { } > > template<typename _Ptr, typename _Deleter, > typename = typename __not_alloc_shared_tag<_Deleter>::type> > __shared_count(_Ptr __p, _Deleter __d) > : __shared_count(__p, std::move(__d), allocator<void>()) > { } > > template<typename _Ptr, typename _Deleter, typename _Alloc, > typename = typename __not_alloc_shared_tag<_Deleter>::type> > __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) > { > typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; > try > { > typename _Sp_cd_type::__allocator_type __a2(__a); > auto __guard = std::__allocate_guarded(__a2); > _Sp_cd_type* __mem = __guard.get(); > ::new (__mem) _Sp_cd_type(__p, std::move(__d), std::move(__a)); > _M_pi = __mem; > __guard = nullptr; > } > catch(...) > { > __d(__p); > throw; > } > } > > template<typename _Tp, typename _Alloc, typename... _Args> > __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a, > _Args&&... __args) > { > typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; > typename _Sp_cp_type::__allocator_type __a2(__a._M_a); > auto __guard = std::__allocate_guarded(__a2); > _Sp_cp_type* __mem = __guard.get(); > auto __pi = ::new (__mem) > _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); > __guard = nullptr; > _M_pi = __pi; > __p = __pi->_M_ptr(); > } ># 1024 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > > template<typename _Tp> > explicit > __shared_count(std::auto_ptr<_Tp>&& __r); >#pragma GCC diagnostic pop > > > > template<typename _Tp, typename _Del> > explicit > __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0) > { > > > if (__r.get() == nullptr) > return; > > using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; > using _Del2 = __conditional_t<is_reference<_Del>::value, > reference_wrapper<typename remove_reference<_Del>::type>, > _Del>; > using _Sp_cd_type > = _Sp_counted_deleter<_Ptr, _Del2, allocator<void>, _Lp>; > using _Alloc = allocator<_Sp_cd_type>; > using _Alloc_traits = allocator_traits<_Alloc>; > _Alloc __a; > _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1); > > > > _Alloc_traits::construct(__a, __mem, __r.release(), > std::forward<_Del>(__r.get_deleter())); > _M_pi = __mem; > } > > > explicit __shared_count(const __weak_count<_Lp>& __r); > > > explicit > __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept; > > ~__shared_count() noexcept > { > if (_M_pi != nullptr) > _M_pi->_M_release(); > } > > __shared_count(const __shared_count& __r) noexcept > : _M_pi(__r._M_pi) > { > if (_M_pi != nullptr) > _M_pi->_M_add_ref_copy(); > } > > __shared_count& > operator=(const __shared_count& __r) noexcept > { > _Sp_counted_base<_Lp>* __tmp = __r._M_pi; > if (__tmp != _M_pi) > { > if (__tmp != nullptr) > __tmp->_M_add_ref_copy(); > if (_M_pi != nullptr) > _M_pi->_M_release(); > _M_pi = __tmp; > } > return *this; > } > > void > _M_swap(__shared_count& __r) noexcept > { > _Sp_counted_base<_Lp>* __tmp = __r._M_pi; > __r._M_pi = _M_pi; > _M_pi = __tmp; > } > > long > _M_get_use_count() const noexcept > { return _M_pi ? _M_pi->_M_get_use_count() : 0; } > > bool > _M_unique() const noexcept > { return this->_M_get_use_count() == 1; } > > void* > _M_get_deleter(const std::type_info& __ti) const noexcept > { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; } > > bool > _M_less(const __shared_count& __rhs) const noexcept > { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } > > bool > _M_less(const __weak_count<_Lp>& __rhs) const noexcept > { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } > > > friend inline bool > operator==(const __shared_count& __a, const __shared_count& __b) noexcept > { return __a._M_pi == __b._M_pi; } > > private: > friend class __weak_count<_Lp>; > > > > > _Sp_counted_base<_Lp>* _M_pi; > }; > > > template<_Lock_policy _Lp> > class __weak_count > { > public: > constexpr __weak_count() noexcept : _M_pi(nullptr) > { } > > __weak_count(const __shared_count<_Lp>& __r) noexcept > : _M_pi(__r._M_pi) > { > if (_M_pi != nullptr) > _M_pi->_M_weak_add_ref(); > } > > __weak_count(const __weak_count& __r) noexcept > : _M_pi(__r._M_pi) > { > if (_M_pi != nullptr) > _M_pi->_M_weak_add_ref(); > } > > __weak_count(__weak_count&& __r) noexcept > : _M_pi(__r._M_pi) > { __r._M_pi = nullptr; } > > ~__weak_count() noexcept > { > if (_M_pi != nullptr) > _M_pi->_M_weak_release(); > } > > __weak_count& > operator=(const __shared_count<_Lp>& __r) noexcept > { > _Sp_counted_base<_Lp>* __tmp = __r._M_pi; > if (__tmp != nullptr) > __tmp->_M_weak_add_ref(); > if (_M_pi != nullptr) > _M_pi->_M_weak_release(); > _M_pi = __tmp; > return *this; > } > > __weak_count& > operator=(const __weak_count& __r) noexcept > { > _Sp_counted_base<_Lp>* __tmp = __r._M_pi; > if (__tmp != nullptr) > __tmp->_M_weak_add_ref(); > if (_M_pi != nullptr) > _M_pi->_M_weak_release(); > _M_pi = __tmp; > return *this; > } > > __weak_count& > operator=(__weak_count&& __r) noexcept > { > if (_M_pi != nullptr) > _M_pi->_M_weak_release(); > _M_pi = __r._M_pi; > __r._M_pi = nullptr; > return *this; > } > > void > _M_swap(__weak_count& __r) noexcept > { > _Sp_counted_base<_Lp>* __tmp = __r._M_pi; > __r._M_pi = _M_pi; > _M_pi = __tmp; > } > > long > _M_get_use_count() const noexcept > { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; } > > bool > _M_less(const __weak_count& __rhs) const noexcept > { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } > > bool > _M_less(const __shared_count<_Lp>& __rhs) const noexcept > { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } > > > friend inline bool > operator==(const __weak_count& __a, const __weak_count& __b) noexcept > { return __a._M_pi == __b._M_pi; } > > private: > friend class __shared_count<_Lp>; > > > > > _Sp_counted_base<_Lp>* _M_pi; > }; > > > template<_Lock_policy _Lp> > inline > __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r) > : _M_pi(__r._M_pi) > { > if (_M_pi == nullptr || !_M_pi->_M_add_ref_lock_nothrow()) > __throw_bad_weak_ptr(); > } > > > template<_Lock_policy _Lp> > inline > __shared_count<_Lp>:: > __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept > : _M_pi(__r._M_pi) > { > if (_M_pi && !_M_pi->_M_add_ref_lock_nothrow()) > _M_pi = nullptr; > } > > > > > > 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 > { > do { if (std::__is_constant_evaluated() && !bool(_M_get() != nullptr)) __builtin_unreachable(); } while (false); > return *_M_get(); > } > > element_type* > operator->() const noexcept > { > ; > return _M_get(); > } > > private: > element_type* > _M_get() const noexcept > { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); } > }; > > > template<typename _Tp, _Lock_policy _Lp> > class __shared_ptr_access<_Tp, _Lp, false, true> > { > public: > using element_type = _Tp; > > element_type* > operator->() const noexcept > { > auto __ptr = static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); > ; > return __ptr; > } > }; > > > template<typename _Tp, _Lock_policy _Lp> > class __shared_ptr_access<_Tp, _Lp, true, false> > { > public: > using element_type = typename remove_extent<_Tp>::type; ># 1407 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 > element_type& > operator[](ptrdiff_t __i) const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(_M_get() != nullptr)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(!extent<_Tp>::value || __i < extent<_Tp>::value)) __builtin_unreachable(); } while (false); > return _M_get()[__i]; > } > > private: > element_type* > _M_get() const noexcept > { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); } > }; > > 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() noexcept > : _M_ptr(0), _M_refcount() > { } > > template<typename _Yp, typename = _SafeConv<_Yp>> > explicit > __shared_ptr(_Yp* __p) > : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) > { > static_assert( !is_void<_Yp>::value, "incomplete type" ); > static_assert( sizeof(_Yp) > 0, "incomplete type" ); > _M_enable_shared_from_this_with(__p); > } > > template<typename _Yp, typename _Deleter, typename = _SafeConv<_Yp>> > __shared_ptr(_Yp* __p, _Deleter __d) > : _M_ptr(__p), _M_refcount(__p, std::move(__d)) > { > static_assert(__is_invocable<_Deleter&, _Yp*&>::value, > "deleter expression d(p) is well-formed"); > _M_enable_shared_from_this_with(__p); > } > > template<typename _Yp, typename _Deleter, typename _Alloc, > typename = _SafeConv<_Yp>> > __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) > : _M_ptr(__p), _M_refcount(__p, std::move(__d), std::move(__a)) > { > static_assert(__is_invocable<_Deleter&, _Yp*&>::value, > "deleter expression d(p) is well-formed"); > _M_enable_shared_from_this_with(__p); > } > > template<typename _Deleter> > __shared_ptr(nullptr_t __p, _Deleter __d) > : _M_ptr(0), _M_refcount(__p, std::move(__d)) > { } > > template<typename _Deleter, typename _Alloc> > __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) > : _M_ptr(0), _M_refcount(__p, std::move(__d), std::move(__a)) > { } > > > template<typename _Yp> > __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, > element_type* __p) noexcept > : _M_ptr(__p), _M_refcount(__r._M_refcount) > { } > > > template<typename _Yp> > __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r, > element_type* __p) noexcept > : _M_ptr(__p), _M_refcount() > { > _M_refcount._M_swap(__r._M_refcount); > __r._M_ptr = nullptr; > } > > __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) noexcept > : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) > { } > > __shared_ptr(__shared_ptr&& __r) noexcept > : _M_ptr(__r._M_ptr), _M_refcount() > { > _M_refcount._M_swap(__r._M_refcount); > __r._M_ptr = nullptr; > } > > template<typename _Yp, typename = _Compatible<_Yp>> > __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept > : _M_ptr(__r._M_ptr), _M_refcount() > { > _M_refcount._M_swap(__r._M_refcount); > __r._M_ptr = nullptr; > } > > template<typename _Yp, typename = _Compatible<_Yp>> > explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) > : _M_refcount(__r._M_refcount) > { > > > _M_ptr = __r._M_ptr; > } > > > template<typename _Yp, typename _Del, > typename = _UniqCompatible<_Yp, _Del>> > __shared_ptr(unique_ptr<_Yp, _Del>&& __r) > : _M_ptr(__r.get()), _M_refcount() > { > auto __raw = __to_address(__r.get()); > _M_refcount = __shared_count<_Lp>(std::move(__r)); > _M_enable_shared_from_this_with(__raw); > } ># 1585 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > > template<typename _Yp, typename = _Compatible<_Yp>> > __shared_ptr(auto_ptr<_Yp>&& __r); >#pragma GCC diagnostic pop > > > constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } > > template<typename _Yp> > _Assignable<_Yp> > operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept > { > _M_ptr = __r._M_ptr; > _M_refcount = __r._M_refcount; > return *this; > } > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > template<typename _Yp> > _Assignable<_Yp> > operator=(auto_ptr<_Yp>&& __r) > { > __shared_ptr(std::move(__r)).swap(*this); > return *this; > } >#pragma GCC diagnostic pop > > > __shared_ptr& > operator=(__shared_ptr&& __r) noexcept > { > __shared_ptr(std::move(__r)).swap(*this); > return *this; > } > > template<class _Yp> > _Assignable<_Yp> > operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept > { > __shared_ptr(std::move(__r)).swap(*this); > return *this; > } > > template<typename _Yp, typename _Del> > _UniqAssignable<_Yp, _Del> > operator=(unique_ptr<_Yp, _Del>&& __r) > { > __shared_ptr(std::move(__r)).swap(*this); > return *this; > } > > void > reset() noexcept > { __shared_ptr().swap(*this); } > > template<typename _Yp> > _SafeConv<_Yp> > reset(_Yp* __p) > { > > do { if (std::__is_constant_evaluated() && !bool(__p == nullptr || __p != _M_ptr)) __builtin_unreachable(); } while (false); > __shared_ptr(__p).swap(*this); > } > > template<typename _Yp, typename _Deleter> > _SafeConv<_Yp> > reset(_Yp* __p, _Deleter __d) > { __shared_ptr(__p, std::move(__d)).swap(*this); } > > template<typename _Yp, typename _Deleter, typename _Alloc> > _SafeConv<_Yp> > reset(_Yp* __p, _Deleter __d, _Alloc __a) > { __shared_ptr(__p, std::move(__d), std::move(__a)).swap(*this); } > > > element_type* > get() const noexcept > { return _M_ptr; } > > > explicit operator bool() const noexcept > { return _M_ptr != nullptr; } > > > bool > unique() const noexcept > { return _M_refcount._M_unique(); } > > > long > use_count() const noexcept > { return _M_refcount._M_get_use_count(); } > > > void > swap(__shared_ptr<_Tp, _Lp>& __other) noexcept > { > std::swap(_M_ptr, __other._M_ptr); > _M_refcount._M_swap(__other._M_refcount); > } ># 1697 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 > template<typename _Tp1> > bool > owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept > { return _M_refcount._M_less(__rhs._M_refcount); } > > template<typename _Tp1> > bool > owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept > { return _M_refcount._M_less(__rhs._M_refcount); } > > > protected: > > template<typename _Alloc, typename... _Args> > __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) > : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) > { _M_enable_shared_from_this_with(_M_ptr); } > > template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc, > typename... _Args> > friend __shared_ptr<_Tp1, _Lp1> > __allocate_shared(const _Alloc& __a, _Args&&... __args); ># 1731 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 > __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) noexcept > : _M_refcount(__r._M_refcount, std::nothrow) > { > _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr; > } > > 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 _Yp, typename _Yp2 = typename remove_cv<_Yp>::type> > typename enable_if<__has_esft_base<_Yp2>::value>::type > _M_enable_shared_from_this_with(_Yp* __p) noexcept > { > if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) > __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); > } > > template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type> > typename enable_if<!__has_esft_base<_Yp2>::value>::type > _M_enable_shared_from_this_with(_Yp*) noexcept > { } > > void* > _M_get_deleter(const std::type_info& __ti) const noexcept > { return _M_refcount._M_get_deleter(__ti); } > > template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr; > template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr; > > template<typename _Del, typename _Tp1, _Lock_policy _Lp1> > friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; > > template<typename _Del, typename _Tp1> > friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept; > > > > > > element_type* _M_ptr; > __shared_count<_Lp> _M_refcount; > }; > > > > template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> > inline bool > operator==(const __shared_ptr<_Tp1, _Lp>& __a, > const __shared_ptr<_Tp2, _Lp>& __b) noexcept > { return __a.get() == __b.get(); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept > { return !__a; } ># 1817 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept > { return !__a; } > > template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> > inline bool > operator!=(const __shared_ptr<_Tp1, _Lp>& __a, > const __shared_ptr<_Tp2, _Lp>& __b) noexcept > { return __a.get() != __b.get(); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept > { return (bool)__a; } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept > { return (bool)__a; } > > template<typename _Tp, typename _Up, _Lock_policy _Lp> > inline bool > operator<(const __shared_ptr<_Tp, _Lp>& __a, > const __shared_ptr<_Up, _Lp>& __b) noexcept > { > using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; > using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; > using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; > return less<_Vp>()(__a.get(), __b.get()); > } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept > { > using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; > return less<_Tp_elt*>()(__a.get(), nullptr); > } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept > { > using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; > return less<_Tp_elt*>()(nullptr, __a.get()); > } > > template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> > inline bool > operator<=(const __shared_ptr<_Tp1, _Lp>& __a, > const __shared_ptr<_Tp2, _Lp>& __b) noexcept > { return !(__b < __a); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept > { return !(nullptr < __a); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept > { return !(__a < nullptr); } > > template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> > inline bool > operator>(const __shared_ptr<_Tp1, _Lp>& __a, > const __shared_ptr<_Tp2, _Lp>& __b) noexcept > { return (__b < __a); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept > { return nullptr < __a; } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept > { return __a < nullptr; } > > template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> > inline bool > operator>=(const __shared_ptr<_Tp1, _Lp>& __a, > const __shared_ptr<_Tp2, _Lp>& __b) noexcept > { return !(__a < __b); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept > { return !(__a < nullptr); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept > { return !(nullptr < __a); } > > > > template<typename _Tp, _Lock_policy _Lp> > inline void > swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept > { __a.swap(__b); } ># 1927 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 > template<typename _Tp, typename _Tp1, _Lock_policy _Lp> > inline __shared_ptr<_Tp, _Lp> > static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept > { > using _Sp = __shared_ptr<_Tp, _Lp>; > return _Sp(__r, static_cast<typename _Sp::element_type*>(__r.get())); > } > > > > > > > template<typename _Tp, typename _Tp1, _Lock_policy _Lp> > inline __shared_ptr<_Tp, _Lp> > const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept > { > using _Sp = __shared_ptr<_Tp, _Lp>; > return _Sp(__r, const_cast<typename _Sp::element_type*>(__r.get())); > } > > > > > > > template<typename _Tp, typename _Tp1, _Lock_policy _Lp> > inline __shared_ptr<_Tp, _Lp> > dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept > { > using _Sp = __shared_ptr<_Tp, _Lp>; > if (auto* __p = dynamic_cast<typename _Sp::element_type*>(__r.get())) > return _Sp(__r, __p); > return _Sp(); > } > > > template<typename _Tp, typename _Tp1, _Lock_policy _Lp> > inline __shared_ptr<_Tp, _Lp> > reinterpret_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept > { > using _Sp = __shared_ptr<_Tp, _Lp>; > return _Sp(__r, reinterpret_cast<typename _Sp::element_type*>(__r.get())); > } > > > 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; > > constexpr __weak_ptr() noexcept > : _M_ptr(nullptr), _M_refcount() > { } > > __weak_ptr(const __weak_ptr&) noexcept = default; > > ~__weak_ptr() = default; ># 2009 "/usr/include/c++/13/bits/shared_ptr_base.h" 3 > template<typename _Yp, typename = _Compatible<_Yp>> > __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept > : _M_refcount(__r._M_refcount) > { _M_ptr = __r.lock().get(); } > > template<typename _Yp, typename = _Compatible<_Yp>> > __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept > : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) > { } > > __weak_ptr(__weak_ptr&& __r) noexcept > : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount)) > { __r._M_ptr = nullptr; } > > template<typename _Yp, typename = _Compatible<_Yp>> > __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept > : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount)) > { __r._M_ptr = nullptr; } > > __weak_ptr& > operator=(const __weak_ptr& __r) noexcept = default; > > template<typename _Yp> > _Assignable<_Yp> > operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept > { > _M_ptr = __r.lock().get(); > _M_refcount = __r._M_refcount; > return *this; > } > > template<typename _Yp> > _Assignable<_Yp> > operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept > { > _M_ptr = __r._M_ptr; > _M_refcount = __r._M_refcount; > return *this; > } > > __weak_ptr& > operator=(__weak_ptr&& __r) noexcept > { > __weak_ptr(std::move(__r)).swap(*this); > return *this; > } > > template<typename _Yp> > _Assignable<_Yp> > operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept > { > _M_ptr = __r.lock().get(); > _M_refcount = std::move(__r._M_refcount); > __r._M_ptr = nullptr; > return *this; > } > > __shared_ptr<_Tp, _Lp> > lock() const noexcept > { return __shared_ptr<element_type, _Lp>(*this, std::nothrow); } > > long > use_count() const noexcept > { return _M_refcount._M_get_use_count(); } > > bool > expired() const noexcept > { return _M_refcount._M_get_use_count() == 0; } > > template<typename _Tp1> > bool > owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept > { return _M_refcount._M_less(__rhs._M_refcount); } > > template<typename _Tp1> > bool > owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept > { return _M_refcount._M_less(__rhs._M_refcount); } > > void > reset() noexcept > { __weak_ptr().swap(*this); } > > void > swap(__weak_ptr& __s) noexcept > { > std::swap(_M_ptr, __s._M_ptr); > _M_refcount._M_swap(__s._M_refcount); > } > > private: > > void > _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept > { > if (use_count() == 0) > { > _M_ptr = __ptr; > _M_refcount = __refcount; > } > } > > 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>; > > > > > element_type* _M_ptr; > __weak_count<_Lp> _M_refcount; > }; > > > template<typename _Tp, _Lock_policy _Lp> > inline void > swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept > { __a.swap(__b); } > >#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> > { > bool > operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept > { return __lhs.owner_before(__rhs); } > > bool > operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept > { return __lhs.owner_before(__rhs); } > > bool > operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept > { return __lhs.owner_before(__rhs); } > }; >#pragma GCC diagnostic pop > > template<> > struct _Sp_owner_less<void, void> > { > template<typename _Tp, typename _Up> > auto > operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept > -> decltype(__lhs.owner_before(__rhs)) > { return __lhs.owner_before(__rhs); } > > 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: > 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 > { return *this; } > > ~__enable_shared_from_this() { } > > public: > __shared_ptr<_Tp, _Lp> > shared_from_this() > { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } > > __shared_ptr<const _Tp, _Lp> > shared_from_this() const > { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); } > > > __weak_ptr<_Tp, _Lp> > weak_from_this() noexcept > { return this->_M_weak_this; } > > __weak_ptr<const _Tp, _Lp> > weak_from_this() const noexcept > { return this->_M_weak_this; } > > > private: > template<typename _Tp1> > void > _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept > { _M_weak_this._M_assign(__p, __n); } > > friend const __enable_shared_from_this* > __enable_shared_from_this_base(const __shared_count<_Lp>&, > const __enable_shared_from_this* __p) > { return __p; } > > template<typename, _Lock_policy> > friend class __shared_ptr; > > mutable __weak_ptr<_Tp, _Lp> _M_weak_this; > }; > > template<typename _Tp, _Lock_policy _Lp = __default_lock_policy, > typename _Alloc, typename... _Args> > inline __shared_ptr<_Tp, _Lp> > __allocate_shared(const _Alloc& __a, _Args&&... __args) > { > static_assert(!is_array<_Tp>::value, "make_shared<T[]> not supported"); > > return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a}, > std::forward<_Args>(__args)...); > } > > template<typename _Tp, _Lock_policy _Lp = __default_lock_policy, > typename... _Args> > inline __shared_ptr<_Tp, _Lp> > __make_shared(_Args&&... __args) > { > typedef typename std::remove_const<_Tp>::type _Tp_nc; > return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), > std::forward<_Args>(__args)...); > } > > > template<typename _Tp, _Lock_policy _Lp> > struct hash<__shared_ptr<_Tp, _Lp>> > : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>> > { > size_t > operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept > { > return hash<typename __shared_ptr<_Tp, _Lp>::element_type*>()( > __s.get()); > } > }; > > >} ># 54 "/usr/include/c++/13/bits/shared_ptr.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 68 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp> > inline std::basic_ostream<_Ch, _Tr>& > operator<<(std::basic_ostream<_Ch, _Tr>& __os, > const __shared_ptr<_Tp, _Lp>& __p) > { > __os << __p.get(); > return __os; > } > > template<typename _Del, typename _Tp, _Lock_policy _Lp> > inline _Del* > get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept > { > > return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); > > > > } > > > > > > template<typename _Del, typename _Tp> > inline _Del* > get_deleter(const shared_ptr<_Tp>& __p) noexcept > { > > return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); > > > > } ># 111 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Tp> > using _NonArray = __enable_if_t<!is_array<_Tp>::value, _Tp>; ># 174 "/usr/include/c++/13/bits/shared_ptr.h" 3 > 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() noexcept : __shared_ptr<_Tp>() { } > > shared_ptr(const shared_ptr&) noexcept = default; > > > > > > > > template<typename _Yp, typename = _Constructible<_Yp*>> > explicit > shared_ptr(_Yp* __p) : __shared_ptr<_Tp>(__p) { } ># 229 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Yp, typename _Deleter, > typename = _Constructible<_Yp*, _Deleter>> > shared_ptr(_Yp* __p, _Deleter __d) > : __shared_ptr<_Tp>(__p, std::move(__d)) { } ># 247 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Deleter> > shared_ptr(nullptr_t __p, _Deleter __d) > : __shared_ptr<_Tp>(__p, std::move(__d)) { } ># 266 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Yp, typename _Deleter, typename _Alloc, > typename = _Constructible<_Yp*, _Deleter, _Alloc>> > shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) > : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } ># 286 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Deleter, typename _Alloc> > shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) > : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } ># 310 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Yp> > shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept > : __shared_ptr<_Tp>(__r, __p) { } ># 349 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Yp, > typename = _Constructible<const shared_ptr<_Yp>&>> > shared_ptr(const shared_ptr<_Yp>& __r) noexcept > : __shared_ptr<_Tp>(__r) { } > > > > > > > shared_ptr(shared_ptr&& __r) noexcept > : __shared_ptr<_Tp>(std::move(__r)) { } > > > > > > > template<typename _Yp, typename = _Constructible<shared_ptr<_Yp>>> > shared_ptr(shared_ptr<_Yp>&& __r) noexcept > : __shared_ptr<_Tp>(std::move(__r)) { } ># 379 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Yp, typename = _Constructible<const weak_ptr<_Yp>&>> > explicit shared_ptr(const weak_ptr<_Yp>& __r) > : __shared_ptr<_Tp>(__r) { } > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > template<typename _Yp, typename = _Constructible<auto_ptr<_Yp>>> > shared_ptr(auto_ptr<_Yp>&& __r); >#pragma GCC diagnostic pop > > > > > template<typename _Yp, typename _Del, > typename = _Constructible<unique_ptr<_Yp, _Del>>> > shared_ptr(unique_ptr<_Yp, _Del>&& __r) > : __shared_ptr<_Tp>(std::move(__r)) { } ># 412 "/usr/include/c++/13/bits/shared_ptr.h" 3 > constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { } > > shared_ptr& operator=(const shared_ptr&) noexcept = default; > > template<typename _Yp> > _Assignable<const shared_ptr<_Yp>&> > operator=(const shared_ptr<_Yp>& __r) noexcept > { > this->__shared_ptr<_Tp>::operator=(__r); > return *this; > } > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > template<typename _Yp> > _Assignable<auto_ptr<_Yp>> > operator=(auto_ptr<_Yp>&& __r) > { > this->__shared_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } >#pragma GCC diagnostic pop > > > shared_ptr& > operator=(shared_ptr&& __r) noexcept > { > this->__shared_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } > > template<class _Yp> > _Assignable<shared_ptr<_Yp>> > operator=(shared_ptr<_Yp>&& __r) noexcept > { > this->__shared_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } > > template<typename _Yp, typename _Del> > _Assignable<unique_ptr<_Yp, _Del>> > operator=(unique_ptr<_Yp, _Del>&& __r) > { > this->__shared_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } > > private: > > template<typename _Alloc, typename... _Args> > shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) > : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) > { } > > template<typename _Yp, typename _Alloc, typename... _Args> > friend shared_ptr<_NonArray<_Yp>> > allocate_shared(const _Alloc&, _Args&&...); > > template<typename _Yp, typename... _Args> > friend shared_ptr<_NonArray<_Yp>> > make_shared(_Args&&...); ># 535 "/usr/include/c++/13/bits/shared_ptr.h" 3 > shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t) noexcept > : __shared_ptr<_Tp>(__r, std::nothrow) { } > > friend class weak_ptr<_Tp>; > }; > > > template<typename _Tp> > shared_ptr(weak_ptr<_Tp>) -> shared_ptr<_Tp>; > template<typename _Tp, typename _Del> > shared_ptr(unique_ptr<_Tp, _Del>) -> shared_ptr<_Tp>; > > > > > > > > template<typename _Tp, typename _Up> > [[__nodiscard__]] inline bool > operator==(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept > { return __a.get() == __b.get(); } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept > { return !__a; } ># 580 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Tp> > [[__nodiscard__]] inline bool > operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept > { return !__a; } > > > template<typename _Tp, typename _Up> > [[__nodiscard__]] inline bool > operator!=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept > { return __a.get() != __b.get(); } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept > { return (bool)__a; } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept > { return (bool)__a; } > > > template<typename _Tp, typename _Up> > [[__nodiscard__]] inline bool > operator<(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept > { > using _Tp_elt = typename shared_ptr<_Tp>::element_type; > using _Up_elt = typename shared_ptr<_Up>::element_type; > using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; > return less<_Vp>()(__a.get(), __b.get()); > } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept > { > using _Tp_elt = typename shared_ptr<_Tp>::element_type; > return less<_Tp_elt*>()(__a.get(), nullptr); > } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept > { > using _Tp_elt = typename shared_ptr<_Tp>::element_type; > return less<_Tp_elt*>()(nullptr, __a.get()); > } > > > template<typename _Tp, typename _Up> > [[__nodiscard__]] inline bool > operator<=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept > { return !(__b < __a); } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept > { return !(nullptr < __a); } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept > { return !(__a < nullptr); } > > > template<typename _Tp, typename _Up> > [[__nodiscard__]] inline bool > operator>(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept > { return (__b < __a); } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept > { return nullptr < __a; } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept > { return __a < nullptr; } > > > template<typename _Tp, typename _Up> > [[__nodiscard__]] inline bool > operator>=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept > { return !(__a < __b); } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept > { return !(__a < nullptr); } > > > template<typename _Tp> > [[__nodiscard__]] inline bool > operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept > { return !(nullptr < __a); } > > > > > > template<typename _Tp> > inline void > swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept > { __a.swap(__b); } > > > > > template<typename _Tp, typename _Up> > inline shared_ptr<_Tp> > static_pointer_cast(const shared_ptr<_Up>& __r) noexcept > { > using _Sp = shared_ptr<_Tp>; > return _Sp(__r, static_cast<typename _Sp::element_type*>(__r.get())); > } > > > template<typename _Tp, typename _Up> > inline shared_ptr<_Tp> > const_pointer_cast(const shared_ptr<_Up>& __r) noexcept > { > using _Sp = shared_ptr<_Tp>; > return _Sp(__r, const_cast<typename _Sp::element_type*>(__r.get())); > } > > > template<typename _Tp, typename _Up> > inline shared_ptr<_Tp> > dynamic_pointer_cast(const shared_ptr<_Up>& __r) noexcept > { > using _Sp = shared_ptr<_Tp>; > if (auto* __p = dynamic_cast<typename _Sp::element_type*>(__r.get())) > return _Sp(__r, __p); > return _Sp(); > } > > > > > template<typename _Tp, typename _Up> > inline shared_ptr<_Tp> > reinterpret_pointer_cast(const shared_ptr<_Up>& __r) noexcept > { > using _Sp = shared_ptr<_Tp>; > return _Sp(__r, reinterpret_cast<typename _Sp::element_type*>(__r.get())); > } ># 810 "/usr/include/c++/13/bits/shared_ptr.h" 3 > 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: > constexpr weak_ptr() noexcept = default; > > template<typename _Yp, > typename = _Constructible<const shared_ptr<_Yp>&>> > weak_ptr(const shared_ptr<_Yp>& __r) noexcept > : __weak_ptr<_Tp>(__r) { } > > weak_ptr(const weak_ptr&) noexcept = default; > > template<typename _Yp, typename = _Constructible<const weak_ptr<_Yp>&>> > weak_ptr(const weak_ptr<_Yp>& __r) noexcept > : __weak_ptr<_Tp>(__r) { } > > weak_ptr(weak_ptr&&) noexcept = default; > > template<typename _Yp, typename = _Constructible<weak_ptr<_Yp>>> > weak_ptr(weak_ptr<_Yp>&& __r) noexcept > : __weak_ptr<_Tp>(std::move(__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 > { > this->__weak_ptr<_Tp>::operator=(__r); > return *this; > } > > template<typename _Yp> > _Assignable<const shared_ptr<_Yp>&> > operator=(const shared_ptr<_Yp>& __r) noexcept > { > this->__weak_ptr<_Tp>::operator=(__r); > return *this; > } > > weak_ptr& > operator=(weak_ptr&& __r) noexcept = default; > > template<typename _Yp> > _Assignable<weak_ptr<_Yp>> > operator=(weak_ptr<_Yp>&& __r) noexcept > { > this->__weak_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } > > shared_ptr<_Tp> > lock() const noexcept > { return shared_ptr<_Tp>(*this, std::nothrow); } > }; > > > template<typename _Tp> > weak_ptr(shared_ptr<_Tp>) -> weak_ptr<_Tp>; > > > > > > template<typename _Tp> > inline void > swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept > { __a.swap(__b); } > > > > 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 > { return *this; } > > ~enable_shared_from_this() { } > > public: > shared_ptr<_Tp> > shared_from_this() > { return shared_ptr<_Tp>(this->_M_weak_this); } > > shared_ptr<const _Tp> > shared_from_this() const > { return shared_ptr<const _Tp>(this->_M_weak_this); } > > > > > > > > weak_ptr<_Tp> > weak_from_this() noexcept > { return this->_M_weak_this; } > > weak_ptr<const _Tp> > weak_from_this() const noexcept > { return this->_M_weak_this; } > > > > private: > template<typename _Tp1> > void > _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept > { _M_weak_this._M_assign(__p, __n); } > > > friend const enable_shared_from_this* > __enable_shared_from_this_base(const __shared_count<>&, > const enable_shared_from_this* __p) > { return __p; } > > template<typename, _Lock_policy> > friend class __shared_ptr; > > mutable weak_ptr<_Tp> _M_weak_this; > }; ># 988 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Tp, typename _Alloc, typename... _Args> > inline shared_ptr<_NonArray<_Tp>> > allocate_shared(const _Alloc& __a, _Args&&... __args) > { > return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, > std::forward<_Args>(__args)...); > } ># 1003 "/usr/include/c++/13/bits/shared_ptr.h" 3 > template<typename _Tp, typename... _Args> > inline shared_ptr<_NonArray<_Tp>> > make_shared(_Args&&... __args) > { > using _Alloc = allocator<void>; > _Alloc __a; > return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, > std::forward<_Args>(__args)...); > } ># 1152 "/usr/include/c++/13/bits/shared_ptr.h" 3 > 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 > { > return std::hash<typename shared_ptr<_Tp>::element_type*>()(__s.get()); > } > }; > > > > > > 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 > { }; > } > > > >} ># 50 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/std_function.h" 1 3 ># 33 "/usr/include/c++/13/bits/std_function.h" 3 > ># 34 "/usr/include/c++/13/bits/std_function.h" 3 ># 45 "/usr/include/c++/13/bits/std_function.h" 3 >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 { return &_M_pod_data[0]; } > const void* _M_access() const noexcept { return &_M_pod_data[0]; } > > template<typename _Tp> > _Tp& > _M_access() noexcept > { return *static_cast<_Tp*>(_M_access()); } > > template<typename _Tp> > const _Tp& > _M_access() const noexcept > { return *static_cast<const _Tp*>(_M_access()); } > > _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 > { > if constexpr (__stored_locally) > { > const _Functor& __f = __source._M_access<_Functor>(); > return const_cast<_Functor*>(std::__addressof(__f)); > } > else > return __source._M_access<_Functor*>(); > } > > private: > > > template<typename _Fn> > static void > _M_create(_Any_data& __dest, _Fn&& __f, true_type) > { > ::new (__dest._M_access()) _Functor(std::forward<_Fn>(__f)); > } > > > template<typename _Fn> > static void > _M_create(_Any_data& __dest, _Fn&& __f, false_type) > { > __dest._M_access<_Functor*>() > = new _Functor(std::forward<_Fn>(__f)); > } > > > static void > _M_destroy(_Any_data& __victim, true_type) > { > __victim._M_access<_Functor>().~_Functor(); > } > > > static void > _M_destroy(_Any_data& __victim, false_type) > { > delete __victim._M_access<_Functor*>(); > } > > public: > static bool > _M_manager(_Any_data& __dest, const _Any_data& __source, > _Manager_operation __op) > { > switch (__op) > { > case __get_type_info: > > __dest._M_access<const type_info*>() = &typeid(_Functor); > > > > break; > > case __get_functor_ptr: > __dest._M_access<_Functor*>() = _M_get_pointer(__source); > break; > > case __clone_functor: > _M_init_functor(__dest, > *const_cast<const _Functor*>(_M_get_pointer(__source))); > break; > > case __destroy_functor: > _M_destroy(__dest, _Local_storage()); > break; > } > return false; > } > > template<typename _Fn> > static void > _M_init_functor(_Any_data& __functor, _Fn&& __f) > noexcept(__and_<_Local_storage, > is_nothrow_constructible<_Functor, _Fn>>::value) > { > _M_create(__functor, std::forward<_Fn>(__f), _Local_storage()); > } > > template<typename _Signature> > static bool > _M_not_empty_function(const function<_Signature>& __f) noexcept > { return static_cast<bool>(__f); } > > template<typename _Tp> > static bool > _M_not_empty_function(_Tp* __fp) noexcept > { return __fp != nullptr; } > > template<typename _Class, typename _Tp> > static bool > _M_not_empty_function(_Tp _Class::* __mp) noexcept > { return __mp != nullptr; } > > template<typename _Tp> > static bool > _M_not_empty_function(const _Tp&) noexcept > { return true; } > }; > > _Function_base() = default; > > ~_Function_base() > { > if (_M_manager) > _M_manager(_M_functor, _M_functor, __destroy_functor); > } > > bool _M_empty() const { return !_M_manager; } > > 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) > { > switch (__op) > { > > case __get_type_info: > __dest._M_access<const type_info*>() = &typeid(_Functor); > break; > > case __get_functor_ptr: > __dest._M_access<_Functor*>() = _Base::_M_get_pointer(__source); > break; > > default: > _Base::_M_manager(__dest, __source, __op); > } > return false; > } > > 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) > { return false; } > }; > > > > > > 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() noexcept > : _Function_base() { } > > > > > > function(nullptr_t) noexcept > : _Function_base() { } ># 386 "/usr/include/c++/13/bits/std_function.h" 3 > function(const function& __x) > : _Function_base() > { > if (static_cast<bool>(__x)) > { > __x._M_manager(_M_functor, __x._M_functor, __clone_functor); > _M_invoker = __x._M_invoker; > _M_manager = __x._M_manager; > } > } ># 404 "/usr/include/c++/13/bits/std_function.h" 3 > function(function&& __x) noexcept > : _Function_base(), _M_invoker(__x._M_invoker) > { > if (static_cast<bool>(__x)) > { > _M_functor = __x._M_functor; > _M_manager = __x._M_manager; > __x._M_manager = nullptr; > __x._M_invoker = nullptr; > } > } ># 433 "/usr/include/c++/13/bits/std_function.h" 3 > template<typename _Functor, > typename _Constraints = _Requires<_Callable<_Functor>>> > function(_Functor&& __f) > noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>()) > : _Function_base() > { > static_assert(is_copy_constructible<__decay_t<_Functor>>::value, > "std::function target must be copy-constructible"); > static_assert(is_constructible<__decay_t<_Functor>, _Functor>::value, > "std::function target must be constructible from the " > "constructor argument"); > > using _My_handler = _Handler<_Functor>; > > if (_My_handler::_M_not_empty_function(__f)) > { > _My_handler::_M_init_functor(_M_functor, > std::forward<_Functor>(__f)); > _M_invoker = &_My_handler::_M_invoke; > _M_manager = &_My_handler::_M_manager; > } > } ># 468 "/usr/include/c++/13/bits/std_function.h" 3 > function& > operator=(const function& __x) > { > function(__x).swap(*this); > return *this; > } ># 486 "/usr/include/c++/13/bits/std_function.h" 3 > function& > operator=(function&& __x) noexcept > { > function(std::move(__x)).swap(*this); > return *this; > } ># 500 "/usr/include/c++/13/bits/std_function.h" 3 > function& > operator=(nullptr_t) noexcept > { > if (_M_manager) > { > _M_manager(_M_functor, _M_functor, __destroy_functor); > _M_manager = nullptr; > _M_invoker = nullptr; > } > return *this; > } ># 529 "/usr/include/c++/13/bits/std_function.h" 3 > template<typename _Functor> > _Requires<_Callable<_Functor>, function&> > operator=(_Functor&& __f) > noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>()) > { > function(std::forward<_Functor>(__f)).swap(*this); > return *this; > } > > > template<typename _Functor> > function& > operator=(reference_wrapper<_Functor> __f) noexcept > { > function(__f).swap(*this); > return *this; > } ># 556 "/usr/include/c++/13/bits/std_function.h" 3 > void swap(function& __x) noexcept > { > std::swap(_M_functor, __x._M_functor); > std::swap(_M_manager, __x._M_manager); > std::swap(_M_invoker, __x._M_invoker); > } ># 573 "/usr/include/c++/13/bits/std_function.h" 3 > explicit operator bool() const noexcept > { return !_M_empty(); } ># 586 "/usr/include/c++/13/bits/std_function.h" 3 > _Res > operator()(_ArgTypes... __args) const > { > if (_M_empty()) > __throw_bad_function_call(); > return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); > } ># 605 "/usr/include/c++/13/bits/std_function.h" 3 > const type_info& > target_type() const noexcept > { > if (_M_manager) > { > _Any_data __typeinfo_result; > _M_manager(__typeinfo_result, _M_functor, __get_type_info); > if (auto __ti = __typeinfo_result._M_access<const type_info*>()) > return *__ti; > } > return typeid(void); > } ># 630 "/usr/include/c++/13/bits/std_function.h" 3 > template<typename _Functor> > _Functor* > target() noexcept > { > const function* __const_this = this; > const _Functor* __func = __const_this->template target<_Functor>(); > > > return *const_cast<_Functor**>(&__func); > } > > template<typename _Functor> > const _Functor* > target() const noexcept > { > if constexpr (is_object<_Functor>::value) > { > > > using _Handler = _Target_handler<_Res(_ArgTypes...), _Functor>; > > if (_M_manager == &_Handler::_M_manager > > || (_M_manager && typeid(_Functor) == target_type()) > > ) > { > _Any_data __ptr; > _M_manager(__ptr, _M_functor, __get_functor_ptr); > return __ptr._M_access<const _Functor*>(); > } > } > return nullptr; > } > > > 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...); }; ># 715 "/usr/include/c++/13/bits/std_function.h" 3 > 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>; ># 735 "/usr/include/c++/13/bits/std_function.h" 3 > template<typename _Res, typename... _Args> > inline bool > operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept > { return !static_cast<bool>(__f); } > > > > template<typename _Res, typename... _Args> > inline bool > operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept > { return !static_cast<bool>(__f); } > > > > > > > > template<typename _Res, typename... _Args> > inline bool > operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept > { return static_cast<bool>(__f); } > > > template<typename _Res, typename... _Args> > inline bool > operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept > { return static_cast<bool>(__f); } ># 774 "/usr/include/c++/13/bits/std_function.h" 3 > template<typename _Res, typename... _Args> > inline void > swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept > { __x.swap(__y); } > > > namespace __detail::__variant > { > template<typename> struct _Never_valueless_alt; > > > > template<typename _Signature> > struct _Never_valueless_alt<std::function<_Signature>> > : std::true_type > { }; > } > > > >} ># 51 "/usr/include/c++/13/regex" 2 3 > ># 1 "/usr/include/c++/13/bits/stl_algo.h" 1 3 ># 59 "/usr/include/c++/13/bits/stl_algo.h" 3 ># 1 "/usr/include/c++/13/bits/algorithmfwd.h" 1 3 ># 33 "/usr/include/c++/13/bits/algorithmfwd.h" 3 > ># 34 "/usr/include/c++/13/bits/algorithmfwd.h" 3 ># 42 "/usr/include/c++/13/bits/algorithmfwd.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 199 "/usr/include/c++/13/bits/algorithmfwd.h" 3 > template<typename _IIter, typename _Predicate> > > bool > all_of(_IIter, _IIter, _Predicate); > > template<typename _IIter, typename _Predicate> > > bool > any_of(_IIter, _IIter, _Predicate); > > > template<typename _FIter, typename _Tp> > > bool > binary_search(_FIter, _FIter, const _Tp&); > > template<typename _FIter, typename _Tp, typename _Compare> > > bool > binary_search(_FIter, _FIter, const _Tp&, _Compare); > > > template<typename _Tp> > constexpr > const _Tp& > clamp(const _Tp&, const _Tp&, const _Tp&); > > template<typename _Tp, typename _Compare> > constexpr > const _Tp& > clamp(const _Tp&, const _Tp&, const _Tp&, _Compare); > > > template<typename _IIter, typename _OIter> > > _OIter > copy(_IIter, _IIter, _OIter); > > template<typename _BIter1, typename _BIter2> > > _BIter2 > copy_backward(_BIter1, _BIter1, _BIter2); > > > template<typename _IIter, typename _OIter, typename _Predicate> > > _OIter > copy_if(_IIter, _IIter, _OIter, _Predicate); > > template<typename _IIter, typename _Size, typename _OIter> > > _OIter > copy_n(_IIter, _Size, _OIter); > > > > > > template<typename _FIter, typename _Tp> > > pair<_FIter, _FIter> > equal_range(_FIter, _FIter, const _Tp&); > > template<typename _FIter, typename _Tp, typename _Compare> > > pair<_FIter, _FIter> > equal_range(_FIter, _FIter, const _Tp&, _Compare); > > template<typename _FIter, typename _Tp> > > void > fill(_FIter, _FIter, const _Tp&); > > template<typename _OIter, typename _Size, typename _Tp> > > _OIter > fill_n(_OIter, _Size, const _Tp&); > > > > template<typename _FIter1, typename _FIter2> > > _FIter1 > find_end(_FIter1, _FIter1, _FIter2, _FIter2); > > template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> > > _FIter1 > find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); > > > > > > template<typename _IIter, typename _Predicate> > > _IIter > find_if_not(_IIter, _IIter, _Predicate); > > > > > > > template<typename _IIter1, typename _IIter2> > > bool > includes(_IIter1, _IIter1, _IIter2, _IIter2); > > template<typename _IIter1, typename _IIter2, typename _Compare> > > bool > includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); > > template<typename _BIter> > void > inplace_merge(_BIter, _BIter, _BIter); > > template<typename _BIter, typename _Compare> > void > inplace_merge(_BIter, _BIter, _BIter, _Compare); > > > template<typename _RAIter> > > bool > is_heap(_RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > bool > is_heap(_RAIter, _RAIter, _Compare); > > template<typename _RAIter> > > _RAIter > is_heap_until(_RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > _RAIter > is_heap_until(_RAIter, _RAIter, _Compare); > > template<typename _IIter, typename _Predicate> > > bool > is_partitioned(_IIter, _IIter, _Predicate); > > template<typename _FIter1, typename _FIter2> > > bool > is_permutation(_FIter1, _FIter1, _FIter2); > > template<typename _FIter1, typename _FIter2, > typename _BinaryPredicate> > > bool > is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); > > template<typename _FIter> > > bool > is_sorted(_FIter, _FIter); > > template<typename _FIter, typename _Compare> > > bool > is_sorted(_FIter, _FIter, _Compare); > > template<typename _FIter> > > _FIter > is_sorted_until(_FIter, _FIter); > > template<typename _FIter, typename _Compare> > > _FIter > is_sorted_until(_FIter, _FIter, _Compare); > > > template<typename _FIter1, typename _FIter2> > > void > iter_swap(_FIter1, _FIter2); > > template<typename _FIter, typename _Tp> > > _FIter > lower_bound(_FIter, _FIter, const _Tp&); > > template<typename _FIter, typename _Tp, typename _Compare> > > _FIter > lower_bound(_FIter, _FIter, const _Tp&, _Compare); > > template<typename _RAIter> > > void > make_heap(_RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > void > make_heap(_RAIter, _RAIter, _Compare); > > 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 > pair<const _Tp&, const _Tp&> > minmax(const _Tp&, const _Tp&); > > template<typename _Tp, typename _Compare> > constexpr > pair<const _Tp&, const _Tp&> > minmax(const _Tp&, const _Tp&, _Compare); > > template<typename _FIter> > constexpr > pair<_FIter, _FIter> > minmax_element(_FIter, _FIter); > > template<typename _FIter, typename _Compare> > constexpr > pair<_FIter, _FIter> > minmax_element(_FIter, _FIter, _Compare); > > template<typename _Tp> > constexpr > _Tp > min(initializer_list<_Tp>); > > template<typename _Tp, typename _Compare> > constexpr > _Tp > min(initializer_list<_Tp>, _Compare); > > template<typename _Tp> > constexpr > _Tp > max(initializer_list<_Tp>); > > template<typename _Tp, typename _Compare> > constexpr > _Tp > max(initializer_list<_Tp>, _Compare); > > template<typename _Tp> > constexpr > pair<_Tp, _Tp> > minmax(initializer_list<_Tp>); > > template<typename _Tp, typename _Compare> > constexpr > pair<_Tp, _Tp> > minmax(initializer_list<_Tp>, _Compare); > > > > > template<typename _BIter> > > bool > next_permutation(_BIter, _BIter); > > template<typename _BIter, typename _Compare> > > bool > next_permutation(_BIter, _BIter, _Compare); > > > template<typename _IIter, typename _Predicate> > > bool > none_of(_IIter, _IIter, _Predicate); > > > > > > template<typename _IIter, typename _RAIter> > > _RAIter > partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); > > template<typename _IIter, typename _RAIter, typename _Compare> > > _RAIter > partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); > > > > > template<typename _IIter, typename _OIter1, > typename _OIter2, typename _Predicate> > > pair<_OIter1, _OIter2> > partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); > > template<typename _FIter, typename _Predicate> > > _FIter > partition_point(_FIter, _FIter, _Predicate); > > > template<typename _RAIter> > > void > pop_heap(_RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > void > pop_heap(_RAIter, _RAIter, _Compare); > > template<typename _BIter> > > bool > prev_permutation(_BIter, _BIter); > > template<typename _BIter, typename _Compare> > > bool > prev_permutation(_BIter, _BIter, _Compare); > > template<typename _RAIter> > > void > push_heap(_RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > void > push_heap(_RAIter, _RAIter, _Compare); > > > > template<typename _FIter, typename _Tp> > > _FIter > remove(_FIter, _FIter, const _Tp&); > > template<typename _FIter, typename _Predicate> > > _FIter > remove_if(_FIter, _FIter, _Predicate); > > template<typename _IIter, typename _OIter, typename _Tp> > > _OIter > remove_copy(_IIter, _IIter, _OIter, const _Tp&); > > template<typename _IIter, typename _OIter, typename _Predicate> > > _OIter > remove_copy_if(_IIter, _IIter, _OIter, _Predicate); > > > > template<typename _IIter, typename _OIter, typename _Tp> > > _OIter > replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); > > template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp> > > _OIter > replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); > > > > template<typename _BIter> > > void > reverse(_BIter, _BIter); > > template<typename _BIter, typename _OIter> > > _OIter > reverse_copy(_BIter, _BIter, _OIter); > >inline namespace _V2 { > > template<typename _FIter> > > _FIter > rotate(_FIter, _FIter, _FIter); > >} > > template<typename _FIter, typename _OIter> > > _OIter > rotate_copy(_FIter, _FIter, _FIter, _OIter); ># 626 "/usr/include/c++/13/bits/algorithmfwd.h" 3 > template<typename _RAIter, typename _UGenerator> > void > shuffle(_RAIter, _RAIter, _UGenerator&&); > > > template<typename _RAIter> > > void > sort_heap(_RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > void > sort_heap(_RAIter, _RAIter, _Compare); > > > template<typename _BIter, typename _Predicate> > _BIter > stable_partition(_BIter, _BIter, _Predicate); ># 661 "/usr/include/c++/13/bits/algorithmfwd.h" 3 > template<typename _FIter1, typename _FIter2> > > _FIter2 > swap_ranges(_FIter1, _FIter1, _FIter2); > > > > template<typename _FIter> > > _FIter > unique(_FIter, _FIter); > > template<typename _FIter, typename _BinaryPredicate> > > _FIter > unique(_FIter, _FIter, _BinaryPredicate); > > > > template<typename _FIter, typename _Tp> > > _FIter > upper_bound(_FIter, _FIter, const _Tp&); > > template<typename _FIter, typename _Tp, typename _Compare> > > _FIter > upper_bound(_FIter, _FIter, const _Tp&, _Compare); > > > > template<typename _FIter> > > _FIter > adjacent_find(_FIter, _FIter); > > template<typename _FIter, typename _BinaryPredicate> > > _FIter > adjacent_find(_FIter, _FIter, _BinaryPredicate); > > template<typename _IIter, typename _Tp> > > typename iterator_traits<_IIter>::difference_type > count(_IIter, _IIter, const _Tp&); > > template<typename _IIter, typename _Predicate> > > typename iterator_traits<_IIter>::difference_type > count_if(_IIter, _IIter, _Predicate); > > template<typename _IIter1, typename _IIter2> > > bool > equal(_IIter1, _IIter1, _IIter2); > > template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> > > bool > equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); > > template<typename _IIter, typename _Tp> > > _IIter > find(_IIter, _IIter, const _Tp&); > > template<typename _FIter1, typename _FIter2> > > _FIter1 > find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); > > template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> > > _FIter1 > find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); > > template<typename _IIter, typename _Predicate> > > _IIter > find_if(_IIter, _IIter, _Predicate); > > template<typename _IIter, typename _Funct> > > _Funct > for_each(_IIter, _IIter, _Funct); > > template<typename _FIter, typename _Generator> > > void > generate(_FIter, _FIter, _Generator); > > template<typename _OIter, typename _Size, typename _Generator> > > _OIter > generate_n(_OIter, _Size, _Generator); > > template<typename _IIter1, typename _IIter2> > > bool > lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); > > template<typename _IIter1, typename _IIter2, typename _Compare> > > bool > lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); > > template<typename _FIter> > constexpr > _FIter > max_element(_FIter, _FIter); > > template<typename _FIter, typename _Compare> > constexpr > _FIter > max_element(_FIter, _FIter, _Compare); > > template<typename _IIter1, typename _IIter2, typename _OIter> > > _OIter > merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); > > template<typename _IIter1, typename _IIter2, typename _OIter, > typename _Compare> > > _OIter > merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); > > template<typename _FIter> > constexpr > _FIter > min_element(_FIter, _FIter); > > template<typename _FIter, typename _Compare> > constexpr > _FIter > min_element(_FIter, _FIter, _Compare); > > template<typename _IIter1, typename _IIter2> > > pair<_IIter1, _IIter2> > mismatch(_IIter1, _IIter1, _IIter2); > > template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> > > pair<_IIter1, _IIter2> > mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); > > template<typename _RAIter> > > void > nth_element(_RAIter, _RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > void > nth_element(_RAIter, _RAIter, _RAIter, _Compare); > > template<typename _RAIter> > > void > partial_sort(_RAIter, _RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > void > partial_sort(_RAIter, _RAIter, _RAIter, _Compare); > > template<typename _BIter, typename _Predicate> > > _BIter > partition(_BIter, _BIter, _Predicate); > > > template<typename _RAIter> > void > random_shuffle(_RAIter, _RAIter); > > template<typename _RAIter, typename _Generator> > void > random_shuffle(_RAIter, _RAIter, > > _Generator&&); > > > > > > template<typename _FIter, typename _Tp> > > void > replace(_FIter, _FIter, const _Tp&, const _Tp&); > > template<typename _FIter, typename _Predicate, typename _Tp> > > void > replace_if(_FIter, _FIter, _Predicate, const _Tp&); > > template<typename _FIter1, typename _FIter2> > > _FIter1 > search(_FIter1, _FIter1, _FIter2, _FIter2); > > template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> > > _FIter1 > search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); > > template<typename _FIter, typename _Size, typename _Tp> > > _FIter > search_n(_FIter, _FIter, _Size, const _Tp&); > > template<typename _FIter, typename _Size, typename _Tp, > typename _BinaryPredicate> > > _FIter > search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); > > template<typename _IIter1, typename _IIter2, typename _OIter> > > _OIter > set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); > > template<typename _IIter1, typename _IIter2, typename _OIter, > typename _Compare> > > _OIter > set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); > > template<typename _IIter1, typename _IIter2, typename _OIter> > > _OIter > set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); > > template<typename _IIter1, typename _IIter2, typename _OIter, > typename _Compare> > > _OIter > set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); > > template<typename _IIter1, typename _IIter2, typename _OIter> > > _OIter > set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); > > template<typename _IIter1, typename _IIter2, typename _OIter, > typename _Compare> > > _OIter > set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, > _OIter, _Compare); > > template<typename _IIter1, typename _IIter2, typename _OIter> > > _OIter > set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); > > template<typename _IIter1, typename _IIter2, typename _OIter, > typename _Compare> > > _OIter > set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); > > template<typename _RAIter> > > void > sort(_RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > > void > sort(_RAIter, _RAIter, _Compare); > > template<typename _RAIter> > void > stable_sort(_RAIter, _RAIter); > > template<typename _RAIter, typename _Compare> > void > stable_sort(_RAIter, _RAIter, _Compare); > > template<typename _IIter, typename _OIter, typename _UnaryOperation> > > _OIter > transform(_IIter, _IIter, _OIter, _UnaryOperation); > > template<typename _IIter1, typename _IIter2, typename _OIter, > typename _BinaryOperation> > > _OIter > transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); > > template<typename _IIter, typename _OIter> > > _OIter > unique_copy(_IIter, _IIter, _OIter); > > template<typename _IIter, typename _OIter, typename _BinaryPredicate> > > _OIter > unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); > > > >} ># 60 "/usr/include/c++/13/bits/stl_algo.h" 2 3 > ># 1 "/usr/include/c++/13/bits/stl_heap.h" 1 3 ># 63 "/usr/include/c++/13/bits/stl_heap.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > template<typename _RandomAccessIterator, typename _Distance, > typename _Compare> > > _Distance > __is_heap_until(_RandomAccessIterator __first, _Distance __n, > _Compare& __comp) > { > _Distance __parent = 0; > for (_Distance __child = 1; __child < __n; ++__child) > { > if (__comp(__first + __parent, __first + __child)) > return __child; > if ((__child & 1) == 0) > ++__parent; > } > return __n; > } > > > > template<typename _RandomAccessIterator, typename _Distance> > > inline bool > __is_heap(_RandomAccessIterator __first, _Distance __n) > { > __gnu_cxx::__ops::_Iter_less_iter __comp; > return std::__is_heap_until(__first, __n, __comp) == __n; > } > > template<typename _RandomAccessIterator, typename _Compare, > typename _Distance> > > inline bool > __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) > { > typedef __decltype(__comp) _Cmp; > __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); > return std::__is_heap_until(__first, __n, __cmp) == __n; > } > > template<typename _RandomAccessIterator> > > inline bool > __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { return std::__is_heap(__first, std::distance(__first, __last)); } > > template<typename _RandomAccessIterator, typename _Compare> > > inline bool > __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > return std::__is_heap(__first, std::move(__comp), > std::distance(__first, __last)); > } > > > > > template<typename _RandomAccessIterator, typename _Distance, typename _Tp, > typename _Compare> > > void > __push_heap(_RandomAccessIterator __first, > _Distance __holeIndex, _Distance __topIndex, _Tp __value, > _Compare& __comp) > { > _Distance __parent = (__holeIndex - 1) / 2; > while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) > { > *(__first + __holeIndex) = std::move(*(__first + __parent)); > __holeIndex = __parent; > __parent = (__holeIndex - 1) / 2; > } > *(__first + __holeIndex) = std::move(__value); > } ># 159 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > > inline void > push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _DistanceType; > > > > > > ; > ; > ; > > __gnu_cxx::__ops::_Iter_less_val __comp; > _ValueType __value = std::move(*(__last - 1)); > std::__push_heap(__first, _DistanceType((__last - __first) - 1), > _DistanceType(0), std::move(__value), __comp); > } ># 195 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline void > push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _DistanceType; > > > > > ; > ; > ; > > __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) > __cmp(std::move(__comp)); > _ValueType __value = std::move(*(__last - 1)); > std::__push_heap(__first, _DistanceType((__last - __first) - 1), > _DistanceType(0), std::move(__value), __cmp); > } > > template<typename _RandomAccessIterator, typename _Distance, > typename _Tp, typename _Compare> > > void > __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, > _Distance __len, _Tp __value, _Compare __comp) > { > const _Distance __topIndex = __holeIndex; > _Distance __secondChild = __holeIndex; > while (__secondChild < (__len - 1) / 2) > { > __secondChild = 2 * (__secondChild + 1); > if (__comp(__first + __secondChild, > __first + (__secondChild - 1))) > __secondChild--; > *(__first + __holeIndex) = std::move(*(__first + __secondChild)); > __holeIndex = __secondChild; > } > if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) > { > __secondChild = 2 * (__secondChild + 1); > *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))) > ; > __holeIndex = __secondChild - 1; > } > __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) > __cmp(std::move(__comp)); > std::__push_heap(__first, __holeIndex, __topIndex, > std::move(__value), __cmp); > } > > template<typename _RandomAccessIterator, typename _Compare> > > inline void > __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _RandomAccessIterator __result, _Compare& __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _DistanceType; > > _ValueType __value = std::move(*__result); > *__result = std::move(*__first); > std::__adjust_heap(__first, _DistanceType(0), > _DistanceType(__last - __first), > std::move(__value), __comp); > } ># 280 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > > inline void > pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > > > ; > ; > ; > ; > > if (__last - __first > 1) > { > --__last; > __gnu_cxx::__ops::_Iter_less_iter __comp; > std::__pop_heap(__first, __last, __last, __comp); > } > } ># 314 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline void > pop_heap(_RandomAccessIterator __first, > _RandomAccessIterator __last, _Compare __comp) > { > > > > ; > ; > ; > ; > > if (__last - __first > 1) > { > typedef __decltype(__comp) _Cmp; > __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); > --__last; > std::__pop_heap(__first, __last, __last, __cmp); > } > } > > template<typename _RandomAccessIterator, typename _Compare> > > void > __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare& __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _DistanceType; > > if (__last - __first < 2) > return; > > const _DistanceType __len = __last - __first; > _DistanceType __parent = (__len - 2) / 2; > while (true) > { > _ValueType __value = std::move(*(__first + __parent)); > std::__adjust_heap(__first, __parent, __len, std::move(__value), > __comp); > if (__parent == 0) > return; > __parent--; > } > } ># 372 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > > inline void > make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > > > ; > ; > > __gnu_cxx::__ops::_Iter_less_iter __comp; > std::__make_heap(__first, __last, __comp); > } ># 399 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline void > make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > > > > ; > ; > > typedef __decltype(__comp) _Cmp; > __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); > std::__make_heap(__first, __last, __cmp); > } > > template<typename _RandomAccessIterator, typename _Compare> > > void > __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare& __comp) > { > while (__last - __first > 1) > { > --__last; > std::__pop_heap(__first, __last, __last, __comp); > } > } ># 437 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > > inline void > sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > > > ; > ; > ; > > __gnu_cxx::__ops::_Iter_less_iter __comp; > std::__sort_heap(__first, __last, __comp); > } ># 465 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline void > sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > > > > ; > ; > ; > > typedef __decltype(__comp) _Cmp; > __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); > std::__sort_heap(__first, __last, __cmp); > } ># 494 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > > inline _RandomAccessIterator > is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > > > ; > ; > > __gnu_cxx::__ops::_Iter_less_iter __comp; > return __first + > std::__is_heap_until(__first, std::distance(__first, __last), __comp); > } ># 523 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline _RandomAccessIterator > is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > > > > ; > ; > > typedef __decltype(__comp) _Cmp; > __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); > return __first > + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); > } ># 548 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > > inline bool > is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { return std::is_heap_until(__first, __last) == __last; } ># 562 "/usr/include/c++/13/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline bool > is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > > > > ; > ; > > const auto __dist = std::distance(__first, __last); > typedef __decltype(__comp) _Cmp; > __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); > return std::__is_heap_until(__first, __dist, __cmp) == __dist; > } > > > >} ># 62 "/usr/include/c++/13/bits/stl_algo.h" 2 3 > > > ># 1 "/usr/include/c++/13/bits/uniform_int_dist.h" 1 3 ># 41 "/usr/include/c++/13/bits/uniform_int_dist.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 58 "/usr/include/c++/13/bits/uniform_int_dist.h" 3 > namespace __detail > { > > > > template<typename _Tp> > constexpr bool > _Power_of_2(_Tp __x) > { > return ((__x - 1) & __x) == 0; > } > } > > > > > > > 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; > > param_type() : param_type(0) { } > > explicit > param_type(_IntType __a, > _IntType __b = __gnu_cxx::__int_traits<_IntType>::__max) > : _M_a(__a), _M_b(__b) > { > do { if (std::__is_constant_evaluated() && !bool(_M_a <= _M_b)) __builtin_unreachable(); } while (false); > } > > result_type > a() const > { return _M_a; } > > result_type > b() const > { return _M_b; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > private: > _IntType _M_a; > _IntType _M_b; > }; > > public: > > > > uniform_int_distribution() : uniform_int_distribution(0) { } > > > > > explicit > uniform_int_distribution(_IntType __a, > _IntType __b > = __gnu_cxx::__int_traits<_IntType>::__max) > : _M_param(__a, __b) > { } > > explicit > uniform_int_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > > > void > reset() { } > > result_type > a() const > { return _M_param.a(); } > > result_type > b() const > { return _M_param.b(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return this->a(); } > > > > > result_type > max() const > { return this->b(); } > > > > > template<typename _UniformRandomBitGenerator> > result_type > operator()(_UniformRandomBitGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > 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) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomBitGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomBitGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomBitGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomBitGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const uniform_int_distribution& __d1, > const uniform_int_distribution& __d2) > { return __d1._M_param == __d2._M_param; } > > 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) > { > using _Up_traits = __gnu_cxx::__int_traits<_Up>; > using _Wp_traits = __gnu_cxx::__int_traits<_Wp>; > static_assert(!_Up_traits::__is_signed, "U must be unsigned"); > static_assert(!_Wp_traits::__is_signed, "W must be unsigned"); > static_assert(_Wp_traits::__digits == (2 * _Up_traits::__digits), > "W must be twice as wide as U"); > > > > > _Wp __product = _Wp(__g()) * _Wp(__range); > _Up __low = _Up(__product); > if (__low < __range) > { > _Up __threshold = -__range % __range; > while (__low < __threshold) > { > __product = _Wp(__g()) * _Wp(__range); > __low = _Up(__product); > } > } > return __product >> _Up_traits::__digits; > } > }; > > template<typename _IntType> > template<typename _UniformRandomBitGenerator> > typename uniform_int_distribution<_IntType>::result_type > uniform_int_distribution<_IntType>:: > operator()(_UniformRandomBitGenerator& __urng, > const param_type& __param) > { > typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; > typedef typename make_unsigned<result_type>::type __utype; > typedef typename common_type<_Gresult_type, __utype>::type __uctype; > > constexpr __uctype __urngmin = _UniformRandomBitGenerator::min(); > constexpr __uctype __urngmax = _UniformRandomBitGenerator::max(); > static_assert( __urngmin < __urngmax, > "Uniform random bit generator must define min() < max()"); > constexpr __uctype __urngrange = __urngmax - __urngmin; > > const __uctype __urange > = __uctype(__param.b()) - __uctype(__param.a()); > > __uctype __ret; > if (__urngrange > __urange) > { > > > const __uctype __uerange = __urange + 1; > > > > if constexpr (__urngrange == 0xffffffffffffffffUL) > { > > > long unsigned int __u64erange = __uerange; > __ret = __extension__ _S_nd<unsigned __int128>(__urng, > __u64erange); > } > else > > if constexpr (__urngrange == 0xffffffffU) > { > > > unsigned int __u32erange = __uerange; > __ret = _S_nd<long unsigned int>(__urng, __u32erange); > } > else > > { > > const __uctype __scaling = __urngrange / __uerange; > const __uctype __past = __uerange * __scaling; > do > __ret = __uctype(__urng()) - __urngmin; > while (__ret >= __past); > __ret /= __scaling; > } > } > else if (__urngrange < __urange) > { ># 348 "/usr/include/c++/13/bits/uniform_int_dist.h" 3 > __uctype __tmp; > do > { > const __uctype __uerngrange = __urngrange + 1; > __tmp = (__uerngrange * operator() > (__urng, param_type(0, __urange / __uerngrange))); > __ret = __tmp + (__uctype(__urng()) - __urngmin); > } > while (__ret > __urange || __ret < __tmp); > } > else > __ret = __uctype(__urng()) - __urngmin; > > return __ret + __param.a(); > } > > > template<typename _IntType> > template<typename _ForwardIterator, > typename _UniformRandomBitGenerator> > void > uniform_int_distribution<_IntType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomBitGenerator& __urng, > const param_type& __param) > { > > typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; > typedef typename make_unsigned<result_type>::type __utype; > typedef typename common_type<_Gresult_type, __utype>::type __uctype; > > static_assert( __urng.min() < __urng.max(), > "Uniform random bit generator must define min() < max()"); > > constexpr __uctype __urngmin = __urng.min(); > constexpr __uctype __urngmax = __urng.max(); > constexpr __uctype __urngrange = __urngmax - __urngmin; > const __uctype __urange > = __uctype(__param.b()) - __uctype(__param.a()); > > __uctype __ret; > > if (__urngrange > __urange) > { > if (__detail::_Power_of_2(__urngrange + 1) > && __detail::_Power_of_2(__urange + 1)) > { > while (__f != __t) > { > __ret = __uctype(__urng()) - __urngmin; > *__f++ = (__ret & __urange) + __param.a(); > } > } > else > { > > const __uctype __uerange = __urange + 1; > const __uctype __scaling = __urngrange / __uerange; > const __uctype __past = __uerange * __scaling; > while (__f != __t) > { > do > __ret = __uctype(__urng()) - __urngmin; > while (__ret >= __past); > *__f++ = __ret / __scaling + __param.a(); > } > } > } > else if (__urngrange < __urange) > { ># 433 "/usr/include/c++/13/bits/uniform_int_dist.h" 3 > __uctype __tmp; > while (__f != __t) > { > do > { > constexpr __uctype __uerngrange = __urngrange + 1; > __tmp = (__uerngrange * operator() > (__urng, param_type(0, __urange / __uerngrange))); > __ret = __tmp + (__uctype(__urng()) - __urngmin); > } > while (__ret > __urange || __ret < __tmp); > *__f++ = __ret; > } > } > else > while (__f != __t) > *__f++ = __uctype(__urng()) - __urngmin + __param.a(); > } > > > > >} ># 66 "/usr/include/c++/13/bits/stl_algo.h" 2 3 > > > ># 1 "/usr/include/c++/13/bits/stl_tempbuf.h" 1 3 ># 65 "/usr/include/c++/13/bits/stl_tempbuf.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > namespace __detail > { > template<typename _Tp> > inline void > __return_temporary_buffer(_Tp* __p, > size_t __len __attribute__((__unused__))) > { > > ::operator delete(__p, __len * sizeof(_Tp)); > > > > } > } ># 101 "/usr/include/c++/13/bits/stl_tempbuf.h" 3 > template<typename _Tp> > [[__deprecated__]] > pair<_Tp*, ptrdiff_t> > get_temporary_buffer(ptrdiff_t __len) noexcept > { > const ptrdiff_t __max = > __gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp); > if (__len > __max) > __len = __max; > > while (__len > 0) > { > _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), > std::nothrow)); > if (__tmp != 0) > return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); > __len = __len == 1 ? 0 : ((__len + 1) / 2); > } > return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); > } ># 129 "/usr/include/c++/13/bits/stl_tempbuf.h" 3 > template<typename _Tp> > inline void > return_temporary_buffer(_Tp* __p) > { ::operator delete(__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 > { return _M_len; } > > > size_type > requested_size() const > { return _M_original_len; } > > > iterator > begin() > { return _M_buffer; } > > > iterator > end() > { return _M_buffer + _M_len; } > > > > > > _Temporary_buffer(_ForwardIterator __seed, size_type __original_len); > > ~_Temporary_buffer() > { > std::_Destroy(_M_buffer, _M_buffer + _M_len); > std::__detail::__return_temporary_buffer(_M_buffer, _M_len); > } > > 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) > { > if (__first == __last) > return; > > _Pointer __cur = __first; > try > { > std::_Construct(std::__addressof(*__first), > std::move(*__seed)); > _Pointer __prev = __cur; > ++__cur; > for(; __cur != __last; ++__cur, ++__prev) > std::_Construct(std::__addressof(*__cur), > std::move(*__prev)); > *__seed = std::move(*__prev); > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > }; > > template<> > struct __uninitialized_construct_buf_dispatch<true> > { > template<typename _Pointer, typename _ForwardIterator> > static void > __ucr(_Pointer, _Pointer, _ForwardIterator) { } > }; ># 247 "/usr/include/c++/13/bits/stl_tempbuf.h" 3 > template<typename _Pointer, typename _ForwardIterator> > inline void > __uninitialized_construct_buf(_Pointer __first, _Pointer __last, > _ForwardIterator __seed) > { > typedef typename std::iterator_traits<_Pointer>::value_type > _ValueType; > > std::__uninitialized_construct_buf_dispatch< > __has_trivial_constructor(_ValueType)>:: > __ucr(__first, __last, __seed); > } > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > template<typename _ForwardIterator, typename _Tp> > _Temporary_buffer<_ForwardIterator, _Tp>:: > _Temporary_buffer(_ForwardIterator __seed, size_type __original_len) > : _M_original_len(__original_len), _M_len(0), _M_buffer(0) > { > std::pair<pointer, size_type> __p( > std::get_temporary_buffer<value_type>(_M_original_len)); > > if (__p.first) > { > try > { > std::__uninitialized_construct_buf(__p.first, __p.first + __p.second, > __seed); > _M_buffer = __p.first; > _M_len = __p.second; > } > catch(...) > { > std::__detail::__return_temporary_buffer(__p.first, __p.second); > throw; > } > } > } >#pragma GCC diagnostic pop > > >} ># 70 "/usr/include/c++/13/bits/stl_algo.h" 2 3 > ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 72 "/usr/include/c++/13/bits/stl_algo.h" 2 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _Iterator, typename _Compare> > > void > __move_median_to_first(_Iterator __result,_Iterator __a, _Iterator __b, > _Iterator __c, _Compare __comp) > { > if (__comp(__a, __b)) > { > if (__comp(__b, __c)) > std::iter_swap(__result, __b); > else if (__comp(__a, __c)) > std::iter_swap(__result, __c); > else > std::iter_swap(__result, __a); > } > else if (__comp(__a, __c)) > std::iter_swap(__result, __a); > else if (__comp(__b, __c)) > std::iter_swap(__result, __c); > else > std::iter_swap(__result, __b); > } > > > template<typename _InputIterator, typename _Predicate> > > inline _InputIterator > __find_if_not(_InputIterator __first, _InputIterator __last, > _Predicate __pred) > { > return std::__find_if(__first, __last, > __gnu_cxx::__ops::__negate(__pred), > std::__iterator_category(__first)); > } > > > > > template<typename _InputIterator, typename _Predicate, typename _Distance> > > _InputIterator > __find_if_not_n(_InputIterator __first, _Distance& __len, _Predicate __pred) > { > for (; __len; --__len, (void) ++__first) > if (!__pred(__first)) > break; > return __first; > } ># 144 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > > _ForwardIterator1 > __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, > _BinaryPredicate __predicate) > { > > if (__first1 == __last1 || __first2 == __last2) > return __first1; > > > _ForwardIterator2 __p1(__first2); > if (++__p1 == __last2) > return std::__find_if(__first1, __last1, > __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); > > > _ForwardIterator1 __current = __first1; > > for (;;) > { > __first1 = > std::__find_if(__first1, __last1, > __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); > > if (__first1 == __last1) > return __last1; > > _ForwardIterator2 __p = __p1; > __current = __first1; > if (++__current == __last1) > return __last1; > > while (__predicate(__current, __p)) > { > if (++__p == __last2) > return __first1; > if (++__current == __last1) > return __last1; > } > ++__first1; > } > return __first1; > } > > > > > > > template<typename _ForwardIterator, typename _Integer, > typename _UnaryPredicate> > > _ForwardIterator > __search_n_aux(_ForwardIterator __first, _ForwardIterator __last, > _Integer __count, _UnaryPredicate __unary_pred, > std::forward_iterator_tag) > { > __first = std::__find_if(__first, __last, __unary_pred); > while (__first != __last) > { > typename iterator_traits<_ForwardIterator>::difference_type > __n = __count; > _ForwardIterator __i = __first; > ++__i; > while (__i != __last && __n != 1 && __unary_pred(__i)) > { > ++__i; > --__n; > } > if (__n == 1) > return __first; > if (__i == __last) > return __last; > __first = std::__find_if(++__i, __last, __unary_pred); > } > return __last; > } > > > > > > template<typename _RandomAccessIter, typename _Integer, > typename _UnaryPredicate> > > _RandomAccessIter > __search_n_aux(_RandomAccessIter __first, _RandomAccessIter __last, > _Integer __count, _UnaryPredicate __unary_pred, > std::random_access_iterator_tag) > { > typedef typename std::iterator_traits<_RandomAccessIter>::difference_type > _DistanceType; > > _DistanceType __tailSize = __last - __first; > _DistanceType __remainder = __count; > > while (__remainder <= __tailSize) > { > __first += __remainder; > __tailSize -= __remainder; > > > _RandomAccessIter __backTrack = __first; > while (__unary_pred(--__backTrack)) > { > if (--__remainder == 0) > return (__first - __count); > } > __remainder = __count + 1 - (__first - __backTrack); > } > return __last; > } > > template<typename _ForwardIterator, typename _Integer, > typename _UnaryPredicate> > > _ForwardIterator > __search_n(_ForwardIterator __first, _ForwardIterator __last, > _Integer __count, > _UnaryPredicate __unary_pred) > { > if (__count <= 0) > return __first; > > if (__count == 1) > return std::__find_if(__first, __last, __unary_pred); > > return std::__search_n_aux(__first, __last, __count, __unary_pred, > std::__iterator_category(__first)); > } > > > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > > _ForwardIterator1 > __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, > forward_iterator_tag, forward_iterator_tag, > _BinaryPredicate __comp) > { > if (__first2 == __last2) > return __last1; > > _ForwardIterator1 __result = __last1; > while (1) > { > _ForwardIterator1 __new_result > = std::__search(__first1, __last1, __first2, __last2, __comp); > if (__new_result == __last1) > return __result; > else > { > __result = __new_result; > __first1 = __new_result; > ++__first1; > } > } > } > > > template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, > typename _BinaryPredicate> > > _BidirectionalIterator1 > __find_end(_BidirectionalIterator1 __first1, > _BidirectionalIterator1 __last1, > _BidirectionalIterator2 __first2, > _BidirectionalIterator2 __last2, > bidirectional_iterator_tag, bidirectional_iterator_tag, > _BinaryPredicate __comp) > { > > > > > > > typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; > typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; > > _RevIterator1 __rlast1(__first1); > _RevIterator2 __rlast2(__first2); > _RevIterator1 __rresult = std::__search(_RevIterator1(__last1), __rlast1, > _RevIterator2(__last2), __rlast2, > __comp); > > if (__rresult == __rlast1) > return __last1; > else > { > _BidirectionalIterator1 __result = __rresult.base(); > std::advance(__result, -std::distance(__first2, __last2)); > return __result; > } > } ># 370 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > > inline _ForwardIterator1 > find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2) > { > > > > > > > ; > ; > > return std::__find_end(__first1, __last1, __first2, __last2, > std::__iterator_category(__first1), > std::__iterator_category(__first2), > __gnu_cxx::__ops::__iter_equal_to_iter()); > } ># 419 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > > inline _ForwardIterator1 > find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, > _BinaryPredicate __comp) > { > > > > > > > ; > ; > > return std::__find_end(__first1, __last1, __first2, __last2, > std::__iterator_category(__first1), > std::__iterator_category(__first2), > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } ># 455 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Predicate> > > inline bool > all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) > { return __last == std::find_if_not(__first, __last, __pred); } ># 473 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Predicate> > > inline bool > none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) > { return __last == std::find_if(__first, __last, __pred); } ># 492 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Predicate> > > inline bool > any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) > { return !std::none_of(__first, __last, __pred); } ># 508 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Predicate> > > inline _InputIterator > find_if_not(_InputIterator __first, _InputIterator __last, > _Predicate __pred) > { > > > > > ; > return std::__find_if_not(__first, __last, > __gnu_cxx::__ops::__pred_iter(__pred)); > } ># 533 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Predicate> > > inline bool > is_partitioned(_InputIterator __first, _InputIterator __last, > _Predicate __pred) > { > __first = std::find_if_not(__first, __last, __pred); > if (__first == __last) > return true; > ++__first; > return std::none_of(__first, __last, __pred); > } ># 555 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Predicate> > > _ForwardIterator > partition_point(_ForwardIterator __first, _ForwardIterator __last, > _Predicate __pred) > { > > > > > > > ; > > typedef typename iterator_traits<_ForwardIterator>::difference_type > _DistanceType; > > _DistanceType __len = std::distance(__first, __last); > > while (__len > 0) > { > _DistanceType __half = __len >> 1; > _ForwardIterator __middle = __first; > std::advance(__middle, __half); > if (__pred(*__middle)) > { > __first = __middle; > ++__first; > __len = __len - __half - 1; > } > else > __len = __half; > } > return __first; > } > > > template<typename _InputIterator, typename _OutputIterator, > typename _Predicate> > > _OutputIterator > __remove_copy_if(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _Predicate __pred) > { > for (; __first != __last; ++__first) > if (!__pred(__first)) > { > *__result = *__first; > ++__result; > } > return __result; > } ># 622 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, typename _Tp> > > inline _OutputIterator > remove_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, const _Tp& __value) > { > > > > > > > ; > > return std::__remove_copy_if(__first, __last, __result, > __gnu_cxx::__ops::__iter_equals_val(__value)); > } ># 655 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _Predicate> > > inline _OutputIterator > remove_copy_if(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _Predicate __pred) > { > > > > > > > ; > > return std::__remove_copy_if(__first, __last, __result, > __gnu_cxx::__ops::__pred_iter(__pred)); > } ># 690 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _Predicate> > > _OutputIterator > copy_if(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _Predicate __pred) > { > > > > > > > ; > > for (; __first != __last; ++__first) > if (__pred(*__first)) > { > *__result = *__first; > ++__result; > } > return __result; > } > > template<typename _InputIterator, typename _Size, typename _OutputIterator> > > _OutputIterator > __copy_n(_InputIterator __first, _Size __n, > _OutputIterator __result, input_iterator_tag) > { > return std::__niter_wrap(__result, > __copy_n_a(__first, __n, > std::__niter_base(__result), true)); > } > > template<typename _RandomAccessIterator, typename _Size, > typename _OutputIterator> > > inline _OutputIterator > __copy_n(_RandomAccessIterator __first, _Size __n, > _OutputIterator __result, random_access_iterator_tag) > { return std::copy(__first, __first + __n, __result); } ># 746 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Size, typename _OutputIterator> > > inline _OutputIterator > copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) > { > > > > > > const auto __n2 = std::__size_to_integer(__n); > if (__n2 <= 0) > return __result; > > ; > ; > > return std::__copy_n(__first, __n2, __result, > std::__iterator_category(__first)); > } ># 782 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator1, > typename _OutputIterator2, typename _Predicate> > > pair<_OutputIterator1, _OutputIterator2> > partition_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator1 __out_true, _OutputIterator2 __out_false, > _Predicate __pred) > { > > > > > > > > > ; > > for (; __first != __last; ++__first) > if (__pred(*__first)) > { > *__out_true = *__first; > ++__out_true; > } > else > { > *__out_false = *__first; > ++__out_false; > } > > return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); > } ># 833 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > > inline _ForwardIterator > remove(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __value) > { > > > > > > ; > > return std::__remove_if(__first, __last, > __gnu_cxx::__ops::__iter_equals_val(__value)); > } ># 867 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Predicate> > > inline _ForwardIterator > remove_if(_ForwardIterator __first, _ForwardIterator __last, > _Predicate __pred) > { > > > > > > ; > > return std::__remove_if(__first, __last, > __gnu_cxx::__ops::__pred_iter(__pred)); > } > > template<typename _ForwardIterator, typename _BinaryPredicate> > > _ForwardIterator > __adjacent_find(_ForwardIterator __first, _ForwardIterator __last, > _BinaryPredicate __binary_pred) > { > if (__first == __last) > return __last; > _ForwardIterator __next = __first; > while (++__next != __last) > { > if (__binary_pred(__first, __next)) > return __first; > __first = __next; > } > return __last; > } > > template<typename _ForwardIterator, typename _BinaryPredicate> > > _ForwardIterator > __unique(_ForwardIterator __first, _ForwardIterator __last, > _BinaryPredicate __binary_pred) > { > > __first = std::__adjacent_find(__first, __last, __binary_pred); > if (__first == __last) > return __last; > > > _ForwardIterator __dest = __first; > ++__first; > while (++__first != __last) > if (!__binary_pred(__dest, __first)) > *++__dest = std::move(*__first); > return ++__dest; > } ># 936 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > > inline _ForwardIterator > unique(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > > ; > > return std::__unique(__first, __last, > __gnu_cxx::__ops::__iter_equal_to_iter()); > } ># 967 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _BinaryPredicate> > > inline _ForwardIterator > unique(_ForwardIterator __first, _ForwardIterator __last, > _BinaryPredicate __binary_pred) > { > > > > > > > ; > > return std::__unique(__first, __last, > __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); > } > > > > > > > > template<typename _ForwardIterator, typename _OutputIterator, > typename _BinaryPredicate> > > _OutputIterator > __unique_copy(_ForwardIterator __first, _ForwardIterator __last, > _OutputIterator __result, _BinaryPredicate __binary_pred, > forward_iterator_tag, output_iterator_tag) > { > > > > > > _ForwardIterator __next = __first; > *__result = *__first; > while (++__next != __last) > if (!__binary_pred(__first, __next)) > { > __first = __next; > *++__result = *__first; > } > return ++__result; > } > > > > > > > > template<typename _InputIterator, typename _OutputIterator, > typename _BinaryPredicate> > > _OutputIterator > __unique_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _BinaryPredicate __binary_pred, > input_iterator_tag, output_iterator_tag) > { > > > > > > typename iterator_traits<_InputIterator>::value_type __value = *__first; > __decltype(__gnu_cxx::__ops::__iter_comp_val(__binary_pred)) > __rebound_pred > = __gnu_cxx::__ops::__iter_comp_val(__binary_pred); > *__result = __value; > while (++__first != __last) > if (!__rebound_pred(__first, __value)) > { > __value = *__first; > *++__result = __value; > } > return ++__result; > } > > > > > > > > template<typename _InputIterator, typename _ForwardIterator, > typename _BinaryPredicate> > > _ForwardIterator > __unique_copy(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result, _BinaryPredicate __binary_pred, > input_iterator_tag, forward_iterator_tag) > { > > > > > *__result = *__first; > while (++__first != __last) > if (!__binary_pred(__result, __first)) > *++__result = *__first; > return ++__result; > } > > > > > > > template<typename _BidirectionalIterator> > > void > __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, > bidirectional_iterator_tag) > { > while (true) > if (__first == __last || __first == --__last) > return; > else > { > std::iter_swap(__first, __last); > ++__first; > } > } > > > > > > > template<typename _RandomAccessIterator> > > void > __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, > random_access_iterator_tag) > { > if (__first == __last) > return; > --__last; > while (__first < __last) > { > std::iter_swap(__first, __last); > ++__first; > --__last; > } > } ># 1128 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator> > > inline void > reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) > { > > > > ; > std::__reverse(__first, __last, std::__iterator_category(__first)); > } ># 1156 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator, typename _OutputIterator> > > _OutputIterator > reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, > _OutputIterator __result) > { > > > > > > ; > > while (__first != __last) > { > --__last; > *__result = *__last; > ++__result; > } > return __result; > } > > > > > > template<typename _EuclideanRingElement> > > _EuclideanRingElement > __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) > { > while (__n != 0) > { > _EuclideanRingElement __t = __m % __n; > __m = __n; > __n = __t; > } > return __m; > } > >inline namespace _V2 { > > > template<typename _ForwardIterator> > > _ForwardIterator > __rotate(_ForwardIterator __first, > _ForwardIterator __middle, > _ForwardIterator __last, > forward_iterator_tag) > { > if (__first == __middle) > return __last; > else if (__last == __middle) > return __first; > > _ForwardIterator __first2 = __middle; > do > { > std::iter_swap(__first, __first2); > ++__first; > ++__first2; > if (__first == __middle) > __middle = __first2; > } > while (__first2 != __last); > > _ForwardIterator __ret = __first; > > __first2 = __middle; > > while (__first2 != __last) > { > std::iter_swap(__first, __first2); > ++__first; > ++__first2; > if (__first == __middle) > __middle = __first2; > else if (__first2 == __last) > __first2 = __middle; > } > return __ret; > } > > > template<typename _BidirectionalIterator> > > _BidirectionalIterator > __rotate(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last, > bidirectional_iterator_tag) > { > > > > > if (__first == __middle) > return __last; > else if (__last == __middle) > return __first; > > std::__reverse(__first, __middle, bidirectional_iterator_tag()); > std::__reverse(__middle, __last, bidirectional_iterator_tag()); > > while (__first != __middle && __middle != __last) > { > std::iter_swap(__first, --__last); > ++__first; > } > > if (__first == __middle) > { > std::__reverse(__middle, __last, bidirectional_iterator_tag()); > return __last; > } > else > { > std::__reverse(__first, __middle, bidirectional_iterator_tag()); > return __first; > } > } > > > template<typename _RandomAccessIterator> > > _RandomAccessIterator > __rotate(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last, > random_access_iterator_tag) > { > > > > > if (__first == __middle) > return __last; > else if (__last == __middle) > return __first; > > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _Distance; > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > _Distance __n = __last - __first; > _Distance __k = __middle - __first; > > if (__k == __n - __k) > { > std::swap_ranges(__first, __middle, __middle); > return __middle; > } > > _RandomAccessIterator __p = __first; > _RandomAccessIterator __ret = __first + (__last - __middle); > > for (;;) > { > if (__k < __n - __k) > { > if (__is_pod(_ValueType) && __k == 1) > { > _ValueType __t = std::move(*__p); > std::move(__p + 1, __p + __n, __p); > *(__p + __n - 1) = std::move(__t); > return __ret; > } > _RandomAccessIterator __q = __p + __k; > for (_Distance __i = 0; __i < __n - __k; ++ __i) > { > std::iter_swap(__p, __q); > ++__p; > ++__q; > } > __n %= __k; > if (__n == 0) > return __ret; > std::swap(__n, __k); > __k = __n - __k; > } > else > { > __k = __n - __k; > if (__is_pod(_ValueType) && __k == 1) > { > _ValueType __t = std::move(*(__p + __n - 1)); > std::move_backward(__p, __p + __n - 1, __p + __n); > *__p = std::move(__t); > return __ret; > } > _RandomAccessIterator __q = __p + __n; > __p = __q - __k; > for (_Distance __i = 0; __i < __n - __k; ++ __i) > { > --__p; > --__q; > std::iter_swap(__p, __q); > } > __n %= __k; > if (__n == 0) > return __ret; > std::swap(__n, __k); > } > } > } ># 1387 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > > inline _ForwardIterator > rotate(_ForwardIterator __first, _ForwardIterator __middle, > _ForwardIterator __last) > { > > > > ; > ; > > return std::__rotate(__first, __middle, __last, > std::__iterator_category(__first)); > } > >} ># 1425 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _OutputIterator> > > inline _OutputIterator > rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, > _ForwardIterator __last, _OutputIterator __result) > { > > > > > ; > ; > > return std::copy(__first, __middle, > std::copy(__middle, __last, __result)); > } > > > template<typename _ForwardIterator, typename _Predicate> > > _ForwardIterator > __partition(_ForwardIterator __first, _ForwardIterator __last, > _Predicate __pred, forward_iterator_tag) > { > if (__first == __last) > return __first; > > while (__pred(*__first)) > if (++__first == __last) > return __first; > > _ForwardIterator __next = __first; > > while (++__next != __last) > if (__pred(*__next)) > { > std::iter_swap(__first, __next); > ++__first; > } > > return __first; > } > > > template<typename _BidirectionalIterator, typename _Predicate> > > _BidirectionalIterator > __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, > _Predicate __pred, bidirectional_iterator_tag) > { > while (true) > { > while (true) > if (__first == __last) > return __first; > else if (__pred(*__first)) > ++__first; > else > break; > --__last; > while (true) > if (__first == __last) > return __first; > else if (!bool(__pred(*__last))) > --__last; > else > break; > std::iter_swap(__first, __last); > ++__first; > } > } ># 1506 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Pointer, typename _Predicate, > typename _Distance> > _ForwardIterator > __stable_partition_adaptive(_ForwardIterator __first, > _ForwardIterator __last, > _Predicate __pred, _Distance __len, > _Pointer __buffer, > _Distance __buffer_size) > { > if (__len == 1) > return __first; > > if (__len <= __buffer_size) > { > _ForwardIterator __result1 = __first; > _Pointer __result2 = __buffer; > > > > > *__result2 = std::move(*__first); > ++__result2; > ++__first; > for (; __first != __last; ++__first) > if (__pred(__first)) > { > *__result1 = std::move(*__first); > ++__result1; > } > else > { > *__result2 = std::move(*__first); > ++__result2; > } > > std::move(__buffer, __result2, __result1); > return __result1; > } > > _ForwardIterator __middle = __first; > std::advance(__middle, __len / 2); > _ForwardIterator __left_split = > std::__stable_partition_adaptive(__first, __middle, __pred, > __len / 2, __buffer, > __buffer_size); > > > > _Distance __right_len = __len - __len / 2; > _ForwardIterator __right_split = > std::__find_if_not_n(__middle, __right_len, __pred); > > if (__right_len) > __right_split = > std::__stable_partition_adaptive(__right_split, __last, __pred, > __right_len, > __buffer, __buffer_size); > > return std::rotate(__left_split, __middle, __right_split); > } > > template<typename _ForwardIterator, typename _Predicate> > _ForwardIterator > __stable_partition(_ForwardIterator __first, _ForwardIterator __last, > _Predicate __pred) > { > __first = std::__find_if_not(__first, __last, __pred); > > if (__first == __last) > return __first; > > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > typedef typename iterator_traits<_ForwardIterator>::difference_type > _DistanceType; > > _Temporary_buffer<_ForwardIterator, _ValueType> > __buf(__first, std::distance(__first, __last)); > return > std::__stable_partition_adaptive(__first, __last, __pred, > _DistanceType(__buf.requested_size()), > __buf.begin(), > _DistanceType(__buf.size())); > } ># 1608 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Predicate> > inline _ForwardIterator > stable_partition(_ForwardIterator __first, _ForwardIterator __last, > _Predicate __pred) > { > > > > > > ; > > return std::__stable_partition(__first, __last, > __gnu_cxx::__ops::__pred_iter(__pred)); > } > > > > > > template<typename _RandomAccessIterator, typename _Compare> > > void > __heap_select(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last, _Compare __comp) > { > std::__make_heap(__first, __middle, __comp); > for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) > if (__comp(__i, __first)) > std::__pop_heap(__first, __middle, __i, __comp); > } > > > > template<typename _InputIterator, typename _RandomAccessIterator, > typename _Compare> > > _RandomAccessIterator > __partial_sort_copy(_InputIterator __first, _InputIterator __last, > _RandomAccessIterator __result_first, > _RandomAccessIterator __result_last, > _Compare __comp) > { > typedef typename iterator_traits<_InputIterator>::value_type > _InputValueType; > typedef iterator_traits<_RandomAccessIterator> _RItTraits; > typedef typename _RItTraits::difference_type _DistanceType; > > if (__result_first == __result_last) > return __result_last; > _RandomAccessIterator __result_real_last = __result_first; > while (__first != __last && __result_real_last != __result_last) > { > *__result_real_last = *__first; > ++__result_real_last; > ++__first; > } > > std::__make_heap(__result_first, __result_real_last, __comp); > while (__first != __last) > { > if (__comp(__first, __result_first)) > std::__adjust_heap(__result_first, _DistanceType(0), > _DistanceType(__result_real_last > - __result_first), > _InputValueType(*__first), __comp); > ++__first; > } > std::__sort_heap(__result_first, __result_real_last, __comp); > return __result_real_last; > } ># 1701 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _RandomAccessIterator> > > inline _RandomAccessIterator > partial_sort_copy(_InputIterator __first, _InputIterator __last, > _RandomAccessIterator __result_first, > _RandomAccessIterator __result_last) > { ># 1716 "/usr/include/c++/13/bits/stl_algo.h" 3 > > > > > > > ; > ; > ; > > return std::__partial_sort_copy(__first, __last, > __result_first, __result_last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 1751 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _RandomAccessIterator, > typename _Compare> > > inline _RandomAccessIterator > partial_sort_copy(_InputIterator __first, _InputIterator __last, > _RandomAccessIterator __result_first, > _RandomAccessIterator __result_last, > _Compare __comp) > { ># 1768 "/usr/include/c++/13/bits/stl_algo.h" 3 > > > > > > > > > > ; > ; > ; > > return std::__partial_sort_copy(__first, __last, > __result_first, __result_last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > > > > template<typename _RandomAccessIterator, typename _Compare> > > void > __unguarded_linear_insert(_RandomAccessIterator __last, > _Compare __comp) > { > typename iterator_traits<_RandomAccessIterator>::value_type > __val = std::move(*__last); > _RandomAccessIterator __next = __last; > --__next; > while (__comp(__val, __next)) > { > *__last = std::move(*__next); > __last = __next; > --__next; > } > *__last = std::move(__val); > } > > > template<typename _RandomAccessIterator, typename _Compare> > > void > __insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last, _Compare __comp) > { > if (__first == __last) return; > > for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) > { > if (__comp(__i, __first)) > { > typename iterator_traits<_RandomAccessIterator>::value_type > __val = std::move(*__i); > std::move_backward(__first, __i, __i + 1); > *__first = std::move(__val); > } > else > std::__unguarded_linear_insert(__i, > __gnu_cxx::__ops::__val_comp_iter(__comp)); > } > } > > > template<typename _RandomAccessIterator, typename _Compare> > > inline void > __unguarded_insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last, _Compare __comp) > { > for (_RandomAccessIterator __i = __first; __i != __last; ++__i) > std::__unguarded_linear_insert(__i, > __gnu_cxx::__ops::__val_comp_iter(__comp)); > } > > > > > > enum { _S_threshold = 16 }; > > > template<typename _RandomAccessIterator, typename _Compare> > > void > __final_insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last, _Compare __comp) > { > if (__last - __first > int(_S_threshold)) > { > std::__insertion_sort(__first, __first + int(_S_threshold), __comp); > std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, > __comp); > } > else > std::__insertion_sort(__first, __last, __comp); > } > > > template<typename _RandomAccessIterator, typename _Compare> > > _RandomAccessIterator > __unguarded_partition(_RandomAccessIterator __first, > _RandomAccessIterator __last, > _RandomAccessIterator __pivot, _Compare __comp) > { > while (true) > { > while (__comp(__first, __pivot)) > ++__first; > --__last; > while (__comp(__pivot, __last)) > --__last; > if (!(__first < __last)) > return __first; > std::iter_swap(__first, __last); > ++__first; > } > } > > > template<typename _RandomAccessIterator, typename _Compare> > > inline _RandomAccessIterator > __unguarded_partition_pivot(_RandomAccessIterator __first, > _RandomAccessIterator __last, _Compare __comp) > { > _RandomAccessIterator __mid = __first + (__last - __first) / 2; > std::__move_median_to_first(__first, __first + 1, __mid, __last - 1, > __comp); > return std::__unguarded_partition(__first + 1, __last, __first, __comp); > } > > template<typename _RandomAccessIterator, typename _Compare> > > inline void > __partial_sort(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last, > _Compare __comp) > { > std::__heap_select(__first, __middle, __last, __comp); > std::__sort_heap(__first, __middle, __comp); > } > > > template<typename _RandomAccessIterator, typename _Size, typename _Compare> > > void > __introsort_loop(_RandomAccessIterator __first, > _RandomAccessIterator __last, > _Size __depth_limit, _Compare __comp) > { > while (__last - __first > int(_S_threshold)) > { > if (__depth_limit == 0) > { > std::__partial_sort(__first, __last, __last, __comp); > return; > } > --__depth_limit; > _RandomAccessIterator __cut = > std::__unguarded_partition_pivot(__first, __last, __comp); > std::__introsort_loop(__cut, __last, __depth_limit, __comp); > __last = __cut; > } > } > > > > template<typename _RandomAccessIterator, typename _Compare> > > inline void > __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > if (__first != __last) > { > std::__introsort_loop(__first, __last, > std::__lg(__last - __first) * 2, > __comp); > std::__final_insertion_sort(__first, __last, __comp); > } > } > > template<typename _RandomAccessIterator, typename _Size, typename _Compare> > > void > __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last, _Size __depth_limit, > _Compare __comp) > { > while (__last - __first > 3) > { > if (__depth_limit == 0) > { > std::__heap_select(__first, __nth + 1, __last, __comp); > > std::iter_swap(__first, __nth); > return; > } > --__depth_limit; > _RandomAccessIterator __cut = > std::__unguarded_partition_pivot(__first, __last, __comp); > if (__cut <= __nth) > __first = __cut; > else > __last = __cut; > } > std::__insertion_sort(__first, __last, __comp); > } ># 2002 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp, typename _Compare> > > inline _ForwardIterator > lower_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > > > > > > ; > > return std::__lower_bound(__first, __last, __val, > __gnu_cxx::__ops::__iter_comp_val(__comp)); > } > > template<typename _ForwardIterator, typename _Tp, typename _Compare> > > _ForwardIterator > __upper_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > typedef typename iterator_traits<_ForwardIterator>::difference_type > _DistanceType; > > _DistanceType __len = std::distance(__first, __last); > > while (__len > 0) > { > _DistanceType __half = __len >> 1; > _ForwardIterator __middle = __first; > std::advance(__middle, __half); > if (__comp(__val, __middle)) > __len = __half; > else > { > __first = __middle; > ++__first; > __len = __len - __half - 1; > } > } > return __first; > } ># 2058 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > > inline _ForwardIterator > upper_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val) > { > > > > > ; > > return std::__upper_bound(__first, __last, __val, > __gnu_cxx::__ops::__val_less_iter()); > } ># 2089 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp, typename _Compare> > > inline _ForwardIterator > upper_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > > > > > > ; > > return std::__upper_bound(__first, __last, __val, > __gnu_cxx::__ops::__val_comp_iter(__comp)); > } > > template<typename _ForwardIterator, typename _Tp, > typename _CompareItTp, typename _CompareTpIt> > > pair<_ForwardIterator, _ForwardIterator> > __equal_range(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, > _CompareItTp __comp_it_val, _CompareTpIt __comp_val_it) > { > typedef typename iterator_traits<_ForwardIterator>::difference_type > _DistanceType; > > _DistanceType __len = std::distance(__first, __last); > > while (__len > 0) > { > _DistanceType __half = __len >> 1; > _ForwardIterator __middle = __first; > std::advance(__middle, __half); > if (__comp_it_val(__middle, __val)) > { > __first = __middle; > ++__first; > __len = __len - __half - 1; > } > else if (__comp_val_it(__val, __middle)) > __len = __half; > else > { > _ForwardIterator __left > = std::__lower_bound(__first, __middle, __val, __comp_it_val); > std::advance(__first, __len); > _ForwardIterator __right > = std::__upper_bound(++__middle, __first, __val, __comp_val_it); > return pair<_ForwardIterator, _ForwardIterator>(__left, __right); > } > } > return pair<_ForwardIterator, _ForwardIterator>(__first, __first); > } ># 2162 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > > inline pair<_ForwardIterator, _ForwardIterator> > equal_range(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val) > { > > > > > > > ; > ; > > return std::__equal_range(__first, __last, __val, > __gnu_cxx::__ops::__iter_less_val(), > __gnu_cxx::__ops::__val_less_iter()); > } ># 2199 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp, typename _Compare> > > inline pair<_ForwardIterator, _ForwardIterator> > equal_range(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > > > > > > > > ; > > ; > > return std::__equal_range(__first, __last, __val, > __gnu_cxx::__ops::__iter_comp_val(__comp), > __gnu_cxx::__ops::__val_comp_iter(__comp)); > } ># 2233 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > > bool > binary_search(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val) > { > > > > > ; > ; > > _ForwardIterator __i > = std::__lower_bound(__first, __last, __val, > __gnu_cxx::__ops::__iter_less_val()); > return __i != __last && !(__val < *__i); > } ># 2267 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp, typename _Compare> > > bool > binary_search(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > > > > > > ; > > ; > > _ForwardIterator __i > = std::__lower_bound(__first, __last, __val, > __gnu_cxx::__ops::__iter_comp_val(__comp)); > return __i != __last && !bool(__comp(__val, *__i)); > } > > > > > 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) > { > while (__first1 != __last1 && __first2 != __last2) > { > if (__comp(__first2, __first1)) > { > *__result = std::move(*__first2); > ++__first2; > } > else > { > *__result = std::move(*__first1); > ++__first1; > } > ++__result; > } > if (__first1 != __last1) > std::move(__first1, __last1, __result); > } > > > 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) > { > if (__first1 == __last1) > { > std::move_backward(__first2, __last2, __result); > return; > } > else if (__first2 == __last2) > return; > > --__last1; > --__last2; > while (true) > { > if (__comp(__last2, __last1)) > { > *--__result = std::move(*__last1); > if (__first1 == __last1) > { > std::move_backward(__first2, ++__last2, __result); > return; > } > --__last1; > } > else > { > *--__result = std::move(*__last2); > if (__first2 == __last2) > return; > --__last2; > } > } > } > > > 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) > { > _BidirectionalIterator2 __buffer_end; > if (__len1 > __len2 && __len2 <= __buffer_size) > { > if (__len2) > { > __buffer_end = std::move(__middle, __last, __buffer); > std::move_backward(__first, __middle, __last); > return std::move(__buffer, __buffer_end, __first); > } > else > return __first; > } > else if (__len1 <= __buffer_size) > { > if (__len1) > { > __buffer_end = std::move(__first, __middle, __buffer); > std::move(__middle, __last, __first); > return std::move_backward(__buffer, __buffer_end, __last); > } > else > return __last; > } > else > return std::rotate(__first, __middle, __last); > } > > > 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) > { > if (__len1 <= __len2) > { > _Pointer __buffer_end = std::move(__first, __middle, __buffer); > std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, > __first, __comp); > } > else > { > _Pointer __buffer_end = std::move(__middle, __last, __buffer); > std::__move_merge_adaptive_backward(__first, __middle, __buffer, > __buffer_end, __last, __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) > { > if (__len1 <= __buffer_size || __len2 <= __buffer_size) > std::__merge_adaptive(__first, __middle, __last, > __len1, __len2, __buffer, __comp); > else > { > _BidirectionalIterator __first_cut = __first; > _BidirectionalIterator __second_cut = __middle; > _Distance __len11 = 0; > _Distance __len22 = 0; > if (__len1 > __len2) > { > __len11 = __len1 / 2; > std::advance(__first_cut, __len11); > __second_cut > = std::__lower_bound(__middle, __last, *__first_cut, > __gnu_cxx::__ops::__iter_comp_val(__comp)); > __len22 = std::distance(__middle, __second_cut); > } > else > { > __len22 = __len2 / 2; > std::advance(__second_cut, __len22); > __first_cut > = std::__upper_bound(__first, __middle, *__second_cut, > __gnu_cxx::__ops::__val_comp_iter(__comp)); > __len11 = std::distance(__first, __first_cut); > } > > _BidirectionalIterator __new_middle > = std::__rotate_adaptive(__first_cut, __middle, __second_cut, > _Distance(__len1 - __len11), __len22, > __buffer, __buffer_size); > std::__merge_adaptive_resize(__first, __first_cut, __new_middle, > __len11, __len22, > __buffer, __buffer_size, __comp); > std::__merge_adaptive_resize(__new_middle, __second_cut, __last, > _Distance(__len1 - __len11), > _Distance(__len2 - __len22), > __buffer, __buffer_size, __comp); > } > } > > > template<typename _BidirectionalIterator, typename _Distance, > typename _Compare> > void > __merge_without_buffer(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last, > _Distance __len1, _Distance __len2, > _Compare __comp) > { > if (__len1 == 0 || __len2 == 0) > return; > > if (__len1 + __len2 == 2) > { > if (__comp(__middle, __first)) > std::iter_swap(__first, __middle); > return; > } > > _BidirectionalIterator __first_cut = __first; > _BidirectionalIterator __second_cut = __middle; > _Distance __len11 = 0; > _Distance __len22 = 0; > if (__len1 > __len2) > { > __len11 = __len1 / 2; > std::advance(__first_cut, __len11); > __second_cut > = std::__lower_bound(__middle, __last, *__first_cut, > __gnu_cxx::__ops::__iter_comp_val(__comp)); > __len22 = std::distance(__middle, __second_cut); > } > else > { > __len22 = __len2 / 2; > std::advance(__second_cut, __len22); > __first_cut > = std::__upper_bound(__first, __middle, *__second_cut, > __gnu_cxx::__ops::__val_comp_iter(__comp)); > __len11 = std::distance(__first, __first_cut); > } > > _BidirectionalIterator __new_middle > = std::rotate(__first_cut, __middle, __second_cut); > std::__merge_without_buffer(__first, __first_cut, __new_middle, > __len11, __len22, __comp); > std::__merge_without_buffer(__new_middle, __second_cut, __last, > __len1 - __len11, __len2 - __len22, __comp); > } > > template<typename _BidirectionalIterator, typename _Compare> > void > __inplace_merge(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last, > _Compare __comp) > { > typedef typename iterator_traits<_BidirectionalIterator>::value_type > _ValueType; > typedef typename iterator_traits<_BidirectionalIterator>::difference_type > _DistanceType; > > if (__first == __middle || __middle == __last) > return; > > const _DistanceType __len1 = std::distance(__first, __middle); > const _DistanceType __len2 = std::distance(__middle, __last); > > > typedef _Temporary_buffer<_BidirectionalIterator, _ValueType> _TmpBuf; > > > _TmpBuf __buf(__first, std::min(__len1, __len2)); > > if (__builtin_expect(__buf.size() == __buf.requested_size(), true)) > std::__merge_adaptive > (__first, __middle, __last, __len1, __len2, __buf.begin(), __comp); > else if (__builtin_expect(__buf.begin() == 0, false)) > std::__merge_without_buffer > (__first, __middle, __last, __len1, __len2, __comp); > else > std::__merge_adaptive_resize > (__first, __middle, __last, __len1, __len2, __buf.begin(), > _DistanceType(__buf.size()), __comp); > > > > > } ># 2582 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator> > inline void > inplace_merge(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last) > { > > > > > > ; > ; > ; > > std::__inplace_merge(__first, __middle, __last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 2623 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator, typename _Compare> > inline void > inplace_merge(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last, > _Compare __comp) > { > > > > > > > ; > ; > ; > > std::__inplace_merge(__first, __middle, __last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > > > template<typename _InputIterator, typename _OutputIterator, > typename _Compare> > _OutputIterator > __move_merge(_InputIterator __first1, _InputIterator __last1, > _InputIterator __first2, _InputIterator __last2, > _OutputIterator __result, _Compare __comp) > { > while (__first1 != __last1 && __first2 != __last2) > { > if (__comp(__first2, __first1)) > { > *__result = std::move(*__first2); > ++__first2; > } > else > { > *__result = std::move(*__first1); > ++__first1; > } > ++__result; > } > return std::move(__first2, __last2, std::move(__first1, __last1, __result)) > > ; > } > > template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, > typename _Distance, typename _Compare> > void > __merge_sort_loop(_RandomAccessIterator1 __first, > _RandomAccessIterator1 __last, > _RandomAccessIterator2 __result, _Distance __step_size, > _Compare __comp) > { > const _Distance __two_step = 2 * __step_size; > > while (__last - __first >= __two_step) > { > __result = std::__move_merge(__first, __first + __step_size, > __first + __step_size, > __first + __two_step, > __result, __comp); > __first += __two_step; > } > __step_size = std::min(_Distance(__last - __first), __step_size); > > std::__move_merge(__first, __first + __step_size, > __first + __step_size, __last, __result, __comp); > } > > template<typename _RandomAccessIterator, typename _Distance, > typename _Compare> > > void > __chunk_insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last, > _Distance __chunk_size, _Compare __comp) > { > while (__last - __first >= __chunk_size) > { > std::__insertion_sort(__first, __first + __chunk_size, __comp); > __first += __chunk_size; > } > std::__insertion_sort(__first, __last, __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) > { > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _Distance; > > const _Distance __len = __last - __first; > const _Pointer __buffer_last = __buffer + __len; > > _Distance __step_size = _S_chunk_size; > std::__chunk_insertion_sort(__first, __last, __step_size, __comp); > > while (__step_size < __len) > { > std::__merge_sort_loop(__first, __last, __buffer, > __step_size, __comp); > __step_size *= 2; > std::__merge_sort_loop(__buffer, __buffer_last, __first, > __step_size, __comp); > __step_size *= 2; > } > } > > template<typename _RandomAccessIterator, typename _Pointer, typename _Compare> > void > __stable_sort_adaptive(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last, > _Pointer __buffer, _Compare __comp) > { > std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); > std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); > > std::__merge_adaptive(__first, __middle, __last, > __middle - __first, __last - __middle, > __buffer, __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) > { > const _Distance __len = (__last - __first + 1) / 2; > const _RandomAccessIterator __middle = __first + __len; > if (__len > __buffer_size) > { > std::__stable_sort_adaptive_resize(__first, __middle, __buffer, > __buffer_size, __comp); > std::__stable_sort_adaptive_resize(__middle, __last, __buffer, > __buffer_size, __comp); > std::__merge_adaptive_resize(__first, __middle, __last, > _Distance(__middle - __first), > _Distance(__last - __middle), > __buffer, __buffer_size, > __comp); > } > else > std::__stable_sort_adaptive(__first, __middle, __last, > __buffer, __comp); > } > > > template<typename _RandomAccessIterator, typename _Compare> > void > __inplace_stable_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last, _Compare __comp) > { > if (__last - __first < 15) > { > std::__insertion_sort(__first, __last, __comp); > return; > } > _RandomAccessIterator __middle = __first + (__last - __first) / 2; > std::__inplace_stable_sort(__first, __middle, __comp); > std::__inplace_stable_sort(__middle, __last, __comp); > std::__merge_without_buffer(__first, __middle, __last, > __middle - __first, > __last - __middle, > __comp); > } ># 2809 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _Compare> > > bool > __includes(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _Compare __comp) > { > while (__first1 != __last1 && __first2 != __last2) > { > if (__comp(__first2, __first1)) > return false; > if (!__comp(__first1, __first2)) > ++__first2; > ++__first1; > } > > return __first2 == __last2; > } ># 2847 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2> > > inline bool > includes(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2) > { > > > > > > > > > > ; > ; > ; > ; > > return std::__includes(__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 2892 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _Compare> > > inline bool > includes(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _Compare __comp) > { > > > > > > > > > > ; > ; > ; > ; > > return std::__includes(__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } ># 2928 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator, typename _Compare> > > bool > __next_permutation(_BidirectionalIterator __first, > _BidirectionalIterator __last, _Compare __comp) > { > if (__first == __last) > return false; > _BidirectionalIterator __i = __first; > ++__i; > if (__i == __last) > return false; > __i = __last; > --__i; > > for(;;) > { > _BidirectionalIterator __ii = __i; > --__i; > if (__comp(__i, __ii)) > { > _BidirectionalIterator __j = __last; > while (!__comp(__i, --__j)) > {} > std::iter_swap(__i, __j); > std::__reverse(__ii, __last, > std::__iterator_category(__first)); > return true; > } > if (__i == __first) > { > std::__reverse(__first, __last, > std::__iterator_category(__first)); > return false; > } > } > } ># 2978 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator> > > inline bool > next_permutation(_BidirectionalIterator __first, > _BidirectionalIterator __last) > { > > > > > > ; > ; > > return std::__next_permutation > (__first, __last, __gnu_cxx::__ops::__iter_less_iter()); > } ># 3011 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator, typename _Compare> > > inline bool > next_permutation(_BidirectionalIterator __first, > _BidirectionalIterator __last, _Compare __comp) > { > > > > > > > ; > ; > > return std::__next_permutation > (__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _BidirectionalIterator, typename _Compare> > > bool > __prev_permutation(_BidirectionalIterator __first, > _BidirectionalIterator __last, _Compare __comp) > { > if (__first == __last) > return false; > _BidirectionalIterator __i = __first; > ++__i; > if (__i == __last) > return false; > __i = __last; > --__i; > > for(;;) > { > _BidirectionalIterator __ii = __i; > --__i; > if (__comp(__ii, __i)) > { > _BidirectionalIterator __j = __last; > while (!__comp(--__j, __i)) > {} > std::iter_swap(__i, __j); > std::__reverse(__ii, __last, > std::__iterator_category(__first)); > return true; > } > if (__i == __first) > { > std::__reverse(__first, __last, > std::__iterator_category(__first)); > return false; > } > } > } ># 3081 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator> > > inline bool > prev_permutation(_BidirectionalIterator __first, > _BidirectionalIterator __last) > { > > > > > > ; > ; > > return std::__prev_permutation(__first, __last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 3114 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator, typename _Compare> > > inline bool > prev_permutation(_BidirectionalIterator __first, > _BidirectionalIterator __last, _Compare __comp) > { > > > > > > > ; > ; > > return std::__prev_permutation(__first, __last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > > > > template<typename _InputIterator, typename _OutputIterator, > typename _Predicate, typename _Tp> > > _OutputIterator > __replace_copy_if(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, > _Predicate __pred, const _Tp& __new_value) > { > for (; __first != __last; ++__first, (void)++__result) > if (__pred(__first)) > *__result = __new_value; > else > *__result = *__first; > return __result; > } ># 3166 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, typename _Tp> > > inline _OutputIterator > replace_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, > const _Tp& __old_value, const _Tp& __new_value) > { > > > > > > > ; > > return std::__replace_copy_if(__first, __last, __result, > __gnu_cxx::__ops::__iter_equals_val(__old_value), > __new_value); > } ># 3201 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _Predicate, typename _Tp> > > inline _OutputIterator > replace_copy_if(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, > _Predicate __pred, const _Tp& __new_value) > { > > > > > > > ; > > return std::__replace_copy_if(__first, __last, __result, > __gnu_cxx::__ops::__pred_iter(__pred), > __new_value); > } ># 3230 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > > inline bool > is_sorted(_ForwardIterator __first, _ForwardIterator __last) > { return std::is_sorted_until(__first, __last) == __last; } ># 3245 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Compare> > > inline bool > is_sorted(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { return std::is_sorted_until(__first, __last, __comp) == __last; } > > template<typename _ForwardIterator, typename _Compare> > > _ForwardIterator > __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { > if (__first == __last) > return __last; > > _ForwardIterator __next = __first; > for (++__next; __next != __last; __first = __next, (void)++__next) > if (__comp(__next, __first)) > return __next; > return __next; > } ># 3276 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > > inline _ForwardIterator > is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > ; > > return std::__is_sorted_until(__first, __last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 3301 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Compare> > > inline _ForwardIterator > is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { > > > > > > ; > ; > > return std::__is_sorted_until(__first, __last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } ># 3327 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _Tp> > constexpr > inline pair<const _Tp&, const _Tp&> > minmax(const _Tp& __a, const _Tp& __b) > { > > > > return __b < __a ? pair<const _Tp&, const _Tp&>(__b, __a) > : pair<const _Tp&, const _Tp&>(__a, __b); > } ># 3348 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _Tp, typename _Compare> > constexpr > inline pair<const _Tp&, const _Tp&> > minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) > { > return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a) > : pair<const _Tp&, const _Tp&>(__a, __b); > } > > template<typename _ForwardIterator, typename _Compare> > constexpr > pair<_ForwardIterator, _ForwardIterator> > __minmax_element(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { > _ForwardIterator __next = __first; > if (__first == __last > || ++__next == __last) > return std::make_pair(__first, __first); > > _ForwardIterator __min{}, __max{}; > if (__comp(__next, __first)) > { > __min = __next; > __max = __first; > } > else > { > __min = __first; > __max = __next; > } > > __first = __next; > ++__first; > > while (__first != __last) > { > __next = __first; > if (++__next == __last) > { > if (__comp(__first, __min)) > __min = __first; > else if (!__comp(__first, __max)) > __max = __first; > break; > } > > if (__comp(__next, __first)) > { > if (__comp(__next, __min)) > __min = __next; > if (!__comp(__first, __max)) > __max = __first; > } > else > { > if (__comp(__first, __min)) > __min = __first; > if (!__comp(__next, __max)) > __max = __next; > } > > __first = __next; > ++__first; > } > > return std::make_pair(__min, __max); > } ># 3428 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > constexpr > inline pair<_ForwardIterator, _ForwardIterator> > minmax_element(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > ; > > return std::__minmax_element(__first, __last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 3456 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Compare> > constexpr > inline pair<_ForwardIterator, _ForwardIterator> > minmax_element(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { > > > > > > ; > ; > > return std::__minmax_element(__first, __last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _Tp> > constexpr > inline pair<_Tp, _Tp> > minmax(initializer_list<_Tp> __l) > { > ; > pair<const _Tp*, const _Tp*> __p = > std::__minmax_element(__l.begin(), __l.end(), > __gnu_cxx::__ops::__iter_less_iter()); > return std::make_pair(*__p.first, *__p.second); > } > > template<typename _Tp, typename _Compare> > constexpr > inline pair<_Tp, _Tp> > minmax(initializer_list<_Tp> __l, _Compare __comp) > { > ; > pair<const _Tp*, const _Tp*> __p = > std::__minmax_element(__l.begin(), __l.end(), > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > return std::make_pair(*__p.first, *__p.second); > } ># 3512 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > > inline bool > is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _BinaryPredicate __pred) > { > > > > > > > ; > > return std::__is_permutation(__first1, __last1, __first2, > __gnu_cxx::__ops::__iter_comp_iter(__pred)); > } > > > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > > bool > __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, > _BinaryPredicate __pred) > { > using _Cat1 > = typename iterator_traits<_ForwardIterator1>::iterator_category; > using _Cat2 > = typename iterator_traits<_ForwardIterator2>::iterator_category; > using _It1_is_RA = is_same<_Cat1, random_access_iterator_tag>; > using _It2_is_RA = is_same<_Cat2, random_access_iterator_tag>; > constexpr bool __ra_iters = _It1_is_RA() && _It2_is_RA(); > if (__ra_iters) > { > auto __d1 = std::distance(__first1, __last1); > auto __d2 = std::distance(__first2, __last2); > if (__d1 != __d2) > return false; > } > > > > for (; __first1 != __last1 && __first2 != __last2; > ++__first1, (void)++__first2) > if (!__pred(__first1, __first2)) > break; > > if (__ra_iters) > { > if (__first1 == __last1) > return true; > } > else > { > auto __d1 = std::distance(__first1, __last1); > auto __d2 = std::distance(__first2, __last2); > if (__d1 == 0 && __d2 == 0) > return true; > if (__d1 != __d2) > return false; > } > > for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) > { > if (__scan != std::__find_if(__first1, __scan, > __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) > continue; > > auto __matches = std::__count_if(__first2, __last2, > __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); > if (0 == __matches > || std::__count_if(__scan, __last1, > __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) > != __matches) > return false; > } > return true; > } ># 3607 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > > inline bool > is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2) > { > ; > ; > > return > std::__is_permutation(__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_equal_to_iter()); > } ># 3635 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > > inline bool > is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, > _BinaryPredicate __pred) > { > ; > ; > > return std::__is_permutation(__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_comp_iter(__pred)); > } ># 3665 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _Tp> > constexpr const _Tp& > clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi) > { > do { if (std::__is_constant_evaluated() && !bool(!(__hi < __lo))) __builtin_unreachable(); } while (false); > return std::min(std::max(__val, __lo), __hi); > } ># 3685 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _Tp, typename _Compare> > constexpr const _Tp& > clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, _Compare __comp) > { > do { if (std::__is_constant_evaluated() && !bool(!__comp(__hi, __lo))) __builtin_unreachable(); } while (false); > return std::min(std::max(__val, __lo, __comp), __hi, __comp); > } ># 3717 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _IntType, typename _UniformRandomBitGenerator> > pair<_IntType, _IntType> > __gen_two_uniform_ints(_IntType __b0, _IntType __b1, > _UniformRandomBitGenerator&& __g) > { > _IntType __x > = uniform_int_distribution<_IntType>{0, (__b0 * __b1) - 1}(__g); > return std::make_pair(__x / __b1, __x % __b1); > } ># 3739 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, > typename _UniformRandomNumberGenerator> > void > shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, > _UniformRandomNumberGenerator&& __g) > { > > > > ; > > if (__first == __last) > return; > > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _DistanceType; > > typedef typename std::make_unsigned<_DistanceType>::type __ud_type; > typedef typename std::uniform_int_distribution<__ud_type> __distr_type; > typedef typename __distr_type::param_type __p_type; > > typedef typename remove_reference<_UniformRandomNumberGenerator>::type > _Gen; > typedef typename common_type<typename _Gen::result_type, __ud_type>::type > __uc_type; > > const __uc_type __urngrange = __g.max() - __g.min(); > const __uc_type __urange = __uc_type(__last - __first); > > if (__urngrange / __urange >= __urange) > > { > _RandomAccessIterator __i = __first + 1; > > > > > > if ((__urange % 2) == 0) > { > __distr_type __d{0, 1}; > std::iter_swap(__i++, __first + __d(__g)); > } > > > > > > while (__i != __last) > { > const __uc_type __swap_range = __uc_type(__i - __first) + 1; > > const pair<__uc_type, __uc_type> __pospos = > __gen_two_uniform_ints(__swap_range, __swap_range + 1, __g); > > std::iter_swap(__i++, __first + __pospos.first); > std::iter_swap(__i++, __first + __pospos.second); > } > > return; > } > > __distr_type __d; > > for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) > std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); > } > > > > > ># 3824 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Function> > > _Function > for_each(_InputIterator __first, _InputIterator __last, _Function __f) > { > > > ; > for (; __first != __last; ++__first) > __f(*__first); > return __f; > } ># 3850 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Size, typename _Function> > > _InputIterator > for_each_n(_InputIterator __first, _Size __n, _Function __f) > { > auto __n2 = std::__size_to_integer(__n); > using _Cat = typename iterator_traits<_InputIterator>::iterator_category; > if constexpr (is_base_of_v<random_access_iterator_tag, _Cat>) > { > if (__n2 <= 0) > return __first; > auto __last = __first + __n2; > std::for_each(__first, __last, std::move(__f)); > return __last; > } > else > { > while (__n2-->0) > { > __f(*__first); > ++__first; > } > return __first; > } > } ># 3886 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Tp> > > inline _InputIterator > find(_InputIterator __first, _InputIterator __last, > const _Tp& __val) > { > > > > > ; > return std::__find_if(__first, __last, > __gnu_cxx::__ops::__iter_equals_val(__val)); > } ># 3911 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Predicate> > > inline _InputIterator > find_if(_InputIterator __first, _InputIterator __last, > _Predicate __pred) > { > > > > > ; > > return std::__find_if(__first, __last, > __gnu_cxx::__ops::__pred_iter(__pred)); > } ># 3943 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _ForwardIterator> > > _InputIterator > find_first_of(_InputIterator __first1, _InputIterator __last1, > _ForwardIterator __first2, _ForwardIterator __last2) > { > > > > > > > ; > ; > > for (; __first1 != __last1; ++__first1) > for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) > if (*__first1 == *__iter) > return __first1; > return __last1; > } ># 3984 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _ForwardIterator, > typename _BinaryPredicate> > > _InputIterator > find_first_of(_InputIterator __first1, _InputIterator __last1, > _ForwardIterator __first2, _ForwardIterator __last2, > _BinaryPredicate __comp) > { > > > > > > > ; > ; > > for (; __first1 != __last1; ++__first1) > for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) > if (__comp(*__first1, *__iter)) > return __first1; > return __last1; > } ># 4017 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > > inline _ForwardIterator > adjacent_find(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > > return std::__adjacent_find(__first, __last, > __gnu_cxx::__ops::__iter_equal_to_iter()); > } ># 4043 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _BinaryPredicate> > > inline _ForwardIterator > adjacent_find(_ForwardIterator __first, _ForwardIterator __last, > _BinaryPredicate __binary_pred) > { > > > > > > ; > > return std::__adjacent_find(__first, __last, > __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); > } ># 4069 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Tp> > > inline typename iterator_traits<_InputIterator>::difference_type > count(_InputIterator __first, _InputIterator __last, const _Tp& __value) > { > > > > > ; > > return std::__count_if(__first, __last, > __gnu_cxx::__ops::__iter_equals_val(__value)); > } ># 4093 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Predicate> > > inline typename iterator_traits<_InputIterator>::difference_type > count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) > { > > > > > ; > > return std::__count_if(__first, __last, > __gnu_cxx::__ops::__pred_iter(__pred)); > } ># 4134 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > > inline _ForwardIterator1 > search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2) > { > > > > > > > ; > ; > > return std::__search(__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_equal_to_iter()); > } ># 4174 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > > inline _ForwardIterator1 > search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, > _BinaryPredicate __predicate) > { > > > > > > > ; > ; > > return std::__search(__first1, __last1, __first2, __last2, > __gnu_cxx::__ops::__iter_comp_iter(__predicate)); > } ># 4210 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Integer, typename _Tp> > > inline _ForwardIterator > search_n(_ForwardIterator __first, _ForwardIterator __last, > _Integer __count, const _Tp& __val) > { > > > > > ; > > return std::__search_n(__first, __last, __count, > __gnu_cxx::__ops::__iter_equals_val(__val)); > } ># 4244 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Integer, typename _Tp, > typename _BinaryPredicate> > > inline _ForwardIterator > search_n(_ForwardIterator __first, _ForwardIterator __last, > _Integer __count, const _Tp& __val, > _BinaryPredicate __binary_pred) > { > > > > > ; > > return std::__search_n(__first, __last, __count, > __gnu_cxx::__ops::__iter_comp_val(__binary_pred, __val)); > } ># 4270 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Searcher> > > inline _ForwardIterator > search(_ForwardIterator __first, _ForwardIterator __last, > const _Searcher& __searcher) > { return __searcher(__first, __last).first; } ># 4294 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _UnaryOperation> > > _OutputIterator > transform(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _UnaryOperation __unary_op) > { > > > > > > ; > > for (; __first != __last; ++__first, (void)++__result) > *__result = __unary_op(*__first); > return __result; > } ># 4332 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _BinaryOperation> > > _OutputIterator > transform(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _OutputIterator __result, > _BinaryOperation __binary_op) > { > > > > > > > ; > > for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) > *__result = __binary_op(*__first1, *__first2); > return __result; > } ># 4366 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > > void > replace(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __old_value, const _Tp& __new_value) > { > > > > > > > > ; > > for (; __first != __last; ++__first) > if (*__first == __old_value) > *__first = __new_value; > } ># 4399 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Predicate, typename _Tp> > > void > replace_if(_ForwardIterator __first, _ForwardIterator __last, > _Predicate __pred, const _Tp& __new_value) > { > > > > > > > > ; > > for (; __first != __last; ++__first) > if (__pred(*__first)) > *__first = __new_value; > } ># 4431 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Generator> > > void > generate(_ForwardIterator __first, _ForwardIterator __last, > _Generator __gen) > { > > > > > ; > > for (; __first != __last; ++__first) > *__first = __gen(); > } ># 4464 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _OutputIterator, typename _Size, typename _Generator> > > _OutputIterator > generate_n(_OutputIterator __first, _Size __n, _Generator __gen) > { > > > > > > typedef __decltype(std::__size_to_integer(__n)) _IntSize; > for (_IntSize __niter = std::__size_to_integer(__n); > __niter > 0; --__niter, (void) ++__first) > *__first = __gen(); > return __first; > } ># 4499 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator> > > inline _OutputIterator > unique_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator __result) > { > > > > > > > ; > > if (__first == __last) > return __result; > return std::__unique_copy(__first, __last, __result, > __gnu_cxx::__ops::__iter_equal_to_iter(), > std::__iterator_category(__first), > std::__iterator_category(__result)); > } ># 4539 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _BinaryPredicate> > > inline _OutputIterator > unique_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, > _BinaryPredicate __binary_pred) > { > > > > > ; > > if (__first == __last) > return __result; > return std::__unique_copy(__first, __last, __result, > __gnu_cxx::__ops::__iter_comp_iter(__binary_pred), > std::__iterator_category(__first), > std::__iterator_category(__result)); > } ># 4578 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > __attribute__ ((__deprecated__ ("use '" "std::shuffle" "' instead"))) > inline void > random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > ; > > if (__first != __last) > for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) > { > > _RandomAccessIterator __j = __first > + std::rand() % ((__i - __first) + 1); > if (__i != __j) > std::iter_swap(__i, __j); > } > } ># 4617 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, typename _RandomNumberGenerator> > __attribute__ ((__deprecated__ ("use '" "std::shuffle" "' instead"))) > void > random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, > > _RandomNumberGenerator&& __rand) > > > > { > > > > ; > > if (__first == __last) > return; > for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) > { > _RandomAccessIterator __j = __first + __rand((__i - __first) + 1); > if (__i != __j) > std::iter_swap(__i, __j); > } > } ># 4659 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Predicate> > > inline _ForwardIterator > partition(_ForwardIterator __first, _ForwardIterator __last, > _Predicate __pred) > { > > > > > > ; > > return std::__partition(__first, __last, __pred, > std::__iterator_category(__first)); > } ># 4694 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > > inline void > partial_sort(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last) > { > > > > > > ; > ; > ; > > std::__partial_sort(__first, __middle, __last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 4733 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline void > partial_sort(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last, > _Compare __comp) > { > > > > > > > ; > ; > ; > > std::__partial_sort(__first, __middle, __last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } ># 4770 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > > inline void > nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last) > { > > > > > > ; > ; > ; > > if (__first == __last || __nth == __last) > return; > > std::__introselect(__first, __nth, __last, > std::__lg(__last - __first) * 2, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 4810 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline void > nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last, _Compare __comp) > { > > > > > > > ; > ; > ; > > if (__first == __last || __nth == __last) > return; > > std::__introselect(__first, __nth, __last, > std::__lg(__last - __first) * 2, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } ># 4848 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > > inline void > sort(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > > > ; > ; > > std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); > } ># 4879 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > > inline void > sort(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > > > > > > > ; > ; > > std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > > _OutputIterator > __merge(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > while (__first1 != __last1 && __first2 != __last2) > { > if (__comp(__first2, __first1)) > { > *__result = *__first2; > ++__first2; > } > else > { > *__result = *__first1; > ++__first1; > } > ++__result; > } > return std::copy(__first2, __last2, > std::copy(__first1, __last1, __result)); > } ># 4942 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > > inline _OutputIterator > merge(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > > > > > > > > > > > ; > ; > ; > ; > > return std::__merge(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 4993 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > > inline _OutputIterator > merge(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > > > > > > > > > > > ; > ; > ; > ; > > return std::__merge(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _RandomAccessIterator, typename _Compare> > inline void > __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _DistanceType; > > if (__first == __last) > return; > > > typedef _Temporary_buffer<_RandomAccessIterator, _ValueType> _TmpBuf; > > > _TmpBuf __buf(__first, (__last - __first + 1) / 2); > > if (__builtin_expect(__buf.requested_size() == __buf.size(), true)) > std::__stable_sort_adaptive(__first, > __first + _DistanceType(__buf.size()), > __last, __buf.begin(), __comp); > else if (__builtin_expect(__buf.begin() == 0, false)) > std::__inplace_stable_sort(__first, __last, __comp); > else > std::__stable_sort_adaptive_resize(__first, __last, __buf.begin(), > _DistanceType(__buf.size()), __comp); > > > > } ># 5071 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > inline void > stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > > > ; > ; > > std::__stable_sort(__first, __last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 5105 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > inline void > stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > > > > > > > ; > ; > > std::__stable_sort(__first, __last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, > typename _Compare> > > _OutputIterator > __set_union(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > while (__first1 != __last1 && __first2 != __last2) > { > if (__comp(__first1, __first2)) > { > *__result = *__first1; > ++__first1; > } > else if (__comp(__first2, __first1)) > { > *__result = *__first2; > ++__first2; > } > else > { > *__result = *__first1; > ++__first1; > ++__first2; > } > ++__result; > } > return std::copy(__first2, __last2, > std::copy(__first1, __last1, __result)); > } ># 5175 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > > inline _OutputIterator > set_union(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > > > > > > > > > > > > > > ; > ; > ; > ; > > return std::__set_union(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 5226 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > > inline _OutputIterator > set_union(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > > > > > > > > > > > > > > ; > ; > ; > ; > > return std::__set_union(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, > typename _Compare> > > _OutputIterator > __set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > while (__first1 != __last1 && __first2 != __last2) > if (__comp(__first1, __first2)) > ++__first1; > else if (__comp(__first2, __first1)) > ++__first2; > else > { > *__result = *__first1; > ++__first1; > ++__first2; > ++__result; > } > return __result; > } ># 5299 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > > inline _OutputIterator > set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > > > > > > > > > > > > ; > ; > ; > ; > > return std::__set_intersection(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 5349 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > > inline _OutputIterator > set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > > > > > > > > > > > > ; > ; > ; > ; > > return std::__set_intersection(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, > typename _Compare> > > _OutputIterator > __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > while (__first1 != __last1 && __first2 != __last2) > if (__comp(__first1, __first2)) > { > *__result = *__first1; > ++__first1; > ++__result; > } > else if (__comp(__first2, __first1)) > ++__first2; > else > { > ++__first1; > ++__first2; > } > return std::copy(__first1, __last1, __result); > } ># 5424 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > > inline _OutputIterator > set_difference(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > > > > > > > > > > > > ; > ; > ; > ; > > return std::__set_difference(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 5476 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > > inline _OutputIterator > set_difference(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > > > > > > > > > > > > ; > ; > ; > ; > > return std::__set_difference(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, > typename _Compare> > > _OutputIterator > __set_symmetric_difference(_InputIterator1 __first1, > _InputIterator1 __last1, > _InputIterator2 __first2, > _InputIterator2 __last2, > _OutputIterator __result, > _Compare __comp) > { > while (__first1 != __last1 && __first2 != __last2) > if (__comp(__first1, __first2)) > { > *__result = *__first1; > ++__first1; > ++__result; > } > else if (__comp(__first2, __first1)) > { > *__result = *__first2; > ++__first2; > ++__result; > } > else > { > ++__first1; > ++__first2; > } > return std::copy(__first2, __last2, > std::copy(__first1, __last1, __result)); > } ># 5557 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > > inline _OutputIterator > set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > > > > > > > > > > > > > > ; > ; > ; > ; > > return std::__set_symmetric_difference(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 5609 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > > inline _OutputIterator > set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, > _Compare __comp) > { > > > > > > > > > > > > > > ; > ; > ; > ; > > return std::__set_symmetric_difference(__first1, __last1, > __first2, __last2, __result, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _ForwardIterator, typename _Compare> > constexpr > _ForwardIterator > __min_element(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { > if (__first == __last) > return __first; > _ForwardIterator __result = __first; > while (++__first != __last) > if (__comp(__first, __result)) > __result = __first; > return __result; > } ># 5663 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > constexpr > _ForwardIterator > inline min_element(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > ; > > return std::__min_element(__first, __last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 5688 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Compare> > constexpr > inline _ForwardIterator > min_element(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { > > > > > > ; > ; > > return std::__min_element(__first, __last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _ForwardIterator, typename _Compare> > constexpr > _ForwardIterator > __max_element(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { > if (__first == __last) return __first; > _ForwardIterator __result = __first; > while (++__first != __last) > if (__comp(__result, __first)) > __result = __first; > return __result; > } ># 5727 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > constexpr > inline _ForwardIterator > max_element(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > ; > > return std::__max_element(__first, __last, > __gnu_cxx::__ops::__iter_less_iter()); > } ># 5752 "/usr/include/c++/13/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Compare> > constexpr > inline _ForwardIterator > max_element(_ForwardIterator __first, _ForwardIterator __last, > _Compare __comp) > { > > > > > > ; > ; > > return std::__max_element(__first, __last, > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > > > template<typename _Tp> > constexpr > inline _Tp > min(initializer_list<_Tp> __l) > { > ; > return *std::__min_element(__l.begin(), __l.end(), > __gnu_cxx::__ops::__iter_less_iter()); > } > > template<typename _Tp, typename _Compare> > constexpr > inline _Tp > min(initializer_list<_Tp> __l, _Compare __comp) > { > ; > return *std::__min_element(__l.begin(), __l.end(), > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > template<typename _Tp> > constexpr > inline _Tp > max(initializer_list<_Tp> __l) > { > ; > return *std::__max_element(__l.begin(), __l.end(), > __gnu_cxx::__ops::__iter_less_iter()); > } > > template<typename _Tp, typename _Compare> > constexpr > inline _Tp > max(initializer_list<_Tp> __l, _Compare __comp) > { > ; > return *std::__max_element(__l.begin(), __l.end(), > __gnu_cxx::__ops::__iter_comp_iter(__comp)); > } > > > > > 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) > { > using __distrib_type = uniform_int_distribution<_Size>; > using __param_type = typename __distrib_type::param_type; > __distrib_type __d{}; > _Size __sample_sz = 0; > while (__first != __last && __sample_sz != __n) > { > __out[__sample_sz++] = *__first; > ++__first; > } > for (auto __pop_sz = __sample_sz; __first != __last; > ++__first, (void) ++__pop_sz) > { > const auto __k = __d(__g, __param_type{0, __pop_sz}); > if (__k < __n) > __out[__k] = *__first; > } > return __out + __sample_sz; > } > > > 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) > { > using __distrib_type = uniform_int_distribution<_Size>; > using __param_type = typename __distrib_type::param_type; > using _USize = make_unsigned_t<_Size>; > using _Gen = remove_reference_t<_UniformRandomBitGenerator>; > using __uc_type = common_type_t<typename _Gen::result_type, _USize>; > > if (__first == __last) > return __out; > > __distrib_type __d{}; > _Size __unsampled_sz = std::distance(__first, __last); > __n = std::min(__n, __unsampled_sz); > > > > > const __uc_type __urngrange = __g.max() - __g.min(); > if (__urngrange / __uc_type(__unsampled_sz) >= __uc_type(__unsampled_sz)) > > > { > while (__n != 0 && __unsampled_sz >= 2) > { > const pair<_Size, _Size> __p = > __gen_two_uniform_ints(__unsampled_sz, __unsampled_sz - 1, __g); > > --__unsampled_sz; > if (__p.first < __n) > { > *__out++ = *__first; > --__n; > } > > ++__first; > > if (__n == 0) break; > > --__unsampled_sz; > if (__p.second < __n) > { > *__out++ = *__first; > --__n; > } > > ++__first; > } > } > > > > for (; __n != 0; ++__first) > if (__d(__g, __param_type{0, --__unsampled_sz}) < __n) > { > *__out++ = *__first; > --__n; > } > return __out; > } > > > > > template<typename _PopulationIterator, typename _SampleIterator, > typename _Distance, typename _UniformRandomBitGenerator> > _SampleIterator > sample(_PopulationIterator __first, _PopulationIterator __last, > _SampleIterator __out, _Distance __n, > _UniformRandomBitGenerator&& __g) > { > using __pop_cat = typename > std::iterator_traits<_PopulationIterator>::iterator_category; > using __samp_cat = typename > std::iterator_traits<_SampleIterator>::iterator_category; > > static_assert( > __or_<is_convertible<__pop_cat, forward_iterator_tag>, > is_convertible<__samp_cat, random_access_iterator_tag>>::value, > "output range must use a RandomAccessIterator when input range" > " does not meet the ForwardIterator requirements"); > > static_assert(is_integral<_Distance>::value, > "sample size must be an integer type"); > > typename iterator_traits<_PopulationIterator>::difference_type __d = __n; > return std:: > __sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, __d, > std::forward<_UniformRandomBitGenerator>(__g)); > } > > > > > >} ># 53 "/usr/include/c++/13/regex" 2 3 > > ># 1 "/usr/include/c++/13/bits/stl_tree.h" 1 3 ># 61 "/usr/include/c++/13/bits/stl_tree.h" 3 > ># 62 "/usr/include/c++/13/bits/stl_tree.h" 3 ># 72 "/usr/include/c++/13/bits/stl_tree.h" 3 ># 1 "/usr/include/c++/13/bits/node_handle.h" 1 3 ># 34 "/usr/include/c++/13/bits/node_handle.h" 3 > ># 35 "/usr/include/c++/13/bits/node_handle.h" 3 ># 43 "/usr/include/c++/13/bits/node_handle.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 63 "/usr/include/c++/13/bits/node_handle.h" 3 > 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 > { > do { if (std::__is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); > return allocator_type(_M_alloc._M_alloc); > } > > explicit operator bool() const noexcept { return _M_ptr != nullptr; } > > [[nodiscard]] bool empty() const noexcept { return _M_ptr == nullptr; } > > > protected: > constexpr _Node_handle_common() noexcept : _M_ptr() { } > > ~_Node_handle_common() > { > if (!empty()) > _M_reset(); > } > > _Node_handle_common(_Node_handle_common&& __nh) noexcept > : _M_ptr(__nh._M_ptr) > { > if (_M_ptr) > _M_move(std::move(__nh)); > } > > _Node_handle_common& > operator=(_Node_handle_common&& __nh) noexcept > { > if (empty()) > { > if (!__nh.empty()) > _M_move(std::move(__nh)); > } > else if (__nh.empty()) > _M_reset(); > else > { > > _AllocTraits::destroy(*_M_alloc, _M_ptr->_M_valptr()); > _AllocTraits::deallocate(*_M_alloc, _M_ptr, 1); > > _M_alloc = __nh._M_alloc.release(); > _M_ptr = __nh._M_ptr; > __nh._M_ptr = nullptr; > } > return *this; > } > > _Node_handle_common(typename _AllocTraits::pointer __ptr, > const _NodeAlloc& __alloc) > : _M_ptr(__ptr), _M_alloc(__alloc) > { > do { if (std::__is_constant_evaluated() && !bool(__ptr != nullptr)) __builtin_unreachable(); } while (false); > } > > void > _M_swap(_Node_handle_common& __nh) noexcept > { > if (empty()) > { > if (!__nh.empty()) > _M_move(std::move(__nh)); > } > else if (__nh.empty()) > __nh._M_move(std::move(*this)); > else > { > using std::swap; > swap(_M_ptr, __nh._M_ptr); > _M_alloc.swap(__nh._M_alloc); > } > } > > private: > > > > void > _M_move(_Node_handle_common&& __nh) noexcept > { > ::new (std::__addressof(_M_alloc)) _NodeAlloc(__nh._M_alloc.release()); > _M_ptr = __nh._M_ptr; > __nh._M_ptr = nullptr; > } > > > > > void > _M_reset() noexcept > { > _NodeAlloc __alloc = _M_alloc.release(); > _AllocTraits::destroy(__alloc, _M_ptr->_M_valptr()); > _AllocTraits::deallocate(__alloc, _M_ptr, 1); > _M_ptr = nullptr; > } > > 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) noexcept > : _M_alloc(__alloc) > { } > > > void > operator=(_NodeAlloc&& __alloc) noexcept > { > using _ATr = _AllocTraits; > if constexpr (_ATr::propagate_on_container_move_assignment::value) > _M_alloc = std::move(__alloc); > else if constexpr (!_AllocTraits::is_always_equal::value) > do { if (std::__is_constant_evaluated() && !bool(_M_alloc == __alloc)) __builtin_unreachable(); } while (false); > } > > > void > swap(_Optional_alloc& __other) noexcept > { > using std::swap; > if constexpr (_AllocTraits::propagate_on_container_swap::value) > swap(_M_alloc, __other._M_alloc); > else if constexpr (!_AllocTraits::is_always_equal::value) > do { if (std::__is_constant_evaluated() && !bool(_M_alloc == __other._M_alloc)) __builtin_unreachable(); } while (false); > } > > > _NodeAlloc& operator*() noexcept { return _M_alloc; } > > > _NodeAlloc release() noexcept > { > _NodeAlloc __tmp = std::move(_M_alloc); > _M_alloc.~_NodeAlloc(); > return __tmp; > } > > 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 > { > do { if (std::__is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); > return *_M_pkey; > } > > mapped_type& > mapped() const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); > return *_M_pmapped; > } > > void > swap(_Node_handle& __nh) noexcept > { > this->_M_swap(__nh); > using std::swap; > swap(_M_pkey, __nh._M_pkey); > swap(_M_pmapped, __nh._M_pmapped); > } > > friend void > swap(_Node_handle& __x, _Node_handle& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > private: > using _AllocTraits = allocator_traits<_NodeAlloc>; > > _Node_handle(typename _AllocTraits::pointer __ptr, > const _NodeAlloc& __alloc) > : _Node_handle_common<_Value, _NodeAlloc>(__ptr, __alloc) > { > if (__ptr) > { > auto& __key = const_cast<_Key&>(__ptr->_M_valptr()->first); > _M_pkey = _S_pointer_to(__key); > _M_pmapped = _S_pointer_to(__ptr->_M_valptr()->second); > } > else > { > _M_pkey = nullptr; > _M_pmapped = nullptr; > } > } > > 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) > { return pointer_traits<__pointer<_Tp>>::pointer_to(__obj); } > > const key_type& > _M_key() const noexcept { return key(); } > > 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 > { > do { if (std::__is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); > return *this->_M_ptr->_M_valptr(); > } > > void > swap(_Node_handle& __nh) noexcept > { this->_M_swap(__nh); } > > friend void > swap(_Node_handle& __x, _Node_handle& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > private: > using _AllocTraits = allocator_traits<_NodeAlloc>; > > _Node_handle(typename _AllocTraits::pointer __ptr, > const _NodeAlloc& __alloc) > : _Node_handle_common<_Value, _NodeAlloc>(__ptr, __alloc) { } > > const value_type& > _M_key() const noexcept { return value(); } > > 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; > }; > > > > >} ># 73 "/usr/include/c++/13/bits/stl_tree.h" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 99 "/usr/include/c++/13/bits/stl_tree.h" 3 > 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; > > static _Base_ptr > _S_minimum(_Base_ptr __x) noexcept > { > while (__x->_M_left != 0) __x = __x->_M_left; > return __x; > } > > static _Const_Base_ptr > _S_minimum(_Const_Base_ptr __x) noexcept > { > while (__x->_M_left != 0) __x = __x->_M_left; > return __x; > } > > static _Base_ptr > _S_maximum(_Base_ptr __x) noexcept > { > while (__x->_M_right != 0) __x = __x->_M_right; > return __x; > } > > static _Const_Base_ptr > _S_maximum(_Const_Base_ptr __x) noexcept > { > while (__x->_M_right != 0) __x = __x->_M_right; > return __x; > } > }; > > > 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) > > : _M_key_compare() > { } > > _Rb_tree_key_compare(const _Key_compare& __comp) > : _M_key_compare(__comp) > { } > > > > _Rb_tree_key_compare(const _Rb_tree_key_compare&) = default; > > _Rb_tree_key_compare(_Rb_tree_key_compare&& __x) > noexcept(is_nothrow_copy_constructible<_Key_compare>::value) > : _M_key_compare(__x._M_key_compare) > { } > > }; > > > struct _Rb_tree_header > { > _Rb_tree_node_base _M_header; > size_t _M_node_count; > > _Rb_tree_header() noexcept > { > _M_header._M_color = _S_red; > _M_reset(); > } > > > _Rb_tree_header(_Rb_tree_header&& __x) noexcept > { > if (__x._M_header._M_parent != nullptr) > _M_move_data(__x); > else > { > _M_header._M_color = _S_red; > _M_reset(); > } > } > > > void > _M_move_data(_Rb_tree_header& __from) > { > _M_header._M_color = __from._M_header._M_color; > _M_header._M_parent = __from._M_header._M_parent; > _M_header._M_left = __from._M_header._M_left; > _M_header._M_right = __from._M_header._M_right; > _M_header._M_parent->_M_parent = &_M_header; > _M_node_count = __from._M_node_count; > > __from._M_reset(); > } > > void > _M_reset() > { > _M_header._M_parent = 0; > _M_header._M_left = &_M_header; > _M_header._M_right = &_M_header; > _M_node_count = 0; > } > }; > > template<typename _Val> > struct _Rb_tree_node : public _Rb_tree_node_base > { > typedef _Rb_tree_node<_Val>* _Link_type; ># 231 "/usr/include/c++/13/bits/stl_tree.h" 3 > __gnu_cxx::__aligned_membuf<_Val> _M_storage; > > _Val* > _M_valptr() > { return _M_storage._M_ptr(); } > > const _Val* > _M_valptr() const > { return _M_storage._M_ptr(); } > > }; > > __attribute__ ((__pure__)) _Rb_tree_node_base* > _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); > > __attribute__ ((__pure__)) const _Rb_tree_node_base* > _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); > > __attribute__ ((__pure__)) _Rb_tree_node_base* > _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); > > __attribute__ ((__pure__)) const _Rb_tree_node_base* > _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); > > 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; > > _Rb_tree_iterator() noexcept > : _M_node() { } > > explicit > _Rb_tree_iterator(_Base_ptr __x) noexcept > : _M_node(__x) { } > > reference > operator*() const noexcept > { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } > > pointer > operator->() const noexcept > { return static_cast<_Link_type> (_M_node)->_M_valptr(); } > > _Self& > operator++() noexcept > { > _M_node = _Rb_tree_increment(_M_node); > return *this; > } > > _Self > operator++(int) noexcept > { > _Self __tmp = *this; > _M_node = _Rb_tree_increment(_M_node); > return __tmp; > } > > _Self& > operator--() noexcept > { > _M_node = _Rb_tree_decrement(_M_node); > return *this; > } > > _Self > operator--(int) noexcept > { > _Self __tmp = *this; > _M_node = _Rb_tree_decrement(_M_node); > return __tmp; > } > > friend bool > operator==(const _Self& __x, const _Self& __y) noexcept > { return __x._M_node == __y._M_node; } > > > friend bool > operator!=(const _Self& __x, const _Self& __y) noexcept > { return __x._M_node != __y._M_node; } > > > _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; > > _Rb_tree_const_iterator() noexcept > : _M_node() { } > > explicit > _Rb_tree_const_iterator(_Base_ptr __x) noexcept > : _M_node(__x) { } > > _Rb_tree_const_iterator(const iterator& __it) noexcept > : _M_node(__it._M_node) { } > > iterator > _M_const_cast() const noexcept > { return iterator(const_cast<typename iterator::_Base_ptr>(_M_node)); } > > reference > operator*() const noexcept > { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } > > pointer > operator->() const noexcept > { return static_cast<_Link_type>(_M_node)->_M_valptr(); } > > _Self& > operator++() noexcept > { > _M_node = _Rb_tree_increment(_M_node); > return *this; > } > > _Self > operator++(int) noexcept > { > _Self __tmp = *this; > _M_node = _Rb_tree_increment(_M_node); > return __tmp; > } > > _Self& > operator--() noexcept > { > _M_node = _Rb_tree_decrement(_M_node); > return *this; > } > > _Self > operator--(int) noexcept > { > _Self __tmp = *this; > _M_node = _Rb_tree_decrement(_M_node); > return __tmp; > } > > friend bool > operator==(const _Self& __x, const _Self& __y) noexcept > { return __x._M_node == __y._M_node; } > > > friend bool > operator!=(const _Self& __x, const _Self& __y) noexcept > { return __x._M_node != __y._M_node; } > > > _Base_ptr _M_node; > }; > > __attribute__((__nonnull__)) > void > _Rb_tree_insert_and_rebalance(const bool __insert_left, > _Rb_tree_node_base* __x, > _Rb_tree_node_base* __p, > _Rb_tree_node_base& __header) throw (); > > __attribute__((__nonnull__,__returns_nonnull__)) > _Rb_tree_node_base* > _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, > _Rb_tree_node_base& __header) throw (); > > > 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 > { > _Reuse_or_alloc_node(_Rb_tree& __t) > : _M_root(__t._M_root()), _M_nodes(__t._M_rightmost()), _M_t(__t) > { > if (_M_root) > { > _M_root->_M_parent = 0; > > if (_M_nodes->_M_left) > _M_nodes = _M_nodes->_M_left; > } > else > _M_nodes = 0; > } > > > _Reuse_or_alloc_node(const _Reuse_or_alloc_node&) = delete; > > > ~_Reuse_or_alloc_node() > { _M_t._M_erase(static_cast<_Link_type>(_M_root)); } > > template<typename _Arg> > _Link_type > operator()(_Arg&& __arg) > { > _Link_type __node = static_cast<_Link_type>(_M_extract()); > if (__node) > { > _M_t._M_destroy_node(__node); > _M_t._M_construct_node(__node, std::forward<_Arg>(__arg)); > return __node; > } > > return _M_t._M_create_node(std::forward<_Arg>(__arg)); > } > > private: > _Base_ptr > _M_extract() > { > if (!_M_nodes) > return _M_nodes; > > _Base_ptr __node = _M_nodes; > _M_nodes = _M_nodes->_M_parent; > if (_M_nodes) > { > if (_M_nodes->_M_right == __node) > { > _M_nodes->_M_right = 0; > > if (_M_nodes->_M_left) > { > _M_nodes = _M_nodes->_M_left; > > while (_M_nodes->_M_right) > _M_nodes = _M_nodes->_M_right; > > if (_M_nodes->_M_left) > _M_nodes = _M_nodes->_M_left; > } > } > else > _M_nodes->_M_left = 0; > } > else > _M_root = 0; > > return __node; > } > > _Base_ptr _M_root; > _Base_ptr _M_nodes; > _Rb_tree& _M_t; > }; > > > > struct _Alloc_node > { > _Alloc_node(_Rb_tree& __t) > : _M_t(__t) { } > > template<typename _Arg> > _Link_type > operator()(_Arg&& __arg) const > { return _M_t._M_create_node(std::forward<_Arg>(__arg)); } > > 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; > > _Node_allocator& > _M_get_Node_allocator() noexcept > { return this->_M_impl; } > > const _Node_allocator& > _M_get_Node_allocator() const noexcept > { return this->_M_impl; } > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_get_Node_allocator()); } > > protected: > _Link_type > _M_get_node() > { return _Alloc_traits::allocate(_M_get_Node_allocator(), 1); } > > void > _M_put_node(_Link_type __p) noexcept > { _Alloc_traits::deallocate(_M_get_Node_allocator(), __p, 1); } ># 590 "/usr/include/c++/13/bits/stl_tree.h" 3 > template<typename... _Args> > void > _M_construct_node(_Link_type __node, _Args&&... __args) > { > try > { > ::new(__node) _Rb_tree_node<_Val>; > _Alloc_traits::construct(_M_get_Node_allocator(), > __node->_M_valptr(), > std::forward<_Args>(__args)...); > } > catch(...) > { > __node->~_Rb_tree_node<_Val>(); > _M_put_node(__node); > throw; > } > } > > template<typename... _Args> > _Link_type > _M_create_node(_Args&&... __args) > { > _Link_type __tmp = _M_get_node(); > _M_construct_node(__tmp, std::forward<_Args>(__args)...); > return __tmp; > } > > > void > _M_destroy_node(_Link_type __p) noexcept > { > > > > _Alloc_traits::destroy(_M_get_Node_allocator(), __p->_M_valptr()); > __p->~_Rb_tree_node<_Val>(); > > } > > void > _M_drop_node(_Link_type __p) noexcept > { > _M_destroy_node(__p); > _M_put_node(__p); > } > > template<bool _MoveValue, typename _NodeGen> > _Link_type > _M_clone_node(_Link_type __x, _NodeGen& __node_gen) > { > > using _Vp = __conditional_t<_MoveValue, > value_type&&, > const value_type&>; > > _Link_type __tmp > = __node_gen(std::forward<_Vp>(*__x->_M_valptr())); > __tmp->_M_color = __x->_M_color; > __tmp->_M_left = 0; > __tmp->_M_right = 0; > return __tmp; > } > > 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) > > > : _Node_allocator() > { } > > _Rb_tree_impl(const _Rb_tree_impl& __x) > : _Node_allocator(_Alloc_traits::_S_select_on_copy(__x)) > , _Base_key_compare(__x._M_key_compare) > , _Rb_tree_header() > { } > > > > > > > _Rb_tree_impl(_Rb_tree_impl&&) > noexcept( is_nothrow_move_constructible<_Base_key_compare>::value ) > = default; > > explicit > _Rb_tree_impl(_Node_allocator&& __a) > : _Node_allocator(std::move(__a)) > { } > > _Rb_tree_impl(_Rb_tree_impl&& __x, _Node_allocator&& __a) > : _Node_allocator(std::move(__a)), > _Base_key_compare(std::move(__x)), > _Rb_tree_header(std::move(__x)) > { } > > _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) > : _Node_allocator(std::move(__a)), _Base_key_compare(__comp) > { } > > }; > > _Rb_tree_impl<_Compare> _M_impl; > > protected: > _Base_ptr& > _M_root() noexcept > { return this->_M_impl._M_header._M_parent; } > > _Const_Base_ptr > _M_root() const noexcept > { return this->_M_impl._M_header._M_parent; } > > _Base_ptr& > _M_leftmost() noexcept > { return this->_M_impl._M_header._M_left; } > > _Const_Base_ptr > _M_leftmost() const noexcept > { return this->_M_impl._M_header._M_left; } > > _Base_ptr& > _M_rightmost() noexcept > { return this->_M_impl._M_header._M_right; } > > _Const_Base_ptr > _M_rightmost() const noexcept > { return this->_M_impl._M_header._M_right; } > > _Link_type > _M_mbegin() const noexcept > { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } > > _Link_type > _M_begin() noexcept > { return _M_mbegin(); } > > _Const_Link_type > _M_begin() const noexcept > { > return static_cast<_Const_Link_type> > (this->_M_impl._M_header._M_parent); > } > > _Base_ptr > _M_end() noexcept > { return &this->_M_impl._M_header; } > > _Const_Base_ptr > _M_end() const noexcept > { return &this->_M_impl._M_header; } > > static const _Key& > _S_key(_Const_Link_type __x) > { > > > > static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{}, > "comparison object must be invocable " > "with two arguments of key type"); > > > > if constexpr (__is_invocable<_Compare&, const _Key&, const _Key&>{}) > static_assert( > is_invocable_v<const _Compare&, const _Key&, const _Key&>, > "comparison object must be invocable as const"); > > > > return _KeyOfValue()(*__x->_M_valptr()); > } > > static _Link_type > _S_left(_Base_ptr __x) noexcept > { return static_cast<_Link_type>(__x->_M_left); } > > static _Const_Link_type > _S_left(_Const_Base_ptr __x) noexcept > { return static_cast<_Const_Link_type>(__x->_M_left); } > > static _Link_type > _S_right(_Base_ptr __x) noexcept > { return static_cast<_Link_type>(__x->_M_right); } > > static _Const_Link_type > _S_right(_Const_Base_ptr __x) noexcept > { return static_cast<_Const_Link_type>(__x->_M_right); } > > static const _Key& > _S_key(_Const_Base_ptr __x) > { return _S_key(static_cast<_Const_Link_type>(__x)); } > > static _Base_ptr > _S_minimum(_Base_ptr __x) noexcept > { return _Rb_tree_node_base::_S_minimum(__x); } > > static _Const_Base_ptr > _S_minimum(_Const_Base_ptr __x) noexcept > { return _Rb_tree_node_base::_S_minimum(__x); } > > static _Base_ptr > _S_maximum(_Base_ptr __x) noexcept > { return _Rb_tree_node_base::_S_maximum(__x); } > > static _Const_Base_ptr > _S_maximum(_Const_Base_ptr __x) noexcept > { return _Rb_tree_node_base::_S_maximum(__x); } > > 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>; > > > pair<_Base_ptr, _Base_ptr> > _M_get_insert_unique_pos(const key_type& __k); > > pair<_Base_ptr, _Base_ptr> > _M_get_insert_equal_pos(const key_type& __k); > > pair<_Base_ptr, _Base_ptr> > _M_get_insert_hint_unique_pos(const_iterator __pos, > const key_type& __k); > > pair<_Base_ptr, _Base_ptr> > _M_get_insert_hint_equal_pos(const_iterator __pos, > const key_type& __k); > > private: > > template<typename _Arg, typename _NodeGen> > iterator > _M_insert_(_Base_ptr __x, _Base_ptr __y, _Arg&& __v, _NodeGen&); > > iterator > _M_insert_node(_Base_ptr __x, _Base_ptr __y, _Link_type __z); > > template<typename _Arg> > iterator > _M_insert_lower(_Base_ptr __y, _Arg&& __v); > > template<typename _Arg> > iterator > _M_insert_equal_lower(_Arg&& __x); > > iterator > _M_insert_lower_node(_Base_ptr __p, _Link_type __z); > > iterator > _M_insert_equal_lower_node(_Link_type __z); ># 881 "/usr/include/c++/13/bits/stl_tree.h" 3 > enum { __as_lvalue, __as_rvalue }; > > template<bool _MoveValues, typename _NodeGen> > _Link_type > _M_copy(_Link_type, _Base_ptr, _NodeGen&); > > template<bool _MoveValues, typename _NodeGen> > _Link_type > _M_copy(const _Rb_tree& __x, _NodeGen& __gen) > { > _Link_type __root = > _M_copy<_MoveValues>(__x._M_mbegin(), _M_end(), __gen); > _M_leftmost() = _S_minimum(__root); > _M_rightmost() = _S_maximum(__root); > _M_impl._M_node_count = __x._M_impl._M_node_count; > return __root; > } > > _Link_type > _M_copy(const _Rb_tree& __x) > { > _Alloc_node __an(*this); > return _M_copy<__as_lvalue>(__x, __an); > } > > void > _M_erase(_Link_type __x); > > iterator > _M_lower_bound(_Link_type __x, _Base_ptr __y, > const _Key& __k); > > const_iterator > _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, > const _Key& __k) const; > > iterator > _M_upper_bound(_Link_type __x, _Base_ptr __y, > const _Key& __k); > > const_iterator > _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, > const _Key& __k) const; > > public: > > > > > _Rb_tree() = default; > > > _Rb_tree(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_impl(__comp, _Node_allocator(__a)) { } > > _Rb_tree(const _Rb_tree& __x) > : _M_impl(__x._M_impl) > { > if (__x._M_root() != 0) > _M_root() = _M_copy(__x); > } > > > _Rb_tree(const allocator_type& __a) > : _M_impl(_Node_allocator(__a)) > { } > > _Rb_tree(const _Rb_tree& __x, const allocator_type& __a) > : _M_impl(__x._M_impl._M_key_compare, _Node_allocator(__a)) > { > if (__x._M_root() != nullptr) > _M_root() = _M_copy(__x); > } > > _Rb_tree(_Rb_tree&&) = default; > > _Rb_tree(_Rb_tree&& __x, const allocator_type& __a) > : _Rb_tree(std::move(__x), _Node_allocator(__a)) > { } > > private: > _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a, true_type) > noexcept(is_nothrow_default_constructible<_Compare>::value) > : _M_impl(std::move(__x._M_impl), std::move(__a)) > { } > > _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a, false_type) > : _M_impl(__x._M_impl._M_key_compare, std::move(__a)) > { > if (__x._M_root() != nullptr) > _M_move_data(__x, false_type{}); > } > > public: > _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a) > noexcept( noexcept( > _Rb_tree(std::declval<_Rb_tree&&>(), std::declval<_Node_allocator&&>(), > std::declval<typename _Alloc_traits::is_always_equal>())) ) > : _Rb_tree(std::move(__x), std::move(__a), > typename _Alloc_traits::is_always_equal{}) > { } > > > ~_Rb_tree() noexcept > { _M_erase(_M_begin()); } > > _Rb_tree& > operator=(const _Rb_tree& __x); > > > _Compare > key_comp() const > { return _M_impl._M_key_compare; } > > iterator > begin() noexcept > { return iterator(this->_M_impl._M_header._M_left); } > > const_iterator > begin() const noexcept > { return const_iterator(this->_M_impl._M_header._M_left); } > > iterator > end() noexcept > { return iterator(&this->_M_impl._M_header); } > > const_iterator > end() const noexcept > { return const_iterator(&this->_M_impl._M_header); } > > reverse_iterator > rbegin() noexcept > { return reverse_iterator(end()); } > > const_reverse_iterator > rbegin() const noexcept > { return const_reverse_iterator(end()); } > > reverse_iterator > rend() noexcept > { return reverse_iterator(begin()); } > > const_reverse_iterator > rend() const noexcept > { return const_reverse_iterator(begin()); } > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_impl._M_node_count == 0; } > > size_type > size() const noexcept > { return _M_impl._M_node_count; } > > size_type > max_size() const noexcept > { return _Alloc_traits::max_size(_M_get_Node_allocator()); } > > void > swap(_Rb_tree& __t) > noexcept(__is_nothrow_swappable<_Compare>::value); > > > > template<typename _Arg> > pair<iterator, bool> > _M_insert_unique(_Arg&& __x); > > template<typename _Arg> > iterator > _M_insert_equal(_Arg&& __x); > > template<typename _Arg, typename _NodeGen> > iterator > _M_insert_unique_(const_iterator __pos, _Arg&& __x, _NodeGen&); > > template<typename _Arg> > iterator > _M_insert_unique_(const_iterator __pos, _Arg&& __x) > { > _Alloc_node __an(*this); > return _M_insert_unique_(__pos, std::forward<_Arg>(__x), __an); > } > > template<typename _Arg, typename _NodeGen> > iterator > _M_insert_equal_(const_iterator __pos, _Arg&& __x, _NodeGen&); > > template<typename _Arg> > iterator > _M_insert_equal_(const_iterator __pos, _Arg&& __x) > { > _Alloc_node __an(*this); > return _M_insert_equal_(__pos, std::forward<_Arg>(__x), __an); > } > > template<typename... _Args> > pair<iterator, bool> > _M_emplace_unique(_Args&&... __args); > > template<typename... _Args> > iterator > _M_emplace_equal(_Args&&... __args); > > template<typename... _Args> > iterator > _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args); > > template<typename... _Args> > iterator > _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args); > > template<typename _Iter> > using __same_value_type > = is_same<value_type, typename iterator_traits<_Iter>::value_type>; > > template<typename _InputIterator> > __enable_if_t<__same_value_type<_InputIterator>::value> > _M_insert_range_unique(_InputIterator __first, _InputIterator __last) > { > _Alloc_node __an(*this); > for (; __first != __last; ++__first) > _M_insert_unique_(end(), *__first, __an); > } > > template<typename _InputIterator> > __enable_if_t<!__same_value_type<_InputIterator>::value> > _M_insert_range_unique(_InputIterator __first, _InputIterator __last) > { > for (; __first != __last; ++__first) > _M_emplace_unique(*__first); > } > > template<typename _InputIterator> > __enable_if_t<__same_value_type<_InputIterator>::value> > _M_insert_range_equal(_InputIterator __first, _InputIterator __last) > { > _Alloc_node __an(*this); > for (; __first != __last; ++__first) > _M_insert_equal_(end(), *__first, __an); > } > > template<typename _InputIterator> > __enable_if_t<!__same_value_type<_InputIterator>::value> > _M_insert_range_equal(_InputIterator __first, _InputIterator __last) > { > for (; __first != __last; ++__first) > _M_emplace_equal(*__first); > } ># 1180 "/usr/include/c++/13/bits/stl_tree.h" 3 > private: > void > _M_erase_aux(const_iterator __position); > > void > _M_erase_aux(const_iterator __first, const_iterator __last); > > public: > > > > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __position) > { > do { if (std::__is_constant_evaluated() && !bool(__position != end())) __builtin_unreachable(); } while (false); > const_iterator __result = __position; > ++__result; > _M_erase_aux(__position); > return __result._M_const_cast(); > } > > > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(iterator __position) > { > do { if (std::__is_constant_evaluated() && !bool(__position != end())) __builtin_unreachable(); } while (false); > iterator __result = __position; > ++__result; > _M_erase_aux(__position); > return __result; > } ># 1229 "/usr/include/c++/13/bits/stl_tree.h" 3 > size_type > erase(const key_type& __x); > > > > > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __first, const_iterator __last) > { > _M_erase_aux(__first, __last); > return __last._M_const_cast(); > } ># 1252 "/usr/include/c++/13/bits/stl_tree.h" 3 > void > clear() noexcept > { > _M_erase(_M_begin()); > _M_impl._M_reset(); > } > > > iterator > find(const key_type& __k); > > const_iterator > find(const key_type& __k) const; > > size_type > count(const key_type& __k) const; > > iterator > lower_bound(const key_type& __k) > { return _M_lower_bound(_M_begin(), _M_end(), __k); } > > const_iterator > lower_bound(const key_type& __k) const > { return _M_lower_bound(_M_begin(), _M_end(), __k); } > > iterator > upper_bound(const key_type& __k) > { return _M_upper_bound(_M_begin(), _M_end(), __k); } > > const_iterator > upper_bound(const key_type& __k) const > { return _M_upper_bound(_M_begin(), _M_end(), __k); } > > pair<iterator, iterator> > equal_range(const key_type& __k); > > pair<const_iterator, const_iterator> > equal_range(const key_type& __k) const; > > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > iterator > _M_find_tr(const _Kt& __k) > { > const _Rb_tree* __const_this = this; > return __const_this->_M_find_tr(__k)._M_const_cast(); > } > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > const_iterator > _M_find_tr(const _Kt& __k) const > { > auto __j = _M_lower_bound_tr(__k); > if (__j != end() && _M_impl._M_key_compare(__k, _S_key(__j._M_node))) > __j = end(); > return __j; > } > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > size_type > _M_count_tr(const _Kt& __k) const > { > auto __p = _M_equal_range_tr(__k); > return std::distance(__p.first, __p.second); > } > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > iterator > _M_lower_bound_tr(const _Kt& __k) > { > const _Rb_tree* __const_this = this; > return __const_this->_M_lower_bound_tr(__k)._M_const_cast(); > } > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > const_iterator > _M_lower_bound_tr(const _Kt& __k) const > { > auto __x = _M_begin(); > auto __y = _M_end(); > while (__x != 0) > if (!_M_impl._M_key_compare(_S_key(__x), __k)) > { > __y = __x; > __x = _S_left(__x); > } > else > __x = _S_right(__x); > return const_iterator(__y); > } > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > iterator > _M_upper_bound_tr(const _Kt& __k) > { > const _Rb_tree* __const_this = this; > return __const_this->_M_upper_bound_tr(__k)._M_const_cast(); > } > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > const_iterator > _M_upper_bound_tr(const _Kt& __k) const > { > auto __x = _M_begin(); > auto __y = _M_end(); > while (__x != 0) > if (_M_impl._M_key_compare(__k, _S_key(__x))) > { > __y = __x; > __x = _S_left(__x); > } > else > __x = _S_right(__x); > return const_iterator(__y); > } > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > pair<iterator, iterator> > _M_equal_range_tr(const _Kt& __k) > { > const _Rb_tree* __const_this = this; > auto __ret = __const_this->_M_equal_range_tr(__k); > return { __ret.first._M_const_cast(), __ret.second._M_const_cast() }; > } > > template<typename _Kt, > typename _Req = __has_is_transparent_t<_Compare, _Kt>> > pair<const_iterator, const_iterator> > _M_equal_range_tr(const _Kt& __k) const > { > auto __low = _M_lower_bound_tr(__k); > auto __high = __low; > auto& __cmp = _M_impl._M_key_compare; > while (__high != end() && !__cmp(__k, _S_key(__high._M_node))) > ++__high; > return { __low, __high }; > } > > > > bool > __rb_verify() const; > > > _Rb_tree& > operator=(_Rb_tree&&) > noexcept(_Alloc_traits::_S_nothrow_move() > && is_nothrow_move_assignable<_Compare>::value); > > template<typename _Iterator> > void > _M_assign_unique(_Iterator, _Iterator); > > template<typename _Iterator> > void > _M_assign_equal(_Iterator, _Iterator); > > private: > > void > _M_move_data(_Rb_tree& __x, true_type) > { _M_impl._M_move_data(__x._M_impl); } > > > > void > _M_move_data(_Rb_tree&, false_type); > > > void > _M_move_assign(_Rb_tree&, true_type); > > > > void > _M_move_assign(_Rb_tree&, false_type); > > > > public: > > insert_return_type > _M_reinsert_node_unique(node_type&& __nh) > { > insert_return_type __ret; > if (__nh.empty()) > __ret.position = end(); > else > { > do { if (std::__is_constant_evaluated() && !bool(_M_get_Node_allocator() == *__nh._M_alloc)) __builtin_unreachable(); } while (false); > > auto __res = _M_get_insert_unique_pos(__nh._M_key()); > if (__res.second) > { > __ret.position > = _M_insert_node(__res.first, __res.second, __nh._M_ptr); > __nh._M_ptr = nullptr; > __ret.inserted = true; > } > else > { > __ret.node = std::move(__nh); > __ret.position = iterator(__res.first); > __ret.inserted = false; > } > } > return __ret; > } > > > iterator > _M_reinsert_node_equal(node_type&& __nh) > { > iterator __ret; > if (__nh.empty()) > __ret = end(); > else > { > do { if (std::__is_constant_evaluated() && !bool(_M_get_Node_allocator() == *__nh._M_alloc)) __builtin_unreachable(); } while (false); > auto __res = _M_get_insert_equal_pos(__nh._M_key()); > if (__res.second) > __ret = _M_insert_node(__res.first, __res.second, __nh._M_ptr); > else > __ret = _M_insert_equal_lower_node(__nh._M_ptr); > __nh._M_ptr = nullptr; > } > return __ret; > } > > > iterator > _M_reinsert_node_hint_unique(const_iterator __hint, node_type&& __nh) > { > iterator __ret; > if (__nh.empty()) > __ret = end(); > else > { > do { if (std::__is_constant_evaluated() && !bool(_M_get_Node_allocator() == *__nh._M_alloc)) __builtin_unreachable(); } while (false); > auto __res = _M_get_insert_hint_unique_pos(__hint, __nh._M_key()); > if (__res.second) > { > __ret = _M_insert_node(__res.first, __res.second, __nh._M_ptr); > __nh._M_ptr = nullptr; > } > else > __ret = iterator(__res.first); > } > return __ret; > } > > > iterator > _M_reinsert_node_hint_equal(const_iterator __hint, node_type&& __nh) > { > iterator __ret; > if (__nh.empty()) > __ret = end(); > else > { > do { if (std::__is_constant_evaluated() && !bool(_M_get_Node_allocator() == *__nh._M_alloc)) __builtin_unreachable(); } while (false); > auto __res = _M_get_insert_hint_equal_pos(__hint, __nh._M_key()); > if (__res.second) > __ret = _M_insert_node(__res.first, __res.second, __nh._M_ptr); > else > __ret = _M_insert_equal_lower_node(__nh._M_ptr); > __nh._M_ptr = nullptr; > } > return __ret; > } > > > node_type > extract(const_iterator __pos) > { > auto __ptr = _Rb_tree_rebalance_for_erase( > __pos._M_const_cast()._M_node, _M_impl._M_header); > --_M_impl._M_node_count; > return { static_cast<_Link_type>(__ptr), _M_get_Node_allocator() }; > } > > > node_type > extract(const key_type& __k) > { > node_type __nh; > auto __pos = find(__k); > if (__pos != end()) > __nh = extract(const_iterator(__pos)); > return __nh; > } > > template<typename _Compare2> > using _Compatible_tree > = _Rb_tree<_Key, _Val, _KeyOfValue, _Compare2, _Alloc>; > > template<typename, typename> > friend class _Rb_tree_merge_helper; > > > template<typename _Compare2> > void > _M_merge_unique(_Compatible_tree<_Compare2>& __src) noexcept > { > using _Merge_helper = _Rb_tree_merge_helper<_Rb_tree, _Compare2>; > for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) > { > auto __pos = __i++; > auto __res = _M_get_insert_unique_pos(_KeyOfValue()(*__pos)); > if (__res.second) > { > auto& __src_impl = _Merge_helper::_S_get_impl(__src); > auto __ptr = _Rb_tree_rebalance_for_erase( > __pos._M_node, __src_impl._M_header); > --__src_impl._M_node_count; > _M_insert_node(__res.first, __res.second, > static_cast<_Link_type>(__ptr)); > } > } > } > > > template<typename _Compare2> > void > _M_merge_equal(_Compatible_tree<_Compare2>& __src) noexcept > { > using _Merge_helper = _Rb_tree_merge_helper<_Rb_tree, _Compare2>; > for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) > { > auto __pos = __i++; > auto __res = _M_get_insert_equal_pos(_KeyOfValue()(*__pos)); > if (__res.second) > { > auto& __src_impl = _Merge_helper::_S_get_impl(__src); > auto __ptr = _Rb_tree_rebalance_for_erase( > __pos._M_node, __src_impl._M_header); > --__src_impl._M_node_count; > _M_insert_node(__res.first, __res.second, > static_cast<_Link_type>(__ptr)); > } > } > } > > > friend bool > operator==(const _Rb_tree& __x, const _Rb_tree& __y) > { > return __x.size() == __y.size() > && std::equal(__x.begin(), __x.end(), __y.begin()); > } ># 1621 "/usr/include/c++/13/bits/stl_tree.h" 3 > friend bool > operator<(const _Rb_tree& __x, const _Rb_tree& __y) > { > return std::lexicographical_compare(__x.begin(), __x.end(), > __y.begin(), __y.end()); > } > > > private: > > > struct _Auto_node > { > template<typename... _Args> > _Auto_node(_Rb_tree& __t, _Args&&... __args) > : _M_t(__t), > _M_node(__t._M_create_node(std::forward<_Args>(__args)...)) > { } > > ~_Auto_node() > { > if (_M_node) > _M_t._M_drop_node(_M_node); > } > > _Auto_node(_Auto_node&& __n) > : _M_t(__n._M_t), _M_node(__n._M_node) > { __n._M_node = nullptr; } > > const _Key& > _M_key() const > { return _S_key(_M_node); } > > iterator > _M_insert(pair<_Base_ptr, _Base_ptr> __p) > { > auto __it = _M_t._M_insert_node(__p.first, __p.second, _M_node); > _M_node = nullptr; > return __it; > } > > iterator > _M_insert_equal_lower() > { > auto __it = _M_t._M_insert_equal_lower_node(_M_node); > _M_node = nullptr; > return __it; > } > > _Rb_tree& _M_t; > _Link_type _M_node; > }; > > }; > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline void > swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) > { __x.swap(__y); } > > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_move_data(_Rb_tree& __x, false_type) > { > if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) > _M_move_data(__x, true_type()); > else > { > constexpr bool __move = !__move_if_noexcept_cond<value_type>::value; > _Alloc_node __an(*this); > _M_root() = _M_copy<__move>(__x, __an); > if constexpr (__move) > __x.clear(); > } > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_move_assign(_Rb_tree& __x, true_type) > { > clear(); > if (__x._M_root() != nullptr) > _M_move_data(__x, true_type()); > std::__alloc_on_move(_M_get_Node_allocator(), > __x._M_get_Node_allocator()); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_move_assign(_Rb_tree& __x, false_type) > { > if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) > return _M_move_assign(__x, true_type{}); > > > > _Reuse_or_alloc_node __roan(*this); > _M_impl._M_reset(); > if (__x._M_root() != nullptr) > { > _M_root() = _M_copy<__as_rvalue>(__x, __roan); > __x.clear(); > } > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > operator=(_Rb_tree&& __x) > noexcept(_Alloc_traits::_S_nothrow_move() > && is_nothrow_move_assignable<_Compare>::value) > { > _M_impl._M_key_compare = std::move(__x._M_impl._M_key_compare); > _M_move_assign(__x, __bool_constant<_Alloc_traits::_S_nothrow_move()>()); > return *this; > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > template<typename _Iterator> > void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_assign_unique(_Iterator __first, _Iterator __last) > { > _Reuse_or_alloc_node __roan(*this); > _M_impl._M_reset(); > for (; __first != __last; ++__first) > _M_insert_unique_(end(), *__first, __roan); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > template<typename _Iterator> > void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_assign_equal(_Iterator __first, _Iterator __last) > { > _Reuse_or_alloc_node __roan(*this); > _M_impl._M_reset(); > for (; __first != __last; ++__first) > _M_insert_equal_(end(), *__first, __roan); > } > > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > operator=(const _Rb_tree& __x) > { > if (this != std::__addressof(__x)) > { > > > if (_Alloc_traits::_S_propagate_on_copy_assign()) > { > auto& __this_alloc = this->_M_get_Node_allocator(); > auto& __that_alloc = __x._M_get_Node_allocator(); > if (!_Alloc_traits::_S_always_equal() > && __this_alloc != __that_alloc) > { > > > clear(); > std::__alloc_on_copy(__this_alloc, __that_alloc); > } > } > > > _Reuse_or_alloc_node __roan(*this); > _M_impl._M_reset(); > _M_impl._M_key_compare = __x._M_impl._M_key_compare; > if (__x._M_root() != 0) > _M_root() = _M_copy<__as_lvalue>(__x, __roan); > } > > return *this; > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > > template<typename _Arg, typename _NodeGen> > > > > typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_insert_(_Base_ptr __x, _Base_ptr __p, > > _Arg&& __v, > > > > _NodeGen& __node_gen) > { > bool __insert_left = (__x != 0 || __p == _M_end() > || _M_impl._M_key_compare(_KeyOfValue()(__v), > _S_key(__p))); > > _Link_type __z = __node_gen(std::forward<_Arg>(__v)); > > _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, > this->_M_impl._M_header); > ++_M_impl._M_node_count; > return iterator(__z); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > > template<typename _Arg> > > typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > > _M_insert_lower(_Base_ptr __p, _Arg&& __v) > > > > { > bool __insert_left = (__p == _M_end() > || !_M_impl._M_key_compare(_S_key(__p), > _KeyOfValue()(__v))); > > _Link_type __z = _M_create_node(std::forward<_Arg>(__v)); > > _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, > this->_M_impl._M_header); > ++_M_impl._M_node_count; > return iterator(__z); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > > template<typename _Arg> > > typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > > _M_insert_equal_lower(_Arg&& __v) > > > > { > _Link_type __x = _M_begin(); > _Base_ptr __y = _M_end(); > while (__x != 0) > { > __y = __x; > __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? > _S_left(__x) : _S_right(__x); > } > return _M_insert_lower(__y, std::forward<_Arg>(__v)); > } > > template<typename _Key, typename _Val, typename _KoV, > typename _Compare, typename _Alloc> > template<bool _MoveValues, typename _NodeGen> > typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type > _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: > _M_copy(_Link_type __x, _Base_ptr __p, _NodeGen& __node_gen) > { > > _Link_type __top = _M_clone_node<_MoveValues>(__x, __node_gen); > __top->_M_parent = __p; > > try > { > if (__x->_M_right) > __top->_M_right = > _M_copy<_MoveValues>(_S_right(__x), __top, __node_gen); > __p = __top; > __x = _S_left(__x); > > while (__x != 0) > { > _Link_type __y = _M_clone_node<_MoveValues>(__x, __node_gen); > __p->_M_left = __y; > __y->_M_parent = __p; > if (__x->_M_right) > __y->_M_right = _M_copy<_MoveValues>(_S_right(__x), > __y, __node_gen); > __p = __y; > __x = _S_left(__x); > } > } > catch(...) > { > _M_erase(__top); > throw; > } > return __top; > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_erase(_Link_type __x) > { > > while (__x != 0) > { > _M_erase(_S_right(__x)); > _Link_type __y = _S_left(__x); > _M_drop_node(__x); > __x = __y; > } > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_lower_bound(_Link_type __x, _Base_ptr __y, > const _Key& __k) > { > while (__x != 0) > if (!_M_impl._M_key_compare(_S_key(__x), __k)) > __y = __x, __x = _S_left(__x); > else > __x = _S_right(__x); > return iterator(__y); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::const_iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, > const _Key& __k) const > { > while (__x != 0) > if (!_M_impl._M_key_compare(_S_key(__x), __k)) > __y = __x, __x = _S_left(__x); > else > __x = _S_right(__x); > return const_iterator(__y); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_upper_bound(_Link_type __x, _Base_ptr __y, > const _Key& __k) > { > while (__x != 0) > if (_M_impl._M_key_compare(__k, _S_key(__x))) > __y = __x, __x = _S_left(__x); > else > __x = _S_right(__x); > return iterator(__y); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::const_iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, > const _Key& __k) const > { > while (__x != 0) > if (_M_impl._M_key_compare(__k, _S_key(__x))) > __y = __x, __x = _S_left(__x); > else > __x = _S_right(__x); > return const_iterator(__y); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::iterator, > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::iterator> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > equal_range(const _Key& __k) > { > _Link_type __x = _M_begin(); > _Base_ptr __y = _M_end(); > while (__x != 0) > { > if (_M_impl._M_key_compare(_S_key(__x), __k)) > __x = _S_right(__x); > else if (_M_impl._M_key_compare(__k, _S_key(__x))) > __y = __x, __x = _S_left(__x); > else > { > _Link_type __xu(__x); > _Base_ptr __yu(__y); > __y = __x, __x = _S_left(__x); > __xu = _S_right(__xu); > return pair<iterator, > iterator>(_M_lower_bound(__x, __y, __k), > _M_upper_bound(__xu, __yu, __k)); > } > } > return pair<iterator, iterator>(iterator(__y), > iterator(__y)); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::const_iterator, > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::const_iterator> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > equal_range(const _Key& __k) const > { > _Const_Link_type __x = _M_begin(); > _Const_Base_ptr __y = _M_end(); > while (__x != 0) > { > if (_M_impl._M_key_compare(_S_key(__x), __k)) > __x = _S_right(__x); > else if (_M_impl._M_key_compare(__k, _S_key(__x))) > __y = __x, __x = _S_left(__x); > else > { > _Const_Link_type __xu(__x); > _Const_Base_ptr __yu(__y); > __y = __x, __x = _S_left(__x); > __xu = _S_right(__xu); > return pair<const_iterator, > const_iterator>(_M_lower_bound(__x, __y, __k), > _M_upper_bound(__xu, __yu, __k)); > } > } > return pair<const_iterator, const_iterator>(const_iterator(__y), > const_iterator(__y)); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > swap(_Rb_tree& __t) > noexcept(__is_nothrow_swappable<_Compare>::value) > { > if (_M_root() == 0) > { > if (__t._M_root() != 0) > _M_impl._M_move_data(__t._M_impl); > } > else if (__t._M_root() == 0) > __t._M_impl._M_move_data(_M_impl); > else > { > std::swap(_M_root(),__t._M_root()); > std::swap(_M_leftmost(),__t._M_leftmost()); > std::swap(_M_rightmost(),__t._M_rightmost()); > > _M_root()->_M_parent = _M_end(); > __t._M_root()->_M_parent = __t._M_end(); > std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); > } > > std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); > > _Alloc_traits::_S_on_swap(_M_get_Node_allocator(), > __t._M_get_Node_allocator()); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::_Base_ptr, > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::_Base_ptr> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_get_insert_unique_pos(const key_type& __k) > { > typedef pair<_Base_ptr, _Base_ptr> _Res; > _Link_type __x = _M_begin(); > _Base_ptr __y = _M_end(); > bool __comp = true; > while (__x != 0) > { > __y = __x; > __comp = _M_impl._M_key_compare(__k, _S_key(__x)); > __x = __comp ? _S_left(__x) : _S_right(__x); > } > iterator __j = iterator(__y); > if (__comp) > { > if (__j == begin()) > return _Res(__x, __y); > else > --__j; > } > if (_M_impl._M_key_compare(_S_key(__j._M_node), __k)) > return _Res(__x, __y); > return _Res(__j._M_node, 0); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::_Base_ptr, > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::_Base_ptr> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_get_insert_equal_pos(const key_type& __k) > { > typedef pair<_Base_ptr, _Base_ptr> _Res; > _Link_type __x = _M_begin(); > _Base_ptr __y = _M_end(); > while (__x != 0) > { > __y = __x; > __x = _M_impl._M_key_compare(__k, _S_key(__x)) ? > _S_left(__x) : _S_right(__x); > } > return _Res(__x, __y); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > > template<typename _Arg> > > pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::iterator, bool> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > > _M_insert_unique(_Arg&& __v) > > > > { > typedef pair<iterator, bool> _Res; > pair<_Base_ptr, _Base_ptr> __res > = _M_get_insert_unique_pos(_KeyOfValue()(__v)); > > if (__res.second) > { > _Alloc_node __an(*this); > return _Res(_M_insert_(__res.first, __res.second, > std::forward<_Arg>(__v), __an), > true); > } > > return _Res(iterator(__res.first), false); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > > template<typename _Arg> > > typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > > _M_insert_equal(_Arg&& __v) > > > > { > pair<_Base_ptr, _Base_ptr> __res > = _M_get_insert_equal_pos(_KeyOfValue()(__v)); > _Alloc_node __an(*this); > return _M_insert_(__res.first, __res.second, > std::forward<_Arg>(__v), __an); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::_Base_ptr, > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::_Base_ptr> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_get_insert_hint_unique_pos(const_iterator __position, > const key_type& __k) > { > iterator __pos = __position._M_const_cast(); > typedef pair<_Base_ptr, _Base_ptr> _Res; > > > if (__pos._M_node == _M_end()) > { > if (size() > 0 > && _M_impl._M_key_compare(_S_key(_M_rightmost()), __k)) > return _Res(0, _M_rightmost()); > else > return _M_get_insert_unique_pos(__k); > } > else if (_M_impl._M_key_compare(__k, _S_key(__pos._M_node))) > { > > iterator __before = __pos; > if (__pos._M_node == _M_leftmost()) > return _Res(_M_leftmost(), _M_leftmost()); > else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), __k)) > { > if (_S_right(__before._M_node) == 0) > return _Res(0, __before._M_node); > else > return _Res(__pos._M_node, __pos._M_node); > } > else > return _M_get_insert_unique_pos(__k); > } > else if (_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) > { > > iterator __after = __pos; > if (__pos._M_node == _M_rightmost()) > return _Res(0, _M_rightmost()); > else if (_M_impl._M_key_compare(__k, _S_key((++__after)._M_node))) > { > if (_S_right(__pos._M_node) == 0) > return _Res(0, __pos._M_node); > else > return _Res(__after._M_node, __after._M_node); > } > else > return _M_get_insert_unique_pos(__k); > } > else > > return _Res(__pos._M_node, 0); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > > template<typename _Arg, typename _NodeGen> > > > > typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_insert_unique_(const_iterator __position, > > _Arg&& __v, > > > > _NodeGen& __node_gen) > { > pair<_Base_ptr, _Base_ptr> __res > = _M_get_insert_hint_unique_pos(__position, _KeyOfValue()(__v)); > > if (__res.second) > return _M_insert_(__res.first, __res.second, > std::forward<_Arg>(__v), > __node_gen); > return iterator(__res.first); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::_Base_ptr, > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::_Base_ptr> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_get_insert_hint_equal_pos(const_iterator __position, const key_type& __k) > { > iterator __pos = __position._M_const_cast(); > typedef pair<_Base_ptr, _Base_ptr> _Res; > > > if (__pos._M_node == _M_end()) > { > if (size() > 0 > && !_M_impl._M_key_compare(__k, _S_key(_M_rightmost()))) > return _Res(0, _M_rightmost()); > else > return _M_get_insert_equal_pos(__k); > } > else if (!_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) > { > > iterator __before = __pos; > if (__pos._M_node == _M_leftmost()) > return _Res(_M_leftmost(), _M_leftmost()); > else if (!_M_impl._M_key_compare(__k, _S_key((--__before)._M_node))) > { > if (_S_right(__before._M_node) == 0) > return _Res(0, __before._M_node); > else > return _Res(__pos._M_node, __pos._M_node); > } > else > return _M_get_insert_equal_pos(__k); > } > else > { > > iterator __after = __pos; > if (__pos._M_node == _M_rightmost()) > return _Res(0, _M_rightmost()); > else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), __k)) > { > if (_S_right(__pos._M_node) == 0) > return _Res(0, __pos._M_node); > else > return _Res(__after._M_node, __after._M_node); > } > else > return _Res(0, 0); > } > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > > template<typename _Arg, typename _NodeGen> > > > > typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_insert_equal_(const_iterator __position, > > _Arg&& __v, > > > > _NodeGen& __node_gen) > { > pair<_Base_ptr, _Base_ptr> __res > = _M_get_insert_hint_equal_pos(__position, _KeyOfValue()(__v)); > > if (__res.second) > return _M_insert_(__res.first, __res.second, > std::forward<_Arg>(__v), > __node_gen); > > return _M_insert_equal_lower(std::forward<_Arg>(__v)); > } > > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > auto > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_insert_node(_Base_ptr __x, _Base_ptr __p, _Link_type __z) > -> iterator > { > bool __insert_left = (__x != 0 || __p == _M_end() > || _M_impl._M_key_compare(_S_key(__z), > _S_key(__p))); > > _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, > this->_M_impl._M_header); > ++_M_impl._M_node_count; > return iterator(__z); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > auto > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_insert_lower_node(_Base_ptr __p, _Link_type __z) > -> iterator > { > bool __insert_left = (__p == _M_end() > || !_M_impl._M_key_compare(_S_key(__p), > _S_key(__z))); > > _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, > this->_M_impl._M_header); > ++_M_impl._M_node_count; > return iterator(__z); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > auto > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_insert_equal_lower_node(_Link_type __z) > -> iterator > { > _Link_type __x = _M_begin(); > _Base_ptr __y = _M_end(); > while (__x != 0) > { > __y = __x; > __x = !_M_impl._M_key_compare(_S_key(__x), _S_key(__z)) ? > _S_left(__x) : _S_right(__x); > } > return _M_insert_lower_node(__y, __z); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > template<typename... _Args> > auto > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_emplace_unique(_Args&&... __args) > -> pair<iterator, bool> > { > _Auto_node __z(*this, std::forward<_Args>(__args)...); > auto __res = _M_get_insert_unique_pos(__z._M_key()); > if (__res.second) > return {__z._M_insert(__res), true}; > return {iterator(__res.first), false}; > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > template<typename... _Args> > auto > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_emplace_equal(_Args&&... __args) > -> iterator > { > _Auto_node __z(*this, std::forward<_Args>(__args)...); > auto __res = _M_get_insert_equal_pos(__z._M_key()); > return __z._M_insert(__res); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > template<typename... _Args> > auto > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args) > -> iterator > { > _Auto_node __z(*this, std::forward<_Args>(__args)...); > auto __res = _M_get_insert_hint_unique_pos(__pos, __z._M_key()); > if (__res.second) > return __z._M_insert(__res); > return iterator(__res.first); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > template<typename... _Args> > auto > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args) > -> iterator > { > _Auto_node __z(*this, std::forward<_Args>(__args)...); > auto __res = _M_get_insert_hint_equal_pos(__pos, __z._M_key()); > if (__res.second) > return __z._M_insert(__res); > return __z._M_insert_equal_lower(); > } > > > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_erase_aux(const_iterator __position) > { > _Link_type __y = > static_cast<_Link_type>(_Rb_tree_rebalance_for_erase > (const_cast<_Base_ptr>(__position._M_node), > this->_M_impl._M_header)); > _M_drop_node(__y); > --_M_impl._M_node_count; > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > void > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _M_erase_aux(const_iterator __first, const_iterator __last) > { > if (__first == begin() && __last == end()) > clear(); > else > while (__first != __last) > _M_erase_aux(__first++); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > erase(const _Key& __x) > { > pair<iterator, iterator> __p = equal_range(__x); > const size_type __old_size = size(); > _M_erase_aux(__p.first, __p.second); > return __old_size - size(); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > find(const _Key& __k) > { > iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); > return (__j == end() > || _M_impl._M_key_compare(__k, > _S_key(__j._M_node))) ? end() : __j; > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > typename _Rb_tree<_Key, _Val, _KeyOfValue, > _Compare, _Alloc>::const_iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > find(const _Key& __k) const > { > const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); > return (__j == end() > || _M_impl._M_key_compare(__k, > _S_key(__j._M_node))) ? end() : __j; > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > count(const _Key& __k) const > { > pair<const_iterator, const_iterator> __p = equal_range(__k); > const size_type __n = std::distance(__p.first, __p.second); > return __n; > } > > __attribute__ ((__pure__)) unsigned int > _Rb_tree_black_count(const _Rb_tree_node_base* __node, > const _Rb_tree_node_base* __root) throw (); > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > bool > _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const > { > if (_M_impl._M_node_count == 0 || begin() == end()) > return _M_impl._M_node_count == 0 && begin() == end() > && this->_M_impl._M_header._M_left == _M_end() > && this->_M_impl._M_header._M_right == _M_end(); > > unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); > for (const_iterator __it = begin(); __it != end(); ++__it) > { > _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); > _Const_Link_type __L = _S_left(__x); > _Const_Link_type __R = _S_right(__x); > > if (__x->_M_color == _S_red) > if ((__L && __L->_M_color == _S_red) > || (__R && __R->_M_color == _S_red)) > return false; > > if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) > return false; > if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) > return false; > > if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) > return false; > } > > if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) > return false; > if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) > return false; > return true; > } > > > > 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>; > > static auto& > _S_get_impl(_Rb_tree<_Key, _Val, _Sel, _Cmp2, _Alloc>& __tree) > { return __tree._M_impl; } > }; > > > >} ># 56 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/stl_map.h" 1 3 ># 66 "/usr/include/c++/13/bits/stl_map.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template <typename _Key, typename _Tp, typename _Compare, typename _Alloc> > class multimap; ># 98 "/usr/include/c++/13/bits/stl_map.h" 3 > 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: ># 123 "/usr/include/c++/13/bits/stl_map.h" 3 > 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; > > value_compare(_Compare __c) > : comp(__c) { } > > public: > bool operator()(const value_type& __x, const value_type& __y) const > { return comp(__x.first, __y.first); } > }; >#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; ># 195 "/usr/include/c++/13/bits/stl_map.h" 3 > map() = default; > > > > > > > > explicit > map(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Pair_alloc_type(__a)) { } ># 217 "/usr/include/c++/13/bits/stl_map.h" 3 > map(const map&) = default; > > > > > > > > map(map&&) = default; ># 238 "/usr/include/c++/13/bits/stl_map.h" 3 > map(initializer_list<value_type> __l, > const _Compare& __comp = _Compare(), > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Pair_alloc_type(__a)) > { _M_t._M_insert_range_unique(__l.begin(), __l.end()); } > > > explicit > map(const allocator_type& __a) > : _M_t(_Pair_alloc_type(__a)) { } > > > map(const map& __m, const __type_identity_t<allocator_type>& __a) > : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } > > > map(map&& __m, const __type_identity_t<allocator_type>& __a) > noexcept(is_nothrow_copy_constructible<_Compare>::value > && _Alloc_traits::_S_always_equal()) > : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } > > > map(initializer_list<value_type> __l, const allocator_type& __a) > : _M_t(_Pair_alloc_type(__a)) > { _M_t._M_insert_range_unique(__l.begin(), __l.end()); } > > > template<typename _InputIterator> > map(_InputIterator __first, _InputIterator __last, > const allocator_type& __a) > : _M_t(_Pair_alloc_type(__a)) > { _M_t._M_insert_range_unique(__first, __last); } ># 282 "/usr/include/c++/13/bits/stl_map.h" 3 > template<typename _InputIterator> > map(_InputIterator __first, _InputIterator __last) > : _M_t() > { _M_t._M_insert_range_unique(__first, __last); } ># 299 "/usr/include/c++/13/bits/stl_map.h" 3 > template<typename _InputIterator> > map(_InputIterator __first, _InputIterator __last, > const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Pair_alloc_type(__a)) > { _M_t._M_insert_range_unique(__first, __last); } > > > > > > > > ~map() = default; ># 328 "/usr/include/c++/13/bits/stl_map.h" 3 > map& > operator=(const map&) = default; > > > map& > operator=(map&&) = default; ># 346 "/usr/include/c++/13/bits/stl_map.h" 3 > map& > operator=(initializer_list<value_type> __l) > { > _M_t._M_assign_unique(__l.begin(), __l.end()); > return *this; > } > > > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_t.get_allocator()); } > > > > > > > > iterator > begin() noexcept > { return _M_t.begin(); } > > > > > > > const_iterator > begin() const noexcept > { return _M_t.begin(); } > > > > > > > iterator > end() noexcept > { return _M_t.end(); } > > > > > > > const_iterator > end() const noexcept > { return _M_t.end(); } > > > > > > > reverse_iterator > rbegin() noexcept > { return _M_t.rbegin(); } > > > > > > > const_reverse_iterator > rbegin() const noexcept > { return _M_t.rbegin(); } > > > > > > > reverse_iterator > rend() noexcept > { return _M_t.rend(); } > > > > > > > const_reverse_iterator > rend() const noexcept > { return _M_t.rend(); } > > > > > > > > const_iterator > cbegin() const noexcept > { return _M_t.begin(); } > > > > > > > const_iterator > cend() const noexcept > { return _M_t.end(); } > > > > > > > const_reverse_iterator > crbegin() const noexcept > { return _M_t.rbegin(); } > > > > > > > const_reverse_iterator > crend() const noexcept > { return _M_t.rend(); } > > > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_t.empty(); } > > > size_type > size() const noexcept > { return _M_t.size(); } > > > size_type > max_size() const noexcept > { return _M_t.max_size(); } ># 501 "/usr/include/c++/13/bits/stl_map.h" 3 > mapped_type& > operator[](const key_type& __k) > { > > > > iterator __i = lower_bound(__k); > > if (__i == end() || key_comp()(__k, (*__i).first)) > > __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, > std::tuple<const key_type&>(__k), > std::tuple<>()); > > > > return (*__i).second; > } > > > mapped_type& > operator[](key_type&& __k) > { > > > > iterator __i = lower_bound(__k); > > if (__i == end() || key_comp()(__k, (*__i).first)) > __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, > std::forward_as_tuple(std::move(__k)), > std::tuple<>()); > return (*__i).second; > } ># 546 "/usr/include/c++/13/bits/stl_map.h" 3 > mapped_type& > at(const key_type& __k) > { > iterator __i = lower_bound(__k); > if (__i == end() || key_comp()(__k, (*__i).first)) > __throw_out_of_range(("map::at")); > return (*__i).second; > } > > const mapped_type& > at(const key_type& __k) const > { > const_iterator __i = lower_bound(__k); > if (__i == end() || key_comp()(__k, (*__i).first)) > __throw_out_of_range(("map::at")); > return (*__i).second; > } ># 584 "/usr/include/c++/13/bits/stl_map.h" 3 > template<typename... _Args> > std::pair<iterator, bool> > emplace(_Args&&... __args) > { > > if constexpr (sizeof...(_Args) == 2) > if constexpr (is_same_v<allocator_type, allocator<value_type>>) > { > auto&& [__a, __v] = pair<_Args&...>(__args...); > if constexpr (__usable_key<decltype(__a)>) > { > const key_type& __k = __a; > iterator __i = lower_bound(__k); > if (__i == end() || key_comp()(__k, (*__i).first)) > { > __i = emplace_hint(__i, std::forward<_Args>(__args)...); > return {__i, true}; > } > return {__i, false}; > } > } > > return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); > } ># 634 "/usr/include/c++/13/bits/stl_map.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { > return _M_t._M_emplace_hint_unique(__pos, > std::forward<_Args>(__args)...); > } > > > > > node_type > extract(const_iterator __pos) > { > do { if (std::__is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); > return _M_t.extract(__pos); > } > > > node_type > extract(const key_type& __x) > { return _M_t.extract(__x); } > > > insert_return_type > insert(node_type&& __nh) > { return _M_t._M_reinsert_node_unique(std::move(__nh)); } > > > iterator > insert(const_iterator __hint, node_type&& __nh) > { return _M_t._M_reinsert_node_hint_unique(__hint, std::move(__nh)); } > > template<typename, typename> > friend struct std::_Rb_tree_merge_helper; > > template<typename _Cmp2> > void > merge(map<_Key, _Tp, _Cmp2, _Alloc>& __source) > { > using _Merge_helper = _Rb_tree_merge_helper<map, _Cmp2>; > _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); > } > > template<typename _Cmp2> > void > merge(map<_Key, _Tp, _Cmp2, _Alloc>&& __source) > { merge(__source); } > > template<typename _Cmp2> > void > merge(multimap<_Key, _Tp, _Cmp2, _Alloc>& __source) > { > using _Merge_helper = _Rb_tree_merge_helper<map, _Cmp2>; > _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); > } > > template<typename _Cmp2> > void > merge(multimap<_Key, _Tp, _Cmp2, _Alloc>&& __source) > { merge(__source); } ># 719 "/usr/include/c++/13/bits/stl_map.h" 3 > template <typename... _Args> > pair<iterator, bool> > try_emplace(const key_type& __k, _Args&&... __args) > { > iterator __i = lower_bound(__k); > if (__i == end() || key_comp()(__k, (*__i).first)) > { > __i = emplace_hint(__i, std::piecewise_construct, > std::forward_as_tuple(__k), > std::forward_as_tuple( > std::forward<_Args>(__args)...)); > return {__i, true}; > } > return {__i, false}; > } > > > template <typename... _Args> > pair<iterator, bool> > try_emplace(key_type&& __k, _Args&&... __args) > { > iterator __i = lower_bound(__k); > if (__i == end() || key_comp()(__k, (*__i).first)) > { > __i = emplace_hint(__i, std::piecewise_construct, > std::forward_as_tuple(std::move(__k)), > std::forward_as_tuple( > std::forward<_Args>(__args)...)); > return {__i, true}; > } > return {__i, false}; > } ># 779 "/usr/include/c++/13/bits/stl_map.h" 3 > template <typename... _Args> > iterator > try_emplace(const_iterator __hint, const key_type& __k, > _Args&&... __args) > { > iterator __i; > auto __true_hint = _M_t._M_get_insert_hint_unique_pos(__hint, __k); > if (__true_hint.second) > __i = emplace_hint(iterator(__true_hint.second), > std::piecewise_construct, > std::forward_as_tuple(__k), > std::forward_as_tuple( > std::forward<_Args>(__args)...)); > else > __i = iterator(__true_hint.first); > return __i; > } > > > template <typename... _Args> > iterator > try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) > { > iterator __i; > auto __true_hint = _M_t._M_get_insert_hint_unique_pos(__hint, __k); > if (__true_hint.second) > __i = emplace_hint(iterator(__true_hint.second), > std::piecewise_construct, > std::forward_as_tuple(std::move(__k)), > std::forward_as_tuple( > std::forward<_Args>(__args)...)); > else > __i = iterator(__true_hint.first); > return __i; > } ># 832 "/usr/include/c++/13/bits/stl_map.h" 3 > std::pair<iterator, bool> > insert(const value_type& __x) > { return _M_t._M_insert_unique(__x); } > > > > > std::pair<iterator, bool> > insert(value_type&& __x) > { return _M_t._M_insert_unique(std::move(__x)); } > > template<typename _Pair> > __enable_if_t<is_constructible<value_type, _Pair>::value, > pair<iterator, bool>> > insert(_Pair&& __x) > { > > using _P2 = remove_reference_t<_Pair>; > if constexpr (__is_pair<remove_const_t<_P2>>) > if constexpr (is_same_v<allocator_type, allocator<value_type>>) > if constexpr (__usable_key<typename _P2::first_type>) > { > const key_type& __k = __x.first; > iterator __i = lower_bound(__k); > if (__i == end() || key_comp()(__k, (*__i).first)) > { > __i = emplace_hint(__i, std::forward<_Pair>(__x)); > return {__i, true}; > } > return {__i, false}; > } > > return _M_t._M_emplace_unique(std::forward<_Pair>(__x)); > } ># 877 "/usr/include/c++/13/bits/stl_map.h" 3 > void > insert(std::initializer_list<value_type> __list) > { insert(__list.begin(), __list.end()); } ># 906 "/usr/include/c++/13/bits/stl_map.h" 3 > iterator > > insert(const_iterator __position, const value_type& __x) > > > > { return _M_t._M_insert_unique_(__position, __x); } > > > > > iterator > insert(const_iterator __position, value_type&& __x) > { return _M_t._M_insert_unique_(__position, std::move(__x)); } > > template<typename _Pair> > __enable_if_t<is_constructible<value_type, _Pair>::value, iterator> > insert(const_iterator __position, _Pair&& __x) > { > return _M_t._M_emplace_hint_unique(__position, > std::forward<_Pair>(__x)); > } ># 939 "/usr/include/c++/13/bits/stl_map.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_t._M_insert_range_unique(__first, __last); } ># 964 "/usr/include/c++/13/bits/stl_map.h" 3 > template <typename _Obj> > pair<iterator, bool> > insert_or_assign(const key_type& __k, _Obj&& __obj) > { > iterator __i = lower_bound(__k); > if (__i == end() || key_comp()(__k, (*__i).first)) > { > __i = emplace_hint(__i, std::piecewise_construct, > std::forward_as_tuple(__k), > std::forward_as_tuple( > std::forward<_Obj>(__obj))); > return {__i, true}; > } > (*__i).second = std::forward<_Obj>(__obj); > return {__i, false}; > } > > > template <typename _Obj> > pair<iterator, bool> > insert_or_assign(key_type&& __k, _Obj&& __obj) > { > iterator __i = lower_bound(__k); > if (__i == end() || key_comp()(__k, (*__i).first)) > { > __i = emplace_hint(__i, std::piecewise_construct, > std::forward_as_tuple(std::move(__k)), > std::forward_as_tuple( > std::forward<_Obj>(__obj))); > return {__i, true}; > } > (*__i).second = std::forward<_Obj>(__obj); > return {__i, false}; > } ># 1019 "/usr/include/c++/13/bits/stl_map.h" 3 > template <typename _Obj> > iterator > insert_or_assign(const_iterator __hint, > const key_type& __k, _Obj&& __obj) > { > iterator __i; > auto __true_hint = _M_t._M_get_insert_hint_unique_pos(__hint, __k); > if (__true_hint.second) > { > return emplace_hint(iterator(__true_hint.second), > std::piecewise_construct, > std::forward_as_tuple(__k), > std::forward_as_tuple( > std::forward<_Obj>(__obj))); > } > __i = iterator(__true_hint.first); > (*__i).second = std::forward<_Obj>(__obj); > return __i; > } > > > template <typename _Obj> > iterator > insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) > { > iterator __i; > auto __true_hint = _M_t._M_get_insert_hint_unique_pos(__hint, __k); > if (__true_hint.second) > { > return emplace_hint(iterator(__true_hint.second), > std::piecewise_construct, > std::forward_as_tuple(std::move(__k)), > std::forward_as_tuple( > std::forward<_Obj>(__obj))); > } > __i = iterator(__true_hint.first); > (*__i).second = std::forward<_Obj>(__obj); > return __i; > } ># 1078 "/usr/include/c++/13/bits/stl_map.h" 3 > iterator > erase(const_iterator __position) > { return _M_t.erase(__position); } > > > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(iterator __position) > { return _M_t.erase(__position); } ># 1115 "/usr/include/c++/13/bits/stl_map.h" 3 > size_type > erase(const key_type& __x) > { return _M_t.erase(__x); } ># 1135 "/usr/include/c++/13/bits/stl_map.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_t.erase(__first, __last); } ># 1169 "/usr/include/c++/13/bits/stl_map.h" 3 > void > swap(map& __x) > noexcept(__is_nothrow_swappable<_Compare>::value) > { _M_t.swap(__x._M_t); } > > > > > > > > void > clear() noexcept > { _M_t.clear(); } > > > > > > > key_compare > key_comp() const > { return _M_t.key_comp(); } > > > > > > value_compare > value_comp() const > { return value_compare(_M_t.key_comp()); } ># 1216 "/usr/include/c++/13/bits/stl_map.h" 3 > iterator > find(const key_type& __x) > { return _M_t.find(__x); } > > > template<typename _Kt> > auto > find(const _Kt& __x) -> decltype(_M_t._M_find_tr(__x)) > { return _M_t._M_find_tr(__x); } ># 1241 "/usr/include/c++/13/bits/stl_map.h" 3 > const_iterator > find(const key_type& __x) const > { return _M_t.find(__x); } > > > template<typename _Kt> > auto > find(const _Kt& __x) const -> decltype(_M_t._M_find_tr(__x)) > { return _M_t._M_find_tr(__x); } ># 1262 "/usr/include/c++/13/bits/stl_map.h" 3 > size_type > count(const key_type& __x) const > { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } > > > template<typename _Kt> > auto > count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) > { return _M_t._M_count_tr(__x); } ># 1305 "/usr/include/c++/13/bits/stl_map.h" 3 > iterator > lower_bound(const key_type& __x) > { return _M_t.lower_bound(__x); } > > > template<typename _Kt> > auto > lower_bound(const _Kt& __x) > -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) > { return iterator(_M_t._M_lower_bound_tr(__x)); } ># 1330 "/usr/include/c++/13/bits/stl_map.h" 3 > const_iterator > lower_bound(const key_type& __x) const > { return _M_t.lower_bound(__x); } > > > template<typename _Kt> > auto > lower_bound(const _Kt& __x) const > -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) > { return const_iterator(_M_t._M_lower_bound_tr(__x)); } ># 1350 "/usr/include/c++/13/bits/stl_map.h" 3 > iterator > upper_bound(const key_type& __x) > { return _M_t.upper_bound(__x); } > > > template<typename _Kt> > auto > upper_bound(const _Kt& __x) > -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) > { return iterator(_M_t._M_upper_bound_tr(__x)); } ># 1370 "/usr/include/c++/13/bits/stl_map.h" 3 > const_iterator > upper_bound(const key_type& __x) const > { return _M_t.upper_bound(__x); } > > > template<typename _Kt> > auto > upper_bound(const _Kt& __x) const > -> decltype(const_iterator(_M_t._M_upper_bound_tr(__x))) > { return const_iterator(_M_t._M_upper_bound_tr(__x)); } ># 1399 "/usr/include/c++/13/bits/stl_map.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_t.equal_range(__x); } > > > template<typename _Kt> > auto > equal_range(const _Kt& __x) > -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) > { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } ># 1428 "/usr/include/c++/13/bits/stl_map.h" 3 > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_t.equal_range(__x); } > > > template<typename _Kt> > auto > equal_range(const _Kt& __x) const > -> decltype(pair<const_iterator, const_iterator>( > _M_t._M_equal_range_tr(__x))) > { > return pair<const_iterator, const_iterator>( > _M_t._M_equal_range_tr(__x)); > } > > > > template<typename _K1, typename _T1, typename _C1, typename _A1> > friend bool > operator==(const map<_K1, _T1, _C1, _A1>&, > const map<_K1, _T1, _C1, _A1>&); > > > > > > > > template<typename _K1, typename _T1, typename _C1, typename _A1> > friend bool > operator<(const map<_K1, _T1, _C1, _A1>&, > const map<_K1, _T1, _C1, _A1>&); > > }; > > > > > template<typename _InputIterator, > typename _Compare = less<__iter_key_t<_InputIterator>>, > typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireAllocator<_Allocator>> > map(_InputIterator, _InputIterator, > _Compare = _Compare(), _Allocator = _Allocator()) > -> map<__iter_key_t<_InputIterator>, __iter_val_t<_InputIterator>, > _Compare, _Allocator>; > > template<typename _Key, typename _Tp, typename _Compare = less<_Key>, > typename _Allocator = allocator<pair<const _Key, _Tp>>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireAllocator<_Allocator>> > map(initializer_list<pair<_Key, _Tp>>, > _Compare = _Compare(), _Allocator = _Allocator()) > -> map<_Key, _Tp, _Compare, _Allocator>; > > template <typename _InputIterator, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > map(_InputIterator, _InputIterator, _Allocator) > -> map<__iter_key_t<_InputIterator>, __iter_val_t<_InputIterator>, > less<__iter_key_t<_InputIterator>>, _Allocator>; > > template<typename _Key, typename _Tp, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > map(initializer_list<pair<_Key, _Tp>>, _Allocator) > -> map<_Key, _Tp, less<_Key>, _Allocator>; ># 1509 "/usr/include/c++/13/bits/stl_map.h" 3 > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, > const map<_Key, _Tp, _Compare, _Alloc>& __y) > { return __x._M_t == __y._M_t; } ># 1547 "/usr/include/c++/13/bits/stl_map.h" 3 > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, > const map<_Key, _Tp, _Compare, _Alloc>& __y) > { return __x._M_t < __y._M_t; } > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, > const map<_Key, _Tp, _Compare, _Alloc>& __y) > { return !(__x == __y); } > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, > const map<_Key, _Tp, _Compare, _Alloc>& __y) > { return __y < __x; } > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, > const map<_Key, _Tp, _Compare, _Alloc>& __y) > { return !(__y < __x); } > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, > const map<_Key, _Tp, _Compare, _Alloc>& __y) > { return !(__x < __y); } > > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline void > swap(map<_Key, _Tp, _Compare, _Alloc>& __x, > map<_Key, _Tp, _Compare, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > > > > > 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>; > > static auto& > _S_get_tree(std::map<_Key, _Val, _Cmp2, _Alloc>& __map) > { return __map._M_t; } > > static auto& > _S_get_tree(std::multimap<_Key, _Val, _Cmp2, _Alloc>& __map) > { return __map._M_t; } > }; > > > >} ># 57 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/stl_vector.h" 1 3 ># 78 "/usr/include/c++/13/bits/stl_vector.h" 3 >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; > > > _Vector_impl_data() noexcept > : _M_start(), _M_finish(), _M_end_of_storage() > { } > > > > _Vector_impl_data(_Vector_impl_data&& __x) noexcept > : _M_start(__x._M_start), _M_finish(__x._M_finish), > _M_end_of_storage(__x._M_end_of_storage) > { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); } > > > > void > _M_copy_data(_Vector_impl_data const& __x) noexcept > { > _M_start = __x._M_start; > _M_finish = __x._M_finish; > _M_end_of_storage = __x._M_end_of_storage; > } > > > void > _M_swap_data(_Vector_impl_data& __x) noexcept > { > > > _Vector_impl_data __tmp; > __tmp._M_copy_data(*this); > _M_copy_data(__x); > __x._M_copy_data(__tmp); > } > }; > > struct _Vector_impl > : public _Tp_alloc_type, public _Vector_impl_data > { > > _Vector_impl() noexcept(is_nothrow_default_constructible<_Tp_alloc_type>::value) > > : _Tp_alloc_type() > { } > > > _Vector_impl(_Tp_alloc_type const& __a) noexcept > : _Tp_alloc_type(__a) > { } > > > > > > _Vector_impl(_Vector_impl&& __x) noexcept > : _Tp_alloc_type(std::move(__x)), _Vector_impl_data(std::move(__x)) > { } > > > _Vector_impl(_Tp_alloc_type&& __a) noexcept > : _Tp_alloc_type(std::move(__a)) > { } > > > _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept > : _Tp_alloc_type(std::move(__a)), _Vector_impl_data(std::move(__rv)) > { } ># 291 "/usr/include/c++/13/bits/stl_vector.h" 3 > }; > > public: > typedef _Alloc allocator_type; > > > _Tp_alloc_type& > _M_get_Tp_allocator() noexcept > { return this->_M_impl; } > > > const _Tp_alloc_type& > _M_get_Tp_allocator() const noexcept > { return this->_M_impl; } > > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_get_Tp_allocator()); } > > > _Vector_base() = default; > > > > > > _Vector_base(const allocator_type& __a) noexcept > : _M_impl(__a) { } > > > > > _Vector_base(size_t __n) > : _M_impl() > { _M_create_storage(__n); } > > > > _Vector_base(size_t __n, const allocator_type& __a) > : _M_impl(__a) > { _M_create_storage(__n); } > > > _Vector_base(_Vector_base&&) = default; > > > > > _Vector_base(_Tp_alloc_type&& __a) noexcept > : _M_impl(std::move(__a)) { } > > > _Vector_base(_Vector_base&& __x, const allocator_type& __a) > : _M_impl(__a) > { > if (__x.get_allocator() == __a) > this->_M_impl._M_swap_data(__x._M_impl); > else > { > size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; > _M_create_storage(__n); > } > } > > > > _Vector_base(const allocator_type& __a, _Vector_base&& __x) > : _M_impl(_Tp_alloc_type(__a), std::move(__x._M_impl)) > { } > > > > ~_Vector_base() noexcept > { > _M_deallocate(_M_impl._M_start, > _M_impl._M_end_of_storage - _M_impl._M_start); > } > > public: > _Vector_impl _M_impl; > > > pointer > _M_allocate(size_t __n) > { > typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; > return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); > } > > > void > _M_deallocate(pointer __p, size_t __n) > { > typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; > if (__p) > _Tr::deallocate(_M_impl, __p, __n); > } > > protected: > > void > _M_create_storage(size_t __n) > { > this->_M_impl._M_start = this->_M_allocate(__n); > this->_M_impl._M_finish = this->_M_impl._M_start; > this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; > } > }; ># 422 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename _Tp, typename _Alloc = std::allocator<_Tp> > > class vector : protected _Vector_base<_Tp, _Alloc> > { ># 435 "/usr/include/c++/13/bits/stl_vector.h" 3 > static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, > "std::vector must have a non-const, non-volatile value_type"); > > 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) > { > return noexcept(std::__relocate_a(std::declval<pointer>(), > std::declval<pointer>(), > std::declval<pointer>(), > std::declval<_Tp_alloc_type&>())); > } > > static constexpr bool > _S_nothrow_relocate(false_type) > { return false; } > > static constexpr bool > _S_use_relocate() > { > > > > return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{}); > } > > static pointer > _S_do_relocate(pointer __first, pointer __last, pointer __result, > _Tp_alloc_type& __alloc, true_type) noexcept > { > return std::__relocate_a(__first, __last, __result, __alloc); > } > > static pointer > _S_do_relocate(pointer, pointer, pointer __result, > _Tp_alloc_type&, false_type) noexcept > { return __result; } > > static pointer > _S_relocate(pointer __first, pointer __last, pointer __result, > _Tp_alloc_type& __alloc) noexcept > { > > > return std::__relocate_a(__first, __last, __result, __alloc); > > > > > } > > > protected: > using _Base::_M_allocate; > using _Base::_M_deallocate; > using _Base::_M_impl; > using _Base::_M_get_Tp_allocator; > > public: > > > > > > > > vector() = default; ># 535 "/usr/include/c++/13/bits/stl_vector.h" 3 > explicit > > vector(const allocator_type& __a) noexcept > : _Base(__a) { } ># 549 "/usr/include/c++/13/bits/stl_vector.h" 3 > explicit > > vector(size_type __n, const allocator_type& __a = allocator_type()) > : _Base(_S_check_init_len(__n, __a), __a) > { _M_default_initialize(__n); } ># 563 "/usr/include/c++/13/bits/stl_vector.h" 3 > > vector(size_type __n, const value_type& __value, > const allocator_type& __a = allocator_type()) > : _Base(_S_check_init_len(__n, __a), __a) > { _M_fill_initialize(__n, __value); } ># 595 "/usr/include/c++/13/bits/stl_vector.h" 3 > > vector(const vector& __x) > : _Base(__x.size(), > _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) > { > this->_M_impl._M_finish = > std::__uninitialized_copy_a(__x.begin(), __x.end(), > this->_M_impl._M_start, > _M_get_Tp_allocator()); > } ># 615 "/usr/include/c++/13/bits/stl_vector.h" 3 > vector(vector&&) noexcept = default; > > > > vector(const vector& __x, const __type_identity_t<allocator_type>& __a) > : _Base(__x.size(), __a) > { > this->_M_impl._M_finish = > std::__uninitialized_copy_a(__x.begin(), __x.end(), > this->_M_impl._M_start, > _M_get_Tp_allocator()); > } > > private: > > vector(vector&& __rv, const allocator_type& __m, true_type) noexcept > : _Base(__m, std::move(__rv)) > { } > > > vector(vector&& __rv, const allocator_type& __m, false_type) > : _Base(__m) > { > if (__rv.get_allocator() == __m) > this->_M_impl._M_swap_data(__rv._M_impl); > else if (!__rv.empty()) > { > this->_M_create_storage(__rv.size()); > this->_M_impl._M_finish = > std::__uninitialized_move_a(__rv.begin(), __rv.end(), > this->_M_impl._M_start, > _M_get_Tp_allocator()); > __rv.clear(); > } > } > > public: > > > 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>())) ) > : vector(std::move(__rv), __m, typename _Alloc_traits::is_always_equal{}) > { } ># 672 "/usr/include/c++/13/bits/stl_vector.h" 3 > > vector(initializer_list<value_type> __l, > const allocator_type& __a = allocator_type()) > : _Base(__a) > { > _M_range_initialize(__l.begin(), __l.end(), > random_access_iterator_tag()); > } ># 699 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > vector(_InputIterator __first, _InputIterator __last, > const allocator_type& __a = allocator_type()) > : _Base(__a) > { > _M_range_initialize(__first, __last, > std::__iterator_category(__first)); > } ># 727 "/usr/include/c++/13/bits/stl_vector.h" 3 > > ~vector() noexcept > { > std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, > _M_get_Tp_allocator()); > ; > } ># 744 "/usr/include/c++/13/bits/stl_vector.h" 3 > > vector& > operator=(const vector& __x); ># 759 "/usr/include/c++/13/bits/stl_vector.h" 3 > > vector& > operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) > { > constexpr bool __move_storage = > _Alloc_traits::_S_propagate_on_move_assign() > || _Alloc_traits::_S_always_equal(); > _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); > return *this; > } ># 781 "/usr/include/c++/13/bits/stl_vector.h" 3 > > vector& > operator=(initializer_list<value_type> __l) > { > this->_M_assign_aux(__l.begin(), __l.end(), > random_access_iterator_tag()); > return *this; > } ># 801 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > assign(size_type __n, const value_type& __val) > { _M_fill_assign(__n, __val); } ># 819 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > void > assign(_InputIterator __first, _InputIterator __last) > { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } ># 848 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > assign(initializer_list<value_type> __l) > { > this->_M_assign_aux(__l.begin(), __l.end(), > random_access_iterator_tag()); > } > > > > using _Base::get_allocator; > > > > > > > > [[__nodiscard__]] > iterator > begin() noexcept > { return iterator(this->_M_impl._M_start); } > > > > > > > [[__nodiscard__]] > const_iterator > begin() const noexcept > { return const_iterator(this->_M_impl._M_start); } > > > > > > > [[__nodiscard__]] > iterator > end() noexcept > { return iterator(this->_M_impl._M_finish); } > > > > > > > [[__nodiscard__]] > const_iterator > end() const noexcept > { return const_iterator(this->_M_impl._M_finish); } > > > > > > > [[__nodiscard__]] > reverse_iterator > rbegin() noexcept > { return reverse_iterator(end()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > rbegin() const noexcept > { return const_reverse_iterator(end()); } > > > > > > > [[__nodiscard__]] > reverse_iterator > rend() noexcept > { return reverse_iterator(begin()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > rend() const noexcept > { return const_reverse_iterator(begin()); } > > > > > > > > [[__nodiscard__]] > const_iterator > cbegin() const noexcept > { return const_iterator(this->_M_impl._M_start); } > > > > > > > [[__nodiscard__]] > const_iterator > cend() const noexcept > { return const_iterator(this->_M_impl._M_finish); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > crbegin() const noexcept > { return const_reverse_iterator(end()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > crend() const noexcept > { return const_reverse_iterator(begin()); } > > > > > [[__nodiscard__]] > size_type > size() const noexcept > { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } > > > [[__nodiscard__]] > size_type > max_size() const noexcept > { return _S_max_size(_M_get_Tp_allocator()); } ># 1006 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > resize(size_type __new_size) > { > if (__new_size > size()) > _M_default_append(__new_size - size()); > else if (__new_size < size()) > _M_erase_at_end(this->_M_impl._M_start + __new_size); > } ># 1027 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > resize(size_type __new_size, const value_type& __x) > { > if (__new_size > size()) > _M_fill_insert(end(), __new_size - size(), __x); > else if (__new_size < size()) > _M_erase_at_end(this->_M_impl._M_start + __new_size); > } ># 1061 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > shrink_to_fit() > { _M_shrink_to_fit(); } > > > > > > > [[__nodiscard__]] > size_type > capacity() const noexcept > { return size_type(this->_M_impl._M_end_of_storage > - this->_M_impl._M_start); } > > > > > > [[__nodiscard__]] > bool > empty() const noexcept > { return begin() == end(); } ># 1103 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > reserve(size_type __n); ># 1119 "/usr/include/c++/13/bits/stl_vector.h" 3 > [[__nodiscard__]] > reference > operator[](size_type __n) noexcept > { > ; > return *(this->_M_impl._M_start + __n); > } ># 1138 "/usr/include/c++/13/bits/stl_vector.h" 3 > [[__nodiscard__]] > const_reference > operator[](size_type __n) const noexcept > { > ; > return *(this->_M_impl._M_start + __n); > } > > protected: > > > void > _M_range_check(size_type __n) const > { > if (__n >= this->size()) > __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") > > , > __n, this->size()); > } > > public: ># 1171 "/usr/include/c++/13/bits/stl_vector.h" 3 > > reference > at(size_type __n) > { > _M_range_check(__n); > return (*this)[__n]; > } ># 1190 "/usr/include/c++/13/bits/stl_vector.h" 3 > > const_reference > at(size_type __n) const > { > _M_range_check(__n); > return (*this)[__n]; > } > > > > > > [[__nodiscard__]] > reference > front() noexcept > { > ; > return *begin(); > } > > > > > > [[__nodiscard__]] > const_reference > front() const noexcept > { > ; > return *begin(); > } > > > > > > [[__nodiscard__]] > reference > back() noexcept > { > ; > return *(end() - 1); > } > > > > > > [[__nodiscard__]] > const_reference > back() const noexcept > { > ; > return *(end() - 1); > } ># 1253 "/usr/include/c++/13/bits/stl_vector.h" 3 > [[__nodiscard__]] > _Tp* > data() noexcept > { return _M_data_ptr(this->_M_impl._M_start); } > > [[__nodiscard__]] > const _Tp* > data() const noexcept > { return _M_data_ptr(this->_M_impl._M_start); } ># 1274 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > push_back(const value_type& __x) > { > if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) > { > ; > _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, > __x); > ++this->_M_impl._M_finish; > ; > } > else > _M_realloc_insert(end(), __x); > } > > > > void > push_back(value_type&& __x) > { emplace_back(std::move(__x)); } > > template<typename... _Args> > > > reference > > > > emplace_back(_Args&&... __args); ># 1315 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > pop_back() noexcept > { > ; > --this->_M_impl._M_finish; > _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); > ; > } ># 1338 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename... _Args> > > iterator > emplace(const_iterator __position, _Args&&... __args) > { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } ># 1355 "/usr/include/c++/13/bits/stl_vector.h" 3 > > iterator > insert(const_iterator __position, const value_type& __x); ># 1386 "/usr/include/c++/13/bits/stl_vector.h" 3 > > iterator > insert(const_iterator __position, value_type&& __x) > { return _M_insert_rval(__position, std::move(__x)); } ># 1404 "/usr/include/c++/13/bits/stl_vector.h" 3 > > iterator > insert(const_iterator __position, initializer_list<value_type> __l) > { > auto __offset = __position - cbegin(); > _M_range_insert(begin() + __offset, __l.begin(), __l.end(), > std::random_access_iterator_tag()); > return begin() + __offset; > } ># 1430 "/usr/include/c++/13/bits/stl_vector.h" 3 > > iterator > insert(const_iterator __position, size_type __n, const value_type& __x) > { > difference_type __offset = __position - cbegin(); > _M_fill_insert(begin() + __offset, __n, __x); > return begin() + __offset; > } ># 1473 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > iterator > insert(const_iterator __position, _InputIterator __first, > _InputIterator __last) > { > difference_type __offset = __position - cbegin(); > _M_range_insert(begin() + __offset, __first, __last, > std::__iterator_category(__first)); > return begin() + __offset; > } ># 1526 "/usr/include/c++/13/bits/stl_vector.h" 3 > > iterator > > erase(const_iterator __position) > { return _M_erase(begin() + (__position - cbegin())); } ># 1554 "/usr/include/c++/13/bits/stl_vector.h" 3 > > iterator > > erase(const_iterator __first, const_iterator __last) > { > const auto __beg = begin(); > const auto __cbeg = cbegin(); > return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); > } ># 1579 "/usr/include/c++/13/bits/stl_vector.h" 3 > > void > swap(vector& __x) noexcept > { > > do { if (std::__is_constant_evaluated() && !bool(_Alloc_traits::propagate_on_container_swap::value || _M_get_Tp_allocator() == __x._M_get_Tp_allocator())) __builtin_unreachable(); } while (false) > ; > > this->_M_impl._M_swap_data(__x._M_impl); > _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), > __x._M_get_Tp_allocator()); > } > > > > > > > > > void > clear() noexcept > { _M_erase_at_end(this->_M_impl._M_start); } > > protected: > > > > > template<typename _ForwardIterator> > > pointer > _M_allocate_and_copy(size_type __n, > _ForwardIterator __first, _ForwardIterator __last) > { > pointer __result = this->_M_allocate(__n); > try > { > std::__uninitialized_copy_a(__first, __last, __result, > _M_get_Tp_allocator()); > return __result; > } > catch(...) > { > _M_deallocate(__result, __n); > throw; > } > } ># 1659 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename _InputIterator> > > void > _M_range_initialize(_InputIterator __first, _InputIterator __last, > std::input_iterator_tag) > { > try { > for (; __first != __last; ++__first) > > emplace_back(*__first); > > > > } catch(...) { > clear(); > throw; > } > } > > > template<typename _ForwardIterator> > > void > _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, > std::forward_iterator_tag) > { > const size_type __n = std::distance(__first, __last); > this->_M_impl._M_start > = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); > this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; > this->_M_impl._M_finish = > std::__uninitialized_copy_a(__first, __last, > this->_M_impl._M_start, > _M_get_Tp_allocator()); > } > > > > > void > _M_fill_initialize(size_type __n, const value_type& __value) > { > this->_M_impl._M_finish = > std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, > _M_get_Tp_allocator()); > } > > > > > void > _M_default_initialize(size_type __n) > { > this->_M_impl._M_finish = > std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, > _M_get_Tp_allocator()); > } ># 1725 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename _Integer> > > void > _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) > { _M_fill_assign(__n, __val); } > > > template<typename _InputIterator> > > void > _M_assign_dispatch(_InputIterator __first, _InputIterator __last, > __false_type) > { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } > > > 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 _Integer> > > void > _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, > __true_type) > { _M_fill_insert(__pos, __n, __val); } > > > template<typename _InputIterator> > > void > _M_insert_dispatch(iterator __pos, _InputIterator __first, > _InputIterator __last, __false_type) > { > _M_range_insert(__pos, __first, __last, > std::__iterator_category(__first)); > } > > > template<typename _InputIterator> > > void > _M_range_insert(iterator __pos, _InputIterator __first, > _InputIterator __last, std::input_iterator_tag); > > > template<typename _ForwardIterator> > > void > _M_range_insert(iterator __pos, _ForwardIterator __first, > _ForwardIterator __last, std::forward_iterator_tag); > > > > > void > _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); > > > > > void > _M_default_append(size_type __n); > > > bool > _M_shrink_to_fit(); ># 1824 "/usr/include/c++/13/bits/stl_vector.h" 3 > struct _Temporary_value > { > template<typename... _Args> > explicit > _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) > { > _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), > std::forward<_Args>(__args)...); > } > > > ~_Temporary_value() > { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } > > value_type& > _M_val() noexcept { return _M_storage._M_val; } > > private: > _Tp* > _M_ptr() noexcept { return std::__addressof(_M_storage._M_val); } > > union _Storage > { > constexpr _Storage() : _M_byte() { } > ~_Storage() { } > _Storage& operator=(const _Storage&) = delete; > unsigned char _M_byte; > _Tp _M_val; > }; > > vector* _M_this; > _Storage _M_storage; > }; > > > > template<typename _Arg> > > void > _M_insert_aux(iterator __position, _Arg&& __arg); > > template<typename... _Args> > > void > _M_realloc_insert(iterator __position, _Args&&... __args); > > > > iterator > _M_insert_rval(const_iterator __position, value_type&& __v); > > > template<typename... _Args> > > iterator > _M_emplace_aux(const_iterator __position, _Args&&... __args); > > > > iterator > _M_emplace_aux(const_iterator __position, value_type&& __v) > { return _M_insert_rval(__position, std::move(__v)); } > > > > > size_type > _M_check_len(size_type __n, const char* __s) const > { > if (max_size() - size() < __n) > __throw_length_error((__s)); > > const size_type __len = size() + (std::max)(size(), __n); > return (__len < size() || __len > max_size()) ? max_size() : __len; > } > > > static size_type > _S_check_init_len(size_type __n, const allocator_type& __a) > { > if (__n > _S_max_size(_Tp_alloc_type(__a))) > __throw_length_error( > ("cannot create std::vector larger than max_size()")); > return __n; > } > > static size_type > _S_max_size(const _Tp_alloc_type& __a) noexcept > { > > > > const size_t __diffmax > = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp); > const size_t __allocmax = _Alloc_traits::max_size(__a); > return (std::min)(__diffmax, __allocmax); > } > > > > > > > void > _M_erase_at_end(pointer __pos) noexcept > { > if (size_type __n = this->_M_impl._M_finish - __pos) > { > std::_Destroy(__pos, this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = __pos; > ; > } > } > > > iterator > _M_erase(iterator __position); > > > iterator > _M_erase(iterator __first, iterator __last); > > > private: > > > > > void > _M_move_assign(vector&& __x, true_type) noexcept > { > vector __tmp(get_allocator()); > this->_M_impl._M_swap_data(__x._M_impl); > __tmp._M_impl._M_swap_data(__x._M_impl); > std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); > } > > > > > void > _M_move_assign(vector&& __x, false_type) > { > if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) > _M_move_assign(std::move(__x), true_type()); > else > { > > > this->_M_assign_aux(std::make_move_iterator(__x.begin()), > std::make_move_iterator(__x.end()), > std::random_access_iterator_tag()); > __x.clear(); > } > } > > > template<typename _Up> > > _Up* > _M_data_ptr(_Up* __ptr) const noexcept > { return __ptr; } > > > template<typename _Ptr> > > typename std::pointer_traits<_Ptr>::element_type* > _M_data_ptr(_Ptr __ptr) const > { return empty() ? nullptr : std::__to_address(__ptr); } ># 2010 "/usr/include/c++/13/bits/stl_vector.h" 3 > }; > > > template<typename _InputIterator, typename _ValT > = typename iterator_traits<_InputIterator>::value_type, > typename _Allocator = allocator<_ValT>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > vector(_InputIterator, _InputIterator, _Allocator = _Allocator()) > -> vector<_ValT, _Allocator>; ># 2032 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename _Tp, typename _Alloc> > > inline bool > operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) > { return (__x.size() == __y.size() > && std::equal(__x.begin(), __x.end(), __y.begin())); } ># 2072 "/usr/include/c++/13/bits/stl_vector.h" 3 > template<typename _Tp, typename _Alloc> > inline bool > operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) > { return std::lexicographical_compare(__x.begin(), __x.end(), > __y.begin(), __y.end()); } > > > template<typename _Tp, typename _Alloc> > inline bool > operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) > { return !(__x == __y); } > > > template<typename _Tp, typename _Alloc> > inline bool > operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) > { return __y < __x; } > > > template<typename _Tp, typename _Alloc> > inline bool > operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) > { return !(__y < __x); } > > > template<typename _Tp, typename _Alloc> > inline bool > operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) > { return !(__x < __y); } > > > > template<typename _Tp, typename _Alloc> > > inline void > swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __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>> > { }; > } > > > >} ># 58 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/stl_bvector.h" 1 3 ># 64 "/usr/include/c++/13/bits/stl_bvector.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > typedef unsigned long _Bit_type; > enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; > > __attribute__((__nonnull__)) > > void > __fill_bvector_n(_Bit_type*, size_t, bool) noexcept; > > > > struct _Bit_reference > { > _Bit_type * _M_p; > _Bit_type _M_mask; > > > _Bit_reference(_Bit_type * __x, _Bit_type __y) > : _M_p(__x), _M_mask(__y) { } > > > _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } > > > _Bit_reference(const _Bit_reference&) = default; > > > [[__nodiscard__]] > operator bool() const noexcept > { return !!(*_M_p & _M_mask); } > > > _Bit_reference& > operator=(bool __x) noexcept > { > if (__x) > *_M_p |= _M_mask; > else > *_M_p &= ~_M_mask; > return *this; > } ># 121 "/usr/include/c++/13/bits/stl_bvector.h" 3 > > _Bit_reference& > operator=(const _Bit_reference& __x) noexcept > { return *this = bool(__x); } > > [[__nodiscard__]] > bool > operator==(const _Bit_reference& __x) const > { return bool(*this) == bool(__x); } > > [[__nodiscard__]] > bool > operator<(const _Bit_reference& __x) const > { return !bool(*this) && bool(__x); } > > > void > flip() noexcept > { *_M_p ^= _M_mask; } > > > > friend void > swap(_Bit_reference __x, _Bit_reference __y) noexcept > { > bool __tmp = __x; > __x = __y; > __y = __tmp; > } > > > friend void > swap(_Bit_reference __x, bool& __y) noexcept > { > bool __tmp = __x; > __x = __y; > __y = __tmp; > } > > > friend void > swap(bool& __x, _Bit_reference __y) noexcept > { > bool __tmp = __x; > __x = __y; > __y = __tmp; > } > > }; > > >#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; > > > _Bit_iterator_base(_Bit_type * __x, unsigned int __y) > : _M_p(__x), _M_offset(__y) { } > > > void > _M_bump_up() > { > if (_M_offset++ == int(_S_word_bit) - 1) > { > _M_offset = 0; > ++_M_p; > } > } > > > void > _M_bump_down() > { > if (_M_offset-- == 0) > { > _M_offset = int(_S_word_bit) - 1; > --_M_p; > } > } > > > void > _M_incr(ptrdiff_t __i) > { > difference_type __n = __i + _M_offset; > _M_p += __n / int(_S_word_bit); > __n = __n % int(_S_word_bit); > if (__n < 0) > { > __n += int(_S_word_bit); > --_M_p; > } > _M_offset = static_cast<unsigned int>(__n); > } > > [[__nodiscard__]] > friend bool > operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) > { return __x._M_p == __y._M_p && __x._M_offset == __y._M_offset; } ># 237 "/usr/include/c++/13/bits/stl_bvector.h" 3 > [[__nodiscard__]] > friend bool > operator<(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) > { > return __x._M_p < __y._M_p > || (__x._M_p == __y._M_p && __x._M_offset < __y._M_offset); > } > > [[__nodiscard__]] > friend bool > operator!=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) > { return !(__x == __y); } > > [[__nodiscard__]] > friend bool > operator>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) > { return __y < __x; } > > [[__nodiscard__]] > friend bool > operator<=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) > { return !(__y < __x); } > > [[__nodiscard__]] > friend bool > operator>=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) > { return !(__x < __y); } > > > friend ptrdiff_t > operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) > { > return (int(_S_word_bit) * (__x._M_p - __y._M_p) > + __x._M_offset - __y._M_offset); > } > }; >#pragma GCC diagnostic pop > > struct _Bit_iterator : public _Bit_iterator_base > { > typedef _Bit_reference reference; > > > > typedef _Bit_reference* pointer; > > typedef _Bit_iterator iterator; > > > _Bit_iterator() : _Bit_iterator_base(0, 0) { } > > > _Bit_iterator(_Bit_type * __x, unsigned int __y) > : _Bit_iterator_base(__x, __y) { } > > > iterator > _M_const_cast() const > { return *this; } > > [[__nodiscard__]] > reference > operator*() const > { return reference(_M_p, 1UL << _M_offset); } > > > iterator& > operator++() > { > _M_bump_up(); > return *this; > } > > > iterator > operator++(int) > { > iterator __tmp = *this; > _M_bump_up(); > return __tmp; > } > > > iterator& > operator--() > { > _M_bump_down(); > return *this; > } > > > iterator > operator--(int) > { > iterator __tmp = *this; > _M_bump_down(); > return __tmp; > } > > > iterator& > operator+=(difference_type __i) > { > _M_incr(__i); > return *this; > } > > > iterator& > operator-=(difference_type __i) > { > *this += -__i; > return *this; > } > > [[__nodiscard__]] > reference > operator[](difference_type __i) const > { return *(*this + __i); } > > [[__nodiscard__]] > friend iterator > operator+(const iterator& __x, difference_type __n) > { > iterator __tmp = __x; > __tmp += __n; > return __tmp; > } > > [[__nodiscard__]] > friend iterator > operator+(difference_type __n, const iterator& __x) > { return __x + __n; } > > [[__nodiscard__]] > friend 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 const bool* pointer; > > typedef _Bit_const_iterator const_iterator; > > > _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } > > > _Bit_const_iterator(_Bit_type * __x, unsigned int __y) > : _Bit_iterator_base(__x, __y) { } > > > _Bit_const_iterator(const _Bit_iterator& __x) > : _Bit_iterator_base(__x._M_p, __x._M_offset) { } > > > _Bit_iterator > _M_const_cast() const > { return _Bit_iterator(_M_p, _M_offset); } > > [[__nodiscard__]] > const_reference > operator*() const > { return _Bit_reference(_M_p, 1UL << _M_offset); } > > > const_iterator& > operator++() > { > _M_bump_up(); > return *this; > } > > > const_iterator > operator++(int) > { > const_iterator __tmp = *this; > _M_bump_up(); > return __tmp; > } > > > const_iterator& > operator--() > { > _M_bump_down(); > return *this; > } > > > const_iterator > operator--(int) > { > const_iterator __tmp = *this; > _M_bump_down(); > return __tmp; > } > > > const_iterator& > operator+=(difference_type __i) > { > _M_incr(__i); > return *this; > } > > > const_iterator& > operator-=(difference_type __i) > { > *this += -__i; > return *this; > } > > [[__nodiscard__]] > const_reference > operator[](difference_type __i) const > { return *(*this + __i); } > > [[__nodiscard__]] > friend const_iterator > operator+(const const_iterator& __x, difference_type __n) > { > const_iterator __tmp = __x; > __tmp += __n; > return __tmp; > } > > [[__nodiscard__]] > friend const_iterator > operator-(const const_iterator& __x, difference_type __n) > { > const_iterator __tmp = __x; > __tmp -= __n; > return __tmp; > } > > [[__nodiscard__]] > friend 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; ># 514 "/usr/include/c++/13/bits/stl_bvector.h" 3 > _Bit_iterator _M_finish; > _Bit_pointer _M_end_of_storage; > > > _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; > > > _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept > : _Bvector_impl_data(__x) > { __x._M_reset(); } > > > void > _M_move_data(_Bvector_impl_data&& __x) noexcept > { > *this = __x; > __x._M_reset(); > } > > > > void > _M_reset() noexcept > { *this = _Bvector_impl_data(); } > > > void > _M_swap_data(_Bvector_impl_data& __x) noexcept > { > > > std::swap(*this, __x); > } > }; > > struct _Bvector_impl > : public _Bit_alloc_type, public _Bvector_impl_data > { > > _Bvector_impl() noexcept(is_nothrow_default_constructible<_Bit_alloc_type>::value) > > : _Bit_alloc_type() > { } > > > _Bvector_impl(const _Bit_alloc_type& __a) noexcept > : _Bit_alloc_type(__a) > { } > > > > > > _Bvector_impl(_Bvector_impl&& __x) noexcept > : _Bit_alloc_type(std::move(__x)), _Bvector_impl_data(std::move(__x)) > { } > > > _Bvector_impl(_Bit_alloc_type&& __a, _Bvector_impl&& __x) noexcept > : _Bit_alloc_type(std::move(__a)), _Bvector_impl_data(std::move(__x)) > { } > > > > _Bit_type* > _M_end_addr() const noexcept > { > if (this->_M_end_of_storage) > return std::__addressof(this->_M_end_of_storage[-1]) + 1; > return 0; > } > }; > > public: > typedef _Alloc allocator_type; > > > _Bit_alloc_type& > _M_get_Bit_allocator() noexcept > { return this->_M_impl; } > > > const _Bit_alloc_type& > _M_get_Bit_allocator() const noexcept > { return this->_M_impl; } > > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_get_Bit_allocator()); } > > > _Bvector_base() = default; > > > > > > _Bvector_base(const allocator_type& __a) > : _M_impl(__a) { } > > > _Bvector_base(_Bvector_base&&) = default; > > > _Bvector_base(_Bvector_base&& __x, const allocator_type& __a) noexcept > : _M_impl(_Bit_alloc_type(__a), std::move(__x._M_impl)) > { } > > > > ~_Bvector_base() > { this->_M_deallocate(); } > > protected: > _Bvector_impl _M_impl; > > > _Bit_pointer > _M_allocate(size_t __n) > { > _Bit_pointer __p = _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); ># 652 "/usr/include/c++/13/bits/stl_bvector.h" 3 > return __p; > } > > > void > _M_deallocate() > { > if (_M_impl._M_start._M_p) > { > const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; > _Bit_alloc_traits::deallocate(_M_impl, > _M_impl._M_end_of_storage - __n, > __n); > _M_impl._M_reset(); > } > } > > > > void > _M_move_data(_Bvector_base&& __x) noexcept > { _M_impl._M_move_data(std::move(__x._M_impl)); } > > > constexpr > static size_t > _S_nword(size_t __n) > { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } > }; ># 701 "/usr/include/c++/13/bits/stl_bvector.h" 3 > 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; > > > allocator_type > get_allocator() const > { return _Base::get_allocator(); } > > protected: > using _Base::_M_allocate; > using _Base::_M_deallocate; > using _Base::_S_nword; > using _Base::_M_get_Bit_allocator; > > public: > > vector() = default; > > > > > > explicit > vector(const allocator_type& __a) > : _Base(__a) { } > > > > explicit > vector(size_type __n, const allocator_type& __a = allocator_type()) > : vector(__n, false, __a) > { } > > > vector(size_type __n, const bool& __value, > const allocator_type& __a = allocator_type()) > > > > > > : _Base(__a) > { > _M_initialize(__n); > _M_initialize_value(__value); > } > > > vector(const vector& __x) > : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator())) > { > _M_initialize(__x.size()); > _M_copy_aligned(__x.begin(), __x.end(), begin()); > } > > > vector(vector&&) = default; > > private: > > vector(vector&& __x, const allocator_type& __a, true_type) noexcept > : _Base(std::move(__x), __a) > { } > > > vector(vector&& __x, const allocator_type& __a, false_type) > : _Base(__a) > { > if (__x.get_allocator() == __a) > this->_M_move_data(std::move(__x)); > else > { > _M_initialize(__x.size()); > _M_copy_aligned(__x.begin(), __x.end(), begin()); > __x.clear(); > } > } > > public: > > vector(vector&& __x, const __type_identity_t<allocator_type>& __a) > noexcept(_Bit_alloc_traits::_S_always_equal()) > : vector(std::move(__x), __a, > typename _Bit_alloc_traits::is_always_equal{}) > { } > > > vector(const vector& __x, const __type_identity_t<allocator_type>& __a) > : _Base(__a) > { > _M_initialize(__x.size()); > _M_copy_aligned(__x.begin(), __x.end(), begin()); > } > > > vector(initializer_list<bool> __l, > const allocator_type& __a = allocator_type()) > : _Base(__a) > { > _M_initialize_range(__l.begin(), __l.end(), > random_access_iterator_tag()); > } > > > > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > vector(_InputIterator __first, _InputIterator __last, > const allocator_type& __a = allocator_type()) > : _Base(__a) > { > _M_initialize_range(__first, __last, > std::__iterator_category(__first)); > } ># 850 "/usr/include/c++/13/bits/stl_bvector.h" 3 > > ~vector() noexcept { } > > > vector& > operator=(const vector& __x) > { > if (&__x == this) > return *this; > > if (_Bit_alloc_traits::_S_propagate_on_copy_assign()) > { > if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator()) > { > this->_M_deallocate(); > std::__alloc_on_copy(_M_get_Bit_allocator(), > __x._M_get_Bit_allocator()); > _M_initialize(__x.size()); > } > else > std::__alloc_on_copy(_M_get_Bit_allocator(), > __x._M_get_Bit_allocator()); > } > > if (__x.size() > capacity()) > { > this->_M_deallocate(); > _M_initialize(__x.size()); > } > this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), > begin()); > return *this; > } > > > > vector& > operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) > { > if (_Bit_alloc_traits::_S_propagate_on_move_assign() > || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator()) > { > this->_M_deallocate(); > this->_M_move_data(std::move(__x)); > std::__alloc_on_move(_M_get_Bit_allocator(), > __x._M_get_Bit_allocator()); > } > else > { > if (__x.size() > capacity()) > { > this->_M_deallocate(); > _M_initialize(__x.size()); > } > this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), > begin()); > __x.clear(); > } > return *this; > } > > > vector& > operator=(initializer_list<bool> __l) > { > this->assign(__l.begin(), __l.end()); > return *this; > } > > > > > > > > void > assign(size_type __n, const bool& __x) > { _M_fill_assign(__n, __x); } > > > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > void > assign(_InputIterator __first, _InputIterator __last) > { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } ># 948 "/usr/include/c++/13/bits/stl_bvector.h" 3 > > void > assign(initializer_list<bool> __l) > { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } > > > [[__nodiscard__]] > iterator > begin() noexcept > { return iterator(this->_M_impl._M_start._M_p, 0); } > > [[__nodiscard__]] > const_iterator > begin() const noexcept > { return const_iterator(this->_M_impl._M_start._M_p, 0); } > > [[__nodiscard__]] > iterator > end() noexcept > { return this->_M_impl._M_finish; } > > [[__nodiscard__]] > const_iterator > end() const noexcept > { return this->_M_impl._M_finish; } > > [[__nodiscard__]] > reverse_iterator > rbegin() noexcept > { return reverse_iterator(end()); } > > [[__nodiscard__]] > const_reverse_iterator > rbegin() const noexcept > { return const_reverse_iterator(end()); } > > [[__nodiscard__]] > reverse_iterator > rend() noexcept > { return reverse_iterator(begin()); } > > [[__nodiscard__]] > const_reverse_iterator > rend() const noexcept > { return const_reverse_iterator(begin()); } > > > [[__nodiscard__]] > const_iterator > cbegin() const noexcept > { return const_iterator(this->_M_impl._M_start._M_p, 0); } > > [[__nodiscard__]] > const_iterator > cend() const noexcept > { return this->_M_impl._M_finish; } > > [[__nodiscard__]] > const_reverse_iterator > crbegin() const noexcept > { return const_reverse_iterator(end()); } > > [[__nodiscard__]] > const_reverse_iterator > crend() const noexcept > { return const_reverse_iterator(begin()); } > > > [[__nodiscard__]] > size_type > size() const noexcept > { return size_type(end() - begin()); } > > [[__nodiscard__]] > size_type > max_size() const noexcept > { > const size_type __isize = > __gnu_cxx::__numeric_traits<difference_type>::__max > - int(_S_word_bit) + 1; > const size_type __asize > = _Bit_alloc_traits::max_size(_M_get_Bit_allocator()); > return (__asize <= __isize / int(_S_word_bit) > ? __asize * int(_S_word_bit) : __isize); > } > > [[__nodiscard__]] > size_type > capacity() const noexcept > { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) > - begin()); } > > [[__nodiscard__]] > bool > empty() const noexcept > { return begin() == end(); } > > [[__nodiscard__]] > reference > operator[](size_type __n) > { return begin()[__n]; } > > [[__nodiscard__]] > const_reference > operator[](size_type __n) const > { return begin()[__n]; } > > protected: > > void > _M_range_check(size_type __n) const > { > if (__n >= this->size()) > __throw_out_of_range_fmt(("vector<bool>::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") > > , > __n, this->size()); > } > > public: > > reference > at(size_type __n) > { > _M_range_check(__n); > return (*this)[__n]; > } > > > const_reference > at(size_type __n) const > { > _M_range_check(__n); > return (*this)[__n]; > } > > > void > reserve(size_type __n) > { > if (__n > max_size()) > __throw_length_error(("vector::reserve")); > if (capacity() < __n) > _M_reallocate(__n); > } > > [[__nodiscard__]] > reference > front() > { return *begin(); } > > [[__nodiscard__]] > const_reference > front() const > { return *begin(); } > > [[__nodiscard__]] > reference > back() > { return *(end() - 1); } > > [[__nodiscard__]] > const_reference > back() const > { return *(end() - 1); } > > > void > push_back(bool __x) > { > if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) > *this->_M_impl._M_finish++ = __x; > else > _M_insert_aux(end(), __x); > } > > > void > swap(vector& __x) noexcept > { > > do { if (std::__is_constant_evaluated() && !bool(_Bit_alloc_traits::propagate_on_container_swap::value || _M_get_Bit_allocator() == __x._M_get_Bit_allocator())) __builtin_unreachable(); } while (false) > ; > > this->_M_impl._M_swap_data(__x._M_impl); > _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), > __x._M_get_Bit_allocator()); > } > > > > static void > swap(reference __x, reference __y) noexcept > { > bool __tmp = __x; > __x = __y; > __y = __tmp; > } > > > iterator > > insert(const_iterator __position, const bool& __x) > > > > { > const difference_type __n = __position - begin(); > if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr() > && __position == end()) > *this->_M_impl._M_finish++ = __x; > else > _M_insert_aux(__position._M_const_cast(), __x); > return begin() + __n; > } > > > __attribute__ ((__deprecated__ ("use '" "insert(position, false)" "' instead"))) > iterator > insert(const_iterator __position) > { return this->insert(__position._M_const_cast(), false); } > > > > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > iterator > insert(const_iterator __position, > _InputIterator __first, _InputIterator __last) > { > difference_type __offset = __position - cbegin(); > _M_insert_range(__position._M_const_cast(), > __first, __last, > std::__iterator_category(__first)); > return begin() + __offset; > } ># 1198 "/usr/include/c++/13/bits/stl_bvector.h" 3 > > iterator > insert(const_iterator __position, size_type __n, const bool& __x) > { > difference_type __offset = __position - cbegin(); > _M_fill_insert(__position._M_const_cast(), __n, __x); > return begin() + __offset; > } > > > > > > > > > iterator > insert(const_iterator __p, initializer_list<bool> __l) > { return this->insert(__p, __l.begin(), __l.end()); } > > > > void > pop_back() > { --this->_M_impl._M_finish; } > > > iterator > > erase(const_iterator __position) > > > > { return _M_erase(__position._M_const_cast()); } > > > iterator > > erase(const_iterator __first, const_iterator __last) > > > > { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } > > > void > resize(size_type __new_size, bool __x = bool()) > { > if (__new_size < size()) > _M_erase_at_end(begin() + difference_type(__new_size)); > else > insert(end(), __new_size - size(), __x); > } > > > > void > shrink_to_fit() > { _M_shrink_to_fit(); } > > > > void > flip() noexcept > { > _Bit_type * const __end = this->_M_impl._M_end_addr(); > for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p) > *__p = ~*__p; > } > > > void > clear() noexcept > { _M_erase_at_end(begin()); } > > > template<typename... _Args> > > > reference > > > > emplace_back(_Args&&... __args) > { > push_back(bool(__args...)); > > return back(); > > } > > template<typename... _Args> > > iterator > emplace(const_iterator __pos, _Args&&... __args) > { return insert(__pos, bool(__args...)); } > > > protected: > > > iterator > _M_copy_aligned(const_iterator __first, const_iterator __last, > iterator __result) > { > _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); > return std::copy(const_iterator(__last._M_p, 0), __last, > iterator(__q, 0)); > } > > > void > _M_initialize(size_type __n) > { > if (__n) > { > _Bit_pointer __q = this->_M_allocate(__n); > this->_M_impl._M_end_of_storage = __q + _S_nword(__n); > iterator __start = iterator(std::__addressof(*__q), 0); > this->_M_impl._M_start = __start; > this->_M_impl._M_finish = __start + difference_type(__n); > } > } > > > void > _M_initialize_value(bool __x) noexcept > { > if (_Bit_type* __p = this->_M_impl._M_start._M_p) > __fill_bvector_n(__p, this->_M_impl._M_end_addr() - __p, __x); > } > > > void > _M_reallocate(size_type __n); > > > > bool > _M_shrink_to_fit(); ># 1359 "/usr/include/c++/13/bits/stl_bvector.h" 3 > template<typename _InputIterator> > > void > _M_initialize_range(_InputIterator __first, _InputIterator __last, > std::input_iterator_tag) > { > for (; __first != __last; ++__first) > push_back(*__first); > } > > template<typename _ForwardIterator> > > void > _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, > std::forward_iterator_tag) > { > const size_type __n = std::distance(__first, __last); > _M_initialize(__n); > std::copy(__first, __last, begin()); > } ># 1395 "/usr/include/c++/13/bits/stl_bvector.h" 3 > > void > _M_fill_assign(size_t __n, bool __x) > { > if (__n > size()) > { > _M_initialize_value(__x); > insert(end(), __n - size(), __x); > } > else > { > _M_erase_at_end(begin() + __n); > _M_initialize_value(__x); > } > } > > template<typename _InputIterator> > > void > _M_assign_aux(_InputIterator __first, _InputIterator __last, > std::input_iterator_tag) > { > iterator __cur = begin(); > for (; __first != __last && __cur != end(); ++__cur, (void)++__first) > *__cur = *__first; > if (__first == __last) > _M_erase_at_end(__cur); > else > insert(end(), __first, __last); > } > > template<typename _ForwardIterator> > > void > _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, > std::forward_iterator_tag) > { > const size_type __len = std::distance(__first, __last); > if (__len < size()) > _M_erase_at_end(std::copy(__first, __last, begin())); > else > { > _ForwardIterator __mid = __first; > std::advance(__mid, size()); > std::copy(__first, __mid, begin()); > insert(end(), __mid, __last); > } > } ># 1462 "/usr/include/c++/13/bits/stl_bvector.h" 3 > > void > _M_fill_insert(iterator __position, size_type __n, bool __x); > > template<typename _InputIterator> > > void > _M_insert_range(iterator __pos, _InputIterator __first, > _InputIterator __last, std::input_iterator_tag) > { > for (; __first != __last; ++__first) > { > __pos = insert(__pos, *__first); > ++__pos; > } > } > > template<typename _ForwardIterator> > > void > _M_insert_range(iterator __position, _ForwardIterator __first, > _ForwardIterator __last, std::forward_iterator_tag); > > > void > _M_insert_aux(iterator __position, bool __x); > > > size_type > _M_check_len(size_type __n, const char* __s) const > { > if (max_size() - size() < __n) > __throw_length_error((__s)); > > const size_type __len = size() + std::max(size(), __n); > return (__len < size() || __len > max_size()) ? max_size() : __len; > } > > > void > _M_erase_at_end(iterator __pos) > { this->_M_impl._M_finish = __pos; } > > > iterator > _M_erase(iterator __pos); > > > iterator > _M_erase(iterator __first, iterator __last); > > protected: > > > > > > > void data() = delete; > > > > }; > > > > > > inline void > __fill_bvector(_Bit_type* __v, unsigned int __first, unsigned int __last, > bool __x) noexcept > { > const _Bit_type __fmask = ~0ul << __first; > const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); > const _Bit_type __mask = __fmask & __lmask; > > if (__x) > *__v |= __mask; > else > *__v &= ~__mask; > } > > > __attribute__((__nonnull__)) > > inline void > __fill_bvector_n(_Bit_type* __p, size_t __n, bool __x) noexcept > { ># 1558 "/usr/include/c++/13/bits/stl_bvector.h" 3 > __builtin_memset(__p, __x ? ~0 : 0, __n * sizeof(_Bit_type)); > } > > > > inline void > __fill_a1(std::_Bit_iterator __first, > std::_Bit_iterator __last, const bool& __x) > { > if (__first._M_p != __last._M_p) > { > _Bit_type* __first_p = __first._M_p; > if (__first._M_offset != 0) > __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); > > __fill_bvector_n(__first_p, __last._M_p - __first_p, __x); > > if (__last._M_offset != 0) > __fill_bvector(__last._M_p, 0, __last._M_offset, __x); > } > else if (__first._M_offset != __last._M_offset) > __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); > } > > > > > template<typename _Alloc> > struct hash<std::vector<bool, _Alloc>> > : public __hash_base<size_t, std::vector<bool, _Alloc>> > { > size_t > operator()(const std::vector<bool, _Alloc>&) const noexcept; > }; > > > >} ># 59 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/vector.tcc" 1 3 ># 59 "/usr/include/c++/13/bits/vector.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _Tp, typename _Alloc> > > void > vector<_Tp, _Alloc>:: > reserve(size_type __n) > { > if (__n > this->max_size()) > __throw_length_error(("vector::reserve")); > if (this->capacity() < __n) > { > const size_type __old_size = size(); > pointer __tmp; > > if constexpr (_S_use_relocate()) > { > __tmp = this->_M_allocate(__n); > _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, > __tmp, _M_get_Tp_allocator()); > } > else > > { > __tmp = _M_allocate_and_copy(__n, > std::__make_move_if_noexcept_iterator(this->_M_impl._M_start), > std::__make_move_if_noexcept_iterator(this->_M_impl._M_finish)); > std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, > _M_get_Tp_allocator()); > } > ; > _M_deallocate(this->_M_impl._M_start, > this->_M_impl._M_end_of_storage > - this->_M_impl._M_start); > this->_M_impl._M_start = __tmp; > this->_M_impl._M_finish = __tmp + __old_size; > this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; > } > } > > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > > > typename vector<_Tp, _Alloc>::reference > > > > vector<_Tp, _Alloc>:: > emplace_back(_Args&&... __args) > { > if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) > { > ; > _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, > std::forward<_Args>(__args)...); > ++this->_M_impl._M_finish; > ; > } > else > _M_realloc_insert(end(), std::forward<_Args>(__args)...); > > return back(); > > } > > > template<typename _Tp, typename _Alloc> > > typename vector<_Tp, _Alloc>::iterator > vector<_Tp, _Alloc>:: > > insert(const_iterator __position, const value_type& __x) > > > > { > const size_type __n = __position - begin(); > if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) > { > do { if (std::__is_constant_evaluated() && !bool(__position != const_iterator())) __builtin_unreachable(); } while (false); > if (!(__position != const_iterator())) > __builtin_unreachable(); > > if (__position == end()) > { > ; > _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, > __x); > ++this->_M_impl._M_finish; > ; > } > else > { > > const auto __pos = begin() + (__position - cbegin()); > > > _Temporary_value __x_copy(this, __x); > _M_insert_aux(__pos, std::move(__x_copy._M_val())); > > > > } > } > else > > _M_realloc_insert(begin() + (__position - cbegin()), __x); > > > > > return iterator(this->_M_impl._M_start + __n); > } > > template<typename _Tp, typename _Alloc> > > typename vector<_Tp, _Alloc>::iterator > vector<_Tp, _Alloc>:: > _M_erase(iterator __position) > { > if (__position + 1 != end()) > std::move(__position + 1, end(), __position); > --this->_M_impl._M_finish; > _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); > ; > return __position; > } > > template<typename _Tp, typename _Alloc> > > typename vector<_Tp, _Alloc>::iterator > vector<_Tp, _Alloc>:: > _M_erase(iterator __first, iterator __last) > { > if (__first != __last) > { > if (__last != end()) > std::move(__last, end(), __first); > _M_erase_at_end(__first.base() + (end() - __last)); > } > return __first; > } > > template<typename _Tp, typename _Alloc> > > vector<_Tp, _Alloc>& > vector<_Tp, _Alloc>:: > operator=(const vector<_Tp, _Alloc>& __x) > { > if (std::__addressof(__x) != this) > { > ; > > if (_Alloc_traits::_S_propagate_on_copy_assign()) > { > if (!_Alloc_traits::_S_always_equal() > && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) > { > > this->clear(); > _M_deallocate(this->_M_impl._M_start, > this->_M_impl._M_end_of_storage > - this->_M_impl._M_start); > this->_M_impl._M_start = nullptr; > this->_M_impl._M_finish = nullptr; > this->_M_impl._M_end_of_storage = nullptr; > } > std::__alloc_on_copy(_M_get_Tp_allocator(), > __x._M_get_Tp_allocator()); > } > > const size_type __xlen = __x.size(); > if (__xlen > capacity()) > { > pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), > __x.end()); > std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, > _M_get_Tp_allocator()); > _M_deallocate(this->_M_impl._M_start, > this->_M_impl._M_end_of_storage > - this->_M_impl._M_start); > this->_M_impl._M_start = __tmp; > this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; > } > else if (size() >= __xlen) > { > std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), > end(), _M_get_Tp_allocator()); > } > else > { > std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), > this->_M_impl._M_start); > std::__uninitialized_copy_a(__x._M_impl._M_start + size(), > __x._M_impl._M_finish, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > } > this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; > } > return *this; > } > > template<typename _Tp, typename _Alloc> > > void > vector<_Tp, _Alloc>:: > _M_fill_assign(size_t __n, const value_type& __val) > { > if (__n > capacity()) > { > vector __tmp(__n, __val, _M_get_Tp_allocator()); > __tmp._M_impl._M_swap_data(this->_M_impl); > } > else if (__n > size()) > { > std::fill(begin(), end(), __val); > const size_type __add = __n - size(); > ; > this->_M_impl._M_finish = > std::__uninitialized_fill_n_a(this->_M_impl._M_finish, > __add, __val, _M_get_Tp_allocator()); > ; > } > else > _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); > } > > template<typename _Tp, typename _Alloc> > template<typename _InputIterator> > > void > vector<_Tp, _Alloc>:: > _M_assign_aux(_InputIterator __first, _InputIterator __last, > std::input_iterator_tag) > { > pointer __cur(this->_M_impl._M_start); > for (; __first != __last && __cur != this->_M_impl._M_finish; > ++__cur, (void)++__first) > *__cur = *__first; > if (__first == __last) > _M_erase_at_end(__cur); > else > _M_range_insert(end(), __first, __last, > std::__iterator_category(__first)); > } > > template<typename _Tp, typename _Alloc> > template<typename _ForwardIterator> > > void > vector<_Tp, _Alloc>:: > _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, > std::forward_iterator_tag) > { > const size_type __len = std::distance(__first, __last); > > if (__len > capacity()) > { > _S_check_init_len(__len, _M_get_Tp_allocator()); > pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); > std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, > _M_get_Tp_allocator()); > ; > _M_deallocate(this->_M_impl._M_start, > this->_M_impl._M_end_of_storage > - this->_M_impl._M_start); > this->_M_impl._M_start = __tmp; > this->_M_impl._M_finish = this->_M_impl._M_start + __len; > this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; > } > else if (size() >= __len) > _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); > else > { > _ForwardIterator __mid = __first; > std::advance(__mid, size()); > std::copy(__first, __mid, this->_M_impl._M_start); > const size_type __attribute__((__unused__)) __n = __len - size(); > ; > this->_M_impl._M_finish = > std::__uninitialized_copy_a(__mid, __last, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > ; > } > } > > > template<typename _Tp, typename _Alloc> > > auto > vector<_Tp, _Alloc>:: > _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator > { > const auto __n = __position - cbegin(); > if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) > if (__position == cend()) > { > ; > _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, > std::move(__v)); > ++this->_M_impl._M_finish; > ; > } > else > _M_insert_aux(begin() + __n, std::move(__v)); > else > _M_realloc_insert(begin() + __n, std::move(__v)); > > return iterator(this->_M_impl._M_start + __n); > } > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > > auto > vector<_Tp, _Alloc>:: > _M_emplace_aux(const_iterator __position, _Args&&... __args) > -> iterator > { > const auto __n = __position - cbegin(); > if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) > if (__position == cend()) > { > ; > _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, > std::forward<_Args>(__args)...); > ++this->_M_impl._M_finish; > ; > } > else > { > > > > _Temporary_value __tmp(this, std::forward<_Args>(__args)...); > _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); > } > else > _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); > > return iterator(this->_M_impl._M_start + __n); > } > > template<typename _Tp, typename _Alloc> > template<typename _Arg> > > void > vector<_Tp, _Alloc>:: > _M_insert_aux(iterator __position, _Arg&& __arg) > > > > > > > { > ; > _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, > std::move(*(this->_M_impl._M_finish - 1))); > ++this->_M_impl._M_finish; > ; > > > > std::move_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) > > ; > > > > *__position = std::forward<_Arg>(__arg); > > } > > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > > void > vector<_Tp, _Alloc>:: > _M_realloc_insert(iterator __position, _Args&&... __args) > > > > > > > { > const size_type __len = > _M_check_len(size_type(1), "vector::_M_realloc_insert"); > pointer __old_start = this->_M_impl._M_start; > pointer __old_finish = this->_M_impl._M_finish; > const size_type __elems_before = __position - begin(); > pointer __new_start(this->_M_allocate(__len)); > pointer __new_finish(__new_start); > try > { > > > > > > _Alloc_traits::construct(this->_M_impl, > __new_start + __elems_before, > > std::forward<_Args>(__args)...); > > > > __new_finish = pointer(); > > > if constexpr (_S_use_relocate()) > { > __new_finish = _S_relocate(__old_start, __position.base(), > __new_start, _M_get_Tp_allocator()); > > ++__new_finish; > > __new_finish = _S_relocate(__position.base(), __old_finish, > __new_finish, _M_get_Tp_allocator()); > } > else > > { > __new_finish > = std::__uninitialized_move_if_noexcept_a > (__old_start, __position.base(), > __new_start, _M_get_Tp_allocator()); > > ++__new_finish; > > __new_finish > = std::__uninitialized_move_if_noexcept_a > (__position.base(), __old_finish, > __new_finish, _M_get_Tp_allocator()); > } > } > catch(...) > { > if (!__new_finish) > _Alloc_traits::destroy(this->_M_impl, > __new_start + __elems_before); > else > std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); > _M_deallocate(__new_start, __len); > throw; > } > > if constexpr (!_S_use_relocate()) > > std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); > ; > _M_deallocate(__old_start, > this->_M_impl._M_end_of_storage - __old_start); > this->_M_impl._M_start = __new_start; > this->_M_impl._M_finish = __new_finish; > this->_M_impl._M_end_of_storage = __new_start + __len; > } > > template<typename _Tp, typename _Alloc> > > void > vector<_Tp, _Alloc>:: > _M_fill_insert(iterator __position, size_type __n, const value_type& __x) > { > if (__n != 0) > { > if (size_type(this->_M_impl._M_end_of_storage > - this->_M_impl._M_finish) >= __n) > { > > > > _Temporary_value __tmp(this, __x); > value_type& __x_copy = __tmp._M_val(); > > const size_type __elems_after = end() - __position; > pointer __old_finish(this->_M_impl._M_finish); > if (__elems_after > __n) > { > ; > std::__uninitialized_move_a(__old_finish - __n, > __old_finish, > __old_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish += __n; > ; > std::move_backward(__position.base(), __old_finish - __n, __old_finish) > ; > std::fill(__position.base(), __position.base() + __n, > __x_copy); > } > else > { > ; > this->_M_impl._M_finish = > std::__uninitialized_fill_n_a(__old_finish, > __n - __elems_after, > __x_copy, > _M_get_Tp_allocator()); > ; > std::__uninitialized_move_a(__position.base(), __old_finish, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish += __elems_after; > ; > std::fill(__position.base(), __old_finish, __x_copy); > } > } > else > { > > > pointer __old_start = this->_M_impl._M_start; > pointer __old_finish = this->_M_impl._M_finish; > const pointer __pos = __position.base(); > > const size_type __len = > _M_check_len(__n, "vector::_M_fill_insert"); > const size_type __elems_before = __pos - __old_start; > pointer __new_start(this->_M_allocate(__len)); > pointer __new_finish(__new_start); > try > { > > std::__uninitialized_fill_n_a(__new_start + __elems_before, > __n, __x, > _M_get_Tp_allocator()); > __new_finish = pointer(); > > __new_finish > = std::__uninitialized_move_if_noexcept_a > (__old_start, __pos, __new_start, _M_get_Tp_allocator()); > > __new_finish += __n; > > __new_finish > = std::__uninitialized_move_if_noexcept_a > (__pos, __old_finish, __new_finish, _M_get_Tp_allocator()); > } > catch(...) > { > if (!__new_finish) > std::_Destroy(__new_start + __elems_before, > __new_start + __elems_before + __n, > _M_get_Tp_allocator()); > else > std::_Destroy(__new_start, __new_finish, > _M_get_Tp_allocator()); > _M_deallocate(__new_start, __len); > throw; > } > std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); > ; > _M_deallocate(__old_start, > this->_M_impl._M_end_of_storage - __old_start); > this->_M_impl._M_start = __new_start; > this->_M_impl._M_finish = __new_finish; > this->_M_impl._M_end_of_storage = __new_start + __len; > } > } > } > > > template<typename _Tp, typename _Alloc> > > void > vector<_Tp, _Alloc>:: > _M_default_append(size_type __n) > { > if (__n != 0) > { > const size_type __size = size(); > size_type __navail = size_type(this->_M_impl._M_end_of_storage > - this->_M_impl._M_finish); > > if (__size > max_size() || __navail > max_size() - __size) > __builtin_unreachable(); > > if (__navail >= __n) > { > ; > this->_M_impl._M_finish = > std::__uninitialized_default_n_a(this->_M_impl._M_finish, > __n, _M_get_Tp_allocator()); > ; > } > else > { > > > pointer __old_start = this->_M_impl._M_start; > pointer __old_finish = this->_M_impl._M_finish; > > const size_type __len = > _M_check_len(__n, "vector::_M_default_append"); > pointer __new_start(this->_M_allocate(__len)); > if constexpr (_S_use_relocate()) > { > try > { > std::__uninitialized_default_n_a(__new_start + __size, > __n, _M_get_Tp_allocator()); > } > catch(...) > { > _M_deallocate(__new_start, __len); > throw; > } > _S_relocate(__old_start, __old_finish, > __new_start, _M_get_Tp_allocator()); > } > else > { > pointer __destroy_from = pointer(); > try > { > std::__uninitialized_default_n_a(__new_start + __size, > __n, _M_get_Tp_allocator()); > __destroy_from = __new_start + __size; > std::__uninitialized_move_if_noexcept_a( > __old_start, __old_finish, > __new_start, _M_get_Tp_allocator()); > } > catch(...) > { > if (__destroy_from) > std::_Destroy(__destroy_from, __destroy_from + __n, > _M_get_Tp_allocator()); > _M_deallocate(__new_start, __len); > throw; > } > std::_Destroy(__old_start, __old_finish, > _M_get_Tp_allocator()); > } > ; > _M_deallocate(__old_start, > this->_M_impl._M_end_of_storage - __old_start); > this->_M_impl._M_start = __new_start; > this->_M_impl._M_finish = __new_start + __size + __n; > this->_M_impl._M_end_of_storage = __new_start + __len; > } > } > } > > template<typename _Tp, typename _Alloc> > > bool > vector<_Tp, _Alloc>:: > _M_shrink_to_fit() > { > if (capacity() == size()) > return false; > ; > return std::__shrink_to_fit_aux<vector>::_S_do_it(*this); > } > > > template<typename _Tp, typename _Alloc> > template<typename _InputIterator> > > void > vector<_Tp, _Alloc>:: > _M_range_insert(iterator __pos, _InputIterator __first, > _InputIterator __last, std::input_iterator_tag) > { > if (__pos == end()) > { > for (; __first != __last; ++__first) > insert(end(), *__first); > } > else if (__first != __last) > { > vector __tmp(__first, __last, _M_get_Tp_allocator()); > insert(__pos, > std::make_move_iterator(__tmp.begin()), > std::make_move_iterator(__tmp.end())); > } > } > > template<typename _Tp, typename _Alloc> > template<typename _ForwardIterator> > > void > vector<_Tp, _Alloc>:: > _M_range_insert(iterator __position, _ForwardIterator __first, > _ForwardIterator __last, std::forward_iterator_tag) > { > if (__first != __last) > { > const size_type __n = std::distance(__first, __last); > if (size_type(this->_M_impl._M_end_of_storage > - this->_M_impl._M_finish) >= __n) > { > const size_type __elems_after = end() - __position; > pointer __old_finish(this->_M_impl._M_finish); > if (__elems_after > __n) > { > ; > std::__uninitialized_move_a(this->_M_impl._M_finish - __n, > this->_M_impl._M_finish, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish += __n; > ; > std::move_backward(__position.base(), __old_finish - __n, __old_finish) > ; > std::copy(__first, __last, __position); > } > else > { > _ForwardIterator __mid = __first; > std::advance(__mid, __elems_after); > ; > std::__uninitialized_copy_a(__mid, __last, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish += __n - __elems_after; > ; > std::__uninitialized_move_a(__position.base(), > __old_finish, > this->_M_impl._M_finish, > _M_get_Tp_allocator()); > this->_M_impl._M_finish += __elems_after; > ; > std::copy(__first, __mid, __position); > } > } > else > { > > > > pointer __old_start = this->_M_impl._M_start; > pointer __old_finish = this->_M_impl._M_finish; > > const size_type __len = > _M_check_len(__n, "vector::_M_range_insert"); > pointer __new_start(this->_M_allocate(__len)); > pointer __new_finish(__new_start); > try > { > __new_finish > = std::__uninitialized_move_if_noexcept_a > (__old_start, __position.base(), > __new_start, _M_get_Tp_allocator()); > __new_finish > = std::__uninitialized_copy_a(__first, __last, > __new_finish, > _M_get_Tp_allocator()); > __new_finish > = std::__uninitialized_move_if_noexcept_a > (__position.base(), __old_finish, > __new_finish, _M_get_Tp_allocator()); > } > catch(...) > { > std::_Destroy(__new_start, __new_finish, > _M_get_Tp_allocator()); > _M_deallocate(__new_start, __len); > throw; > } > std::_Destroy(__old_start, __old_finish, > _M_get_Tp_allocator()); > ; > _M_deallocate(__old_start, > this->_M_impl._M_end_of_storage - __old_start); > this->_M_impl._M_start = __new_start; > this->_M_impl._M_finish = __new_finish; > this->_M_impl._M_end_of_storage = __new_start + __len; > } > } > } > > > > template<typename _Alloc> > > void > vector<bool, _Alloc>:: > _M_reallocate(size_type __n) > { > _Bit_pointer __q = this->_M_allocate(__n); > iterator __start(std::__addressof(*__q), 0); > iterator __finish(_M_copy_aligned(begin(), end(), __start)); > this->_M_deallocate(); > this->_M_impl._M_start = __start; > this->_M_impl._M_finish = __finish; > this->_M_impl._M_end_of_storage = __q + _S_nword(__n); > } > > template<typename _Alloc> > > void > vector<bool, _Alloc>:: > _M_fill_insert(iterator __position, size_type __n, bool __x) > { > if (__n == 0) > return; > if (capacity() - size() >= __n) > { > std::copy_backward(__position, end(), > this->_M_impl._M_finish + difference_type(__n)); > std::fill(__position, __position + difference_type(__n), __x); > this->_M_impl._M_finish += difference_type(__n); > } > else > { > const size_type __len = > _M_check_len(__n, "vector<bool>::_M_fill_insert"); > _Bit_pointer __q = this->_M_allocate(__len); > iterator __start(std::__addressof(*__q), 0); > iterator __i = _M_copy_aligned(begin(), __position, __start); > std::fill(__i, __i + difference_type(__n), __x); > iterator __finish = std::copy(__position, end(), > __i + difference_type(__n)); > this->_M_deallocate(); > this->_M_impl._M_end_of_storage = __q + _S_nword(__len); > this->_M_impl._M_start = __start; > this->_M_impl._M_finish = __finish; > } > } > > template<typename _Alloc> > template<typename _ForwardIterator> > > void > vector<bool, _Alloc>:: > _M_insert_range(iterator __position, _ForwardIterator __first, > _ForwardIterator __last, std::forward_iterator_tag) > { > if (__first != __last) > { > size_type __n = std::distance(__first, __last); > if (capacity() - size() >= __n) > { > std::copy_backward(__position, end(), > this->_M_impl._M_finish > + difference_type(__n)); > std::copy(__first, __last, __position); > this->_M_impl._M_finish += difference_type(__n); > } > else > { > const size_type __len = > _M_check_len(__n, "vector<bool>::_M_insert_range"); > _Bit_pointer __q = this->_M_allocate(__len); > iterator __start(std::__addressof(*__q), 0); > iterator __i = _M_copy_aligned(begin(), __position, __start); > __i = std::copy(__first, __last, __i); > iterator __finish = std::copy(__position, end(), __i); > this->_M_deallocate(); > this->_M_impl._M_end_of_storage = __q + _S_nword(__len); > this->_M_impl._M_start = __start; > this->_M_impl._M_finish = __finish; > } > } > } > > template<typename _Alloc> > > void > vector<bool, _Alloc>:: > _M_insert_aux(iterator __position, bool __x) > { > if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) > { > std::copy_backward(__position, this->_M_impl._M_finish, > this->_M_impl._M_finish + 1); > *__position = __x; > ++this->_M_impl._M_finish; > } > else > { > const size_type __len = > _M_check_len(size_type(1), "vector<bool>::_M_insert_aux"); > _Bit_pointer __q = this->_M_allocate(__len); > iterator __start(std::__addressof(*__q), 0); > iterator __i = _M_copy_aligned(begin(), __position, __start); > *__i++ = __x; > iterator __finish = std::copy(__position, end(), __i); > this->_M_deallocate(); > this->_M_impl._M_end_of_storage = __q + _S_nword(__len); > this->_M_impl._M_start = __start; > this->_M_impl._M_finish = __finish; > } > } > > template<typename _Alloc> > > typename vector<bool, _Alloc>::iterator > vector<bool, _Alloc>:: > _M_erase(iterator __position) > { > if (__position + 1 != end()) > std::copy(__position + 1, end(), __position); > --this->_M_impl._M_finish; > return __position; > } > > template<typename _Alloc> > > typename vector<bool, _Alloc>::iterator > vector<bool, _Alloc>:: > _M_erase(iterator __first, iterator __last) > { > if (__first != __last) > _M_erase_at_end(std::copy(__last, end(), __first)); > return __first; > } > > > template<typename _Alloc> > > bool > vector<bool, _Alloc>:: > _M_shrink_to_fit() > { > if (capacity() - size() < int(_S_word_bit)) > return false; > try > { > if (size_type __n = size()) > _M_reallocate(__n); > else > { > this->_M_deallocate(); > this->_M_impl._M_reset(); > } > return true; > } > catch(...) > { return false; } > } > > > > >} > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Alloc> > size_t > hash<std::vector<bool, _Alloc>>:: > operator()(const std::vector<bool, _Alloc>& __b) const noexcept > { > size_t __hash = 0; > const size_t __words = __b.size() / _S_word_bit; > if (__words) > { > const size_t __clength = __words * sizeof(_Bit_type); > __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); > } > > const size_t __extrabits = __b.size() % _S_word_bit; > if (__extrabits) > { > _Bit_type __hiword = *__b._M_impl._M_finish._M_p; > __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); > > const size_t __clength > = (__extrabits + 8 - 1) / 8; > if (__words) > __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); > else > __hash = std::_Hash_impl::hash(&__hiword, __clength); > } > > return __hash; > } > > >} ># 60 "/usr/include/c++/13/regex" 2 3 > > > ># 1 "/usr/include/c++/13/bits/regex_constants.h" 1 3 ># 33 "/usr/include/c++/13/bits/regex_constants.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 51 "/usr/include/c++/13/bits/regex_constants.h" 3 >namespace regex_constants >{ ># 69 "/usr/include/c++/13/bits/regex_constants.h" 3 > enum syntax_option_type : unsigned int > { > _S_icase = 1 << 0, > _S_nosubs = 1 << 1, > _S_optimize = 1 << 2, > _S_collate = 1 << 3, > _S_ECMAScript = 1 << 4, > _S_basic = 1 << 5, > _S_extended = 1 << 6, > _S_awk = 1 << 7, > _S_grep = 1 << 8, > _S_egrep = 1 << 9, > _S_polynomial = 1 << 10, > _S_multiline = 1 << 11 > }; > > > > > > inline constexpr syntax_option_type icase = _S_icase; > > > > > > > inline constexpr syntax_option_type nosubs = _S_nosubs; > > > > > > > > inline constexpr syntax_option_type optimize = _S_optimize; > > > > > > inline constexpr syntax_option_type collate = _S_collate; ># 120 "/usr/include/c++/13/bits/regex_constants.h" 3 > inline constexpr syntax_option_type ECMAScript = _S_ECMAScript; ># 129 "/usr/include/c++/13/bits/regex_constants.h" 3 > inline constexpr syntax_option_type basic = _S_basic; > > > > > > > > inline constexpr syntax_option_type extended = _S_extended; ># 147 "/usr/include/c++/13/bits/regex_constants.h" 3 > inline constexpr syntax_option_type awk = _S_awk; > > > > > > > > inline constexpr syntax_option_type grep = _S_grep; > > > > > > > > inline constexpr syntax_option_type egrep = _S_egrep; ># 175 "/usr/include/c++/13/bits/regex_constants.h" 3 > inline constexpr syntax_option_type multiline = _S_multiline; > > > > inline constexpr syntax_option_type __multiline = _S_multiline; > > > > > > > > inline constexpr syntax_option_type __polynomial = _S_polynomial; > > constexpr inline syntax_option_type > operator&(syntax_option_type __a, syntax_option_type __b) > { > return (syntax_option_type)(static_cast<unsigned int>(__a) > & static_cast<unsigned int>(__b)); > } > > constexpr inline syntax_option_type > operator|(syntax_option_type __a, syntax_option_type __b) > { > return (syntax_option_type)(static_cast<unsigned int>(__a) > | static_cast<unsigned int>(__b)); > } > > constexpr inline syntax_option_type > operator^(syntax_option_type __a, syntax_option_type __b) > { > return (syntax_option_type)(static_cast<unsigned int>(__a) > ^ static_cast<unsigned int>(__b)); > } > > constexpr inline syntax_option_type > operator~(syntax_option_type __a) > { return (syntax_option_type)(~static_cast<unsigned int>(__a)); } > > constexpr > inline syntax_option_type& > operator&=(syntax_option_type& __a, syntax_option_type __b) > { return __a = __a & __b; } > > constexpr > inline syntax_option_type& > operator|=(syntax_option_type& __a, syntax_option_type __b) > { return __a = __a | __b; } > > constexpr > inline syntax_option_type& > operator^=(syntax_option_type& __a, syntax_option_type __b) > { return __a = __a ^ __b; } ># 249 "/usr/include/c++/13/bits/regex_constants.h" 3 > enum match_flag_type : unsigned int > { > _S_default, > _S_not_bol = 1 << 0, > _S_not_eol = 1 << 1, > _S_not_bow = 1 << 2, > _S_not_eow = 1 << 3, > _S_any = 1 << 4, > _S_not_null = 1 << 5, > _S_continuous = 1 << 6, > _S_prev_avail = 1 << 7, > _S_sed = 1 << 8, > _S_no_copy = 1 << 9, > _S_first_only = 1 << 10, > _S_match_flag_last = 1 << 11 > }; > > > > > inline constexpr match_flag_type match_default = _S_default; > > > > > > > inline constexpr match_flag_type match_not_bol = _S_not_bol; > > > > > > > inline constexpr match_flag_type match_not_eol = _S_not_eol; > > > > > > inline constexpr match_flag_type match_not_bow = _S_not_bow; > > > > > > inline constexpr match_flag_type match_not_eow = _S_not_eow; > > > > > > inline constexpr match_flag_type match_any = _S_any; > > > > > inline constexpr match_flag_type match_not_null = _S_not_null; > > > > > inline constexpr match_flag_type match_continuous = _S_continuous; > > > > > > > > inline constexpr match_flag_type match_prev_avail = _S_prev_avail; ># 347 "/usr/include/c++/13/bits/regex_constants.h" 3 > inline constexpr match_flag_type format_default = _S_default; > > > > > > > > inline constexpr match_flag_type format_sed = _S_sed; > > > > > > > inline constexpr match_flag_type format_no_copy = _S_no_copy; > > > > > > inline constexpr match_flag_type format_first_only = _S_first_only; > > constexpr inline match_flag_type > operator&(match_flag_type __a, match_flag_type __b) > { > return (match_flag_type)(static_cast<unsigned int>(__a) > & static_cast<unsigned int>(__b)); > } > > constexpr inline match_flag_type > operator|(match_flag_type __a, match_flag_type __b) > { > return (match_flag_type)(static_cast<unsigned int>(__a) > | static_cast<unsigned int>(__b)); > } > > constexpr inline match_flag_type > operator^(match_flag_type __a, match_flag_type __b) > { > return (match_flag_type)(static_cast<unsigned int>(__a) > ^ static_cast<unsigned int>(__b)); > } > > constexpr inline match_flag_type > operator~(match_flag_type __a) > { return (match_flag_type)(~static_cast<unsigned int>(__a)); } > > constexpr > inline match_flag_type& > operator&=(match_flag_type& __a, match_flag_type __b) > { return __a = __a & __b; } > > constexpr > inline match_flag_type& > operator|=(match_flag_type& __a, match_flag_type __b) > { return __a = __a | __b; } > > constexpr > inline match_flag_type& > operator^=(match_flag_type& __a, match_flag_type __b) > { return __a = __a ^ __b; } > > >} > > > >} ># 64 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/regex_error.h" 1 3 ># 33 "/usr/include/c++/13/bits/regex_error.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > >namespace regex_constants >{ > > > > > > enum error_type > { > _S_error_collate, > _S_error_ctype, > _S_error_escape, > _S_error_backref, > _S_error_brack, > _S_error_paren, > _S_error_brace, > _S_error_badbrace, > _S_error_range, > _S_error_space, > _S_error_badrepeat, > _S_error_complexity, > _S_error_stack, > _S_null, > _S_grammar > }; > > > inline constexpr error_type error_collate(_S_error_collate); > > > inline constexpr error_type error_ctype(_S_error_ctype); > > > > > > inline constexpr error_type error_escape(_S_error_escape); > > > inline constexpr error_type error_backref(_S_error_backref); > > > inline constexpr error_type error_brack(_S_error_brack); > > > inline constexpr error_type error_paren(_S_error_paren); > > > inline constexpr error_type error_brace(_S_error_brace); > > > inline constexpr error_type error_badbrace(_S_error_badbrace); > > > > > > inline constexpr error_type error_range(_S_error_range); > > > > > > inline constexpr error_type error_space(_S_error_space); > > > > > inline constexpr error_type error_badrepeat(_S_error_badrepeat); > > > > > > inline constexpr error_type error_complexity(_S_error_complexity); > > > > > > inline constexpr error_type error_stack(_S_error_stack); > > >} ># 137 "/usr/include/c++/13/bits/regex_error.h" 3 > class regex_error : public std::runtime_error > { > using error_type = regex_constants::error_type; > > error_type _M_code; > > public: > > > > > > explicit > regex_error(error_type __ecode); > > virtual ~regex_error() throw(); > > > > > > > regex_constants::error_type > code() const noexcept > { return _M_code; } > > private: > > regex_error(error_type __ecode, const char* __what) > : std::runtime_error(__what), _M_code(__ecode) > { } > > [[__noreturn__]] > friend void > __throw_regex_error(error_type __ecode __attribute__((__unused__)), > const char* __what __attribute__((__unused__))) > { (throw (regex_error(__ecode, __what))); } > > }; > > > > [[__noreturn__]] > void > __throw_regex_error(regex_constants::error_type __ecode); > > [[__noreturn__]] > inline void > __throw_regex_error(regex_constants::error_type __ecode, const char* __what); > > > > > > >} ># 65 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/regex_automaton.h" 1 3 ># 36 "/usr/include/c++/13/bits/regex_automaton.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ > > > > > > > typedef long _StateIdT; > inline constexpr _StateIdT _S_invalid_state_id = -1; > > template<typename _CharT> > using _Matcher = std::function<bool (_CharT)>; > > > > enum _Opcode : int > { > _S_opcode_unknown, > _S_opcode_alternative, > _S_opcode_repeat, > _S_opcode_backref, > _S_opcode_line_begin_assertion, > _S_opcode_line_end_assertion, > _S_opcode_word_boundary, > _S_opcode_subexpr_lookahead, > _S_opcode_subexpr_begin, > _S_opcode_subexpr_end, > _S_opcode_dummy, > _S_opcode_match, > _S_opcode_accept, > }; > > struct _State_base > { > protected: > _Opcode _M_opcode; > > public: > _StateIdT _M_next; > union > { > size_t _M_subexpr; > size_t _M_backref_index; > struct > { > > > _StateIdT _M_alt; > > > bool _M_neg; > }; > > __gnu_cxx::__aligned_membuf<_Matcher<char>> _M_matcher_storage; > }; > > protected: > explicit _State_base(_Opcode __opcode) noexcept > : _M_opcode(__opcode), _M_next(_S_invalid_state_id) > { } > > public: > bool > _M_has_alt() const noexcept > { > return _M_opcode == _S_opcode_alternative > || _M_opcode == _S_opcode_repeat > || _M_opcode == _S_opcode_subexpr_lookahead; > } ># 119 "/usr/include/c++/13/bits/regex_automaton.h" 3 > }; > > template<typename _Char_type> > struct _State : _State_base > { > typedef _Matcher<_Char_type> _MatcherT; > static_assert(sizeof(_MatcherT) == sizeof(_Matcher<char>), > "std::function<bool(T)> has the same size as " > "std::function<bool(char)>"); > static_assert(alignof(_MatcherT) == alignof(_Matcher<char>), > "std::function<bool(T)> has the same alignment as " > "std::function<bool(char)>"); > > explicit > _State(_Opcode __opcode) noexcept : _State_base(__opcode) > { > if (_M_opcode() == _S_opcode_match) > new (this->_M_matcher_storage._M_addr()) _MatcherT(); > } > > _State(const _State& __rhs) : _State_base(__rhs) > { > if (__rhs._M_opcode() == _S_opcode_match) > new (this->_M_matcher_storage._M_addr()) > _MatcherT(__rhs._M_get_matcher()); > } > > _State(_State&& __rhs) noexcept : _State_base(__rhs) > { > if (__rhs._M_opcode() == _S_opcode_match) > new (this->_M_matcher_storage._M_addr()) > _MatcherT(std::move(__rhs._M_get_matcher())); > } > > _State& > operator=(const _State&) = delete; > > ~_State() > { > if (_M_opcode() == _S_opcode_match) > _M_get_matcher().~_MatcherT(); > } > > > > _Opcode > _M_opcode() const noexcept > { return _State_base::_M_opcode; } > > bool > _M_matches(_Char_type __char) const > { return _M_get_matcher()(__char); } > > _MatcherT& > _M_get_matcher() noexcept > { return *static_cast<_MatcherT*>(this->_M_matcher_storage._M_addr()); } > > const _MatcherT& > _M_get_matcher() const noexcept > { > return *static_cast<const _MatcherT*>( > this->_M_matcher_storage._M_addr()); > } > }; > > struct _NFA_base > { > typedef regex_constants::syntax_option_type _FlagT; > > explicit > _NFA_base(_FlagT __f) noexcept > : _M_flags(__f), _M_start_state(0), _M_subexpr_count(0), > _M_has_backref(false) > { } > > _NFA_base(_NFA_base&&) = default; > > protected: > ~_NFA_base() = default; > > public: > _FlagT > _M_options() const noexcept > { return _M_flags; } > > _StateIdT > _M_start() const noexcept > { return _M_start_state; } > > size_t > _M_sub_count() const noexcept > { return _M_subexpr_count; } > > std::vector<size_t> _M_paren_stack; > _FlagT _M_flags; > _StateIdT _M_start_state; > size_t _M_subexpr_count; > bool _M_has_backref; > }; > > template<typename _TraitsT> > struct _NFA > : _NFA_base, std::vector<_State<typename _TraitsT::char_type>> > { > typedef typename _TraitsT::char_type _Char_type; > typedef _State<_Char_type> _StateT; > typedef _Matcher<_Char_type> _MatcherT; > > _NFA(const typename _TraitsT::locale_type& __loc, _FlagT __flags) > : _NFA_base(__flags) > { _M_traits.imbue(__loc); } > > > _NFA(const _NFA&) = delete; > _NFA(_NFA&&) = default; > > _StateIdT > _M_insert_accept() > { > auto __ret = _M_insert_state(_StateT(_S_opcode_accept)); > return __ret; > } > > _StateIdT > _M_insert_alt(_StateIdT __next, _StateIdT __alt, > bool __neg __attribute__((__unused__))) > { > _StateT __tmp(_S_opcode_alternative); > > > __tmp._M_next = __next; > __tmp._M_alt = __alt; > return _M_insert_state(std::move(__tmp)); > } > > _StateIdT > _M_insert_repeat(_StateIdT __next, _StateIdT __alt, bool __neg) > { > _StateT __tmp(_S_opcode_repeat); > > > __tmp._M_next = __next; > __tmp._M_alt = __alt; > __tmp._M_neg = __neg; > return _M_insert_state(std::move(__tmp)); > } > > _StateIdT > _M_insert_matcher(_MatcherT __m) > { > _StateT __tmp(_S_opcode_match); > __tmp._M_get_matcher() = std::move(__m); > return _M_insert_state(std::move(__tmp)); > } > > _StateIdT > _M_insert_subexpr_begin() > { > auto __id = this->_M_subexpr_count++; > this->_M_paren_stack.push_back(__id); > _StateT __tmp(_S_opcode_subexpr_begin); > __tmp._M_subexpr = __id; > return _M_insert_state(std::move(__tmp)); > } > > _StateIdT > _M_insert_subexpr_end() > { > _StateT __tmp(_S_opcode_subexpr_end); > __tmp._M_subexpr = this->_M_paren_stack.back(); > this->_M_paren_stack.pop_back(); > return _M_insert_state(std::move(__tmp)); > } > > _StateIdT > _M_insert_backref(size_t __index); > > _StateIdT > _M_insert_line_begin() > { return _M_insert_state(_StateT(_S_opcode_line_begin_assertion)); } > > _StateIdT > _M_insert_line_end() > { return _M_insert_state(_StateT(_S_opcode_line_end_assertion)); } > > _StateIdT > _M_insert_word_bound(bool __neg) > { > _StateT __tmp(_S_opcode_word_boundary); > __tmp._M_neg = __neg; > return _M_insert_state(std::move(__tmp)); > } > > _StateIdT > _M_insert_lookahead(_StateIdT __alt, bool __neg) > { > _StateT __tmp(_S_opcode_subexpr_lookahead); > __tmp._M_alt = __alt; > __tmp._M_neg = __neg; > return _M_insert_state(std::move(__tmp)); > } > > _StateIdT > _M_insert_dummy() > { return _M_insert_state(_StateT(_S_opcode_dummy)); } > > _StateIdT > _M_insert_state(_StateT __s) > { > this->push_back(std::move(__s)); > if (this->size() > 100000) > __throw_regex_error( > regex_constants::error_space, > "Number of NFA states exceeds limit. Please use shorter regex " > "string, or use smaller brace expression, or make " > "_GLIBCXX_REGEX_STATE_LIMIT larger."); > return this->size() - 1; > } > > > void > _M_eliminate_dummy(); > > > > > > public: > _TraitsT _M_traits; > }; > > > > > template<typename _TraitsT> > class _StateSeq > { > public: > typedef _NFA<_TraitsT> _RegexT; > > public: > _StateSeq(_RegexT& __nfa, _StateIdT __s) > : _M_nfa(__nfa), _M_start(__s), _M_end(__s) > { } > > _StateSeq(_RegexT& __nfa, _StateIdT __s, _StateIdT __end) > : _M_nfa(__nfa), _M_start(__s), _M_end(__end) > { } > > > void > _M_append(_StateIdT __id) > { > _M_nfa[_M_end]._M_next = __id; > _M_end = __id; > } > > > void > _M_append(const _StateSeq& __s) > { > _M_nfa[_M_end]._M_next = __s._M_start; > _M_end = __s._M_end; > } > > > _StateSeq > _M_clone(); > > public: > _RegexT& _M_nfa; > _StateIdT _M_start; > _StateIdT _M_end; > }; > > >} > > >} > ># 1 "/usr/include/c++/13/bits/regex_automaton.tcc" 1 3 ># 31 "/usr/include/c++/13/bits/regex_automaton.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ ># 147 "/usr/include/c++/13/bits/regex_automaton.tcc" 3 > template<typename _TraitsT> > _StateIdT > _NFA<_TraitsT>::_M_insert_backref(size_t __index) > { > if (this->_M_flags & regex_constants::__polynomial) > __throw_regex_error(regex_constants::error_complexity, > "Unexpected back-reference in polynomial mode."); > > > > > > > > if (__index >= _M_subexpr_count) > __throw_regex_error( > regex_constants::error_backref, > "Back-reference index exceeds current sub-expression count."); > for (auto __it : this->_M_paren_stack) > if (__index == __it) > __throw_regex_error( > regex_constants::error_backref, > "Back-reference referred to an opened sub-expression."); > this->_M_has_backref = true; > _StateT __tmp(_S_opcode_backref); > __tmp._M_backref_index = __index; > return _M_insert_state(std::move(__tmp)); > } > > template<typename _TraitsT> > void > _NFA<_TraitsT>::_M_eliminate_dummy() > { > for (auto& __it : *this) > { > while (__it._M_next >= 0 && (*this)[__it._M_next]._M_opcode() > == _S_opcode_dummy) > __it._M_next = (*this)[__it._M_next]._M_next; > if (__it._M_has_alt()) > while (__it._M_alt >= 0 && (*this)[__it._M_alt]._M_opcode() > == _S_opcode_dummy) > __it._M_alt = (*this)[__it._M_alt]._M_next; > } > } > > > template<typename _TraitsT> > _StateSeq<_TraitsT> > _StateSeq<_TraitsT>::_M_clone() > { > std::map<_StateIdT, _StateIdT> __m; > std::stack<_StateIdT, std::deque<_StateIdT>> __stack; > __stack.push(_M_start); > while (!__stack.empty()) > { > auto __u = __stack.top(); > __stack.pop(); > auto __dup = _M_nfa[__u]; > > auto __id = _M_nfa._M_insert_state(std::move(__dup)); > __m[__u] = __id; > if (__dup._M_has_alt()) > if (__dup._M_alt != _S_invalid_state_id > && __m.count(__dup._M_alt) == 0) > __stack.push(__dup._M_alt); > if (__u == _M_end) > continue; > if (__dup._M_next != _S_invalid_state_id > && __m.count(__dup._M_next) == 0) > __stack.push(__dup._M_next); > } > for (auto __it : __m) > { > auto __v = __it.second; > auto& __ref = _M_nfa[__v]; > if (__ref._M_next != _S_invalid_state_id) > __ref._M_next = __m.find(__ref._M_next)->second; > if (__ref._M_has_alt() && __ref._M_alt != _S_invalid_state_id) > __ref._M_alt = __m.find(__ref._M_alt)->second; > } > return _StateSeq(_M_nfa, __m[_M_start], __m[_M_end]); > } >} > > >} ># 401 "/usr/include/c++/13/bits/regex_automaton.h" 2 3 ># 66 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/regex_scanner.h" 1 3 ># 31 "/usr/include/c++/13/bits/regex_scanner.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ > > > > > > struct _ScannerBase > { > public: > > enum _TokenT : unsigned > { > _S_token_anychar, > _S_token_ord_char, > _S_token_oct_num, > _S_token_hex_num, > _S_token_backref, > _S_token_subexpr_begin, > _S_token_subexpr_no_group_begin, > _S_token_subexpr_lookahead_begin, > _S_token_subexpr_end, > _S_token_bracket_begin, > _S_token_bracket_neg_begin, > _S_token_bracket_end, > _S_token_interval_begin, > _S_token_interval_end, > _S_token_quoted_class, > _S_token_char_class_name, > _S_token_collsymbol, > _S_token_equiv_class_name, > _S_token_opt, > _S_token_or, > _S_token_closure0, > _S_token_closure1, > _S_token_line_begin, > _S_token_line_end, > _S_token_word_bound, > _S_token_comma, > _S_token_dup_count, > _S_token_eof, > _S_token_bracket_dash, > _S_token_unknown = -1u > }; > > protected: > typedef regex_constants::syntax_option_type _FlagT; > > enum _StateT > { > _S_state_normal, > _S_state_in_brace, > _S_state_in_bracket, > }; > > protected: > _ScannerBase(_FlagT __flags) > : _M_state(_S_state_normal), > _M_flags(__flags), > _M_escape_tbl(_M_is_ecma() > ? _M_ecma_escape_tbl > : _M_awk_escape_tbl), > _M_spec_char(_M_is_ecma() > ? _M_ecma_spec_char > : _M_flags & regex_constants::basic > ? _M_basic_spec_char > : _M_flags & regex_constants::extended > ? _M_extended_spec_char > : _M_flags & regex_constants::grep > ? ".[\\*^$\n" > : _M_flags & regex_constants::egrep > ? ".[\\()*+?{|^$\n" > : _M_flags & regex_constants::awk > ? _M_extended_spec_char > : nullptr), > _M_at_bracket_start(false) > { do { if (std::__is_constant_evaluated() && !bool(_M_spec_char)) __builtin_unreachable(); } while (false); } > > protected: > const char* > _M_find_escape(char __c) > { > auto __it = _M_escape_tbl; > for (; __it->first != '\0'; ++__it) > if (__it->first == __c) > return &__it->second; > return nullptr; > } > > bool > _M_is_ecma() const > { return _M_flags & regex_constants::ECMAScript; } > > bool > _M_is_basic() const > { return _M_flags & (regex_constants::basic | regex_constants::grep); } > > bool > _M_is_extended() const > { > return _M_flags & (regex_constants::extended > | regex_constants::egrep > | regex_constants::awk); > } > > bool > _M_is_grep() const > { return _M_flags & (regex_constants::grep | regex_constants::egrep); } > > bool > _M_is_awk() const > { return _M_flags & regex_constants::awk; } > > protected: > > const std::pair<char, _TokenT> _M_token_tbl[9] = > { > {'^', _S_token_line_begin}, > {'$', _S_token_line_end}, > {'.', _S_token_anychar}, > {'*', _S_token_closure0}, > {'+', _S_token_closure1}, > {'?', _S_token_opt}, > {'|', _S_token_or}, > {'\n', _S_token_or}, > {'\0', _S_token_or}, > }; > const std::pair<char, char> _M_ecma_escape_tbl[8] = > { > {'0', '\0'}, > {'b', '\b'}, > {'f', '\f'}, > {'n', '\n'}, > {'r', '\r'}, > {'t', '\t'}, > {'v', '\v'}, > {'\0', '\0'}, > }; > const std::pair<char, char> _M_awk_escape_tbl[11] = > { > {'"', '"'}, > {'/', '/'}, > {'\\', '\\'}, > {'a', '\a'}, > {'b', '\b'}, > {'f', '\f'}, > {'n', '\n'}, > {'r', '\r'}, > {'t', '\t'}, > {'v', '\v'}, > {'\0', '\0'}, > }; > const char* _M_ecma_spec_char = "^$\\.*+?()[]{}|"; > const char* _M_basic_spec_char = ".[\\*^$"; > const char* _M_extended_spec_char = ".[\\()*+?{|^$"; > > _StateT _M_state; > _FlagT _M_flags; > _TokenT _M_token; > const std::pair<char, char>* _M_escape_tbl; > const char* _M_spec_char; > bool _M_at_bracket_start; > }; ># 209 "/usr/include/c++/13/bits/regex_scanner.h" 3 > template<typename _CharT> > class _Scanner > : public _ScannerBase > { > public: > typedef std::basic_string<_CharT> _StringT; > typedef regex_constants::syntax_option_type _FlagT; > typedef const std::ctype<_CharT> _CtypeT; > > _Scanner(const _CharT* __begin, const _CharT* __end, > _FlagT __flags, std::locale __loc); > > void > _M_advance(); > > _TokenT > _M_get_token() const noexcept > { return _M_token; } > > const _StringT& > _M_get_value() const noexcept > { return _M_value; } > > > > > > > private: > void > _M_scan_normal(); > > void > _M_scan_in_bracket(); > > void > _M_scan_in_brace(); > > void > _M_eat_escape_ecma(); > > void > _M_eat_escape_posix(); > > void > _M_eat_escape_awk(); > > void > _M_eat_class(char); > > const _CharT* _M_current; > const _CharT* _M_end; > _CtypeT& _M_ctype; > _StringT _M_value; > void (_Scanner::* _M_eat_escape)(); > }; > > >} > >} > ># 1 "/usr/include/c++/13/bits/regex_scanner.tcc" 1 3 ># 49 "/usr/include/c++/13/bits/regex_scanner.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ > template<typename _CharT> > _Scanner<_CharT>:: > _Scanner(const _CharT* __begin, const _CharT* __end, > _FlagT __flags, std::locale __loc) > : _ScannerBase(__flags), > _M_current(__begin), _M_end(__end), > _M_ctype(std::use_facet<_CtypeT>(__loc)), > _M_eat_escape(_M_is_ecma() > ? &_Scanner::_M_eat_escape_ecma > : &_Scanner::_M_eat_escape_posix) > { _M_advance(); } > > template<typename _CharT> > void > _Scanner<_CharT>:: > _M_advance() > { > if (_M_current == _M_end) > { > _M_token = _S_token_eof; > return; > } > > if (_M_state == _S_state_normal) > _M_scan_normal(); > else if (_M_state == _S_state_in_bracket) > _M_scan_in_bracket(); > else if (_M_state == _S_state_in_brace) > _M_scan_in_brace(); > else > { > do { if (std::__is_constant_evaluated() && !bool(!"unexpected state while processing regex")) __builtin_unreachable(); } while (false); > } > } > > > > > template<typename _CharT> > void > _Scanner<_CharT>:: > _M_scan_normal() > { > auto __c = *_M_current++; > > if (__builtin_strchr(_M_spec_char, _M_ctype.narrow(__c, ' ')) == nullptr) > { > _M_token = _S_token_ord_char; > _M_value.assign(1, __c); > return; > } > if (__c == '\\') > { > if (_M_current == _M_end) > __throw_regex_error( > regex_constants::error_escape, > "Invalid escape at end of regular expression"); > > if (!_M_is_basic() > || (*_M_current != '(' > && *_M_current != ')' > && *_M_current != '{')) > { > (this->*_M_eat_escape)(); > return; > } > __c = *_M_current++; > } > if (__c == '(') > { > if (_M_is_ecma() && *_M_current == '?') > { > if (++_M_current == _M_end) > __throw_regex_error(regex_constants::error_paren); > > if (*_M_current == ':') > { > ++_M_current; > _M_token = _S_token_subexpr_no_group_begin; > } > else if (*_M_current == '=') > { > ++_M_current; > _M_token = _S_token_subexpr_lookahead_begin; > _M_value.assign(1, 'p'); > } > else if (*_M_current == '!') > { > ++_M_current; > _M_token = _S_token_subexpr_lookahead_begin; > _M_value.assign(1, 'n'); > } > else > __throw_regex_error(regex_constants::error_paren, > "Invalid '(?...)' zero-width assertion " > "in regular expression"); > } > else if (_M_flags & regex_constants::nosubs) > _M_token = _S_token_subexpr_no_group_begin; > else > _M_token = _S_token_subexpr_begin; > } > else if (__c == ')') > _M_token = _S_token_subexpr_end; > else if (__c == '[') > { > _M_state = _S_state_in_bracket; > _M_at_bracket_start = true; > if (_M_current != _M_end && *_M_current == '^') > { > _M_token = _S_token_bracket_neg_begin; > ++_M_current; > } > else > _M_token = _S_token_bracket_begin; > } > else if (__c == '{') > { > _M_state = _S_state_in_brace; > _M_token = _S_token_interval_begin; > } > else if (__builtin_expect(__c == _CharT(0), false)) > { > if (!_M_is_ecma()) > __throw_regex_error(regex_constants::_S_null); > _M_token = _S_token_ord_char; > _M_value.assign(1, __c); > } > else if (__c != ']' && __c != '}') > { > auto __it = _M_token_tbl; > auto __narrowc = _M_ctype.narrow(__c, '\0'); > for (; __it->first != '\0'; ++__it) > if (__it->first == __narrowc) > { > _M_token = __it->second; > return; > } > do { if (std::__is_constant_evaluated() && !bool(!"unexpected special character in regex")) __builtin_unreachable(); } while (false); > } > else > { > _M_token = _S_token_ord_char; > _M_value.assign(1, __c); > } > } > > > > > template<typename _CharT> > void > _Scanner<_CharT>:: > _M_scan_in_bracket() > { > if (_M_current == _M_end) > __throw_regex_error(regex_constants::error_brack); > > auto __c = *_M_current++; > > if (__c == '-') > _M_token = _S_token_bracket_dash; > else if (__c == '[') > { > if (_M_current == _M_end) > __throw_regex_error(regex_constants::error_brack, > "Incomplete '[[' character class in " > "regular expression"); > > if (*_M_current == '.') > { > _M_token = _S_token_collsymbol; > _M_eat_class(*_M_current++); > } > else if (*_M_current == ':') > { > _M_token = _S_token_char_class_name; > _M_eat_class(*_M_current++); > } > else if (*_M_current == '=') > { > _M_token = _S_token_equiv_class_name; > _M_eat_class(*_M_current++); > } > else > { > _M_token = _S_token_ord_char; > _M_value.assign(1, __c); > } > } > > > > else if (__c == ']' && (_M_is_ecma() || !_M_at_bracket_start)) > { > _M_token = _S_token_bracket_end; > _M_state = _S_state_normal; > } > > else if (__c == '\\' && (_M_is_ecma() || _M_is_awk())) > (this->*_M_eat_escape)(); > else > { > _M_token = _S_token_ord_char; > _M_value.assign(1, __c); > } > _M_at_bracket_start = false; > } > > > > template<typename _CharT> > void > _Scanner<_CharT>:: > _M_scan_in_brace() > { > if (_M_current == _M_end) > __throw_regex_error(regex_constants::error_brace); > > auto __c = *_M_current++; > > if (_M_ctype.is(_CtypeT::digit, __c)) > { > _M_token = _S_token_dup_count; > _M_value.assign(1, __c); > while (_M_current != _M_end > && _M_ctype.is(_CtypeT::digit, *_M_current)) > _M_value += *_M_current++; > } > else if (__c == ',') > _M_token = _S_token_comma; > > else if (_M_is_basic()) > { > if (__c == '\\' && _M_current != _M_end && *_M_current == '}') > { > _M_state = _S_state_normal; > _M_token = _S_token_interval_end; > ++_M_current; > } > else > __throw_regex_error(regex_constants::error_badbrace); > } > else if (__c == '}') > { > _M_state = _S_state_normal; > _M_token = _S_token_interval_end; > } > else > __throw_regex_error(regex_constants::error_badbrace); > } > > template<typename _CharT> > void > _Scanner<_CharT>:: > _M_eat_escape_ecma() > { > if (_M_current == _M_end) > __throw_regex_error(regex_constants::error_escape); > > auto __c = *_M_current++; > auto __pos = _M_find_escape(_M_ctype.narrow(__c, '\0')); > > if (__pos != nullptr && (__c != 'b' || _M_state == _S_state_in_bracket)) > { > _M_token = _S_token_ord_char; > _M_value.assign(1, *__pos); > } > else if (__c == 'b') > { > _M_token = _S_token_word_bound; > _M_value.assign(1, 'p'); > } > else if (__c == 'B') > { > _M_token = _S_token_word_bound; > _M_value.assign(1, 'n'); > } > > else if (__c == 'd' > || __c == 'D' > || __c == 's' > || __c == 'S' > || __c == 'w' > || __c == 'W') > { > _M_token = _S_token_quoted_class; > _M_value.assign(1, __c); > } > else if (__c == 'c') > { > if (_M_current == _M_end) > __throw_regex_error(regex_constants::error_escape, > "invalid '\\cX' control character in " > "regular expression"); > _M_token = _S_token_ord_char; > _M_value.assign(1, *_M_current++); > } > else if (__c == 'x' || __c == 'u') > { > _M_value.clear(); > const int __n = __c == 'x' ? 2 : 4; > for (int __i = 0; __i < __n; __i++) > { > if (_M_current == _M_end > || !_M_ctype.is(_CtypeT::xdigit, *_M_current)) > __throw_regex_error(regex_constants::error_escape, > __n == 2 > ? "Invalid '\\xNN' control character in " > "regular expression" > : "Invalid '\\uNNNN' control character in " > "regular expression"); > _M_value += *_M_current++; > } > _M_token = _S_token_hex_num; > } > > else if (_M_ctype.is(_CtypeT::digit, __c)) > { > _M_value.assign(1, __c); > while (_M_current != _M_end > && _M_ctype.is(_CtypeT::digit, *_M_current)) > _M_value += *_M_current++; > _M_token = _S_token_backref; > } > else > { > _M_token = _S_token_ord_char; > _M_value.assign(1, __c); > } > } > > > > template<typename _CharT> > void > _Scanner<_CharT>:: > _M_eat_escape_posix() > { > if (_M_current == _M_end) > __throw_regex_error(regex_constants::error_escape); > > auto __c = *_M_current; > auto __pos = __builtin_strchr(_M_spec_char, _M_ctype.narrow(__c, '\0')); > > if (__pos != nullptr && *__pos != '\0') > { > _M_token = _S_token_ord_char; > _M_value.assign(1, __c); > } > > else if (_M_is_awk()) > { > _M_eat_escape_awk(); > return; > } > else if (_M_is_basic() && _M_ctype.is(_CtypeT::digit, __c) && __c != '0') > { > _M_token = _S_token_backref; > _M_value.assign(1, __c); > } > else > { > > > __throw_regex_error(regex_constants::error_escape); > > > > > } > ++_M_current; > } > > template<typename _CharT> > void > _Scanner<_CharT>:: > _M_eat_escape_awk() > { > auto __c = *_M_current++; > auto __pos = _M_find_escape(_M_ctype.narrow(__c, '\0')); > > if (__pos != nullptr) > { > _M_token = _S_token_ord_char; > _M_value.assign(1, *__pos); > } > > else if (_M_ctype.is(_CtypeT::digit, __c) > && __c != '8' > && __c != '9') > { > _M_value.assign(1, __c); > for (int __i = 0; > __i < 2 > && _M_current != _M_end > && _M_ctype.is(_CtypeT::digit, *_M_current) > && *_M_current != '8' > && *_M_current != '9'; > __i++) > _M_value += *_M_current++; > _M_token = _S_token_oct_num; > return; > } > else > __throw_regex_error(regex_constants::error_escape); > } > > > > > template<typename _CharT> > void > _Scanner<_CharT>:: > _M_eat_class(char __ch) > { > for (_M_value.clear(); _M_current != _M_end && *_M_current != __ch;) > _M_value += *_M_current++; > if (_M_current == _M_end > || *_M_current++ != __ch > || _M_current == _M_end > || *_M_current++ != ']') > { > __throw_regex_error(__ch == ':' ? regex_constants::error_ctype > : regex_constants::error_collate); > } > } ># 582 "/usr/include/c++/13/bits/regex_scanner.tcc" 3 >} > >} ># 272 "/usr/include/c++/13/bits/regex_scanner.h" 2 3 ># 67 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/regex_compiler.h" 1 3 ># 31 "/usr/include/c++/13/bits/regex_compiler.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > >namespace __cxx11 { > > template<typename> > class regex_traits; > >} > >namespace __detail >{ > > > > > > template<typename, bool, bool> > struct _BracketMatcher; > > > > > > > template<typename _TraitsT> > class _Compiler > { > public: > typedef typename _TraitsT::char_type _CharT; > typedef _NFA<_TraitsT> _RegexT; > typedef regex_constants::syntax_option_type _FlagT; > > _Compiler(const _CharT* __b, const _CharT* __e, > const typename _TraitsT::locale_type& __traits, _FlagT __flags); > > shared_ptr<const _RegexT> > _M_get_nfa() noexcept > { return std::move(_M_nfa); } > > private: > typedef _Scanner<_CharT> _ScannerT; > typedef typename _TraitsT::string_type _StringT; > typedef typename _ScannerT::_TokenT _TokenT; > typedef _StateSeq<_TraitsT> _StateSeqT; > typedef std::stack<_StateSeqT> _StackT; > typedef std::ctype<_CharT> _CtypeT; > > > bool > _M_match_token(_TokenT __token); > > void > _M_disjunction(); > > void > _M_alternative(); > > bool > _M_term(); > > bool > _M_assertion(); > > bool > _M_quantifier(); > > bool > _M_atom(); > > bool > _M_bracket_expression(); > > template<bool __icase, bool __collate> > void > _M_insert_any_matcher_ecma(); > > template<bool __icase, bool __collate> > void > _M_insert_any_matcher_posix(); > > template<bool __icase, bool __collate> > void > _M_insert_char_matcher(); > > template<bool __icase, bool __collate> > void > _M_insert_character_class_matcher(); > > template<bool __icase, bool __collate> > void > _M_insert_bracket_matcher(bool __neg); > > > struct _BracketState > { > enum class _Type : char { _None, _Char, _Class } _M_type = _Type::_None; > _CharT _M_char = _CharT(); > > void > set(_CharT __c) noexcept { _M_type = _Type::_Char; _M_char = __c; } > > [[__nodiscard__]] _CharT > get() const noexcept { return _M_char; } > > void > reset(_Type __t = _Type::_None) noexcept { _M_type = __t; } > > explicit operator bool() const noexcept > { return _M_type != _Type::_None; } > > > [[__nodiscard__]] bool > _M_is_char() const noexcept { return _M_type == _Type::_Char; } > > > > [[__nodiscard__]] bool > _M_is_class() const noexcept { return _M_type == _Type::_Class; } > }; > > template<bool __icase, bool __collate> > using _BracketMatcher > = std::__detail::_BracketMatcher<_TraitsT, __icase, __collate>; > > > > > template<bool __icase, bool __collate> > bool > _M_expression_term(_BracketState& __last_char, > _BracketMatcher<__icase, __collate>& __matcher); > > int > _M_cur_int_value(int __radix); > > bool > _M_try_char(); > > _StateSeqT > _M_pop() > { > auto ret = _M_stack.top(); > _M_stack.pop(); > return ret; > } > > static _FlagT > _S_validate(_FlagT __f) > { > using namespace regex_constants; > switch (__f & (ECMAScript|basic|extended|awk|grep|egrep)) > { > case ECMAScript: > case basic: > case extended: > case awk: > case grep: > case egrep: > return __f; > case _FlagT(0): > return __f | ECMAScript; > default: > std::__throw_regex_error(_S_grammar, "conflicting grammar options"); > } > } > > _FlagT _M_flags; > _ScannerT _M_scanner; > shared_ptr<_RegexT> _M_nfa; > _StringT _M_value; > _StackT _M_stack; > const _TraitsT& _M_traits; > const _CtypeT& _M_ctype; > }; > > > template<typename _TraitsT, bool __icase, bool __collate> > class _RegexTranslatorBase > { > public: > typedef typename _TraitsT::char_type _CharT; > typedef typename _TraitsT::string_type _StringT; > typedef _StringT _StrTransT; > > explicit > _RegexTranslatorBase(const _TraitsT& __traits) > : _M_traits(__traits) > { } > > _CharT > _M_translate(_CharT __ch) const > { > if constexpr (__icase) > return _M_traits.translate_nocase(__ch); > else if constexpr (__collate) > return _M_traits.translate(__ch); > else > return __ch; > } > > _StrTransT > _M_transform(_CharT __ch) const > { > _StrTransT __str(1, __ch); > return _M_traits.transform(__str.begin(), __str.end()); > } > > > > > bool > _M_match_range(const _StrTransT& __first, const _StrTransT& __last, > const _StrTransT& __s) const > { return __first <= __s && __s <= __last; } > > protected: > bool _M_in_range_icase(_CharT __first, _CharT __last, _CharT __ch) const > { > typedef std::ctype<_CharT> __ctype_type; > const auto& __fctyp = use_facet<__ctype_type>(this->_M_traits.getloc()); > auto __lower = __fctyp.tolower(__ch); > auto __upper = __fctyp.toupper(__ch); > return (__first <= __lower && __lower <= __last) > || (__first <= __upper && __upper <= __last); > } > > const _TraitsT& _M_traits; > }; > > template<typename _TraitsT, bool __icase, bool __collate> > class _RegexTranslator > : public _RegexTranslatorBase<_TraitsT, __icase, __collate> > { > public: > typedef _RegexTranslatorBase<_TraitsT, __icase, __collate> _Base; > using _Base::_Base; > }; > > template<typename _TraitsT, bool __icase> > class _RegexTranslator<_TraitsT, __icase, false> > : public _RegexTranslatorBase<_TraitsT, __icase, false> > { > public: > typedef _RegexTranslatorBase<_TraitsT, __icase, false> _Base; > typedef typename _Base::_CharT _CharT; > typedef _CharT _StrTransT; > > using _Base::_Base; > > _StrTransT > _M_transform(_CharT __ch) const > { return __ch; } > > bool > _M_match_range(_CharT __first, _CharT __last, _CharT __ch) const > { > if constexpr (!__icase) > return __first <= __ch && __ch <= __last; > else > return this->_M_in_range_icase(__first, __last, __ch); > } > }; > > template<typename _CharType> > class _RegexTranslator<std::regex_traits<_CharType>, true, true> > : public _RegexTranslatorBase<std::regex_traits<_CharType>, true, true> > { > public: > typedef _RegexTranslatorBase<std::regex_traits<_CharType>, true, true> > _Base; > typedef typename _Base::_CharT _CharT; > typedef typename _Base::_StrTransT _StrTransT; > > using _Base::_Base; > > bool > _M_match_range(const _StrTransT& __first, const _StrTransT& __last, > const _StrTransT& __str) const > { > do { if (std::__is_constant_evaluated() && !bool(__first.size() == 1)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__last.size() == 1)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__str.size() == 1)) __builtin_unreachable(); } while (false); > return this->_M_in_range_icase(__first[0], __last[0], __str[0]); > } > }; > > template<typename _TraitsT> > class _RegexTranslator<_TraitsT, false, false> > { > public: > typedef typename _TraitsT::char_type _CharT; > typedef _CharT _StrTransT; > > explicit > _RegexTranslator(const _TraitsT&) > { } > > _CharT > _M_translate(_CharT __ch) const > { return __ch; } > > _StrTransT > _M_transform(_CharT __ch) const > { return __ch; } > > bool > _M_match_range(_CharT __first, _CharT __last, _CharT __ch) const > { return __first <= __ch && __ch <= __last; } > }; > > template<typename _TraitsT, bool __is_ecma, bool __icase, bool __collate> > struct _AnyMatcher; > > template<typename _TraitsT, bool __icase, bool __collate> > struct _AnyMatcher<_TraitsT, false, __icase, __collate> > { > typedef _RegexTranslator<_TraitsT, __icase, __collate> _TransT; > typedef typename _TransT::_CharT _CharT; > > explicit > _AnyMatcher(const _TraitsT& __traits) > : _M_translator(__traits) > { } > > bool > operator()(_CharT __ch) const > { > static auto __nul = _M_translator._M_translate('\0'); > return _M_translator._M_translate(__ch) != __nul; > } > > _TransT _M_translator; > }; > > template<typename _TraitsT, bool __icase, bool __collate> > struct _AnyMatcher<_TraitsT, true, __icase, __collate> > { > typedef _RegexTranslator<_TraitsT, __icase, __collate> _TransT; > typedef typename _TransT::_CharT _CharT; > > explicit > _AnyMatcher(const _TraitsT& __traits) > : _M_translator(__traits) > { } > > bool > operator()(_CharT __ch) const > { return _M_apply(__ch, typename is_same<_CharT, char>::type()); } > > bool > _M_apply(_CharT __ch, true_type) const > { > auto __c = _M_translator._M_translate(__ch); > auto __n = _M_translator._M_translate('\n'); > auto __r = _M_translator._M_translate('\r'); > return __c != __n && __c != __r; > } > > bool > _M_apply(_CharT __ch, false_type) const > { > auto __c = _M_translator._M_translate(__ch); > auto __n = _M_translator._M_translate('\n'); > auto __r = _M_translator._M_translate('\r'); > auto __u2028 = _M_translator._M_translate(u'\u2028'); > auto __u2029 = _M_translator._M_translate(u'\u2029'); > return __c != __n && __c != __r && __c != __u2028 && __c != __u2029; > } > > _TransT _M_translator; > }; > > template<typename _TraitsT, bool __icase, bool __collate> > struct _CharMatcher > { > typedef _RegexTranslator<_TraitsT, __icase, __collate> _TransT; > typedef typename _TransT::_CharT _CharT; > > _CharMatcher(_CharT __ch, const _TraitsT& __traits) > : _M_translator(__traits), _M_ch(_M_translator._M_translate(__ch)) > { } > > bool > operator()(_CharT __ch) const > { return _M_ch == _M_translator._M_translate(__ch); } > > _TransT _M_translator; > _CharT _M_ch; > }; > > > template<typename _TraitsT, bool __icase, bool __collate> > struct _BracketMatcher > { > public: > typedef _RegexTranslator<_TraitsT, __icase, __collate> _TransT; > typedef typename _TransT::_CharT _CharT; > typedef typename _TransT::_StrTransT _StrTransT; > typedef typename _TraitsT::string_type _StringT; > typedef typename _TraitsT::char_class_type _CharClassT; > > public: > _BracketMatcher(bool __is_non_matching, > const _TraitsT& __traits) > : _M_class_set(0), _M_translator(__traits), _M_traits(__traits), > _M_is_non_matching(__is_non_matching) > { } > > bool > operator()(_CharT __ch) const > { > ; > return _M_apply(__ch, _UseCache()); > } > > void > _M_add_char(_CharT __c) > { > _M_char_set.push_back(_M_translator._M_translate(__c)); > ; > } > > _StringT > _M_add_collate_element(const _StringT& __s) > { > auto __st = _M_traits.lookup_collatename(__s.data(), > __s.data() + __s.size()); > if (__st.empty()) > __throw_regex_error(regex_constants::error_collate, > "Invalid collate element."); > _M_char_set.push_back(_M_translator._M_translate(__st[0])); > ; > return __st; > } > > void > _M_add_equivalence_class(const _StringT& __s) > { > auto __st = _M_traits.lookup_collatename(__s.data(), > __s.data() + __s.size()); > if (__st.empty()) > __throw_regex_error(regex_constants::error_collate, > "Invalid equivalence class."); > __st = _M_traits.transform_primary(__st.data(), > __st.data() + __st.size()); > _M_equiv_set.push_back(__st); > ; > } > > > void > _M_add_character_class(const _StringT& __s, bool __neg) > { > auto __mask = _M_traits.lookup_classname(__s.data(), > __s.data() + __s.size(), > __icase); > if (__mask == 0) > __throw_regex_error(regex_constants::error_collate, > "Invalid character class."); > if (!__neg) > _M_class_set |= __mask; > else > _M_neg_class_set.push_back(__mask); > ; > } > > void > _M_make_range(_CharT __l, _CharT __r) > { > if (__l > __r) > __throw_regex_error(regex_constants::error_range, > "Invalid range in bracket expression."); > _M_range_set.push_back(make_pair(_M_translator._M_transform(__l), > _M_translator._M_transform(__r))); > ; > } > > void > _M_ready() > { > std::sort(_M_char_set.begin(), _M_char_set.end()); > auto __end = std::unique(_M_char_set.begin(), _M_char_set.end()); > _M_char_set.erase(__end, _M_char_set.end()); > _M_make_cache(_UseCache()); > ; > } > > private: > > using _UseCache = typename std::is_same<_CharT, char>::type; > > static constexpr size_t > _S_cache_size = > 1ul << (sizeof(_CharT) * 8 * int(_UseCache::value)); > > struct _Dummy { }; > using _CacheT = std::__conditional_t<_UseCache::value, > std::bitset<_S_cache_size>, > _Dummy>; > using _UnsignedCharT = typename std::make_unsigned<_CharT>::type; > > bool > _M_apply(_CharT __ch, false_type) const; > > bool > _M_apply(_CharT __ch, true_type) const > { return _M_cache[static_cast<_UnsignedCharT>(__ch)]; } > > void > _M_make_cache(true_type) > { > for (unsigned __i = 0; __i < _M_cache.size(); __i++) > _M_cache[__i] = _M_apply(static_cast<_CharT>(__i), false_type()); > } > > void > _M_make_cache(false_type) > { } > > private: > std::vector<_CharT> _M_char_set; > std::vector<_StringT> _M_equiv_set; > std::vector<pair<_StrTransT, _StrTransT>> _M_range_set; > std::vector<_CharClassT> _M_neg_class_set; > _CharClassT _M_class_set; > _TransT _M_translator; > const _TraitsT& _M_traits; > bool _M_is_non_matching; > _CacheT _M_cache; > > > > }; > > >} > >} > ># 1 "/usr/include/c++/13/bits/regex_compiler.tcc" 1 3 ># 58 "/usr/include/c++/13/bits/regex_compiler.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ > template<typename _TraitsT> > _Compiler<_TraitsT>:: > _Compiler(const _CharT* __b, const _CharT* __e, > const typename _TraitsT::locale_type& __loc, _FlagT __flags) > : _M_flags(_S_validate(__flags)), > _M_scanner(__b, __e, _M_flags, __loc), > _M_nfa(make_shared<_RegexT>(__loc, _M_flags)), > _M_traits(_M_nfa->_M_traits), > _M_ctype(std::use_facet<_CtypeT>(__loc)) > { > _StateSeqT __r(*_M_nfa, _M_nfa->_M_start()); > __r._M_append(_M_nfa->_M_insert_subexpr_begin()); > this->_M_disjunction(); > if (!_M_match_token(_ScannerT::_S_token_eof)) > __throw_regex_error(regex_constants::error_paren); > __r._M_append(_M_pop()); > do { if (std::__is_constant_evaluated() && !bool(_M_stack.empty())) __builtin_unreachable(); } while (false); > __r._M_append(_M_nfa->_M_insert_subexpr_end()); > __r._M_append(_M_nfa->_M_insert_accept()); > _M_nfa->_M_eliminate_dummy(); > } > > template<typename _TraitsT> > void > _Compiler<_TraitsT>:: > _M_disjunction() > { > this->_M_alternative(); > while (_M_match_token(_ScannerT::_S_token_or)) > { > _StateSeqT __alt1 = _M_pop(); > this->_M_alternative(); > _StateSeqT __alt2 = _M_pop(); > auto __end = _M_nfa->_M_insert_dummy(); > __alt1._M_append(__end); > __alt2._M_append(__end); > > > > _M_stack.push(_StateSeqT(*_M_nfa, > _M_nfa->_M_insert_alt( > __alt2._M_start, __alt1._M_start, false), > __end)); > } > } > > template<typename _TraitsT> > void > _Compiler<_TraitsT>:: > _M_alternative() > { > if (this->_M_term()) > { > _StateSeqT __re = _M_pop(); > this->_M_alternative(); > __re._M_append(_M_pop()); > _M_stack.push(__re); > } > else > _M_stack.push(_StateSeqT(*_M_nfa, _M_nfa->_M_insert_dummy())); > } > > template<typename _TraitsT> > bool > _Compiler<_TraitsT>:: > _M_term() > { > if (this->_M_assertion()) > return true; > if (this->_M_atom()) > { > while (this->_M_quantifier()) > ; > return true; > } > return false; > } > > template<typename _TraitsT> > bool > _Compiler<_TraitsT>:: > _M_assertion() > { > if (_M_match_token(_ScannerT::_S_token_line_begin)) > _M_stack.push(_StateSeqT(*_M_nfa, _M_nfa->_M_insert_line_begin())); > else if (_M_match_token(_ScannerT::_S_token_line_end)) > _M_stack.push(_StateSeqT(*_M_nfa, _M_nfa->_M_insert_line_end())); > else if (_M_match_token(_ScannerT::_S_token_word_bound)) > > _M_stack.push(_StateSeqT(*_M_nfa, _M_nfa-> > _M_insert_word_bound(_M_value[0] == 'n'))); > else if (_M_match_token(_ScannerT::_S_token_subexpr_lookahead_begin)) > { > auto __neg = _M_value[0] == 'n'; > this->_M_disjunction(); > if (!_M_match_token(_ScannerT::_S_token_subexpr_end)) > __throw_regex_error(regex_constants::error_paren); > auto __tmp = _M_pop(); > __tmp._M_append(_M_nfa->_M_insert_accept()); > _M_stack.push( > _StateSeqT( > *_M_nfa, > _M_nfa->_M_insert_lookahead(__tmp._M_start, __neg))); > } > else > return false; > return true; > } > > template<typename _TraitsT> > bool > _Compiler<_TraitsT>:: > _M_quantifier() > { > bool __neg = (_M_flags & regex_constants::ECMAScript); > auto __init = [this, &__neg]() > { > if (_M_stack.empty()) > __throw_regex_error(regex_constants::error_badrepeat); > __neg = __neg && _M_match_token(_ScannerT::_S_token_opt); > }; > if (_M_match_token(_ScannerT::_S_token_closure0)) > { > __init(); > auto __e = _M_pop(); > _StateSeqT __r(*_M_nfa, > _M_nfa->_M_insert_repeat(_S_invalid_state_id, > __e._M_start, __neg)); > __e._M_append(__r); > _M_stack.push(__r); > } > else if (_M_match_token(_ScannerT::_S_token_closure1)) > { > __init(); > auto __e = _M_pop(); > __e._M_append(_M_nfa->_M_insert_repeat(_S_invalid_state_id, > __e._M_start, __neg)); > _M_stack.push(__e); > } > else if (_M_match_token(_ScannerT::_S_token_opt)) > { > __init(); > auto __e = _M_pop(); > auto __end = _M_nfa->_M_insert_dummy(); > _StateSeqT __r(*_M_nfa, > _M_nfa->_M_insert_repeat(_S_invalid_state_id, > __e._M_start, __neg)); > __e._M_append(__end); > __r._M_append(__end); > _M_stack.push(__r); > } > else if (_M_match_token(_ScannerT::_S_token_interval_begin)) > { > if (_M_stack.empty()) > __throw_regex_error(regex_constants::error_badrepeat); > if (!_M_match_token(_ScannerT::_S_token_dup_count)) > __throw_regex_error(regex_constants::error_badbrace); > _StateSeqT __r(_M_pop()); > _StateSeqT __e(*_M_nfa, _M_nfa->_M_insert_dummy()); > long __min_rep = _M_cur_int_value(10); > bool __infi = false; > long __n = 0; > > > if (_M_match_token(_ScannerT::_S_token_comma)) > { > if (_M_match_token(_ScannerT::_S_token_dup_count)) > __n = _M_cur_int_value(10) - __min_rep; > else > __infi = true; > } > if (!_M_match_token(_ScannerT::_S_token_interval_end)) > __throw_regex_error(regex_constants::error_brace); > > __neg = __neg && _M_match_token(_ScannerT::_S_token_opt); > > for (long __i = 0; __i < __min_rep; ++__i) > __e._M_append(__r._M_clone()); > > if (__infi) > { > auto __tmp = __r._M_clone(); > _StateSeqT __s(*_M_nfa, > _M_nfa->_M_insert_repeat(_S_invalid_state_id, > __tmp._M_start, __neg)); > __tmp._M_append(__s); > __e._M_append(__s); > } > else > { > if (__n < 0) > __throw_regex_error(regex_constants::error_badbrace); > auto __end = _M_nfa->_M_insert_dummy(); > > > > std::stack<_StateIdT> __stack; > for (long __i = 0; __i < __n; ++__i) > { > auto __tmp = __r._M_clone(); > auto __alt = _M_nfa->_M_insert_repeat(__tmp._M_start, > __end, __neg); > __stack.push(__alt); > __e._M_append(_StateSeqT(*_M_nfa, __alt, __tmp._M_end)); > } > __e._M_append(__end); > while (!__stack.empty()) > { > auto& __tmp = (*_M_nfa)[__stack.top()]; > __stack.pop(); > std::swap(__tmp._M_next, __tmp._M_alt); > } > } > _M_stack.push(__e); > } > else > return false; > return true; > } ># 298 "/usr/include/c++/13/bits/regex_compiler.tcc" 3 > template<typename _TraitsT> > bool > _Compiler<_TraitsT>:: > _M_atom() > { > if (_M_match_token(_ScannerT::_S_token_anychar)) > { > if (!(_M_flags & regex_constants::ECMAScript)) > do { if (!(_M_flags & regex_constants::icase)) if (!(_M_flags & regex_constants::collate)) _M_insert_any_matcher_posix<false, false>(); else _M_insert_any_matcher_posix<false, true>(); else if (!(_M_flags & regex_constants::collate)) _M_insert_any_matcher_posix<true, false>(); else _M_insert_any_matcher_posix<true, true>(); } while (false); > else > do { if (!(_M_flags & regex_constants::icase)) if (!(_M_flags & regex_constants::collate)) _M_insert_any_matcher_ecma<false, false>(); else _M_insert_any_matcher_ecma<false, true>(); else if (!(_M_flags & regex_constants::collate)) _M_insert_any_matcher_ecma<true, false>(); else _M_insert_any_matcher_ecma<true, true>(); } while (false); > } > else if (_M_try_char()) > do { if (!(_M_flags & regex_constants::icase)) if (!(_M_flags & regex_constants::collate)) _M_insert_char_matcher<false, false>(); else _M_insert_char_matcher<false, true>(); else if (!(_M_flags & regex_constants::collate)) _M_insert_char_matcher<true, false>(); else _M_insert_char_matcher<true, true>(); } while (false); > else if (_M_match_token(_ScannerT::_S_token_backref)) > _M_stack.push(_StateSeqT(*_M_nfa, _M_nfa-> > _M_insert_backref(_M_cur_int_value(10)))); > else if (_M_match_token(_ScannerT::_S_token_quoted_class)) > do { if (!(_M_flags & regex_constants::icase)) if (!(_M_flags & regex_constants::collate)) _M_insert_character_class_matcher<false, false>(); else _M_insert_character_class_matcher<false, true>(); else if (!(_M_flags & regex_constants::collate)) _M_insert_character_class_matcher<true, false>(); else _M_insert_character_class_matcher<true, true>(); } while (false); > else if (_M_match_token(_ScannerT::_S_token_subexpr_no_group_begin)) > { > _StateSeqT __r(*_M_nfa, _M_nfa->_M_insert_dummy()); > this->_M_disjunction(); > if (!_M_match_token(_ScannerT::_S_token_subexpr_end)) > __throw_regex_error(regex_constants::error_paren); > __r._M_append(_M_pop()); > _M_stack.push(__r); > } > else if (_M_match_token(_ScannerT::_S_token_subexpr_begin)) > { > _StateSeqT __r(*_M_nfa, _M_nfa->_M_insert_subexpr_begin()); > this->_M_disjunction(); > if (!_M_match_token(_ScannerT::_S_token_subexpr_end)) > __throw_regex_error(regex_constants::error_paren); > __r._M_append(_M_pop()); > __r._M_append(_M_nfa->_M_insert_subexpr_end()); > _M_stack.push(__r); > } > else if (!_M_bracket_expression()) > return false; > return true; > } > > template<typename _TraitsT> > bool > _Compiler<_TraitsT>:: > _M_bracket_expression() > { > bool __neg = > _M_match_token(_ScannerT::_S_token_bracket_neg_begin); > if (!(__neg || _M_match_token(_ScannerT::_S_token_bracket_begin))) > return false; > do { if (!(_M_flags & regex_constants::icase)) if (!(_M_flags & regex_constants::collate)) _M_insert_bracket_matcher<false, false>(__neg); else _M_insert_bracket_matcher<false, true>(__neg); else if (!(_M_flags & regex_constants::collate)) _M_insert_bracket_matcher<true, false>(__neg); else _M_insert_bracket_matcher<true, true>(__neg); } while (false); > return true; > } > > > template<typename _TraitsT> > template<bool __icase, bool __collate> > void > _Compiler<_TraitsT>:: > _M_insert_any_matcher_ecma() > { > _M_stack.push(_StateSeqT(*_M_nfa, > _M_nfa->_M_insert_matcher > (_AnyMatcher<_TraitsT, true, __icase, __collate> > (_M_traits)))); > } > > template<typename _TraitsT> > template<bool __icase, bool __collate> > void > _Compiler<_TraitsT>:: > _M_insert_any_matcher_posix() > { > _M_stack.push(_StateSeqT(*_M_nfa, > _M_nfa->_M_insert_matcher > (_AnyMatcher<_TraitsT, false, __icase, __collate> > (_M_traits)))); > } > > template<typename _TraitsT> > template<bool __icase, bool __collate> > void > _Compiler<_TraitsT>:: > _M_insert_char_matcher() > { > _M_stack.push(_StateSeqT(*_M_nfa, > _M_nfa->_M_insert_matcher > (_CharMatcher<_TraitsT, __icase, __collate> > (_M_value[0], _M_traits)))); > } > > template<typename _TraitsT> > template<bool __icase, bool __collate> > void > _Compiler<_TraitsT>:: > _M_insert_character_class_matcher() > { > do { if (std::__is_constant_evaluated() && !bool(_M_value.size() == 1)) __builtin_unreachable(); } while (false); > _BracketMatcher<__icase, __collate> __matcher > (_M_ctype.is(_CtypeT::upper, _M_value[0]), _M_traits); > __matcher._M_add_character_class(_M_value, false); > __matcher._M_ready(); > _M_stack.push(_StateSeqT(*_M_nfa, > _M_nfa->_M_insert_matcher(std::move(__matcher)))); > } > > template<typename _TraitsT> > template<bool __icase, bool __collate> > void > _Compiler<_TraitsT>:: > _M_insert_bracket_matcher(bool __neg) > { > _BracketMatcher<__icase, __collate> __matcher(__neg, _M_traits); > _BracketState __last_char; > if (_M_try_char()) > __last_char.set(_M_value[0]); > else if (_M_match_token(_ScannerT::_S_token_bracket_dash)) > > __last_char.set('-'); > while (_M_expression_term(__last_char, __matcher)) > ; > if (__last_char._M_is_char()) > __matcher._M_add_char(__last_char.get()); > __matcher._M_ready(); > _M_stack.push(_StateSeqT( > *_M_nfa, > _M_nfa->_M_insert_matcher(std::move(__matcher)))); > } > > template<typename _TraitsT> > template<bool __icase, bool __collate> > bool > _Compiler<_TraitsT>:: > _M_expression_term(_BracketState& __last_char, > _BracketMatcher<__icase, __collate>& __matcher) > { > if (_M_match_token(_ScannerT::_S_token_bracket_end)) > return false; > > > const auto __push_char = [&](_CharT __ch) > { > if (__last_char._M_is_char()) > __matcher._M_add_char(__last_char.get()); > __last_char.set(__ch); > }; > > const auto __push_class = [&] > { > if (__last_char._M_is_char()) > __matcher._M_add_char(__last_char.get()); > > > __last_char.reset(_BracketState::_Type::_Class); > }; > > if (_M_match_token(_ScannerT::_S_token_collsymbol)) > { > auto __symbol = __matcher._M_add_collate_element(_M_value); > if (__symbol.size() == 1) > __push_char(__symbol[0]); > else > __push_class(); > } > else if (_M_match_token(_ScannerT::_S_token_equiv_class_name)) > { > __push_class(); > __matcher._M_add_equivalence_class(_M_value); > } > else if (_M_match_token(_ScannerT::_S_token_char_class_name)) > { > __push_class(); > __matcher._M_add_character_class(_M_value, false); > } > else if (_M_try_char()) > __push_char(_M_value[0]); ># 486 "/usr/include/c++/13/bits/regex_compiler.tcc" 3 > else if (_M_match_token(_ScannerT::_S_token_bracket_dash)) > { > if (_M_match_token(_ScannerT::_S_token_bracket_end)) > { > > __push_char('-'); > return false; > } > else if (__last_char._M_is_class()) > { > > __throw_regex_error(regex_constants::error_range, > "Invalid start of '[x-x]' range in " > "regular expression"); > } > else if (__last_char._M_is_char()) > { > if (_M_try_char()) > { > > __matcher._M_make_range(__last_char.get(), _M_value[0]); > __last_char.reset(); > } > else if (_M_match_token(_ScannerT::_S_token_bracket_dash)) > { > > __matcher._M_make_range(__last_char.get(), '-'); > __last_char.reset(); > } > else > __throw_regex_error(regex_constants::error_range, > "Invalid end of '[x-x]' range in " > "regular expression"); > } > else if (_M_flags & regex_constants::ECMAScript) > { > > > > __push_char('-'); > } > else > __throw_regex_error(regex_constants::error_range, > "Invalid location of '-' within '[...]' in " > "POSIX regular expression"); > } > else if (_M_match_token(_ScannerT::_S_token_quoted_class)) > { > __push_class(); > __matcher._M_add_character_class(_M_value, > _M_ctype.is(_CtypeT::upper, > _M_value[0])); > } > else > __throw_regex_error(regex_constants::error_brack, > "Unexpected character within '[...]' in " > "regular expression"); > return true; > } > > template<typename _TraitsT> > bool > _Compiler<_TraitsT>:: > _M_try_char() > { > bool __is_char = false; > if (_M_match_token(_ScannerT::_S_token_oct_num)) > { > __is_char = true; > _M_value.assign(1, _M_cur_int_value(8)); > } > else if (_M_match_token(_ScannerT::_S_token_hex_num)) > { > __is_char = true; > _M_value.assign(1, _M_cur_int_value(16)); > } > else if (_M_match_token(_ScannerT::_S_token_ord_char)) > __is_char = true; > return __is_char; > } > > template<typename _TraitsT> > bool > _Compiler<_TraitsT>:: > _M_match_token(_TokenT __token) > { > if (__token == _M_scanner._M_get_token()) > { > _M_value = _M_scanner._M_get_value(); > _M_scanner._M_advance(); > return true; > } > return false; > } > > template<typename _TraitsT> > int > _Compiler<_TraitsT>:: > _M_cur_int_value(int __radix) > { > int __v = 0; > for (_CharT __c : _M_value) > if (__builtin_mul_overflow(__v, __radix, &__v) > || __builtin_add_overflow(__v, _M_traits.value(__c, __radix), &__v)) > std::__throw_regex_error(regex_constants::error_backref, > "invalid back reference"); > return __v; > } > > template<typename _TraitsT, bool __icase, bool __collate> > bool > _BracketMatcher<_TraitsT, __icase, __collate>:: > _M_apply(_CharT __ch, false_type) const > { > return [this, __ch] > { > if (std::binary_search(_M_char_set.begin(), _M_char_set.end(), > _M_translator._M_translate(__ch))) > return true; > auto __s = _M_translator._M_transform(__ch); > for (auto& __it : _M_range_set) > if (_M_translator._M_match_range(__it.first, __it.second, __s)) > return true; > if (_M_traits.isctype(__ch, _M_class_set)) > return true; > if (std::find(_M_equiv_set.begin(), _M_equiv_set.end(), > _M_traits.transform_primary(&__ch, &__ch+1)) > != _M_equiv_set.end()) > return true; > for (auto& __it : _M_neg_class_set) > if (!_M_traits.isctype(__ch, __it)) > return true; > return false; > }() ^ _M_is_non_matching; > } >} > > >} ># 572 "/usr/include/c++/13/bits/regex_compiler.h" 2 3 ># 68 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/regex.h" 1 3 ># 35 "/usr/include/c++/13/bits/regex.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > >namespace __cxx11 { > template<typename, typename> > class basic_regex; > > template<typename _Bi_iter, typename _Alloc> > class match_results; > >} > >namespace __detail >{ > enum class _RegexExecutorPolicy : int { _S_auto, _S_alternate }; > > template<typename _BiIter, typename _Alloc, > typename _CharT, typename _TraitsT> > bool > __regex_algo_impl(_BiIter __s, _BiIter __e, > match_results<_BiIter, _Alloc>& __m, > const basic_regex<_CharT, _TraitsT>& __re, > regex_constants::match_flag_type __flags, > _RegexExecutorPolicy __policy, > bool __match_mode); > > template<typename, typename, typename, bool> > class _Executor; > > template<typename _Tp> > struct __is_contiguous_iter : false_type { }; > > template<typename _Tp> > struct __is_contiguous_iter<_Tp*> : true_type { }; > > template<typename _Tp, typename _Cont> > struct __is_contiguous_iter<__gnu_cxx::__normal_iterator<_Tp*, _Cont>> > : true_type { }; >} > >namespace __cxx11 { ># 95 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_type> > class regex_traits > { > public: > typedef _Ch_type char_type; > typedef std::basic_string<char_type> string_type; > typedef std::locale locale_type; > > private: > struct _RegexMask > { > typedef std::ctype_base::mask _BaseType; > _BaseType _M_base; > unsigned char _M_extended; > static constexpr unsigned char _S_under = 1 << 0; > static constexpr unsigned char _S_valid_mask = 0x1; > > constexpr _RegexMask(_BaseType __base = 0, > unsigned char __extended = 0) > : _M_base(__base), _M_extended(__extended) > { } > > constexpr _RegexMask > operator&(_RegexMask __other) const > { > return _RegexMask(_M_base & __other._M_base, > _M_extended & __other._M_extended); > } > > constexpr _RegexMask > operator|(_RegexMask __other) const > { > return _RegexMask(_M_base | __other._M_base, > _M_extended | __other._M_extended); > } > > constexpr _RegexMask > operator^(_RegexMask __other) const > { > return _RegexMask(_M_base ^ __other._M_base, > _M_extended ^ __other._M_extended); > } > > constexpr _RegexMask > operator~() const > { return _RegexMask(~_M_base, ~_M_extended); } > > _RegexMask& > operator&=(_RegexMask __other) > { return *this = (*this) & __other; } > > _RegexMask& > operator|=(_RegexMask __other) > { return *this = (*this) | __other; } > > _RegexMask& > operator^=(_RegexMask __other) > { return *this = (*this) ^ __other; } > > constexpr bool > operator==(_RegexMask __other) const > { > return (_M_extended & _S_valid_mask) > == (__other._M_extended & _S_valid_mask) > && _M_base == __other._M_base; > } > > > constexpr bool > operator!=(_RegexMask __other) const > { return !((*this) == __other); } > > }; > > public: > typedef _RegexMask char_class_type; > > public: > > > > regex_traits() { } ># 188 "/usr/include/c++/13/bits/regex.h" 3 > static std::size_t > length(const char_type* __p) > { return string_type::traits_type::length(__p); } ># 199 "/usr/include/c++/13/bits/regex.h" 3 > char_type > translate(char_type __c) const > { return __c; } ># 212 "/usr/include/c++/13/bits/regex.h" 3 > char_type > translate_nocase(char_type __c) const > { > typedef std::ctype<char_type> __ctype_type; > const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale)); > return __fctyp.tolower(__c); > } ># 240 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Fwd_iter> > string_type > transform(_Fwd_iter __first, _Fwd_iter __last) const > { > typedef std::collate<char_type> __collate_type; > const __collate_type& __fclt(use_facet<__collate_type>(_M_locale)); > string_type __s(__first, __last); > return __fclt.transform(__s.data(), __s.data() + __s.size()); > } ># 264 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Fwd_iter> > string_type > transform_primary(_Fwd_iter __first, _Fwd_iter __last) const > { > > > > > > > typedef std::ctype<char_type> __ctype_type; > const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale)); > std::vector<char_type> __s(__first, __last); > __fctyp.tolower(__s.data(), __s.data() + __s.size()); > return this->transform(__s.data(), __s.data() + __s.size()); > } ># 292 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Fwd_iter> > string_type > lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const; ># 333 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Fwd_iter> > char_class_type > lookup_classname(_Fwd_iter __first, _Fwd_iter __last, > bool __icase = false) const; ># 350 "/usr/include/c++/13/bits/regex.h" 3 > bool > isctype(_Ch_type __c, char_class_type __f) const; ># 363 "/usr/include/c++/13/bits/regex.h" 3 > int > value(_Ch_type __ch, int __radix) const; ># 377 "/usr/include/c++/13/bits/regex.h" 3 > locale_type > imbue(locale_type __loc) > { > std::swap(_M_locale, __loc); > return __loc; > } > > > > > > locale_type > getloc() const > { return _M_locale; } > > protected: > locale_type _M_locale; > }; ># 417 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_type, typename _Rx_traits = regex_traits<_Ch_type>> > class basic_regex > { > public: > static_assert(is_same<_Ch_type, typename _Rx_traits::char_type>::value, > "regex traits class must have the same char_type"); > > > typedef _Ch_type value_type; > typedef _Rx_traits traits_type; > typedef typename traits_type::string_type string_type; > typedef regex_constants::syntax_option_type flag_type; > typedef typename traits_type::locale_type locale_type; > > > > > > > static constexpr flag_type icase = regex_constants::icase; > static constexpr flag_type nosubs = regex_constants::nosubs; > static constexpr flag_type optimize = regex_constants::optimize; > static constexpr flag_type collate = regex_constants::collate; > static constexpr flag_type ECMAScript = regex_constants::ECMAScript; > static constexpr flag_type basic = regex_constants::basic; > static constexpr flag_type extended = regex_constants::extended; > static constexpr flag_type awk = regex_constants::awk; > static constexpr flag_type grep = regex_constants::grep; > static constexpr flag_type egrep = regex_constants::egrep; > > static constexpr flag_type multiline = regex_constants::multiline; ># 456 "/usr/include/c++/13/bits/regex.h" 3 > basic_regex() noexcept > : _M_flags(ECMAScript), _M_loc(), _M_automaton(nullptr) > { } ># 471 "/usr/include/c++/13/bits/regex.h" 3 > explicit > basic_regex(const _Ch_type* __p, flag_type __f = ECMAScript) > { _M_compile(__p, __p + _Rx_traits::length(__p), __f); } ># 487 "/usr/include/c++/13/bits/regex.h" 3 > basic_regex(const _Ch_type* __p, std::size_t __len, > flag_type __f = ECMAScript) > { > ; > _M_compile(__p, __p + __len, __f); > } > > > > > > > basic_regex(const basic_regex& __rhs) = default; > > > > > > > basic_regex(basic_regex&& __rhs) noexcept = default; ># 517 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_traits, typename _Ch_alloc> > explicit > basic_regex(const std::basic_string<_Ch_type, _Ch_traits, > _Ch_alloc>& __s, > flag_type __f = ECMAScript) > { _M_compile(__s.data(), __s.data() + __s.size(), __f); } ># 537 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _FwdIter> > basic_regex(_FwdIter __first, _FwdIter __last, > flag_type __f = ECMAScript) > { this->assign(__first, __last, __f); } ># 550 "/usr/include/c++/13/bits/regex.h" 3 > basic_regex(initializer_list<_Ch_type> __l, flag_type __f = ECMAScript) > { _M_compile(__l.begin(), __l.end(), __f); } > > > > > ~basic_regex() > { } > > > > > basic_regex& > operator=(const basic_regex&) = default; > > > > > basic_regex& > operator=(basic_regex&&) = default; ># 578 "/usr/include/c++/13/bits/regex.h" 3 > basic_regex& > operator=(const _Ch_type* __p) > { return this->assign(__p); } ># 590 "/usr/include/c++/13/bits/regex.h" 3 > basic_regex& > operator=(initializer_list<_Ch_type> __l) > { return this->assign(__l); } > > > > > > > > template<typename _Ch_traits, typename _Alloc> > basic_regex& > operator=(const basic_string<_Ch_type, _Ch_traits, _Alloc>& __s) > { return this->assign(__s); } > > > > > > > > basic_regex& > assign(const basic_regex& __rhs) noexcept > { return *this = __rhs; } > > > > > > > basic_regex& > assign(basic_regex&& __rhs) noexcept > { return *this = std::move(__rhs); } ># 637 "/usr/include/c++/13/bits/regex.h" 3 > basic_regex& > assign(const _Ch_type* __p, flag_type __flags = ECMAScript) > { > _M_compile(__p, __p + _Rx_traits::length(__p), __flags); > return *this; > } ># 659 "/usr/include/c++/13/bits/regex.h" 3 > basic_regex& > assign(const _Ch_type* __p, size_t __len, flag_type __flags = ECMAScript) > { > _M_compile(__p, __p + __len, __flags); > return *this; > } ># 677 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_traits, typename _Alloc> > basic_regex& > assign(const basic_string<_Ch_type, _Ch_traits, _Alloc>& __s, > flag_type __flags = ECMAScript) > { > _M_compile(__s.data(), __s.data() + __s.size(), __flags); > return *this; > } ># 699 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _InputIterator> > basic_regex& > assign(_InputIterator __first, _InputIterator __last, > flag_type __flags = ECMAScript) > { > > using _ValT = typename iterator_traits<_InputIterator>::value_type; > if constexpr (__detail::__is_contiguous_iter<_InputIterator>::value > && is_same_v<_ValT, value_type>) > { > ; > if constexpr (is_pointer_v<_InputIterator>) > _M_compile(__first, __last, __flags); > else > _M_compile(__first.base(), __last.base(), __flags); > } > else > > this->assign(string_type(__first, __last), __flags); > return *this; > } ># 732 "/usr/include/c++/13/bits/regex.h" 3 > basic_regex& > assign(initializer_list<_Ch_type> __l, flag_type __flags = ECMAScript) > { > _M_compile(__l.begin(), __l.end(), __flags); > return *this; > } > > > > > > > unsigned int > mark_count() const noexcept > { > if (_M_automaton) > return _M_automaton->_M_sub_count() - 1; > return 0; > } > > > > > > flag_type > flags() const noexcept > { return _M_flags; } > > > > > > > > locale_type > imbue(locale_type __loc) > { > std::swap(__loc, _M_loc); > _M_automaton.reset(); > return __loc; > } > > > > > > locale_type > getloc() const noexcept > { return _M_loc; } > > > > > > > > void > swap(basic_regex& __rhs) noexcept > { > std::swap(_M_flags, __rhs._M_flags); > std::swap(_M_loc, __rhs._M_loc); > std::swap(_M_automaton, __rhs._M_automaton); > } > > > > > > > > private: > typedef std::shared_ptr<const __detail::_NFA<_Rx_traits>> _AutomatonPtr; > > void > _M_compile(const _Ch_type* __first, const _Ch_type* __last, > flag_type __f) > { > __detail::_Compiler<_Rx_traits> __c(__first, __last, _M_loc, __f); > _M_automaton = __c._M_get_nfa(); > _M_flags = __f; > } > > template<typename _Bp, typename _Ap, typename _Cp, typename _Rp> > friend bool > __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&, > const basic_regex<_Cp, _Rp>&, > regex_constants::match_flag_type, > __detail::_RegexExecutorPolicy, bool); > > template<typename, typename, typename, bool> > friend class __detail::_Executor; > > flag_type _M_flags; > locale_type _M_loc; > _AutomatonPtr _M_automaton; > }; ># 872 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _ForwardIterator> > basic_regex(_ForwardIterator, _ForwardIterator, > regex_constants::syntax_option_type = {}) > -> basic_regex<typename iterator_traits<_ForwardIterator>::value_type>; > > > > typedef basic_regex<char> regex; > > > > typedef basic_regex<wchar_t> wregex; ># 894 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_type, typename _Rx_traits> > inline void > swap(basic_regex<_Ch_type, _Rx_traits>& __lhs, > basic_regex<_Ch_type, _Rx_traits>& __rhs) noexcept > { __lhs.swap(__rhs); } ># 919 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _BiIter> > class sub_match > > : public std::pair<_BiIter, _BiIter> > > { > typedef iterator_traits<_BiIter> __iter_traits; > > public: > typedef typename __iter_traits::value_type value_type; > typedef typename __iter_traits::difference_type difference_type; > typedef _BiIter iterator; > typedef basic_string<value_type> string_type; > > > > bool matched; > > constexpr sub_match() noexcept : matched() { } > > > difference_type > length() const noexcept > { return this->matched ? std::distance(this->first, this->second) : 0; } ># 954 "/usr/include/c++/13/bits/regex.h" 3 > operator string_type() const > { return str(); } > > > > > > > string_type > str() const > { > return this->matched > ? string_type(this->first, this->second) > : string_type(); > } ># 979 "/usr/include/c++/13/bits/regex.h" 3 > int > compare(const sub_match& __s) const > { return this->_M_str().compare(__s._M_str()); } ># 993 "/usr/include/c++/13/bits/regex.h" 3 > int > compare(const string_type& __s) const > { return this->_M_str().compare(__s); } > > int > compare(const value_type* __s) const > { return this->_M_str().compare(__s); } > > > > > int > _M_compare(const value_type* __s, size_t __n) const > { return this->_M_str().compare({__s, __n}); } > > > private: > > struct __string_view > { > using traits_type = typename string_type::traits_type; > > __string_view() = default; > > __string_view(const value_type* __s, size_t __n) noexcept > : _M_data(__s), _M_len(__n) { } > > __string_view(const value_type* __s) noexcept > : _M_data(__s), _M_len(traits_type::length(__s)) { } > > __string_view(const string_type& __s) noexcept > : _M_data(__s.data()), _M_len(__s.length()) { } > > int > compare(__string_view __s) const noexcept > { > if (const size_t __n = std::min(_M_len, __s._M_len)) > if (int __ret = traits_type::compare(_M_data, __s._M_data, __n)) > return __ret; > using __limits = __gnu_cxx::__int_traits<int>; > const difference_type __diff = _M_len - __s._M_len; > if (__diff > __limits::__max) > return __limits::__max; > if (__diff < __limits::__min) > return __limits::__min; > return static_cast<int>(__diff); > } > > private: > const value_type* _M_data = nullptr; > size_t _M_len = 0; > }; > > > template<typename _Iter = _BiIter> > __enable_if_t<__detail::__is_contiguous_iter<_Iter>::value, > __string_view> > _M_str() const noexcept > { > if (this->matched) > if (size_t __len = this->second - this->first) > return { std::__addressof(*this->first), __len }; > return {}; > } > > > template<typename _Iter = _BiIter> > __enable_if_t<!__detail::__is_contiguous_iter<_Iter>::value, > string_type> > _M_str() const > { return str(); } > }; > > > > typedef sub_match<const char*> csub_match; > > > typedef sub_match<string::const_iterator> ssub_match; > > > > typedef sub_match<const wchar_t*> wcsub_match; > > > typedef sub_match<wstring::const_iterator> wssub_match; ># 1091 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _BiIter> > inline bool > operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) > { return __lhs.compare(__rhs) == 0; } ># 1120 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _BiIter> > inline bool > operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) > { return __lhs.compare(__rhs) != 0; } > > > > > > > > template<typename _BiIter> > inline bool > operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) > { return __lhs.compare(__rhs) < 0; } > > > > > > > > template<typename _BiIter> > inline bool > operator<=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) > { return __lhs.compare(__rhs) <= 0; } > > > > > > > > template<typename _BiIter> > inline bool > operator>=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) > { return __lhs.compare(__rhs) >= 0; } > > > > > > > > template<typename _BiIter> > inline bool > operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) > { return __lhs.compare(__rhs) > 0; } > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > using __sub_match_string = basic_string< > typename iterator_traits<_Bi_iter>::value_type, > _Ch_traits, _Ch_alloc>; ># 1187 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs._M_compare(__lhs.data(), __lhs.size()) == 0; } ># 1200 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__lhs == __rhs); } > > > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs._M_compare(__lhs.data(), __lhs.size()) > 0; } > > > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs < __lhs; } > > > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator>=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__lhs < __rhs); } > > > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator<=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__rhs < __lhs); } ># 1262 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator==(const sub_match<_Bi_iter>& __lhs, > const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __rhs) > { return __lhs._M_compare(__rhs.data(), __rhs.size()) == 0; } ># 1293 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator!=(const sub_match<_Bi_iter>& __lhs, > const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __rhs) > { return !(__lhs == __rhs); } > > > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator<(const sub_match<_Bi_iter>& __lhs, > const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __rhs) > { return __lhs._M_compare(__rhs.data(), __rhs.size()) < 0; } > > > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator>(const sub_match<_Bi_iter>& __lhs, > const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __rhs) > { return __rhs < __lhs; } > > > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator>=(const sub_match<_Bi_iter>& __lhs, > const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __rhs) > { return !(__lhs < __rhs); } > > > > > > > > template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc> > inline bool > operator<=(const sub_match<_Bi_iter>& __lhs, > const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __rhs) > { return !(__rhs < __lhs); } ># 1354 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs.compare(__lhs) == 0; } ># 1367 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__lhs == __rhs); } > > > > > > > > template<typename _Bi_iter> > inline bool > operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs.compare(__lhs) > 0; } > > > > > > > > template<typename _Bi_iter> > inline bool > operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs < __lhs; } > > > > > > > > template<typename _Bi_iter> > inline bool > operator>=(typename iterator_traits<_Bi_iter>::value_type const* __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__lhs < __rhs); } > > > > > > > > template<typename _Bi_iter> > inline bool > operator<=(typename iterator_traits<_Bi_iter>::value_type const* __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__rhs < __lhs); } ># 1429 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator==(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const* __rhs) > { return __lhs.compare(__rhs) == 0; } ># 1461 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator!=(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const* __rhs) > { return !(__lhs == __rhs); } > > > > > > > > template<typename _Bi_iter> > inline bool > operator<(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const* __rhs) > { return __lhs.compare(__rhs) < 0; } > > > > > > > > template<typename _Bi_iter> > inline bool > operator>(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const* __rhs) > { return __rhs < __lhs; } > > > > > > > > template<typename _Bi_iter> > inline bool > operator>=(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const* __rhs) > { return !(__lhs < __rhs); } > > > > > > > > template<typename _Bi_iter> > inline bool > operator<=(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const* __rhs) > { return !(__rhs < __lhs); } ># 1522 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs._M_compare(std::__addressof(__lhs), 1) == 0; } ># 1535 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__lhs == __rhs); } ># 1548 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs._M_compare(std::__addressof(__lhs), 1) > 0; } ># 1561 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return __rhs < __lhs; } ># 1574 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator>=(typename iterator_traits<_Bi_iter>::value_type const& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__lhs < __rhs); } ># 1587 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator<=(typename iterator_traits<_Bi_iter>::value_type const& __lhs, > const sub_match<_Bi_iter>& __rhs) > { return !(__rhs < __lhs); } ># 1601 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator==(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const& __rhs) > { return __lhs._M_compare(std::__addressof(__rhs), 1) == 0; } ># 1635 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator!=(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const& __rhs) > { return !(__lhs == __rhs); } ># 1648 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator<(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const& __rhs) > { return __lhs._M_compare(std::__addressof(__rhs), 1) < 0; } ># 1661 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator>(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const& __rhs) > { return __rhs < __lhs; } ># 1674 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator>=(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const& __rhs) > { return !(__lhs < __rhs); } ># 1687 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter> > inline bool > operator<=(const sub_match<_Bi_iter>& __lhs, > typename iterator_traits<_Bi_iter>::value_type const& __rhs) > { return !(__rhs < __lhs); } ># 1702 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_type, typename _Ch_traits, typename _Bi_iter> > inline > basic_ostream<_Ch_type, _Ch_traits>& > operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, > const sub_match<_Bi_iter>& __m) > { return __os << __m.str(); } ># 1736 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, > typename _Alloc = allocator<sub_match<_Bi_iter> > > > class match_results > : private std::vector<sub_match<_Bi_iter>, _Alloc> > { > private: ># 1758 "/usr/include/c++/13/bits/regex.h" 3 > typedef std::vector<sub_match<_Bi_iter>, _Alloc> _Base_type; > > typedef std::vector<sub_match<_Bi_iter>, _Alloc> _Unchecked; > typedef std::iterator_traits<_Bi_iter> __iter_traits; > typedef regex_constants::match_flag_type match_flag_type; > > public: > > > > > typedef sub_match<_Bi_iter> value_type; > typedef const value_type& const_reference; > typedef value_type& reference; > typedef typename _Base_type::const_iterator const_iterator; > typedef const_iterator iterator; > typedef typename __iter_traits::difference_type difference_type; > typedef typename allocator_traits<_Alloc>::size_type size_type; > typedef _Alloc allocator_type; > typedef typename __iter_traits::value_type char_type; > typedef std::basic_string<char_type> string_type; > > > public: ># 1791 "/usr/include/c++/13/bits/regex.h" 3 > match_results() : match_results(_Alloc()) { } > > > > > > explicit > match_results(const _Alloc& __a) noexcept > : _Base_type(__a) > { } > > > > > match_results(const match_results&) = default; > > > > > match_results(match_results&&) noexcept = default; > > > > > match_results& > operator=(const match_results&) = default; > > > > > match_results& > operator=(match_results&&) = default; > > > > > ~match_results() = default; > > > > > match_results(const match_results& __m, const _Alloc& __a) > : _Base_type(__m, __a) { } > > match_results(match_results&& __m, const _Alloc& __a) > noexcept(noexcept(_Base_type(std::move(__m), __a))) > : _Base_type(std::move(__m), __a) { } ># 1847 "/usr/include/c++/13/bits/regex.h" 3 > bool ready() const noexcept { return !_Unchecked::empty(); } ># 1863 "/usr/include/c++/13/bits/regex.h" 3 > size_type > size() const noexcept > { return _Unchecked::empty() ? 0 : _Unchecked::size() - 3; } > > size_type > max_size() const noexcept > { return _Unchecked::max_size() - 3; } > > > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _Unchecked::size() <= 3; } ># 1895 "/usr/include/c++/13/bits/regex.h" 3 > difference_type > length(size_type __sub = 0) const > { return (*this)[__sub].length(); } ># 1910 "/usr/include/c++/13/bits/regex.h" 3 > difference_type > position(size_type __sub = 0) const > { return std::distance(_M_begin, (*this)[__sub].first); } ># 1923 "/usr/include/c++/13/bits/regex.h" 3 > string_type > str(size_type __sub = 0) const > { return string_type((*this)[__sub]); } ># 1938 "/usr/include/c++/13/bits/regex.h" 3 > const_reference > operator[](size_type __sub) const > { > do { if (std::__is_constant_evaluated() && !bool(ready())) __builtin_unreachable(); } while (false); > return __sub < size() > ? _Unchecked::operator[](__sub) > : _M_unmatched_sub(); > } ># 1955 "/usr/include/c++/13/bits/regex.h" 3 > const_reference > prefix() const > { > do { if (std::__is_constant_evaluated() && !bool(ready())) __builtin_unreachable(); } while (false); > return !empty() ? _M_prefix() : _M_unmatched_sub(); > } ># 1970 "/usr/include/c++/13/bits/regex.h" 3 > const_reference > suffix() const > { > do { if (std::__is_constant_evaluated() && !bool(ready())) __builtin_unreachable(); } while (false); > return !empty() ? _M_suffix() : _M_unmatched_sub(); > } > > > > > const_iterator > begin() const noexcept > { return _Base_type::begin(); } > > > > > const_iterator > cbegin() const noexcept > { return this->begin(); } > > > > > const_iterator > end() const noexcept > { return _Base_type::end() - (_Base_type::empty() ? 0 : 3); } > > > > > const_iterator > cend() const noexcept > { return this->end(); } ># 2020 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Out_iter> > _Out_iter > format(_Out_iter __out, const char_type* __fmt_first, > const char_type* __fmt_last, > match_flag_type __flags = regex_constants::format_default) const; > > > > > template<typename _Out_iter, typename _St, typename _Sa> > _Out_iter > format(_Out_iter __out, const basic_string<char_type, _St, _Sa>& __fmt, > match_flag_type __flags = regex_constants::format_default) const > { > return format(__out, __fmt.data(), __fmt.data() + __fmt.size(), > __flags); > } > > > > > template<typename _St, typename _Sa> > basic_string<char_type, _St, _Sa> > format(const basic_string<char_type, _St, _Sa>& __fmt, > match_flag_type __flags = regex_constants::format_default) const > { > basic_string<char_type, _St, _Sa> __result; > format(std::back_inserter(__result), __fmt, __flags); > return __result; > } > > > > > string_type > format(const char_type* __fmt, > match_flag_type __flags = regex_constants::format_default) const > { > string_type __result; > format(std::back_inserter(__result), > __fmt, > __fmt + char_traits<char_type>::length(__fmt), > __flags); > return __result; > } ># 2076 "/usr/include/c++/13/bits/regex.h" 3 > allocator_type > get_allocator() const noexcept > { return _Base_type::get_allocator(); } ># 2090 "/usr/include/c++/13/bits/regex.h" 3 > void > swap(match_results& __that) noexcept > { > using std::swap; > _Base_type::swap(__that); > swap(_M_begin, __that._M_begin); > } > > > private: > template<typename, typename, typename> > friend class regex_iterator; > > > > template<typename, typename, typename, bool> > friend class __detail::_Executor; > > template<typename _Bp, typename _Ap, typename _Cp, typename _Rp> > friend bool > __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&, > const basic_regex<_Cp, _Rp>&, > regex_constants::match_flag_type, > __detail::_RegexExecutorPolicy, bool); > > > > void > _M_resize(unsigned int __size) > { _Unchecked::assign(__size + 3, sub_match<_Bi_iter>{}); } > > > void > _M_establish_failed_match(_Bi_iter __end) > { > sub_match<_Bi_iter> __sm; > __sm.first = __sm.second = __end; > _Unchecked::assign(3, __sm); > } > > const_reference > _M_unmatched_sub() const > { return _Unchecked::operator[](_Unchecked::size() - 3); } > > sub_match<_Bi_iter>& > _M_unmatched_sub() > { return _Unchecked::operator[](_Unchecked::size() - 3); } > > const_reference > _M_prefix() const > { return _Unchecked::operator[](_Unchecked::size() - 2); } > > sub_match<_Bi_iter>& > _M_prefix() > { return _Unchecked::operator[](_Unchecked::size() - 2); } > > const_reference > _M_suffix() const > { return _Unchecked::operator[](_Unchecked::size() - 1); } > > sub_match<_Bi_iter>& > _M_suffix() > { return _Unchecked::operator[](_Unchecked::size() - 1); } > > _Bi_iter _M_begin {}; > > }; > > typedef match_results<const char*> cmatch; > typedef match_results<string::const_iterator> smatch; > > typedef match_results<const wchar_t*> wcmatch; > typedef match_results<wstring::const_iterator> wsmatch; ># 2174 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Alloc> > inline bool > operator==(const match_results<_Bi_iter, _Alloc>& __m1, > const match_results<_Bi_iter, _Alloc>& __m2) > { > if (__m1.ready() != __m2.ready()) > return false; > if (!__m1.ready()) > return true; > if (__m1.empty() != __m2.empty()) > return false; > if (__m1.empty()) > return true; > return __m1.prefix() == __m2.prefix() > && __m1.size() == __m2.size() > && std::equal(__m1.begin(), __m1.end(), __m2.begin()) > && __m1.suffix() == __m2.suffix(); > } ># 2201 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, class _Alloc> > inline bool > operator!=(const match_results<_Bi_iter, _Alloc>& __m1, > const match_results<_Bi_iter, _Alloc>& __m2) > { return !(__m1 == __m2); } ># 2218 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Alloc> > inline void > swap(match_results<_Bi_iter, _Alloc>& __lhs, > match_results<_Bi_iter, _Alloc>& __rhs) noexcept > { __lhs.swap(__rhs); } > >} ># 2248 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Alloc, > typename _Ch_type, typename _Rx_traits> > inline bool > regex_match(_Bi_iter __s, > _Bi_iter __e, > match_results<_Bi_iter, _Alloc>& __m, > const basic_regex<_Ch_type, _Rx_traits>& __re, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > return __detail::__regex_algo_impl(__s, __e, __m, __re, __flags, > __detail::_RegexExecutorPolicy::_S_auto, true); > } ># 2276 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Ch_type, typename _Rx_traits> > inline bool > regex_match(_Bi_iter __first, _Bi_iter __last, > const basic_regex<_Ch_type, _Rx_traits>& __re, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > match_results<_Bi_iter> __what; > return regex_match(__first, __last, __what, __re, __flags); > } ># 2301 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_type, typename _Alloc, typename _Rx_traits> > inline bool > regex_match(const _Ch_type* __s, > match_results<const _Ch_type*, _Alloc>& __m, > const basic_regex<_Ch_type, _Rx_traits>& __re, > regex_constants::match_flag_type __f > = regex_constants::match_default) > { return regex_match(__s, __s + _Rx_traits::length(__s), __m, __re, __f); } ># 2324 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_traits, typename _Ch_alloc, > typename _Alloc, typename _Ch_type, typename _Rx_traits> > inline bool > regex_match(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>& __s, > match_results<typename basic_string<_Ch_type, > _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>& __m, > const basic_regex<_Ch_type, _Rx_traits>& __re, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { return regex_match(__s.begin(), __s.end(), __m, __re, __flags); } > > > > > template<typename _Ch_traits, typename _Ch_alloc, > typename _Alloc, typename _Ch_type, typename _Rx_traits> > bool > regex_match(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&&, > match_results<typename basic_string<_Ch_type, > _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>&, > const basic_regex<_Ch_type, _Rx_traits>&, > regex_constants::match_flag_type > = regex_constants::match_default) = delete; ># 2361 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_type, class _Rx_traits> > inline bool > regex_match(const _Ch_type* __s, > const basic_regex<_Ch_type, _Rx_traits>& __re, > regex_constants::match_flag_type __f > = regex_constants::match_default) > { return regex_match(__s, __s + _Rx_traits::length(__s), __re, __f); } ># 2382 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_traits, typename _Str_allocator, > typename _Ch_type, typename _Rx_traits> > inline bool > regex_match(const basic_string<_Ch_type, _Ch_traits, _Str_allocator>& __s, > const basic_regex<_Ch_type, _Rx_traits>& __re, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { return regex_match(__s.begin(), __s.end(), __re, __flags); } ># 2405 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Alloc, > typename _Ch_type, typename _Rx_traits> > inline bool > regex_search(_Bi_iter __s, _Bi_iter __e, > match_results<_Bi_iter, _Alloc>& __m, > const basic_regex<_Ch_type, _Rx_traits>& __re, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > return __detail::__regex_algo_impl(__s, __e, __m, __re, __flags, > __detail::_RegexExecutorPolicy::_S_auto, false); > } ># 2429 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, typename _Ch_type, typename _Rx_traits> > inline bool > regex_search(_Bi_iter __first, _Bi_iter __last, > const basic_regex<_Ch_type, _Rx_traits>& __re, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > match_results<_Bi_iter> __what; > return regex_search(__first, __last, __what, __re, __flags); > } ># 2452 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_type, class _Alloc, class _Rx_traits> > inline bool > regex_search(const _Ch_type* __s, > match_results<const _Ch_type*, _Alloc>& __m, > const basic_regex<_Ch_type, _Rx_traits>& __e, > regex_constants::match_flag_type __f > = regex_constants::match_default) > { return regex_search(__s, __s + _Rx_traits::length(__s), __m, __e, __f); } ># 2471 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_type, typename _Rx_traits> > inline bool > regex_search(const _Ch_type* __s, > const basic_regex<_Ch_type, _Rx_traits>& __e, > regex_constants::match_flag_type __f > = regex_constants::match_default) > { return regex_search(__s, __s + _Rx_traits::length(__s), __e, __f); } ># 2489 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_traits, typename _String_allocator, > typename _Ch_type, typename _Rx_traits> > inline bool > regex_search(const basic_string<_Ch_type, _Ch_traits, > _String_allocator>& __s, > const basic_regex<_Ch_type, _Rx_traits>& __e, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { return regex_search(__s.begin(), __s.end(), __e, __flags); } ># 2511 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Ch_traits, typename _Ch_alloc, > typename _Alloc, typename _Ch_type, > typename _Rx_traits> > inline bool > regex_search(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>& __s, > match_results<typename basic_string<_Ch_type, > _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>& __m, > const basic_regex<_Ch_type, _Rx_traits>& __e, > regex_constants::match_flag_type __f > = regex_constants::match_default) > { return regex_search(__s.begin(), __s.end(), __m, __e, __f); } > > > > > template<typename _Ch_traits, typename _Ch_alloc, > typename _Alloc, typename _Ch_type, > typename _Rx_traits> > bool > regex_search(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&&, > match_results<typename basic_string<_Ch_type, > _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>&, > const basic_regex<_Ch_type, _Rx_traits>&, > regex_constants::match_flag_type > = regex_constants::match_default) = delete; > > > > > template<typename _Out_iter, typename _Bi_iter, > typename _Rx_traits, typename _Ch_type> > _Out_iter > __regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, > const basic_regex<_Ch_type, _Rx_traits>& __e, > const _Ch_type* __fmt, size_t __len, > regex_constants::match_flag_type __flags); ># 2562 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Out_iter, typename _Bi_iter, > typename _Rx_traits, typename _Ch_type, > typename _St, typename _Sa> > inline _Out_iter > regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, > const basic_regex<_Ch_type, _Rx_traits>& __e, > const basic_string<_Ch_type, _St, _Sa>& __fmt, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > return std::__regex_replace(__out, __first, __last, __e, __fmt.c_str(), > __fmt.length(), __flags); > } ># 2589 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Out_iter, typename _Bi_iter, > typename _Rx_traits, typename _Ch_type> > _Out_iter > regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, > const basic_regex<_Ch_type, _Rx_traits>& __e, > const _Ch_type* __fmt, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > return std::__regex_replace(__out, __first, __last, __e, __fmt, > char_traits<_Ch_type>::length(__fmt), > __flags); > } ># 2615 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Rx_traits, typename _Ch_type, > typename _St, typename _Sa, typename _Fst, typename _Fsa> > inline basic_string<_Ch_type, _St, _Sa> > regex_replace(const basic_string<_Ch_type, _St, _Sa>& __s, > const basic_regex<_Ch_type, _Rx_traits>& __e, > const basic_string<_Ch_type, _Fst, _Fsa>& __fmt, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > basic_string<_Ch_type, _St, _Sa> __result; > regex_replace(std::back_inserter(__result), > __s.begin(), __s.end(), __e, __fmt, __flags); > return __result; > } ># 2641 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Rx_traits, typename _Ch_type, > typename _St, typename _Sa> > inline basic_string<_Ch_type, _St, _Sa> > regex_replace(const basic_string<_Ch_type, _St, _Sa>& __s, > const basic_regex<_Ch_type, _Rx_traits>& __e, > const _Ch_type* __fmt, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > basic_string<_Ch_type, _St, _Sa> __result; > regex_replace(std::back_inserter(__result), > __s.begin(), __s.end(), __e, __fmt, __flags); > return __result; > } ># 2667 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Rx_traits, typename _Ch_type, > typename _St, typename _Sa> > inline basic_string<_Ch_type> > regex_replace(const _Ch_type* __s, > const basic_regex<_Ch_type, _Rx_traits>& __e, > const basic_string<_Ch_type, _St, _Sa>& __fmt, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > basic_string<_Ch_type> __result; > regex_replace(std::back_inserter(__result), __s, > __s + char_traits<_Ch_type>::length(__s), > __e, __fmt, __flags); > return __result; > } ># 2694 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Rx_traits, typename _Ch_type> > inline basic_string<_Ch_type> > regex_replace(const _Ch_type* __s, > const basic_regex<_Ch_type, _Rx_traits>& __e, > const _Ch_type* __fmt, > regex_constants::match_flag_type __flags > = regex_constants::match_default) > { > basic_string<_Ch_type> __result; > regex_replace(std::back_inserter(__result), __s, > __s + char_traits<_Ch_type>::length(__s), > __e, __fmt, __flags); > return __result; > } > > > >namespace __cxx11 { ># 2721 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, > typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, > typename _Rx_traits = regex_traits<_Ch_type> > > class regex_iterator > { > public: > typedef basic_regex<_Ch_type, _Rx_traits> regex_type; > typedef match_results<_Bi_iter> value_type; > typedef std::ptrdiff_t difference_type; > typedef const value_type* pointer; > typedef const value_type& reference; > typedef std::forward_iterator_tag iterator_category; > > > > > > regex_iterator() = default; ># 2747 "/usr/include/c++/13/bits/regex.h" 3 > regex_iterator(_Bi_iter __a, _Bi_iter __b, const regex_type& __re, > regex_constants::match_flag_type __m > = regex_constants::match_default) > : _M_begin(__a), _M_end(__b), _M_pregex(&__re), _M_flags(__m), _M_match() > { > if (!regex_search(_M_begin, _M_end, _M_match, *_M_pregex, _M_flags)) > *this = regex_iterator(); > } > > > > regex_iterator(_Bi_iter, _Bi_iter, const regex_type&&, > regex_constants::match_flag_type > = regex_constants::match_default) = delete; > > > regex_iterator(const regex_iterator&) = default; > > > regex_iterator& > operator=(const regex_iterator&) = default; > > ~regex_iterator() = default; > > > > > bool > operator==(const regex_iterator&) const noexcept; ># 2788 "/usr/include/c++/13/bits/regex.h" 3 > bool > operator!=(const regex_iterator& __rhs) const noexcept > { return !(*this == __rhs); } > > > > > > const value_type& > operator*() const noexcept > { return _M_match; } > > > > > const value_type* > operator->() const noexcept > { return &_M_match; } > > > > > regex_iterator& > operator++(); > > > > > regex_iterator > operator++(int) > { > auto __tmp = *this; > ++(*this); > return __tmp; > } > > private: > _Bi_iter _M_begin {}; > _Bi_iter _M_end {}; > const regex_type* _M_pregex = nullptr; > regex_constants::match_flag_type _M_flags {}; > match_results<_Bi_iter> _M_match; > }; > > typedef regex_iterator<const char*> cregex_iterator; > typedef regex_iterator<string::const_iterator> sregex_iterator; > > typedef regex_iterator<const wchar_t*> wcregex_iterator; > typedef regex_iterator<wstring::const_iterator> wsregex_iterator; ># 2850 "/usr/include/c++/13/bits/regex.h" 3 > template<typename _Bi_iter, > typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, > typename _Rx_traits = regex_traits<_Ch_type> > > class regex_token_iterator > { > public: > typedef basic_regex<_Ch_type, _Rx_traits> regex_type; > typedef sub_match<_Bi_iter> value_type; > typedef std::ptrdiff_t difference_type; > typedef const value_type* pointer; > typedef const value_type& reference; > typedef std::forward_iterator_tag iterator_category; > > public: > > > > > > > > regex_token_iterator() > : _M_position(), _M_subs(), _M_suffix(), _M_n(0), _M_result(nullptr), > _M_has_m1(false) > { } ># 2893 "/usr/include/c++/13/bits/regex.h" 3 > regex_token_iterator(_Bi_iter __a, _Bi_iter __b, const regex_type& __re, > int __submatch = 0, > regex_constants::match_flag_type __m > = regex_constants::match_default) > : _M_position(__a, __b, __re, __m), _M_subs(1, __submatch), _M_n(0) > { _M_init(__a, __b); } ># 2909 "/usr/include/c++/13/bits/regex.h" 3 > regex_token_iterator(_Bi_iter __a, _Bi_iter __b, > const regex_type& __re, > const std::vector<int>& __submatches, > regex_constants::match_flag_type __m > = regex_constants::match_default) > : _M_position(__a, __b, __re, __m), _M_subs(__submatches), _M_n(0) > { _M_init(__a, __b); } ># 2926 "/usr/include/c++/13/bits/regex.h" 3 > regex_token_iterator(_Bi_iter __a, _Bi_iter __b, > const regex_type& __re, > initializer_list<int> __submatches, > regex_constants::match_flag_type __m > = regex_constants::match_default) > : _M_position(__a, __b, __re, __m), _M_subs(__submatches), _M_n(0) > { _M_init(__a, __b); } ># 2943 "/usr/include/c++/13/bits/regex.h" 3 > template<std::size_t _Nm> > regex_token_iterator(_Bi_iter __a, _Bi_iter __b, > const regex_type& __re, > const int (&__submatches)[_Nm], > regex_constants::match_flag_type __m > = regex_constants::match_default) > : _M_position(__a, __b, __re, __m), > _M_subs(__submatches, __submatches + _Nm), _M_n(0) > { _M_init(__a, __b); } > > > > regex_token_iterator(_Bi_iter, _Bi_iter, const regex_type&&, int = 0, > regex_constants::match_flag_type = > regex_constants::match_default) = delete; > regex_token_iterator(_Bi_iter, _Bi_iter, const regex_type&&, > const std::vector<int>&, > regex_constants::match_flag_type = > regex_constants::match_default) = delete; > regex_token_iterator(_Bi_iter, _Bi_iter, const regex_type&&, > initializer_list<int>, > regex_constants::match_flag_type = > regex_constants::match_default) = delete; > template <std::size_t _Nm> > regex_token_iterator(_Bi_iter, _Bi_iter, const regex_type&&, > const int (&)[_Nm], > regex_constants::match_flag_type = > regex_constants::match_default) = delete; > > > > > > regex_token_iterator(const regex_token_iterator& __rhs) > : _M_position(__rhs._M_position), _M_subs(__rhs._M_subs), > _M_suffix(__rhs._M_suffix), _M_n(__rhs._M_n), _M_has_m1(__rhs._M_has_m1) > { _M_normalize_result(); } > > > > > > regex_token_iterator& > operator=(const regex_token_iterator& __rhs); > > > > > bool > operator==(const regex_token_iterator& __rhs) const; ># 3005 "/usr/include/c++/13/bits/regex.h" 3 > bool > operator!=(const regex_token_iterator& __rhs) const > { return !(*this == __rhs); } > > > > > > const value_type& > operator*() const > { return *_M_result; } > > > > > const value_type* > operator->() const > { return _M_result; } > > > > > regex_token_iterator& > operator++(); > > > > > regex_token_iterator > operator++(int) > { > auto __tmp = *this; > ++(*this); > return __tmp; > } > > private: > typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> _Position; > > void > _M_init(_Bi_iter __a, _Bi_iter __b); > > const value_type& > _M_current_match() const > { > if (_M_subs[_M_n] == -1) > return (*_M_position).prefix(); > else > return (*_M_position)[_M_subs[_M_n]]; > } > > constexpr bool > _M_end_of_seq() const noexcept > { return _M_result == nullptr; } > > > void > _M_normalize_result() > { > if (_M_position != _Position()) > _M_result = &_M_current_match(); > else if (_M_has_m1) > _M_result = &_M_suffix; > else > _M_result = nullptr; > } > > _Position _M_position; > std::vector<int> _M_subs; > value_type _M_suffix; > std::size_t _M_n; > const value_type* _M_result; > > > bool _M_has_m1; > }; > > > typedef regex_token_iterator<const char*> cregex_token_iterator; > > > typedef regex_token_iterator<string::const_iterator> sregex_token_iterator; > > > > typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator; > > > typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator; > > > > >} > >} > ># 1 "/usr/include/c++/13/bits/regex.tcc" 1 3 ># 31 "/usr/include/c++/13/bits/regex.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ ># 45 "/usr/include/c++/13/bits/regex.tcc" 3 > template<typename _BiIter, typename _Alloc, > typename _CharT, typename _TraitsT> > bool > __regex_algo_impl(_BiIter __s, > _BiIter __e, > match_results<_BiIter, _Alloc>& __m, > const basic_regex<_CharT, _TraitsT>& __re, > regex_constants::match_flag_type __flags, > _RegexExecutorPolicy __policy, > bool __match_mode) > { > if (__re._M_automaton == nullptr) > return false; > > typename match_results<_BiIter, _Alloc>::_Unchecked& __res = __m; > __m._M_begin = __s; > __m._M_resize(__re._M_automaton->_M_sub_count()); > > bool __ret; > if ((__re.flags() & regex_constants::__polynomial) > || (__policy == _RegexExecutorPolicy::_S_alternate > && !__re._M_automaton->_M_has_backref)) > { > _Executor<_BiIter, _Alloc, _TraitsT, false> > __executor(__s, __e, __res, __re, __flags); > if (__match_mode) > __ret = __executor._M_match(); > else > __ret = __executor._M_search(); > } > else > { > _Executor<_BiIter, _Alloc, _TraitsT, true> > __executor(__s, __e, __res, __re, __flags); > if (__match_mode) > __ret = __executor._M_match(); > else > __ret = __executor._M_search(); > } > if (__ret) > { > for (auto& __it : __res) > if (!__it.matched) > __it.first = __it.second = __e; > auto& __pre = __m._M_prefix(); > auto& __suf = __m._M_suffix(); > if (__match_mode) > { > __pre.matched = false; > __pre.first = __s; > __pre.second = __s; > __suf.matched = false; > __suf.first = __e; > __suf.second = __e; > } > else > { > __pre.first = __s; > __pre.second = __res[0].first; > __pre.matched = (__pre.first != __pre.second); > __suf.first = __res[0].second; > __suf.second = __e; > __suf.matched = (__suf.first != __suf.second); > } > } > else > { > __m._M_establish_failed_match(__e); > } > return __ret; > } > >} > > > > template<typename _Ch_type> > template<typename _Fwd_iter> > typename regex_traits<_Ch_type>::string_type > regex_traits<_Ch_type>:: > lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const > { > typedef std::ctype<char_type> __ctype_type; > const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale)); > > static const char* __collatenames[] = > { > "NUL", > "SOH", > "STX", > "ETX", > "EOT", > "ENQ", > "ACK", > "alert", > "backspace", > "tab", > "newline", > "vertical-tab", > "form-feed", > "carriage-return", > "SO", > "SI", > "DLE", > "DC1", > "DC2", > "DC3", > "DC4", > "NAK", > "SYN", > "ETB", > "CAN", > "EM", > "SUB", > "ESC", > "IS4", > "IS3", > "IS2", > "IS1", > "space", > "exclamation-mark", > "quotation-mark", > "number-sign", > "dollar-sign", > "percent-sign", > "ampersand", > "apostrophe", > "left-parenthesis", > "right-parenthesis", > "asterisk", > "plus-sign", > "comma", > "hyphen", > "period", > "slash", > "zero", > "one", > "two", > "three", > "four", > "five", > "six", > "seven", > "eight", > "nine", > "colon", > "semicolon", > "less-than-sign", > "equals-sign", > "greater-than-sign", > "question-mark", > "commercial-at", > "A", > "B", > "C", > "D", > "E", > "F", > "G", > "H", > "I", > "J", > "K", > "L", > "M", > "N", > "O", > "P", > "Q", > "R", > "S", > "T", > "U", > "V", > "W", > "X", > "Y", > "Z", > "left-square-bracket", > "backslash", > "right-square-bracket", > "circumflex", > "underscore", > "grave-accent", > "a", > "b", > "c", > "d", > "e", > "f", > "g", > "h", > "i", > "j", > "k", > "l", > "m", > "n", > "o", > "p", > "q", > "r", > "s", > "t", > "u", > "v", > "w", > "x", > "y", > "z", > "left-curly-bracket", > "vertical-line", > "right-curly-bracket", > "tilde", > "DEL", > }; > > string __s; > for (; __first != __last; ++__first) > __s += __fctyp.narrow(*__first, 0); > > for (const auto& __it : __collatenames) > if (__s == __it) > return string_type(1, __fctyp.widen( > static_cast<char>(&__it - __collatenames))); > > > > > return string_type(); > } > > template<typename _Ch_type> > template<typename _Fwd_iter> > typename regex_traits<_Ch_type>::char_class_type > regex_traits<_Ch_type>:: > lookup_classname(_Fwd_iter __first, _Fwd_iter __last, bool __icase) const > { > typedef std::ctype<char_type> __ctype_type; > const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale)); > > > static const pair<const char*, char_class_type> __classnames[] = > { > {"d", ctype_base::digit}, > {"w", {ctype_base::alnum, _RegexMask::_S_under}}, > {"s", ctype_base::space}, > {"alnum", ctype_base::alnum}, > {"alpha", ctype_base::alpha}, > {"blank", ctype_base::blank}, > {"cntrl", ctype_base::cntrl}, > {"digit", ctype_base::digit}, > {"graph", ctype_base::graph}, > {"lower", ctype_base::lower}, > {"print", ctype_base::print}, > {"punct", ctype_base::punct}, > {"space", ctype_base::space}, > {"upper", ctype_base::upper}, > {"xdigit", ctype_base::xdigit}, > }; > > string __s; > for (; __first != __last; ++__first) > __s += __fctyp.narrow(__fctyp.tolower(*__first), 0); > > for (const auto& __it : __classnames) > if (__s == __it.first) > { > if (__icase > && ((__it.second > & (ctype_base::lower | ctype_base::upper)) != 0)) > return ctype_base::alpha; > return __it.second; > } > return 0; > } > > template<typename _Ch_type> > bool > regex_traits<_Ch_type>:: > isctype(_Ch_type __c, char_class_type __f) const > { > typedef std::ctype<char_type> __ctype_type; > const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale)); > > return __fctyp.is(__f._M_base, __c) > > || ((__f._M_extended & _RegexMask::_S_under) > && __c == __fctyp.widen('_')); > } > > template<typename _Ch_type> > int > regex_traits<_Ch_type>:: > value(_Ch_type __ch, int __radix) const > { > std::basic_istringstream<char_type> __is(string_type(1, __ch)); > long __v; > if (__radix == 8) > __is >> std::oct; > else if (__radix == 16) > __is >> std::hex; > __is >> __v; > return __is.fail() ? -1 : __v; > } > > template<typename _Bi_iter, typename _Alloc> > template<typename _Out_iter> > _Out_iter > match_results<_Bi_iter, _Alloc>:: > format(_Out_iter __out, > const match_results<_Bi_iter, _Alloc>::char_type* __fmt_first, > const match_results<_Bi_iter, _Alloc>::char_type* __fmt_last, > match_flag_type __flags) const > { > do { if (std::__is_constant_evaluated() && !bool(ready())) __builtin_unreachable(); } while (false); > regex_traits<char_type> __traits; > typedef std::ctype<char_type> __ctype_type; > const __ctype_type& > __fctyp(use_facet<__ctype_type>(__traits.getloc())); > > auto __output = [&](size_t __idx) > { > auto& __sub = (*this)[__idx]; > if (__sub.matched) > __out = std::copy(__sub.first, __sub.second, __out); > }; > > if (__flags & regex_constants::format_sed) > { > bool __escaping = false; > for (; __fmt_first != __fmt_last; __fmt_first++) > { > if (__escaping) > { > __escaping = false; > if (__fctyp.is(__ctype_type::digit, *__fmt_first)) > __output(__traits.value(*__fmt_first, 10)); > else > *__out++ = *__fmt_first; > continue; > } > if (*__fmt_first == '\\') > { > __escaping = true; > continue; > } > if (*__fmt_first == '&') > { > __output(0); > continue; > } > *__out++ = *__fmt_first; > } > if (__escaping) > *__out++ = '\\'; > } > else > { > while (1) > { > auto __next = std::find(__fmt_first, __fmt_last, '$'); > if (__next == __fmt_last) > break; > > __out = std::copy(__fmt_first, __next, __out); > > auto __eat = [&](char __ch) -> bool > { > if (*__next == __ch) > { > ++__next; > return true; > } > return false; > }; > > if (++__next == __fmt_last) > *__out++ = '$'; > else if (__eat('$')) > *__out++ = '$'; > else if (__eat('&')) > __output(0); > else if (__eat('`')) > { > auto& __sub = _M_prefix(); > if (__sub.matched) > __out = std::copy(__sub.first, __sub.second, __out); > } > else if (__eat('\'')) > { > auto& __sub = _M_suffix(); > if (__sub.matched) > __out = std::copy(__sub.first, __sub.second, __out); > } > else if (__fctyp.is(__ctype_type::digit, *__next)) > { > long __num = __traits.value(*__next, 10); > if (++__next != __fmt_last > && __fctyp.is(__ctype_type::digit, *__next)) > { > __num *= 10; > __num += __traits.value(*__next++, 10); > } > if (0 <= __num && __num < this->size()) > __output(__num); > } > else > *__out++ = '$'; > __fmt_first = __next; > } > __out = std::copy(__fmt_first, __fmt_last, __out); > } > return __out; > } > > template<typename _Out_iter, typename _Bi_iter, > typename _Rx_traits, typename _Ch_type> > _Out_iter > __regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, > const basic_regex<_Ch_type, _Rx_traits>& __e, > const _Ch_type* __fmt, size_t __len, > regex_constants::match_flag_type __flags) > { > typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> _IterT; > _IterT __i(__first, __last, __e, __flags); > _IterT __end; > if (__i == __end) > { > if (!(__flags & regex_constants::format_no_copy)) > __out = std::copy(__first, __last, __out); > } > else > { > sub_match<_Bi_iter> __last; > for (; __i != __end; ++__i) > { > if (!(__flags & regex_constants::format_no_copy)) > __out = std::copy(__i->prefix().first, __i->prefix().second, > __out); > __out = __i->format(__out, __fmt, __fmt + __len, __flags); > __last = __i->suffix(); > if (__flags & regex_constants::format_first_only) > break; > } > if (!(__flags & regex_constants::format_no_copy)) > __out = std::copy(__last.first, __last.second, __out); > } > return __out; > } > > template<typename _Bi_iter, > typename _Ch_type, > typename _Rx_traits> > bool > regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>:: > operator==(const regex_iterator& __rhs) const noexcept > { > if (_M_pregex == nullptr && __rhs._M_pregex == nullptr) > return true; > return _M_pregex == __rhs._M_pregex > && _M_begin == __rhs._M_begin > && _M_end == __rhs._M_end > && _M_flags == __rhs._M_flags > && _M_match[0] == __rhs._M_match[0]; > } > > template<typename _Bi_iter, > typename _Ch_type, > typename _Rx_traits> > regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>& > regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>:: > operator++() > { > > > > > > > if (_M_match[0].matched) > { > auto __start = _M_match[0].second; > auto __prefix_first = _M_match[0].second; > if (_M_match[0].first == _M_match[0].second) > { > if (__start == _M_end) > { > _M_pregex = nullptr; > return *this; > } > else > { > if (regex_search(__start, _M_end, _M_match, *_M_pregex, > _M_flags > | regex_constants::match_not_null > | regex_constants::match_continuous)) > { > do { if (std::__is_constant_evaluated() && !bool(_M_match[0].matched)) __builtin_unreachable(); } while (false); > auto& __prefix = _M_match._M_prefix(); > __prefix.first = __prefix_first; > __prefix.matched = __prefix.first != __prefix.second; > > _M_match._M_begin = _M_begin; > return *this; > } > else > ++__start; > } > } > _M_flags |= regex_constants::match_prev_avail; > if (regex_search(__start, _M_end, _M_match, *_M_pregex, _M_flags)) > { > do { if (std::__is_constant_evaluated() && !bool(_M_match[0].matched)) __builtin_unreachable(); } while (false); > auto& __prefix = _M_match._M_prefix(); > __prefix.first = __prefix_first; > __prefix.matched = __prefix.first != __prefix.second; > > _M_match._M_begin = _M_begin; > } > else > _M_pregex = nullptr; > } > return *this; > } > > template<typename _Bi_iter, > typename _Ch_type, > typename _Rx_traits> > regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>& > regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>:: > operator=(const regex_token_iterator& __rhs) > { > _M_position = __rhs._M_position; > _M_subs = __rhs._M_subs; > _M_n = __rhs._M_n; > _M_suffix = __rhs._M_suffix; > _M_has_m1 = __rhs._M_has_m1; > _M_normalize_result(); > return *this; > } > > template<typename _Bi_iter, > typename _Ch_type, > typename _Rx_traits> > bool > regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>:: > operator==(const regex_token_iterator& __rhs) const > { > if (_M_end_of_seq() && __rhs._M_end_of_seq()) > return true; > if (_M_suffix.matched && __rhs._M_suffix.matched > && _M_suffix == __rhs._M_suffix) > return true; > if (_M_end_of_seq() || _M_suffix.matched > || __rhs._M_end_of_seq() || __rhs._M_suffix.matched) > return false; > return _M_position == __rhs._M_position > && _M_n == __rhs._M_n > && _M_subs == __rhs._M_subs; > } > > template<typename _Bi_iter, > typename _Ch_type, > typename _Rx_traits> > regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>& > regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>:: > operator++() > { > _Position __prev = _M_position; > if (_M_suffix.matched) > *this = regex_token_iterator(); > else if (_M_n + 1 < _M_subs.size()) > { > _M_n++; > _M_result = &_M_current_match(); > } > else > { > _M_n = 0; > ++_M_position; > if (_M_position != _Position()) > _M_result = &_M_current_match(); > else if (_M_has_m1 && __prev->suffix().length() != 0) > { > _M_suffix.matched = true; > _M_suffix.first = __prev->suffix().first; > _M_suffix.second = __prev->suffix().second; > _M_result = &_M_suffix; > } > else > *this = regex_token_iterator(); > } > return *this; > } > > template<typename _Bi_iter, > typename _Ch_type, > typename _Rx_traits> > void > regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>:: > _M_init(_Bi_iter __a, _Bi_iter __b) > { > _M_has_m1 = false; > for (auto __it : _M_subs) > if (__it == -1) > { > _M_has_m1 = true; > break; > } > if (_M_position != _Position()) > _M_result = &_M_current_match(); > else if (_M_has_m1) > { > _M_suffix.matched = true; > _M_suffix.first = __a; > _M_suffix.second = __b; > _M_result = &_M_suffix; > } > else > _M_result = nullptr; > } > > > > >} ># 3103 "/usr/include/c++/13/bits/regex.h" 2 3 ># 69 "/usr/include/c++/13/regex" 2 3 ># 1 "/usr/include/c++/13/bits/regex_executor.h" 1 3 ># 33 "/usr/include/c++/13/bits/regex_executor.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ ># 50 "/usr/include/c++/13/bits/regex_executor.h" 3 > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > class _Executor > { > using __search_mode = integral_constant<bool, __dfs_mode>; > using __dfs = true_type; > using __bfs = false_type; > > enum class _Match_mode : unsigned char { _Exact, _Prefix }; > > public: > typedef typename iterator_traits<_BiIter>::value_type _CharT; > typedef basic_regex<_CharT, _TraitsT> _RegexT; > typedef std::vector<sub_match<_BiIter>, _Alloc> _ResultsVec; > typedef regex_constants::match_flag_type _FlagT; > typedef typename _TraitsT::char_class_type _ClassT; > typedef _NFA<_TraitsT> _NFAT; > > public: > _Executor(_BiIter __begin, > _BiIter __end, > _ResultsVec& __results, > const _RegexT& __re, > _FlagT __flags) > : _M_cur_results(__results.get_allocator()), > _M_begin(__begin), > _M_end(__end), > _M_re(__re), > _M_nfa(*__re._M_automaton), > _M_results(__results), > _M_rep_count(_M_nfa.size()), > _M_states(_M_nfa._M_start(), _M_nfa.size()), > _M_flags(__flags) > { > using namespace regex_constants; > if (__flags & match_prev_avail) > _M_flags &= ~(match_not_bol | match_not_bow); > } > > > bool > _M_match() > { > _M_current = _M_begin; > return _M_main(_Match_mode::_Exact); > } > > > bool > _M_search_from_first() > { > _M_current = _M_begin; > return _M_main(_Match_mode::_Prefix); > } > > bool > _M_search(); > > private: > void > _M_rep_once_more(_Match_mode __match_mode, _StateIdT); > > void > _M_handle_repeat(_Match_mode, _StateIdT); > > void > _M_handle_subexpr_begin(_Match_mode, _StateIdT); > > void > _M_handle_subexpr_end(_Match_mode, _StateIdT); > > void > _M_handle_line_begin_assertion(_Match_mode, _StateIdT); > > void > _M_handle_line_end_assertion(_Match_mode, _StateIdT); > > void > _M_handle_word_boundary(_Match_mode, _StateIdT); > > void > _M_handle_subexpr_lookahead(_Match_mode, _StateIdT); > > void > _M_handle_match(_Match_mode, _StateIdT); > > void > _M_handle_backref(_Match_mode, _StateIdT); > > void > _M_handle_accept(_Match_mode, _StateIdT); > > void > _M_handle_alternative(_Match_mode, _StateIdT); > > void > _M_dfs(_Match_mode __match_mode, _StateIdT __start); > > bool > _M_main(_Match_mode __match_mode) > { return _M_main_dispatch(__match_mode, __search_mode{}); } > > bool > _M_main_dispatch(_Match_mode __match_mode, __dfs); > > bool > _M_main_dispatch(_Match_mode __match_mode, __bfs); > > bool > _M_is_word(_CharT __ch) const > { > static const _CharT __s[2] = { 'w' }; > return _M_re._M_automaton->_M_traits.isctype > (__ch, _M_re._M_automaton->_M_traits.lookup_classname(__s, __s+1)); > } > > bool > _M_at_begin() const > { > if (_M_current == _M_begin) > { > > if (_M_flags & regex_constants::match_not_bol) > return false; > > if (_M_flags & regex_constants::match_prev_avail) > { > > > if (_M_match_multiline()) > return _M_is_line_terminator(*std::prev(_M_current)); > else > return false; > } > else > return true; > } > else if (_M_match_multiline()) > return _M_is_line_terminator(*std::prev(_M_current)); > else > return false; > } > > bool > _M_at_end() const > { > if (_M_current == _M_end) > return !(_M_flags & regex_constants::match_not_eol); > else if (_M_match_multiline()) > return _M_is_line_terminator(*_M_current); > else > return false; > } > > bool > _M_word_boundary() const; > > bool > _M_lookahead(_StateIdT __next); > > bool > _M_is_line_terminator(_CharT __c) const > { > const auto& __traits = _M_re._M_automaton->_M_traits; > const auto& __ct = use_facet<ctype<_CharT>>(__traits.getloc()); > const char __n{ __ct.narrow(__c, ' ') }; > if (__n == '\n') > return true; > if (_M_re._M_automaton->_M_options() & regex_constants::ECMAScript) > { > if (__n == '\r') > return true; > > } > return false; > } > > bool > _M_match_multiline() const noexcept > { > constexpr auto __m > = regex_constants::ECMAScript | regex_constants::__multiline; > return (_M_re._M_automaton->_M_options() & __m) == __m; > } > > > template<typename _SearchMode, typename _ResultsVec> > struct _State_info; > > template<typename _ResultsVec> > struct _State_info<__bfs, _ResultsVec> > { > explicit > _State_info(_StateIdT __start, size_t __n) > : _M_visited_states(new bool[__n]()), _M_start(__start) > { } > > ~_State_info() { delete[] _M_visited_states; } > > _State_info(const _State_info&) = delete; > _State_info& operator=(const _State_info&) = delete; > > bool _M_visited(_StateIdT __i) > { > if (_M_visited_states[__i]) > return true; > _M_visited_states[__i] = true; > return false; > } > > void _M_queue(_StateIdT __i, const _ResultsVec& __res) > { _M_match_queue.emplace_back(__i, __res); } > > > _BiIter* _M_get_sol_pos() { return nullptr; } > > > std::vector<pair<_StateIdT, _ResultsVec>> _M_match_queue; > > bool* _M_visited_states; > > _StateIdT _M_start; > }; > > template<typename _ResultsVec> > struct _State_info<__dfs, _ResultsVec> > { > explicit > _State_info(_StateIdT __start, size_t) : _M_start(__start) > { } > > > bool _M_visited(_StateIdT) const { return false; } > void _M_queue(_StateIdT, const _ResultsVec&) { } > > _BiIter* _M_get_sol_pos() { return &_M_sol_pos; } > > > _StateIdT _M_start; > _BiIter _M_sol_pos; > }; > > public: > _ResultsVec _M_cur_results; > _BiIter _M_current; > _BiIter _M_begin; > const _BiIter _M_end; > const _RegexT& _M_re; > const _NFAT& _M_nfa; > _ResultsVec& _M_results; > std::vector<pair<_BiIter, int>> _M_rep_count; > _State_info<__search_mode, _ResultsVec> _M_states; > _FlagT _M_flags; > > bool _M_has_sol; > }; > > >} > >} > ># 1 "/usr/include/c++/13/bits/regex_executor.tcc" 1 3 ># 31 "/usr/include/c++/13/bits/regex_executor.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_search() > { > if (_M_search_from_first()) > return true; > if (_M_flags & regex_constants::match_continuous) > return false; > _M_flags |= regex_constants::match_prev_avail; > while (_M_begin != _M_end) > { > ++_M_begin; > if (_M_search_from_first()) > return true; > } > return false; > } ># 79 "/usr/include/c++/13/bits/regex_executor.tcc" 3 > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_main_dispatch(_Match_mode __match_mode, __dfs) > { > _M_has_sol = false; > *_M_states._M_get_sol_pos() = _BiIter(); > _M_cur_results = _M_results; > _M_dfs(__match_mode, _M_states._M_start); > return _M_has_sol; > } ># 113 "/usr/include/c++/13/bits/regex_executor.tcc" 3 > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_main_dispatch(_Match_mode __match_mode, __bfs) > { > _M_states._M_queue(_M_states._M_start, _M_results); > bool __ret = false; > while (1) > { > _M_has_sol = false; > if (_M_states._M_match_queue.empty()) > break; > std::fill_n(_M_states._M_visited_states, _M_nfa.size(), false); > auto __old_queue = std::move(_M_states._M_match_queue); > auto __alloc = _M_cur_results.get_allocator(); > for (auto& __task : __old_queue) > { > _M_cur_results = _ResultsVec(std::move(__task.second), __alloc); > _M_dfs(__match_mode, __task.first); > } > if (__match_mode == _Match_mode::_Prefix) > __ret |= _M_has_sol; > if (_M_current == _M_end) > break; > ++_M_current; > } > if (__match_mode == _Match_mode::_Exact) > __ret = _M_has_sol; > _M_states._M_match_queue.clear(); > return __ret; > } > > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_lookahead(_StateIdT __next) > { > > > > _ResultsVec __what(_M_cur_results); > _Executor __sub(_M_current, _M_end, __what, _M_re, _M_flags); > __sub._M_states._M_start = __next; > if (__sub._M_search_from_first()) > { > for (size_t __i = 0; __i < __what.size(); __i++) > if (__what[__i].matched) > _M_cur_results[__i] = __what[__i]; > return true; > } > return false; > } > > > > > > > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_rep_once_more(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > auto& __rep_count = _M_rep_count[__i]; > if (__rep_count.second == 0 || __rep_count.first != _M_current) > { > auto __back = __rep_count; > __rep_count.first = _M_current; > __rep_count.second = 1; > _M_dfs(__match_mode, __state._M_alt); > __rep_count = __back; > } > else > { > if (__rep_count.second < 2) > { > __rep_count.second++; > _M_dfs(__match_mode, __state._M_alt); > __rep_count.second--; > } > } > } > > > > > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_repeat(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > > > if (!__state._M_neg) > { > _M_rep_once_more(__match_mode, __i); > > if (!__dfs_mode || !_M_has_sol) > _M_dfs(__match_mode, __state._M_next); > } > else > { > if (__dfs_mode) > { > > _M_dfs(__match_mode, __state._M_next); > if (!_M_has_sol) > _M_rep_once_more(__match_mode, __i); > } > else > { > > > > if (!_M_has_sol) > { > _M_dfs(__match_mode, __state._M_next); > > > > if (!_M_has_sol) > _M_rep_once_more(__match_mode, __i); > } > } > } > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_subexpr_begin(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > > auto& __res = _M_cur_results[__state._M_subexpr]; > auto __back = __res.first; > __res.first = _M_current; > _M_dfs(__match_mode, __state._M_next); > __res.first = __back; > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_subexpr_end(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > > auto& __res = _M_cur_results[__state._M_subexpr]; > auto __back = __res; > __res.second = _M_current; > __res.matched = true; > _M_dfs(__match_mode, __state._M_next); > __res = __back; > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > inline void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_line_begin_assertion(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > if (_M_at_begin()) > _M_dfs(__match_mode, __state._M_next); > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > inline void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_line_end_assertion(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > if (_M_at_end()) > _M_dfs(__match_mode, __state._M_next); > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > inline void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_word_boundary(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > if (_M_word_boundary() == !__state._M_neg) > _M_dfs(__match_mode, __state._M_next); > } > > > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_subexpr_lookahead(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > if (_M_lookahead(__state._M_alt) == !__state._M_neg) > _M_dfs(__match_mode, __state._M_next); > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_match(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > > if (_M_current == _M_end) > return; > if (__dfs_mode) > { > if (__state._M_matches(*_M_current)) > { > ++_M_current; > _M_dfs(__match_mode, __state._M_next); > --_M_current; > } > } > else > if (__state._M_matches(*_M_current)) > _M_states._M_queue(__state._M_next, _M_cur_results); > } > > template<typename _BiIter, typename _TraitsT> > struct _Backref_matcher > { > _Backref_matcher(bool __icase, const _TraitsT& __traits) > : _M_traits(__traits) { } > > bool > _M_apply(_BiIter __expected_begin, > _BiIter __expected_end, _BiIter __actual_begin, > _BiIter __actual_end) > { > return _M_traits.transform(__expected_begin, __expected_end) > == _M_traits.transform(__actual_begin, __actual_end); > } > > const _TraitsT& _M_traits; > }; > > template<typename _BiIter, typename _CharT> > struct _Backref_matcher<_BiIter, std::regex_traits<_CharT>> > { > using _TraitsT = std::regex_traits<_CharT>; > _Backref_matcher(bool __icase, const _TraitsT& __traits) > : _M_icase(__icase), _M_traits(__traits) { } > > bool > _M_apply(_BiIter __expected_begin, > _BiIter __expected_end, _BiIter __actual_begin, > _BiIter __actual_end) > { > if (!_M_icase) > return std::__equal4(__expected_begin, __expected_end, > __actual_begin, __actual_end); > typedef std::ctype<_CharT> __ctype_type; > const auto& __fctyp = use_facet<__ctype_type>(_M_traits.getloc()); > return std::__equal4(__expected_begin, __expected_end, > __actual_begin, __actual_end, > [this, &__fctyp](_CharT __lhs, _CharT __rhs) > { > return __fctyp.tolower(__lhs) > == __fctyp.tolower(__rhs); > }); > } > > bool _M_icase; > const _TraitsT& _M_traits; > }; > > > > > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_backref(_Match_mode __match_mode, _StateIdT __i) > { > do { if (std::__is_constant_evaluated() && !bool(__dfs_mode)) __builtin_unreachable(); } while (false); > > const auto& __state = _M_nfa[__i]; > auto& __submatch = _M_cur_results[__state._M_backref_index]; > if (!__submatch.matched) > return; > auto __last = _M_current; > for (auto __tmp = __submatch.first; > __last != _M_end && __tmp != __submatch.second; > ++__tmp) > ++__last; > if (_Backref_matcher<_BiIter, _TraitsT>( > _M_re.flags() & regex_constants::icase, > _M_re._M_automaton->_M_traits)._M_apply( > __submatch.first, __submatch.second, _M_current, __last)) > { > if (__last != _M_current) > { > auto __backup = _M_current; > _M_current = __last; > _M_dfs(__match_mode, __state._M_next); > _M_current = __backup; > } > else > _M_dfs(__match_mode, __state._M_next); > } > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_accept(_Match_mode __match_mode, _StateIdT) > { > if constexpr (__dfs_mode) > { > do { if (std::__is_constant_evaluated() && !bool(!_M_has_sol)) __builtin_unreachable(); } while (false); > if (__match_mode == _Match_mode::_Exact) > _M_has_sol = _M_current == _M_end; > else > _M_has_sol = true; > if (_M_current == _M_begin > && (_M_flags & regex_constants::match_not_null)) > _M_has_sol = false; > if (_M_has_sol) > { > if (_M_nfa._M_flags & regex_constants::ECMAScript) > _M_results = _M_cur_results; > else > { > do { if (std::__is_constant_evaluated() && !bool(_M_states._M_get_sol_pos())) __builtin_unreachable(); } while (false); > > > > > > > > if (*_M_states._M_get_sol_pos() == _BiIter() > || std::distance(_M_begin, > *_M_states._M_get_sol_pos()) > < std::distance(_M_begin, _M_current)) > { > *_M_states._M_get_sol_pos() = _M_current; > _M_results = _M_cur_results; > } > } > } > } > else > { > if (_M_current == _M_begin > && (_M_flags & regex_constants::match_not_null)) > return; > if (__match_mode == _Match_mode::_Prefix || _M_current == _M_end) > if (!_M_has_sol) > { > _M_has_sol = true; > _M_results = _M_cur_results; > } > } > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_handle_alternative(_Match_mode __match_mode, _StateIdT __i) > { > const auto& __state = _M_nfa[__i]; > > if (_M_nfa._M_flags & regex_constants::ECMAScript) > { > > _M_dfs(__match_mode, __state._M_alt); > > if (!_M_has_sol) > _M_dfs(__match_mode, __state._M_next); > } > else > { > > > _M_dfs(__match_mode, __state._M_alt); > auto __has_sol = _M_has_sol; > _M_has_sol = false; > _M_dfs(__match_mode, __state._M_next); > _M_has_sol |= __has_sol; > } > } > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_dfs(_Match_mode __match_mode, _StateIdT __i) > { > if (_M_states._M_visited(__i)) > return; > > switch (_M_nfa[__i]._M_opcode()) > { > case _S_opcode_repeat: > _M_handle_repeat(__match_mode, __i); break; > case _S_opcode_subexpr_begin: > _M_handle_subexpr_begin(__match_mode, __i); break; > case _S_opcode_subexpr_end: > _M_handle_subexpr_end(__match_mode, __i); break; > case _S_opcode_line_begin_assertion: > _M_handle_line_begin_assertion(__match_mode, __i); break; > case _S_opcode_line_end_assertion: > _M_handle_line_end_assertion(__match_mode, __i); break; > case _S_opcode_word_boundary: > _M_handle_word_boundary(__match_mode, __i); break; > case _S_opcode_subexpr_lookahead: > _M_handle_subexpr_lookahead(__match_mode, __i); break; > case _S_opcode_match: > _M_handle_match(__match_mode, __i); break; > case _S_opcode_backref: > _M_handle_backref(__match_mode, __i); break; > case _S_opcode_accept: > _M_handle_accept(__match_mode, __i); break; > case _S_opcode_alternative: > _M_handle_alternative(__match_mode, __i); break; > default: > do { if (std::__is_constant_evaluated() && !bool(false)) __builtin_unreachable(); } while (false); > } > } > > > template<typename _BiIter, typename _Alloc, typename _TraitsT, > bool __dfs_mode> > bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: > _M_word_boundary() const > { > if (_M_current == _M_begin && (_M_flags & regex_constants::match_not_bow)) > return false; > if (_M_current == _M_end && (_M_flags & regex_constants::match_not_eow)) > return false; > > bool __left_is_word = false; > if (_M_current != _M_begin > || (_M_flags & regex_constants::match_prev_avail)) > { > auto __prev = _M_current; > if (_M_is_word(*std::prev(__prev))) > __left_is_word = true; > } > bool __right_is_word = > _M_current != _M_end && _M_is_word(*_M_current); > > return __left_is_word != __right_is_word; > } >} > > >} ># 313 "/usr/include/c++/13/bits/regex_executor.h" 2 3 ># 70 "/usr/include/c++/13/regex" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > namespace pmr > { > template<typename _BidirectionalIterator> > using match_results > = std::match_results<_BidirectionalIterator, polymorphic_allocator< > sub_match<_BidirectionalIterator>>>; > using cmatch = match_results<const char*>; > > > using smatch > = match_results<__gnu_cxx::__normal_iterator<const char*, string>>; > > using wcmatch = match_results<const wchar_t*>; > using wsmatch > = match_results<__gnu_cxx::__normal_iterator<const wchar_t*, wstring>>; > > } > >} ># 6 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 2 ># 1 "/usr/include/boost/filesystem.hpp" 1 3 4 ># 15 "/usr/include/boost/filesystem.hpp" 3 4 ># 1 "/usr/include/boost/filesystem/config.hpp" 1 3 4 ># 19 "/usr/include/boost/filesystem/config.hpp" 3 4 ># 1 "/usr/include/boost/config.hpp" 1 3 4 ># 30 "/usr/include/boost/config.hpp" 3 4 ># 1 "/usr/include/boost/config/user.hpp" 1 3 4 ># 31 "/usr/include/boost/config.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/config/detail/select_compiler_config.hpp" 1 3 4 ># 36 "/usr/include/boost/config.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/config/compiler/gcc.hpp" 1 3 4 ># 40 "/usr/include/boost/config.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/config/detail/select_stdlib_config.hpp" 1 3 4 ># 24 "/usr/include/boost/config/detail/select_stdlib_config.hpp" 3 4 ># 1 "/usr/include/c++/13/version" 1 3 4 ># 33 "/usr/include/c++/13/version" 3 4 > ># 34 "/usr/include/c++/13/version" 3 ># 25 "/usr/include/boost/config/detail/select_stdlib_config.hpp" 2 3 4 ># 45 "/usr/include/boost/config.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 1 3 4 ># 78 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 3 4 ># 1 "/usr/include/unistd.h" 1 3 4 ># 27 "/usr/include/unistd.h" 3 4 >extern "C" { ># 202 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/bits/posix_opt.h" 1 3 4 ># 203 "/usr/include/unistd.h" 2 3 4 > > > ># 1 "/usr/include/bits/environments.h" 1 3 4 ># 22 "/usr/include/bits/environments.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 23 "/usr/include/bits/environments.h" 2 3 4 ># 207 "/usr/include/unistd.h" 2 3 4 ># 226 "/usr/include/unistd.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 227 "/usr/include/unistd.h" 2 3 4 ># 267 "/usr/include/unistd.h" 3 4 >typedef __intptr_t intptr_t; > > > > > > >typedef __socklen_t socklen_t; ># 287 "/usr/include/unistd.h" 3 4 >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))) ; ># 342 "/usr/include/unistd.h" 3 4 >extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) noexcept (true) __asm__ ("" "lseek64") > > ; > > > > > >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__ ((__access__ (__write_only__, 2, 3))); > > > > > >extern ssize_t write (int __fd, const void *__buf, size_t __n) > __attribute__ ((__access__ (__read_only__, 2, 3))); ># 404 "/usr/include/unistd.h" 3 4 >extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") > > > __attribute__ ((__access__ (__write_only__, 2, 3))); >extern ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") > > > __attribute__ ((__access__ (__read_only__, 2, 3))); ># 422 "/usr/include/unistd.h" 3 4 >extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, > __off64_t __offset) > __attribute__ ((__access__ (__write_only__, 2, 3))); > > >extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, > __off64_t __offset) > __attribute__ ((__access__ (__read_only__, 2, 3))); > > > > > > > >extern int pipe (int __pipedes[2]) noexcept (true) ; > > > > >extern int pipe2 (int __pipedes[2], int __flags) noexcept (true) ; ># 452 "/usr/include/unistd.h" 3 4 >extern unsigned int alarm (unsigned int __seconds) noexcept (true); ># 464 "/usr/include/unistd.h" 3 4 >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); ># 489 "/usr/include/unistd.h" 3 4 >extern int pause (void); > > > >extern int chown (const char *__file, __uid_t __owner, __gid_t __group) > noexcept (true) __attribute__ ((__nonnull__ (1))) ; > > > >extern int fchown (int __fd, __uid_t __owner, __gid_t __group) noexcept (true) ; > > > > >extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) > noexcept (true) __attribute__ ((__nonnull__ (1))) ; > > > > > > >extern int fchownat (int __fd, const char *__file, __uid_t __owner, > __gid_t __group, int __flag) > noexcept (true) __attribute__ ((__nonnull__ (2))) ; > > > >extern int chdir (const char *__path) noexcept (true) __attribute__ ((__nonnull__ (1))) ; > > > >extern int fchdir (int __fd) noexcept (true) ; ># 531 "/usr/include/unistd.h" 3 4 >extern char *getcwd (char *__buf, size_t __size) noexcept (true) ; > > > > > >extern char *get_current_dir_name (void) noexcept (true); > > > > > > > >extern char *getwd (char *__buf) > noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) > __attribute__ ((__access__ (__write_only__, 1))); > > > > >extern int dup (int __fd) noexcept (true) ; > > >extern int dup2 (int __fd, int __fd2) noexcept (true); > > > > >extern int dup3 (int __fd, int __fd2, int __flags) noexcept (true); > > > >extern char **__environ; > >extern char **environ; > > > > > >extern int execve (const char *__path, char *const __argv[], > char *const __envp[]) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) > noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > >extern int execv (const char *__path, char *const __argv[]) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execle (const char *__path, const char *__arg, ...) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execl (const char *__path, const char *__arg, ...) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > >extern int execvp (const char *__file, char *const __argv[]) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int execlp (const char *__file, const char *__arg, ...) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern int execvpe (const char *__file, char *const __argv[], > char *const __envp[]) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern int nice (int __inc) noexcept (true) ; > > > > >extern void _exit (int __status) __attribute__ ((__noreturn__)); > > > > > ># 1 "/usr/include/bits/confname.h" 1 3 4 ># 24 "/usr/include/bits/confname.h" 3 4 >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 > > }; ># 631 "/usr/include/unistd.h" 2 3 4 > > >extern long int pathconf (const char *__path, int __name) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern long int fpathconf (int __fd, int __name) noexcept (true); > > >extern long int sysconf (int __name) noexcept (true); > > > >extern size_t confstr (int __name, char *__buf, size_t __len) noexcept (true) > __attribute__ ((__access__ (__write_only__, 2, 3))); > > > > >extern __pid_t getpid (void) noexcept (true); > > >extern __pid_t getppid (void) noexcept (true); > > >extern __pid_t getpgrp (void) noexcept (true); > > >extern __pid_t __getpgid (__pid_t __pid) noexcept (true); > >extern __pid_t getpgid (__pid_t __pid) noexcept (true); > > > > > > >extern int setpgid (__pid_t __pid, __pid_t __pgid) noexcept (true); ># 682 "/usr/include/unistd.h" 3 4 >extern int setpgrp (void) noexcept (true); > > > > > > >extern __pid_t setsid (void) noexcept (true); > > > >extern __pid_t getsid (__pid_t __pid) noexcept (true); > > > >extern __uid_t getuid (void) noexcept (true); > > >extern __uid_t geteuid (void) noexcept (true); > > >extern __gid_t getgid (void) noexcept (true); > > >extern __gid_t getegid (void) noexcept (true); > > > > >extern int getgroups (int __size, __gid_t __list[]) noexcept (true) > __attribute__ ((__access__ (__write_only__, 2, 1))); > > >extern int group_member (__gid_t __gid) noexcept (true); > > > > > > >extern int setuid (__uid_t __uid) noexcept (true) ; > > > > >extern int setreuid (__uid_t __ruid, __uid_t __euid) noexcept (true) ; > > > > >extern int seteuid (__uid_t __uid) noexcept (true) ; > > > > > > >extern int setgid (__gid_t __gid) noexcept (true) ; > > > > >extern int setregid (__gid_t __rgid, __gid_t __egid) noexcept (true) ; > > > > >extern int setegid (__gid_t __gid) noexcept (true) ; > > > > > >extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) > noexcept (true); > > > >extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) > noexcept (true); > > > >extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) > noexcept (true) ; > > > >extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) > noexcept (true) ; > > > > > > >extern __pid_t fork (void) noexcept (true); > > > > > > > >extern __pid_t vfork (void) noexcept (true); > > > > > > >extern __pid_t _Fork (void) noexcept (true); > > > > > >extern char *ttyname (int __fd) noexcept (true); > > > >extern int ttyname_r (int __fd, char *__buf, size_t __buflen) > noexcept (true) __attribute__ ((__nonnull__ (2))) > __attribute__ ((__access__ (__write_only__, 2, 3))); > > > >extern int isatty (int __fd) noexcept (true); > > > > >extern int ttyslot (void) noexcept (true); > > > > >extern int link (const char *__from, const char *__to) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))) ; > > > > >extern int linkat (int __fromfd, const char *__from, int __tofd, > const char *__to, int __flags) > noexcept (true) __attribute__ ((__nonnull__ (2, 4))) ; > > > > >extern int symlink (const char *__from, const char *__to) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))) ; > > > > >extern ssize_t readlink (const char *__restrict __path, > char *__restrict __buf, size_t __len) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))) > __attribute__ ((__access__ (__write_only__, 2, 3))); > > > > > >extern int symlinkat (const char *__from, int __tofd, > const char *__to) noexcept (true) __attribute__ ((__nonnull__ (1, 3))) ; > > >extern ssize_t readlinkat (int __fd, const char *__restrict __path, > char *__restrict __buf, size_t __len) > noexcept (true) __attribute__ ((__nonnull__ (2, 3))) > __attribute__ ((__access__ (__write_only__, 3, 4))); > > > >extern int unlink (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int unlinkat (int __fd, const char *__name, int __flag) > noexcept (true) __attribute__ ((__nonnull__ (2))); > > > >extern int rmdir (const char *__path) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern __pid_t tcgetpgrp (int __fd) noexcept (true); > > >extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) noexcept (true); > > > > > > >extern char *getlogin (void); > > > > > > > >extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))) > __attribute__ ((__access__ (__write_only__, 1, 2))); > > > > >extern int setlogin (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > > > ># 1 "/usr/include/bits/getopt_posix.h" 1 3 4 ># 27 "/usr/include/bits/getopt_posix.h" 3 4 ># 1 "/usr/include/bits/getopt_core.h" 1 3 4 ># 28 "/usr/include/bits/getopt_core.h" 3 4 >extern "C" { > > > > > > > >extern char *optarg; ># 50 "/usr/include/bits/getopt_core.h" 3 4 >extern int optind; > > > > >extern int opterr; > > > >extern int optopt; ># 91 "/usr/include/bits/getopt_core.h" 3 4 >extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) > noexcept (true) __attribute__ ((__nonnull__ (2, 3))); > >} ># 28 "/usr/include/bits/getopt_posix.h" 2 3 4 > >extern "C" { ># 49 "/usr/include/bits/getopt_posix.h" 3 4 >} ># 904 "/usr/include/unistd.h" 2 3 4 > > > > > > > >extern int gethostname (char *__name, size_t __len) noexcept (true) __attribute__ ((__nonnull__ (1))) > __attribute__ ((__access__ (__write_only__, 1, 2))); > > > > > > >extern int sethostname (const char *__name, size_t __len) > noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__read_only__, 1, 2))); > > > >extern int sethostid (long int __id) noexcept (true) ; > > > > > >extern int getdomainname (char *__name, size_t __len) > noexcept (true) __attribute__ ((__nonnull__ (1))) > __attribute__ ((__access__ (__write_only__, 1, 2))); >extern int setdomainname (const char *__name, size_t __len) > noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__read_only__, 1, 2))); > > > > >extern int vhangup (void) noexcept (true); > > >extern int revoke (const char *__file) noexcept (true) __attribute__ ((__nonnull__ (1))) ; > > > > > > > >extern int profil (unsigned short int *__sample_buffer, size_t __size, > size_t __offset, unsigned int __scale) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern int acct (const char *__name) noexcept (true); > > > >extern char *getusershell (void) noexcept (true); >extern void endusershell (void) noexcept (true); >extern void setusershell (void) noexcept (true); > > > > > >extern int daemon (int __nochdir, int __noclose) noexcept (true) ; > > > > > > >extern int chroot (const char *__path) noexcept (true) __attribute__ ((__nonnull__ (1))) ; > > > >extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); > > > > > > > >extern int fsync (int __fd); > > > > > >extern int syncfs (int __fd) noexcept (true); > > > > > > >extern long int gethostid (void); > > >extern void sync (void) noexcept (true); > > > > > >extern int getpagesize (void) noexcept (true) __attribute__ ((__const__)); > > > > >extern int getdtablesize (void) noexcept (true); ># 1030 "/usr/include/unistd.h" 3 4 >extern int truncate (const char *__file, __off64_t __length) noexcept (true) __asm__ ("" "truncate64") > > __attribute__ ((__nonnull__ (1))) ; > > > > > >extern int truncate64 (const char *__file, __off64_t __length) > noexcept (true) __attribute__ ((__nonnull__ (1))) ; ># 1052 "/usr/include/unistd.h" 3 4 >extern int ftruncate (int __fd, __off64_t __length) noexcept (true) __asm__ ("" "ftruncate64") > ; > > > > > >extern int ftruncate64 (int __fd, __off64_t __length) noexcept (true) ; ># 1070 "/usr/include/unistd.h" 3 4 >extern int brk (void *__addr) noexcept (true) ; > > > > > >extern void *sbrk (intptr_t __delta) noexcept (true); ># 1091 "/usr/include/unistd.h" 3 4 >extern long int syscall (long int __sysno, ...) noexcept (true); ># 1117 "/usr/include/unistd.h" 3 4 >extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64") > ; > > > > > >extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; ># 1142 "/usr/include/unistd.h" 3 4 >ssize_t copy_file_range (int __infd, __off64_t *__pinoff, > int __outfd, __off64_t *__poutoff, > size_t __length, unsigned int __flags); > > > > > >extern int fdatasync (int __fildes); ># 1159 "/usr/include/unistd.h" 3 4 >extern char *crypt (const char *__key, const char *__salt) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); > > > > > > > >extern void swab (const void *__restrict __from, void *__restrict __to, > ssize_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))) > __attribute__ ((__access__ (__read_only__, 1, 3))) > __attribute__ ((__access__ (__write_only__, 2, 3))); ># 1198 "/usr/include/unistd.h" 3 4 >int getentropy (void *__buffer, size_t __length) > __attribute__ ((__access__ (__write_only__, 1, 2))); ># 1208 "/usr/include/unistd.h" 3 4 >extern int close_range (unsigned int __fd, unsigned int __max_fd, > int __flags) noexcept (true); ># 1218 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/bits/unistd_ext.h" 1 3 4 ># 34 "/usr/include/bits/unistd_ext.h" 3 4 >extern __pid_t gettid (void) noexcept (true); > > > ># 1 "/usr/include/linux/close_range.h" 1 3 4 ># 39 "/usr/include/bits/unistd_ext.h" 2 3 4 ># 1219 "/usr/include/unistd.h" 2 3 4 > >} ># 79 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 2 3 4 ># 49 "/usr/include/boost/config.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/config/detail/select_platform_config.hpp" 1 3 4 ># 54 "/usr/include/boost/config.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/config/platform/linux.hpp" 1 3 4 ># 15 "/usr/include/boost/config/platform/linux.hpp" 3 4 ># 1 "/usr/include/c++/13/cstdlib" 1 3 4 ># 39 "/usr/include/c++/13/cstdlib" 3 4 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 16 "/usr/include/boost/config/platform/linux.hpp" 2 3 4 ># 75 "/usr/include/boost/config/platform/linux.hpp" 3 4 ># 1 "/usr/include/boost/config/detail/posix_features.hpp" 1 3 4 ># 76 "/usr/include/boost/config/platform/linux.hpp" 2 3 4 ># 58 "/usr/include/boost/config.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/config/detail/suffix.hpp" 1 3 4 ># 34 "/usr/include/boost/config/detail/suffix.hpp" 3 4 > ># 35 "/usr/include/boost/config/detail/suffix.hpp" 3 ># 494 "/usr/include/boost/config/detail/suffix.hpp" 3 >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; > > > > >} ># 556 "/usr/include/boost/config/detail/suffix.hpp" 3 ># 1 "/usr/include/boost/config/helper_macros.hpp" 1 3 4 ># 557 "/usr/include/boost/config/detail/suffix.hpp" 2 3 ># 1204 "/usr/include/boost/config/detail/suffix.hpp" 3 ># 1 "/usr/include/boost/config/detail/cxx_composite.hpp" 1 3 4 ># 1205 "/usr/include/boost/config/detail/suffix.hpp" 2 3 ># 1216 "/usr/include/boost/config/detail/suffix.hpp" 3 ># 1 "/usr/include/boost/config/detail/cxx_composite.hpp" 1 3 4 ># 1217 "/usr/include/boost/config/detail/suffix.hpp" 2 3 ># 62 "/usr/include/boost/config.hpp" 2 3 4 > > > ># 20 "/usr/include/boost/filesystem/config.hpp" 2 3 4 ># 1 "/usr/include/boost/system/api_config.hpp" 1 3 4 ># 21 "/usr/include/boost/filesystem/config.hpp" 2 3 4 ># 1 "/usr/include/boost/detail/workaround.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/workaround.hpp" 1 3 4 ># 9 "/usr/include/boost/detail/workaround.hpp" 2 3 4 ># 22 "/usr/include/boost/filesystem/config.hpp" 2 3 4 ># 122 "/usr/include/boost/filesystem/config.hpp" 3 4 ># 1 "/usr/include/boost/config/auto_link.hpp" 1 3 4 ># 123 "/usr/include/boost/filesystem/config.hpp" 2 3 4 ># 16 "/usr/include/boost/filesystem.hpp" 2 3 4 ># 1 "/usr/include/boost/filesystem/path.hpp" 1 3 4 ># 19 "/usr/include/boost/filesystem/path.hpp" 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 20 "/usr/include/boost/filesystem/path.hpp" 2 3 4 > ># 1 "/usr/include/boost/filesystem/path_traits.hpp" 1 3 4 ># 14 "/usr/include/boost/filesystem/path_traits.hpp" 3 4 ># 1 "/usr/include/boost/system/error_category.hpp" 1 3 4 ># 10 "/usr/include/boost/system/error_category.hpp" 3 4 ># 1 "/usr/include/boost/system/detail/error_category.hpp" 1 3 4 ># 13 "/usr/include/boost/system/detail/error_category.hpp" 3 4 ># 1 "/usr/include/boost/system/detail/config.hpp" 1 3 4 ># 14 "/usr/include/boost/system/detail/error_category.hpp" 2 3 4 ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 46 "/usr/include/boost/cstdint.hpp" 3 4 > ># 47 "/usr/include/boost/cstdint.hpp" 3 ># 71 "/usr/include/boost/cstdint.hpp" 3 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stdint.h" 1 3 4 ># 9 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stdint.h" 3 4 ># 1 "/usr/include/stdint.h" 1 3 4 ># 26 "/usr/include/stdint.h" 3 4 ># 1 "/usr/include/bits/libc-header-start.h" 1 3 4 ># 27 "/usr/include/stdint.h" 2 3 4 > > ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 30 "/usr/include/stdint.h" 2 3 4 > > > > > > > ># 1 "/usr/include/bits/stdint-uintn.h" 1 3 4 ># 24 "/usr/include/bits/stdint-uintn.h" 3 4 >typedef __uint8_t uint8_t; >typedef __uint16_t uint16_t; >typedef __uint32_t uint32_t; >typedef __uint64_t uint64_t; ># 38 "/usr/include/stdint.h" 2 3 4 > > > > > >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; ># 71 "/usr/include/stdint.h" 3 4 >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; ># 90 "/usr/include/stdint.h" 3 4 >typedef unsigned long int uintptr_t; ># 101 "/usr/include/stdint.h" 3 4 >typedef __intmax_t intmax_t; >typedef __uintmax_t uintmax_t; ># 10 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stdint.h" 2 3 4 ># 72 "/usr/include/boost/cstdint.hpp" 2 3 ># 114 "/usr/include/boost/cstdint.hpp" 3 >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; > >} ># 387 "/usr/include/boost/cstdint.hpp" 3 >namespace boost { > using ::intptr_t; > using ::uintptr_t; >} ># 15 "/usr/include/boost/system/detail/error_category.hpp" 2 3 4 > > ># 1 "/usr/include/c++/13/functional" 1 3 4 ># 46 "/usr/include/c++/13/functional" 3 4 > ># 47 "/usr/include/c++/13/functional" 3 ># 63 "/usr/include/c++/13/functional" 3 ># 1 "/usr/include/c++/13/unordered_map" 1 3 ># 32 "/usr/include/c++/13/unordered_map" 3 > ># 33 "/usr/include/c++/13/unordered_map" 3 ># 41 "/usr/include/c++/13/unordered_map" 3 ># 1 "/usr/include/c++/13/bits/unordered_map.h" 1 3 ># 33 "/usr/include/c++/13/bits/unordered_map.h" 3 ># 1 "/usr/include/c++/13/bits/hashtable.h" 1 3 ># 33 "/usr/include/c++/13/bits/hashtable.h" 3 > ># 34 "/usr/include/c++/13/bits/hashtable.h" 3 > ># 1 "/usr/include/c++/13/bits/hashtable_policy.h" 1 3 ># 42 "/usr/include/c++/13/bits/hashtable_policy.h" 3 >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> > inline typename std::iterator_traits<_Iterator>::difference_type > __distance_fw(_Iterator __first, _Iterator __last, > std::input_iterator_tag) > { return __first != __last ? 1 : 0; } > > template<typename _Iterator> > inline typename std::iterator_traits<_Iterator>::difference_type > __distance_fw(_Iterator __first, _Iterator __last, > std::forward_iterator_tag) > { return std::distance(__first, __last); } > > template<typename _Iterator> > inline typename std::iterator_traits<_Iterator>::difference_type > __distance_fw(_Iterator __first, _Iterator __last) > { return __distance_fw(__first, __last, > std::__iterator_category(__first)); } > > struct _Identity > { > template<typename _Tp> > _Tp&& > operator()(_Tp&& __x) const noexcept > { return std::forward<_Tp>(__x); } > }; > > 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 > { return std::forward<_Tp>(__x).first; } > }; > > template<typename _ExKey, typename _Value> > struct _ConvertToValueType; > > template<typename _Value> > struct _ConvertToValueType<_Identity, _Value> > { > template<typename _Kt> > constexpr _Kt&& > operator()(_Kt&& __k) const noexcept > { return std::forward<_Kt>(__k); } > }; > > template<typename _Value> > struct _ConvertToValueType<_Select1st, _Value> > { > constexpr _Value&& > operator()(_Value&& __x) const noexcept > { return std::move(__x); } > > constexpr const _Value& > operator()(const _Value& __x) const noexcept > { return __x; } > > template<typename _Kt, typename _Val> > constexpr std::pair<_Kt, _Val>&& > operator()(std::pair<_Kt, _Val>&& __x) const noexcept > { return std::move(__x); } > > template<typename _Kt, typename _Val> > constexpr const std::pair<_Kt, _Val>& > operator()(const std::pair<_Kt, _Val>& __x) const noexcept > { return __x; } > }; > > 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* > { > return __node_gen(std::forward<_Kt>(__k), > std::forward<_Arg>(__arg).second); > } > }; > > 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* > { return __node_gen(std::forward<_Kt>(__k)); } > }; > > 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) > : _M_nodes(__nodes), _M_h(__h) { } > _ReuseOrAllocNode(const _ReuseOrAllocNode&) = delete; > > ~_ReuseOrAllocNode() > { _M_h._M_deallocate_nodes(_M_nodes); } > > template<typename... _Args> > __node_type* > operator()(_Args&&... __args) const > { > if (_M_nodes) > { > __node_type* __node = _M_nodes; > _M_nodes = _M_nodes->_M_next(); > __node->_M_nxt = nullptr; > auto& __a = _M_h._M_node_allocator(); > __node_alloc_traits::destroy(__a, __node->_M_valptr()); > try > { > __node_alloc_traits::construct(__a, __node->_M_valptr(), > std::forward<_Args>(__args)...); > } > catch(...) > { > _M_h._M_deallocate_node_ptr(__node); > throw; > } > return __node; > } > return _M_h._M_allocate_node(std::forward<_Args>(__args)...); > } > > 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) > : _M_h(__h) { } > > template<typename... _Args> > __node_type* > operator()(_Args&&... __args) const > { return _M_h._M_allocate_node(std::forward<_Args>(__args)...); } > > private: > __hashtable_alloc& _M_h; > }; ># 279 "/usr/include/c++/13/bits/hashtable_policy.h" 3 > 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 > { return std::__is_fast_hash<_Hash>::value ? 0 : 20; } > }; ># 309 "/usr/include/c++/13/bits/hashtable_policy.h" 3 > struct _Hash_node_base > { > _Hash_node_base* _M_nxt; > > _Hash_node_base() noexcept : _M_nxt() { } > > _Hash_node_base(_Hash_node_base* __next) noexcept : _M_nxt(__next) { } > }; > > > > > > > template<typename _Value> > struct _Hash_node_value_base > { > typedef _Value value_type; > > __gnu_cxx::__aligned_buffer<_Value> _M_storage; > > _Value* > _M_valptr() noexcept > { return _M_storage._M_ptr(); } > > const _Value* > _M_valptr() const noexcept > { return _M_storage._M_ptr(); } > > _Value& > _M_v() noexcept > { return *_M_valptr(); } > > const _Value& > _M_v() const noexcept > { return *_M_valptr(); } > }; > > > > > 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 > { return static_cast<_Hash_node*>(this->_M_nxt); } > }; > > > 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() : _M_cur(nullptr) { } > _Node_iterator_base(__node_type* __p) noexcept > : _M_cur(__p) { } > > void > _M_incr() noexcept > { _M_cur = _M_cur->_M_next(); } > > friend bool > operator==(const _Node_iterator_base& __x, const _Node_iterator_base& __y) > noexcept > { return __x._M_cur == __y._M_cur; } > > > friend bool > operator!=(const _Node_iterator_base& __x, const _Node_iterator_base& __y) > noexcept > { return __x._M_cur != __y._M_cur; } > > }; > > > 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) noexcept > : __base_type(__p) { } > > reference > operator*() const noexcept > { return this->_M_cur->_M_v(); } > > pointer > operator->() const noexcept > { return this->_M_cur->_M_valptr(); } > > _Node_iterator& > operator++() noexcept > { > this->_M_incr(); > return *this; > } > > _Node_iterator > operator++(int) noexcept > { > _Node_iterator __tmp(*this); > this->_M_incr(); > return __tmp; > } > }; > > > 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) noexcept > : __base_type(__p) { } > > _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, > __cache>& __x) noexcept > : __base_type(__x._M_cur) { } > > reference > operator*() const noexcept > { return this->_M_cur->_M_v(); } > > pointer > operator->() const noexcept > { return this->_M_cur->_M_valptr(); } > > _Node_const_iterator& > operator++() noexcept > { > this->_M_incr(); > return *this; > } > > _Node_const_iterator > operator++(int) noexcept > { > _Node_const_iterator __tmp(*this); > this->_M_incr(); > return __tmp; > } > }; > > > > > > > struct _Mod_range_hashing > { > typedef std::size_t first_argument_type; > typedef std::size_t second_argument_type; > typedef std::size_t result_type; > > result_type > operator()(first_argument_type __num, > second_argument_type __den) const noexcept > { return __num % __den; } > }; > > > > > > > struct _Default_ranged_hash { }; > > > > struct _Prime_rehash_policy > { > using __has_load_factor = true_type; > > _Prime_rehash_policy(float __z = 1.0) noexcept > : _M_max_load_factor(__z), _M_next_resize(0) { } > > float > max_load_factor() const noexcept > { return _M_max_load_factor; } > > > std::size_t > _M_next_bkt(std::size_t __n) const; > > > std::size_t > _M_bkt_for_elements(std::size_t __n) const > { return __builtin_ceil(__n / (double)_M_max_load_factor); } > > > > > > std::pair<bool, std::size_t> > _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, > std::size_t __n_ins) const; > > typedef std::size_t _State; > > _State > _M_state() const > { return _M_next_resize; } > > void > _M_reset() noexcept > { _M_next_resize = 0; } > > void > _M_reset(_State __state) > { _M_next_resize = __state; } > > static const std::size_t _S_growth_factor = 2; > > float _M_max_load_factor; > mutable std::size_t _M_next_resize; > }; > > > struct _Mask_range_hashing > { > typedef std::size_t first_argument_type; > typedef std::size_t second_argument_type; > typedef std::size_t result_type; > > result_type > operator()(first_argument_type __num, > second_argument_type __den) const noexcept > { return __num & (__den - 1); } > }; > > > inline std::size_t > __clp2(std::size_t __n) noexcept > { > using __gnu_cxx::__int_traits; > > if (__n < 2) > return __n; > const unsigned __lz = sizeof(size_t) > sizeof(long) > ? __builtin_clzll(__n - 1ull) > : __builtin_clzl(__n - 1ul); > > return (size_t(1) << (__int_traits<size_t>::__digits - __lz - 1)) << 1; > } > > > > struct _Power2_rehash_policy > { > using __has_load_factor = true_type; > > _Power2_rehash_policy(float __z = 1.0) noexcept > : _M_max_load_factor(__z), _M_next_resize(0) { } > > float > max_load_factor() const noexcept > { return _M_max_load_factor; } > > > > std::size_t > _M_next_bkt(std::size_t __n) noexcept > { > if (__n == 0) > > > > return 1; > > const auto __max_width = std::min<size_t>(sizeof(size_t), 8); > const auto __max_bkt = size_t(1) << (__max_width * 8 - 1); > std::size_t __res = __clp2(__n); > > if (__res == 0) > __res = __max_bkt; > else if (__res == 1) > > > > __res = 2; > > if (__res == __max_bkt) > > > > _M_next_resize = size_t(-1); > else > _M_next_resize > = __builtin_floor(__res * (double)_M_max_load_factor); > > return __res; > } > > > std::size_t > _M_bkt_for_elements(std::size_t __n) const noexcept > { return __builtin_ceil(__n / (double)_M_max_load_factor); } > > > > > > std::pair<bool, std::size_t> > _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, > std::size_t __n_ins) noexcept > { > if (__n_elt + __n_ins > _M_next_resize) > { > > > > double __min_bkts > = std::max<std::size_t>(__n_elt + __n_ins, _M_next_resize ? 0 : 11) > / (double)_M_max_load_factor; > if (__min_bkts >= __n_bkt) > return { true, > _M_next_bkt(std::max<std::size_t>(__builtin_floor(__min_bkts) + 1, > __n_bkt * _S_growth_factor)) }; > > _M_next_resize > = __builtin_floor(__n_bkt * (double)_M_max_load_factor); > return { false, 0 }; > } > else > return { false, 0 }; > } > > typedef std::size_t _State; > > _State > _M_state() const noexcept > { return _M_next_resize; } > > void > _M_reset() noexcept > { _M_next_resize = 0; } > > void > _M_reset(_State __state) noexcept > { _M_next_resize = __state; } > > static const std::size_t _S_growth_factor = 2; > > float _M_max_load_factor; > std::size_t _M_next_resize; > }; ># 732 "/usr/include/c++/13/bits/hashtable_policy.h" 3 > 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) > { > auto __ite = static_cast<__hashtable*>(this)->find(__k); > if (!__ite._M_cur) > __throw_out_of_range(("unordered_map::at")); > return __ite->second; > } > > const mapped_type& > at(const key_type& __k) const > { > auto __ite = static_cast<const __hashtable*>(this)->find(__k); > if (!__ite._M_cur) > __throw_out_of_range(("unordered_map::at")); > return __ite->second; > } > }; > > template<typename _Key, typename _Val, typename _Alloc, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Map_base<_Key, pair<const _Key, _Val>, _Alloc, _Select1st, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: > operator[](const key_type& __k) > -> mapped_type& > { > __hashtable* __h = static_cast<__hashtable*>(this); > __hash_code __code = __h->_M_hash_code(__k); > std::size_t __bkt = __h->_M_bucket_index(__code); > if (auto __node = __h->_M_find_node(__bkt, __k, __code)) > return __node->_M_v().second; > > typename __hashtable::_Scoped_node __node { > __h, > std::piecewise_construct, > std::tuple<const key_type&>(__k), > std::tuple<>() > }; > auto __pos > = __h->_M_insert_unique_node(__bkt, __code, __node._M_node); > __node._M_node = nullptr; > return __pos->second; > } > > template<typename _Key, typename _Val, typename _Alloc, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Map_base<_Key, pair<const _Key, _Val>, _Alloc, _Select1st, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: > operator[](key_type&& __k) > -> mapped_type& > { > __hashtable* __h = static_cast<__hashtable*>(this); > __hash_code __code = __h->_M_hash_code(__k); > std::size_t __bkt = __h->_M_bucket_index(__code); > if (auto __node = __h->_M_find_node(__bkt, __k, __code)) > return __node->_M_v().second; > > typename __hashtable::_Scoped_node __node { > __h, > std::piecewise_construct, > std::forward_as_tuple(std::move(__k)), > std::tuple<>() > }; > auto __pos > = __h->_M_insert_unique_node(__bkt, __code, __node._M_node); > __node._M_node = nullptr; > return __pos->second; > } > > > 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() > { return *(static_cast<__hashtable*>(this)); } > > 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) > { > __hashtable& __h = _M_conjure_hashtable(); > __node_gen_type __node_gen(__h); > return __h._M_insert(__v, __node_gen, __unique_keys{}); > } > > iterator > insert(const_iterator __hint, const value_type& __v) > { > __hashtable& __h = _M_conjure_hashtable(); > __node_gen_type __node_gen(__h); > return __h._M_insert(__hint, __v, __node_gen, __unique_keys{}); > } > > template<typename _KType, typename... _Args> > std::pair<iterator, bool> > try_emplace(const_iterator, _KType&& __k, _Args&&... __args) > { > __hashtable& __h = _M_conjure_hashtable(); > auto __code = __h._M_hash_code(__k); > std::size_t __bkt = __h._M_bucket_index(__code); > if (auto __node = __h._M_find_node(__bkt, __k, __code)) > return { iterator(__node), false }; > > typename __hashtable::_Scoped_node __node { > &__h, > std::piecewise_construct, > std::forward_as_tuple(std::forward<_KType>(__k)), > std::forward_as_tuple(std::forward<_Args>(__args)...) > }; > auto __it > = __h._M_insert_unique_node(__bkt, __code, __node._M_node); > __node._M_node = nullptr; > return { __it, true }; > } > > void > insert(initializer_list<value_type> __l) > { this->insert(__l.begin(), __l.end()); } > > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { > __hashtable& __h = _M_conjure_hashtable(); > __node_gen_type __node_gen(__h); > return _M_insert_range(__first, __last, __node_gen, __unique_keys{}); > } > }; > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _InputIterator, typename _NodeGetter> > void > _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, > _RehashPolicy, _Traits>:: > _M_insert_range(_InputIterator __first, _InputIterator __last, > const _NodeGetter& __node_gen, true_type __uks) > { > __hashtable& __h = _M_conjure_hashtable(); > for (; __first != __last; ++__first) > __h._M_insert(*__first, __node_gen, __uks); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _InputIterator, typename _NodeGetter> > void > _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, > _RehashPolicy, _Traits>:: > _M_insert_range(_InputIterator __first, _InputIterator __last, > const _NodeGetter& __node_gen, false_type __uks) > { > using __rehash_type = typename __hashtable::__rehash_type; > using __rehash_state = typename __hashtable::__rehash_state; > using pair_type = std::pair<bool, std::size_t>; > > size_type __n_elt = __detail::__distance_fw(__first, __last); > if (__n_elt == 0) > return; > > __hashtable& __h = _M_conjure_hashtable(); > __rehash_type& __rehash = __h._M_rehash_policy; > const __rehash_state& __saved_state = __rehash._M_state(); > pair_type __do_rehash = __rehash._M_need_rehash(__h._M_bucket_count, > __h._M_element_count, > __n_elt); > > if (__do_rehash.first) > __h._M_rehash(__do_rehash.second, __saved_state); > > for (; __first != __last; ++__first) > __h._M_insert(*__first, __node_gen, __uks); > } > > > > > > > > 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) > { > __hashtable& __h = this->_M_conjure_hashtable(); > __node_gen_type __node_gen(__h); > return __h._M_insert(std::move(__v), __node_gen, __unique_keys{}); > } > > iterator > insert(const_iterator __hint, value_type&& __v) > { > __hashtable& __h = this->_M_conjure_hashtable(); > __node_gen_type __node_gen(__h); > return __h._M_insert(__hint, std::move(__v), __node_gen, > __unique_keys{}); > } > }; > > > 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) > { > __hashtable& __h = this->_M_conjure_hashtable(); > return __h._M_emplace(__unique_keys{}, std::forward<_Pair>(__v)); > } > > template<typename _Pair, typename = _IFconsp<_Pair>> > iterator > insert(const_iterator __hint, _Pair&& __v) > { > __hashtable& __h = this->_M_conjure_hashtable(); > return __h._M_emplace(__hint, __unique_keys{}, > std::forward<_Pair>(__v)); > } > }; > > template<typename _Policy> > using __has_load_factor = typename _Policy::__has_load_factor; > > > > > > > > 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 > { > const __hashtable* __this = static_cast<const __hashtable*>(this); > return __this->__rehash_policy().max_load_factor(); > } > > void > max_load_factor(float __z) > { > __hashtable* __this = static_cast<__hashtable*>(this); > __this->__rehash_policy(_RehashPolicy(__z)); > } > > void > reserve(std::size_t __n) > { > __hashtable* __this = static_cast<__hashtable*>(this); > __this->rehash(__this->__rehash_policy()._M_bkt_for_elements(__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())) : _Tp() { } > > template<typename _OtherTp> > _Hashtable_ebo_helper(_OtherTp&& __tp) > : _Tp(std::forward<_OtherTp>(__tp)) > { } > > const _Tp& _M_cget() const { return static_cast<const _Tp&>(*this); } > _Tp& _M_get() { return static_cast<_Tp&>(*this); } > }; > > > template<int _Nm, typename _Tp> > struct _Hashtable_ebo_helper<_Nm, _Tp, false> > { > _Hashtable_ebo_helper() = default; > > template<typename _OtherTp> > _Hashtable_ebo_helper(_OtherTp&& __tp) > : _M_tp(std::forward<_OtherTp>(__tp)) > { } > > const _Tp& _M_cget() const { return _M_tp; } > _Tp& _M_get() { return _M_tp; } > > 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; ># 1272 "/usr/include/c++/13/bits/hashtable_policy.h" 3 > 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 > { return _M_hash(); } > > protected: > typedef std::size_t __hash_code; > > > > _Hash_code_base() = default; > > _Hash_code_base(const _Hash& __hash) : __ebo_hash(__hash) { } > > __hash_code > _M_hash_code(const _Key& __k) const > { > static_assert(__is_invocable<const _Hash&, const _Key&>{}, > "hash function must be invocable with an argument of key type"); > return _M_hash()(__k); > } > > template<typename _Kt> > __hash_code > _M_hash_code_tr(const _Kt& __k) const > { > static_assert(__is_invocable<const _Hash&, const _Kt&>{}, > "hash function must be invocable with an argument of key type"); > return _M_hash()(__k); > } > > __hash_code > _M_hash_code(const _Hash&, > const _Hash_node_value<_Value, true>& __n) const > { return __n._M_hash_code; } > > > > template<typename _H2> > __hash_code > _M_hash_code(const _H2&, > const _Hash_node_value<_Value, __cache_hash_code>& __n) const > { return _M_hash_code(_ExtractKey{}(__n._M_v())); } > > __hash_code > _M_hash_code(const _Hash_node_value<_Value, false>& __n) const > { return _M_hash_code(_ExtractKey{}(__n._M_v())); } > > __hash_code > _M_hash_code(const _Hash_node_value<_Value, true>& __n) const > { return __n._M_hash_code; } > > std::size_t > _M_bucket_index(__hash_code __c, std::size_t __bkt_count) const > { return _RangeHash{}(__c, __bkt_count); } > > 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)) ) > { > return _RangeHash{}(_M_hash_code(_ExtractKey{}(__n._M_v())), > __bkt_count); > } > > 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)) ) > { return _RangeHash{}(__n._M_hash_code, __bkt_count); } > > 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 > { __n._M_hash_code = __c; } > > void > _M_copy_code(_Hash_node_code_cache<true>& __to, > const _Hash_node_code_cache<true>& __from) const > { __to._M_hash_code = __from._M_hash_code; } > > void > _M_swap(_Hash_code_base& __x) > { std::swap(__ebo_hash::_M_get(), __x.__ebo_hash::_M_get()); } > > const _Hash& > _M_hash() const { return __ebo_hash::_M_cget(); } > }; > > > 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) > : __base_node_iter(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) > { } > > void > _M_incr() > { > __base_node_iter::_M_incr(); > if (this->_M_cur) > { > std::size_t __bkt > = _RangeHash{}(this->_M_cur->_M_hash_code, _M_bucket_count); > if (__bkt != _M_bucket) > this->_M_cur = nullptr; > } > } > > std::size_t _M_bucket; > std::size_t _M_bucket_count; > > public: > std::size_t > _M_get_bucket() const { return _M_bucket; } > }; > > > > > > template<typename _Tp, bool _IsEmpty = std::is_empty<_Tp>::value> > struct _Hash_code_storage > { > __gnu_cxx::__aligned_buffer<_Tp> _M_storage; > > _Tp* > _M_h() { return _M_storage._M_ptr(); } > > const _Tp* > _M_h() const { return _M_storage._M_ptr(); } > }; > > > template<typename _Tp> > struct _Hash_code_storage<_Tp, true> > { > static_assert( std::is_empty<_Tp>::value, "Type must be empty" ); > > > > _Tp* > _M_h() { return reinterpret_cast<_Tp*>(this); } > > const _Tp* > _M_h() const { return reinterpret_cast<const _Tp*>(this); } > }; > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _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() : _M_bucket_count(-1) { } > > _Local_iterator_base(const __hash_code_base& __base, > _Hash_node<_Value, false>* __p, > std::size_t __bkt, std::size_t __bkt_count) > : __node_iter_base(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) > { _M_init(__base); } > > ~_Local_iterator_base() > { > if (_M_bucket_count != size_t(-1)) > _M_destroy(); > } > > _Local_iterator_base(const _Local_iterator_base& __iter) > : __node_iter_base(__iter._M_cur), _M_bucket(__iter._M_bucket) > , _M_bucket_count(__iter._M_bucket_count) > { > if (_M_bucket_count != size_t(-1)) > _M_init(*__iter._M_h()); > } > > _Local_iterator_base& > operator=(const _Local_iterator_base& __iter) > { > if (_M_bucket_count != -1) > _M_destroy(); > this->_M_cur = __iter._M_cur; > _M_bucket = __iter._M_bucket; > _M_bucket_count = __iter._M_bucket_count; > if (_M_bucket_count != -1) > _M_init(*__iter._M_h()); > return *this; > } > > void > _M_incr() > { > __node_iter_base::_M_incr(); > if (this->_M_cur) > { > std::size_t __bkt = this->_M_h()->_M_bucket_index(*this->_M_cur, > _M_bucket_count); > if (__bkt != _M_bucket) > this->_M_cur = nullptr; > } > } > > std::size_t _M_bucket; > std::size_t _M_bucket_count; > > void > _M_init(const __hash_code_base& __base) > { ::new(this->_M_h()) __hash_code_base(__base); } > > void > _M_destroy() { this->_M_h()->~__hash_code_base(); } > > public: > std::size_t > _M_get_bucket() const { return _M_bucket; } > }; > > > 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) > : __base_type(__base, __n, __bkt, __bkt_count) > { } > > reference > operator*() const > { return this->_M_cur->_M_v(); } > > pointer > operator->() const > { return this->_M_cur->_M_valptr(); } > > _Local_iterator& > operator++() > { > this->_M_incr(); > return *this; > } > > _Local_iterator > operator++(int) > { > _Local_iterator __tmp(*this); > this->_M_incr(); > return __tmp; > } > }; > > > 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) > : __base_type(__base, __n, __bkt, __bkt_count) > { } > > _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, > _Hash, _RangeHash, _Unused, > __constant_iterators, > __cache>& __x) > : __base_type(__x) > { } > > reference > operator*() const > { return this->_M_cur->_M_v(); } > > pointer > operator->() const > { return this->_M_cur->_M_valptr(); } > > _Local_const_iterator& > operator++() > { > this->_M_incr(); > return *this; > } > > _Local_const_iterator > operator++(int) > { > _Local_const_iterator __tmp(*this); > this->_M_incr(); > return __tmp; > } > }; ># 1664 "/usr/include/c++/13/bits/hashtable_policy.h" 3 > 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>&) > { return true; } > > static bool > _S_node_equals(const _Hash_node_code_cache<false>&, > const _Hash_node_code_cache<false>&) > { return true; } > > static bool > _S_equals(__hash_code __c, const _Hash_node_code_cache<true>& __n) > { return __c == __n._M_hash_code; } > > static bool > _S_node_equals(const _Hash_node_code_cache<true>& __lhn, > const _Hash_node_code_cache<true>& __rhn) > { return __lhn._M_hash_code == __rhn._M_hash_code; } > > protected: > _Hashtable_base() = default; > > _Hashtable_base(const _Hash& __hash, const _Equal& __eq) > : __hash_code_base(__hash), _EqualEBO(__eq) > { } > > bool > _M_key_equals(const _Key& __k, > const _Hash_node_value<_Value, > __hash_cached::value>& __n) const > { > static_assert(__is_invocable<const _Equal&, const _Key&, const _Key&>{}, > "key equality predicate must be invocable with two arguments of " > "key type"); > return _M_eq()(__k, _ExtractKey{}(__n._M_v())); > } > > template<typename _Kt> > bool > _M_key_equals_tr(const _Kt& __k, > const _Hash_node_value<_Value, > __hash_cached::value>& __n) const > { > static_assert( > __is_invocable<const _Equal&, const _Kt&, const _Key&>{}, > "key equality predicate must be invocable with two arguments of " > "key type"); > return _M_eq()(__k, _ExtractKey{}(__n._M_v())); > } > > bool > _M_equals(const _Key& __k, __hash_code __c, > const _Hash_node_value<_Value, __hash_cached::value>& __n) const > { return _S_equals(__c, __n) && _M_key_equals(__k, __n); } > > template<typename _Kt> > bool > _M_equals_tr(const _Kt& __k, __hash_code __c, > const _Hash_node_value<_Value, > __hash_cached::value>& __n) const > { return _S_equals(__c, __n) && _M_key_equals_tr(__k, __n); } > > bool > _M_node_equals( > const _Hash_node_value<_Value, __hash_cached::value>& __lhn, > const _Hash_node_value<_Value, __hash_cached::value>& __rhn) const > { > return _S_node_equals(__lhn, __rhn) > && _M_key_equals(_ExtractKey{}(__lhn._M_v()), __rhn); > } > > void > _M_swap(_Hashtable_base& __x) > { > __hash_code_base::_M_swap(__x); > std::swap(_EqualEBO::_M_get(), __x._EqualEBO::_M_get()); > } > > const _Equal& > _M_eq() const { return _EqualEBO::_M_cget(); } > }; ># 1780 "/usr/include/c++/13/bits/hashtable_policy.h" 3 > 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> > bool > _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: > _M_equal(const __hashtable& __other) const > { > using __node_type = typename __hashtable::__node_type; > const __hashtable* __this = static_cast<const __hashtable*>(this); > if (__this->size() != __other.size()) > return false; > > for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) > { > std::size_t __ybkt = __other._M_bucket_index(*__itx._M_cur); > auto __prev_n = __other._M_buckets[__ybkt]; > if (!__prev_n) > return false; > > for (__node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt);; > __n = __n->_M_next()) > { > if (__n->_M_v() == *__itx) > break; > > if (!__n->_M_nxt > || __other._M_bucket_index(*__n->_M_next()) != __ybkt) > return false; > } > } > > return true; > } > > > 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 _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > bool > _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false>:: > _M_equal(const __hashtable& __other) const > { > using __node_type = typename __hashtable::__node_type; > const __hashtable* __this = static_cast<const __hashtable*>(this); > if (__this->size() != __other.size()) > return false; > > for (auto __itx = __this->begin(); __itx != __this->end();) > { > std::size_t __x_count = 1; > auto __itx_end = __itx; > for (++__itx_end; __itx_end != __this->end() > && __this->key_eq()(_ExtractKey{}(*__itx), > _ExtractKey{}(*__itx_end)); > ++__itx_end) > ++__x_count; > > std::size_t __ybkt = __other._M_bucket_index(*__itx._M_cur); > auto __y_prev_n = __other._M_buckets[__ybkt]; > if (!__y_prev_n) > return false; > > __node_type* __y_n = static_cast<__node_type*>(__y_prev_n->_M_nxt); > for (;;) > { > if (__this->key_eq()(_ExtractKey{}(__y_n->_M_v()), > _ExtractKey{}(*__itx))) > break; > > auto __y_ref_n = __y_n; > for (__y_n = __y_n->_M_next(); __y_n; __y_n = __y_n->_M_next()) > if (!__other._M_node_equals(*__y_ref_n, *__y_n)) > break; > > if (!__y_n || __other._M_bucket_index(*__y_n) != __ybkt) > return false; > } > > typename __hashtable::const_iterator __ity(__y_n); > for (auto __ity_end = __ity; __ity_end != __other.end(); ++__ity_end) > if (--__x_count == 0) > break; > > if (__x_count != 0) > return false; > > if (!std::is_permutation(__itx, __itx_end, __ity)) > return false; > > __itx = __itx_end; > } > return true; > } > > > > > > 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) > : __ebo_node_alloc(std::forward<_Alloc>(__a)) > { } > > __node_alloc_type& > _M_node_allocator() > { return __ebo_node_alloc::_M_get(); } > > const __node_alloc_type& > _M_node_allocator() const > { return __ebo_node_alloc::_M_cget(); } > > > 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); > }; > > > > template<typename _NodeAlloc> > template<typename... _Args> > auto > _Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args&&... __args) > -> __node_ptr > { > auto __nptr = __node_alloc_traits::allocate(_M_node_allocator(), 1); > __node_ptr __n = std::__to_address(__nptr); > try > { > ::new ((void*)__n) __node_type; > __node_alloc_traits::construct(_M_node_allocator(), > __n->_M_valptr(), > std::forward<_Args>(__args)...); > return __n; > } > catch(...) > { > __node_alloc_traits::deallocate(_M_node_allocator(), __nptr, 1); > throw; > } > } > > template<typename _NodeAlloc> > void > _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node(__node_ptr __n) > { > __node_alloc_traits::destroy(_M_node_allocator(), __n->_M_valptr()); > _M_deallocate_node_ptr(__n); > } > > template<typename _NodeAlloc> > void > _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node_ptr(__node_ptr __n) > { > typedef typename __node_alloc_traits::pointer _Ptr; > auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__n); > __n->~__node_type(); > __node_alloc_traits::deallocate(_M_node_allocator(), __ptr, 1); > } > > template<typename _NodeAlloc> > void > _Hashtable_alloc<_NodeAlloc>::_M_deallocate_nodes(__node_ptr __n) > { > while (__n) > { > __node_ptr __tmp = __n; > __n = __n->_M_next(); > _M_deallocate_node(__tmp); > } > } > > template<typename _NodeAlloc> > auto > _Hashtable_alloc<_NodeAlloc>::_M_allocate_buckets(std::size_t __bkt_count) > -> __buckets_ptr > { > __buckets_alloc_type __alloc(_M_node_allocator()); > > auto __ptr = __buckets_alloc_traits::allocate(__alloc, __bkt_count); > __buckets_ptr __p = std::__to_address(__ptr); > __builtin_memset(__p, 0, __bkt_count * sizeof(__node_base_ptr)); > return __p; > } > > template<typename _NodeAlloc> > void > _Hashtable_alloc<_NodeAlloc>:: > _M_deallocate_buckets(__buckets_ptr __bkts, > std::size_t __bkt_count) > { > typedef typename __buckets_alloc_traits::pointer _Ptr; > auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__bkts); > __buckets_alloc_type __alloc(_M_node_allocator()); > __buckets_alloc_traits::deallocate(__alloc, __ptr, __bkt_count); > } > > >} > > >} ># 36 "/usr/include/c++/13/bits/hashtable.h" 2 3 ># 1 "/usr/include/c++/13/bits/enable_special_members.h" 1 3 ># 33 "/usr/include/c++/13/bits/enable_special_members.h" 3 > ># 34 "/usr/include/c++/13/bits/enable_special_members.h" 3 > > > >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 { }; ># 96 "/usr/include/c++/13/bits/enable_special_members.h" 3 >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; > }; > > > >} ># 37 "/usr/include/c++/13/bits/hashtable.h" 2 3 > > > > > >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>; ># 177 "/usr/include/c++/13/bits/hashtable.h" 3 > 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) > : _M_h(__h), _M_node(__n) { } > > > template<typename... _Args> > _Scoped_node(__hashtable_alloc* __h, _Args&&... __args) > : _M_h(__h), > _M_node(__h->_M_allocate_node(std::forward<_Args>(__args)...)) > { } > > > ~_Scoped_node() { if (_M_node) _M_h->_M_deallocate_node(_M_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 > { return std::move(__val); } > > > > > > 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() > { > if (_M_begin()) > _M_buckets[_M_bucket_index(*_M_begin())] = &_M_before_begin; > } > > void > _M_update_bbegin(__node_ptr __n) > { > _M_before_begin._M_nxt = __n; > _M_update_bbegin(); > } > > bool > _M_uses_single_bucket(__buckets_ptr __bkts) const > { return __builtin_expect(__bkts == &_M_single_bucket, false); } > > bool > _M_uses_single_bucket() const > { return _M_uses_single_bucket(_M_buckets); } > > static constexpr size_t > __small_size_threshold() noexcept > { > return > __detail::_Hashtable_hash_traits<_Hash>::__small_size_threshold(); > } > > __hashtable_alloc& > _M_base_alloc() { return *this; } > > __buckets_ptr > _M_allocate_buckets(size_type __bkt_count) > { > if (__builtin_expect(__bkt_count == 1, false)) > { > _M_single_bucket = nullptr; > return &_M_single_bucket; > } > > return __hashtable_alloc::_M_allocate_buckets(__bkt_count); > } > > void > _M_deallocate_buckets(__buckets_ptr __bkts, size_type __bkt_count) > { > if (_M_uses_single_bucket(__bkts)) > return; > > __hashtable_alloc::_M_deallocate_buckets(__bkts, __bkt_count); > } > > void > _M_deallocate_buckets() > { _M_deallocate_buckets(_M_buckets, _M_bucket_count); } > > > > __node_ptr > _M_bucket_begin(size_type __bkt) const; > > __node_ptr > _M_begin() const > { return static_cast<__node_ptr>(_M_before_begin._M_nxt); } > > > > 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) > : __hashtable_base(__h, __eq), > __hashtable_alloc(__node_alloc_type(__a)), > __enable_default_ctor(_Enable_default_constructor_tag{}) > { } > > template<bool _No_realloc = true> > static constexpr bool > _S_nothrow_move() > { > > > > > > if constexpr (_No_realloc) > if constexpr (is_nothrow_copy_constructible<_Hash>()) > return is_nothrow_copy_constructible<_Equal>(); > return false; > > } > > _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(std::move(__ht), std::move(__ht._M_node_allocator()), > true_type{}) > { } > > _Hashtable(_Hashtable&& __ht, const allocator_type& __a) > noexcept(_S_nothrow_move<__node_alloc_traits::_S_always_equal()>()) > : _Hashtable(std::move(__ht), __node_alloc_type(__a), > typename __node_alloc_traits::is_always_equal{}) > { } > > explicit > _Hashtable(const allocator_type& __a) > : __hashtable_alloc(__node_alloc_type(__a)), > __enable_default_ctor(_Enable_default_constructor_tag{}) > { } > > 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(__f, __l, __bkt_count_hint, __hf, __eql, __a, > __unique_keys{}) > { } > > _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(__l.begin(), __l.end(), __bkt_count_hint, > __hf, __eql, __a, __unique_keys{}) > { } > > _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) > { > constexpr bool __move_storage = > __node_alloc_traits::_S_propagate_on_move_assign() > || __node_alloc_traits::_S_always_equal(); > _M_move_assign(std::move(__ht), __bool_constant<__move_storage>()); > return *this; > } > > _Hashtable& > operator=(initializer_list<value_type> __l) > { > __reuse_or_alloc_node_gen_t __roan(_M_begin(), *this); > _M_before_begin._M_nxt = nullptr; > clear(); > > > auto __l_bkt_count = _M_rehash_policy._M_bkt_for_elements(__l.size()); > > > if (_M_bucket_count < __l_bkt_count) > rehash(__l_bkt_count); > > this->_M_insert_range(__l.begin(), __l.end(), __roan, __unique_keys{}); > return *this; > } > > ~_Hashtable() noexcept; > > void > swap(_Hashtable&) > noexcept(__and_<__is_nothrow_swappable<_Hash>, > __is_nothrow_swappable<_Equal>>::value); > > > iterator > begin() noexcept > { return iterator(_M_begin()); } > > const_iterator > begin() const noexcept > { return const_iterator(_M_begin()); } > > iterator > end() noexcept > { return iterator(nullptr); } > > const_iterator > end() const noexcept > { return const_iterator(nullptr); } > > const_iterator > cbegin() const noexcept > { return const_iterator(_M_begin()); } > > const_iterator > cend() const noexcept > { return const_iterator(nullptr); } > > size_type > size() const noexcept > { return _M_element_count; } > > [[__nodiscard__]] bool > empty() const noexcept > { return size() == 0; } > > allocator_type > get_allocator() const noexcept > { return allocator_type(this->_M_node_allocator()); } > > size_type > max_size() const noexcept > { return __node_alloc_traits::max_size(this->_M_node_allocator()); } > > > key_equal > key_eq() const > { return this->_M_eq(); } > > > > > size_type > bucket_count() const noexcept > { return _M_bucket_count; } > > size_type > max_bucket_count() const noexcept > { return max_size(); } > > size_type > bucket_size(size_type __bkt) const > { return std::distance(begin(__bkt), end(__bkt)); } > > size_type > bucket(const key_type& __k) const > { return _M_bucket_index(this->_M_hash_code(__k)); } > > local_iterator > begin(size_type __bkt) > { > return local_iterator(*this, _M_bucket_begin(__bkt), > __bkt, _M_bucket_count); > } > > local_iterator > end(size_type __bkt) > { return local_iterator(*this, nullptr, __bkt, _M_bucket_count); } > > const_local_iterator > begin(size_type __bkt) const > { > return const_local_iterator(*this, _M_bucket_begin(__bkt), > __bkt, _M_bucket_count); > } > > const_local_iterator > end(size_type __bkt) const > { return const_local_iterator(*this, nullptr, __bkt, _M_bucket_count); } > > > const_local_iterator > cbegin(size_type __bkt) const > { > return const_local_iterator(*this, _M_bucket_begin(__bkt), > __bkt, _M_bucket_count); > } > > const_local_iterator > cend(size_type __bkt) const > { return const_local_iterator(*this, nullptr, __bkt, _M_bucket_count); } > > float > load_factor() const noexcept > { > return static_cast<float>(size()) / static_cast<float>(bucket_count()); > } > > > > > > > const _RehashPolicy& > __rehash_policy() const > { return _M_rehash_policy; } > > void > __rehash_policy(const _RehashPolicy& __pol) > { _M_rehash_policy = __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; ># 789 "/usr/include/c++/13/bits/hashtable.h" 3 > private: > > size_type > _M_bucket_index(const __node_value_type& __n) const noexcept > { return __hash_code_base::_M_bucket_index(__n, _M_bucket_count); } > > size_type > _M_bucket_index(__hash_code __c) const > { return __hash_code_base::_M_bucket_index(__c, _M_bucket_count); } > > __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 > { > __node_base_ptr __before_n = _M_find_before_node(__bkt, __key, __c); > if (__before_n) > return static_cast<__node_ptr>(__before_n->_M_nxt); > return nullptr; > } > > template<typename _Kt> > __node_ptr > _M_find_node_tr(size_type __bkt, const _Kt& __key, > __hash_code __c) const > { > auto __before_n = _M_find_before_node_tr(__bkt, __key, __c); > if (__before_n) > return static_cast<__node_ptr>(__before_n->_M_nxt); > return nullptr; > } > > > 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) > { return _M_emplace(cend(), __uks, std::forward<_Args>(__args)...); } > > > template<typename... _Args> > iterator > _M_emplace(const_iterator, true_type __uks, _Args&&... __args) > { return _M_emplace(__uks, std::forward<_Args>(__args)...).first; } > > 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) > { return std::forward<_Kt>(__k); } > > static const key_type& > _S_forward_key(const key_type& __k) > { return __k; } > > static key_type&& > _S_forward_key(key_type&& __k) > { return std::move(__k); } > > template<typename _Arg, typename _NodeGenerator> > std::pair<iterator, bool> > _M_insert_unique_aux(_Arg&& __arg, const _NodeGenerator& __node_gen) > { > return _M_insert_unique( > _S_forward_key(_ExtractKey{}(std::forward<_Arg>(__arg))), > std::forward<_Arg>(__arg), __node_gen); > } > > template<typename _Arg, typename _NodeGenerator> > std::pair<iterator, bool> > _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, > true_type ) > { > using __to_value > = __detail::_ConvertToValueType<_ExtractKey, value_type>; > return _M_insert_unique_aux( > __to_value{}(std::forward<_Arg>(__arg)), __node_gen); > } > > template<typename _Arg, typename _NodeGenerator> > iterator > _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, > false_type __uks) > { > using __to_value > = __detail::_ConvertToValueType<_ExtractKey, value_type>; > return _M_insert(cend(), > __to_value{}(std::forward<_Arg>(__arg)), __node_gen, __uks); > } > > > template<typename _Arg, typename _NodeGenerator> > iterator > _M_insert(const_iterator, _Arg&& __arg, > const _NodeGenerator& __node_gen, true_type __uks) > { > return > _M_insert(std::forward<_Arg>(__arg), __node_gen, __uks).first; > } > > > 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) > { return _M_emplace(__unique_keys{}, std::forward<_Args>(__args)...); } > > template<typename... _Args> > iterator > emplace_hint(const_iterator __hint, _Args&&... __args) > { > return _M_emplace(__hint, __unique_keys{}, > std::forward<_Args>(__args)...); > } > > > > > iterator > erase(const_iterator); > > > iterator > erase(iterator __it) > { return erase(const_iterator(__it)); } > > size_type > erase(const key_type& __k) > { return _M_erase(__unique_keys{}, __k); } > > iterator > erase(const_iterator, const_iterator); > > void > clear() noexcept; > > > > void rehash(size_type __bkt_count); > > > > > > > insert_return_type > _M_reinsert_node(node_type&& __nh) > { > insert_return_type __ret; > if (__nh.empty()) > __ret.position = end(); > else > { > do { if (std::__is_constant_evaluated() && !bool(get_allocator() == __nh.get_allocator())) __builtin_unreachable(); } while (false); > > const key_type& __k = __nh._M_key(); > __hash_code __code = this->_M_hash_code(__k); > size_type __bkt = _M_bucket_index(__code); > if (__node_ptr __n = _M_find_node(__bkt, __k, __code)) > { > __ret.node = std::move(__nh); > __ret.position = iterator(__n); > __ret.inserted = false; > } > else > { > __ret.position > = _M_insert_unique_node(__bkt, __code, __nh._M_ptr); > __nh._M_ptr = nullptr; > __ret.inserted = true; > } > } > return __ret; > } > > > iterator > _M_reinsert_node_multi(const_iterator __hint, node_type&& __nh) > { > if (__nh.empty()) > return end(); > > do { if (std::__is_constant_evaluated() && !bool(get_allocator() == __nh.get_allocator())) __builtin_unreachable(); } while (false); > > const key_type& __k = __nh._M_key(); > auto __code = this->_M_hash_code(__k); > auto __ret > = _M_insert_multi_node(__hint._M_cur, __code, __nh._M_ptr); > __nh._M_ptr = nullptr; > return __ret; > } > > private: > node_type > _M_extract_node(size_t __bkt, __node_base_ptr __prev_n) > { > __node_ptr __n = static_cast<__node_ptr>(__prev_n->_M_nxt); > if (__prev_n == _M_buckets[__bkt]) > _M_remove_bucket_begin(__bkt, __n->_M_next(), > __n->_M_nxt ? _M_bucket_index(*__n->_M_next()) : 0); > else if (__n->_M_nxt) > { > size_type __next_bkt = _M_bucket_index(*__n->_M_next()); > if (__next_bkt != __bkt) > _M_buckets[__next_bkt] = __prev_n; > } > > __prev_n->_M_nxt = __n->_M_nxt; > __n->_M_nxt = nullptr; > --_M_element_count; > return { __n, this->_M_node_allocator() }; > } > > public: > > node_type > extract(const_iterator __pos) > { > size_t __bkt = _M_bucket_index(*__pos._M_cur); > return _M_extract_node(__bkt, > _M_get_previous_node(__bkt, __pos._M_cur)); > } > > > node_type > extract(const _Key& __k) > { > node_type __nh; > __hash_code __code = this->_M_hash_code(__k); > std::size_t __bkt = _M_bucket_index(__code); > if (__node_base_ptr __prev_node = _M_find_before_node(__bkt, __k, __code)) > __nh = _M_extract_node(__bkt, __prev_node); > return __nh; > } > > > template<typename _Compatible_Hashtable> > void > _M_merge_unique(_Compatible_Hashtable& __src) > { > static_assert(is_same_v<typename _Compatible_Hashtable::node_type, > node_type>, "Node types are compatible"); > do { if (std::__is_constant_evaluated() && !bool(get_allocator() == __src.get_allocator())) __builtin_unreachable(); } while (false); > > auto __n_elt = __src.size(); > for (auto __i = __src.cbegin(), __end = __src.cend(); __i != __end;) > { > auto __pos = __i++; > const key_type& __k = _ExtractKey{}(*__pos); > __hash_code __code > = this->_M_hash_code(__src.hash_function(), *__pos._M_cur); > size_type __bkt = _M_bucket_index(__code); > if (_M_find_node(__bkt, __k, __code) == nullptr) > { > auto __nh = __src.extract(__pos); > _M_insert_unique_node(__bkt, __code, __nh._M_ptr, __n_elt); > __nh._M_ptr = nullptr; > __n_elt = 1; > } > else if (__n_elt != 1) > --__n_elt; > } > } > > > template<typename _Compatible_Hashtable> > void > _M_merge_multi(_Compatible_Hashtable& __src) > { > static_assert(is_same_v<typename _Compatible_Hashtable::node_type, > node_type>, "Node types are compatible"); > do { if (std::__is_constant_evaluated() && !bool(get_allocator() == __src.get_allocator())) __builtin_unreachable(); } while (false); > > __node_ptr __hint = nullptr; > this->reserve(size() + __src.size()); > for (auto __i = __src.cbegin(), __end = __src.cend(); __i != __end;) > { > auto __pos = __i++; > __hash_code __code > = this->_M_hash_code(__src.hash_function(), *__pos._M_cur); > auto __nh = __src.extract(__pos); > __hint = _M_insert_multi_node(__hint, __code, __nh._M_ptr)._M_cur; > __nh._M_ptr = nullptr; > } > } > > > 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 _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_bucket_begin(size_type __bkt) const > -> __node_ptr > { > __node_base_ptr __n = _M_buckets[__bkt]; > return __n ? static_cast<__node_ptr>(__n->_M_nxt) : nullptr; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _Hashtable(size_type __bkt_count_hint, > const _Hash& __h, const _Equal& __eq, const allocator_type& __a) > : _Hashtable(__h, __eq, __a) > { > auto __bkt_count = _M_rehash_policy._M_next_bkt(__bkt_count_hint); > if (__bkt_count > _M_bucket_count) > { > _M_buckets = _M_allocate_buckets(__bkt_count); > _M_bucket_count = __bkt_count; > } > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _InputIterator> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _Hashtable(_InputIterator __f, _InputIterator __l, > size_type __bkt_count_hint, > const _Hash& __h, const _Equal& __eq, > const allocator_type& __a, true_type ) > : _Hashtable(__bkt_count_hint, __h, __eq, __a) > { this->insert(__f, __l); } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _InputIterator> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _Hashtable(_InputIterator __f, _InputIterator __l, > size_type __bkt_count_hint, > const _Hash& __h, const _Equal& __eq, > const allocator_type& __a, false_type __uks) > : _Hashtable(__h, __eq, __a) > { > auto __nb_elems = __detail::__distance_fw(__f, __l); > auto __bkt_count = > _M_rehash_policy._M_next_bkt( > std::max(_M_rehash_policy._M_bkt_for_elements(__nb_elems), > __bkt_count_hint)); > > if (__bkt_count > _M_bucket_count) > { > _M_buckets = _M_allocate_buckets(__bkt_count); > _M_bucket_count = __bkt_count; > } > > __alloc_node_gen_t __node_gen(*this); > for (; __f != __l; ++__f) > _M_insert(*__f, __node_gen, __uks); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > operator=(const _Hashtable& __ht) > -> _Hashtable& > { > if (&__ht == this) > return *this; > > if (__node_alloc_traits::_S_propagate_on_copy_assign()) > { > auto& __this_alloc = this->_M_node_allocator(); > auto& __that_alloc = __ht._M_node_allocator(); > if (!__node_alloc_traits::_S_always_equal() > && __this_alloc != __that_alloc) > { > > this->_M_deallocate_nodes(_M_begin()); > _M_before_begin._M_nxt = nullptr; > _M_deallocate_buckets(); > _M_buckets = nullptr; > std::__alloc_on_copy(__this_alloc, __that_alloc); > __hashtable_base::operator=(__ht); > _M_bucket_count = __ht._M_bucket_count; > _M_element_count = __ht._M_element_count; > _M_rehash_policy = __ht._M_rehash_policy; > __alloc_node_gen_t __alloc_node_gen(*this); > try > { > _M_assign(__ht, __alloc_node_gen); > } > catch(...) > { > > > _M_reset(); > throw; > } > return *this; > } > std::__alloc_on_copy(__this_alloc, __that_alloc); > } > > > _M_assign_elements(__ht); > return *this; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _Ht> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_assign_elements(_Ht&& __ht) > { > __buckets_ptr __former_buckets = nullptr; > std::size_t __former_bucket_count = _M_bucket_count; > const __rehash_state& __former_state = _M_rehash_policy._M_state(); > > if (_M_bucket_count != __ht._M_bucket_count) > { > __former_buckets = _M_buckets; > _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); > _M_bucket_count = __ht._M_bucket_count; > } > else > __builtin_memset(_M_buckets, 0, > _M_bucket_count * sizeof(__node_base_ptr)); > > try > { > __hashtable_base::operator=(std::forward<_Ht>(__ht)); > _M_element_count = __ht._M_element_count; > _M_rehash_policy = __ht._M_rehash_policy; > __reuse_or_alloc_node_gen_t __roan(_M_begin(), *this); > _M_before_begin._M_nxt = nullptr; > _M_assign(std::forward<_Ht>(__ht), __roan); > if (__former_buckets) > _M_deallocate_buckets(__former_buckets, __former_bucket_count); > } > catch(...) > { > if (__former_buckets) > { > > _M_deallocate_buckets(); > _M_rehash_policy._M_reset(__former_state); > _M_buckets = __former_buckets; > _M_bucket_count = __former_bucket_count; > } > __builtin_memset(_M_buckets, 0, > _M_bucket_count * sizeof(__node_base_ptr)); > throw; > } > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _Ht, typename _NodeGenerator> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_assign(_Ht&& __ht, const _NodeGenerator& __node_gen) > { > __buckets_ptr __buckets = nullptr; > if (!_M_buckets) > _M_buckets = __buckets = _M_allocate_buckets(_M_bucket_count); > > try > { > if (!__ht._M_before_begin._M_nxt) > return; > > > > __node_ptr __ht_n = __ht._M_begin(); > __node_ptr __this_n > = __node_gen(__fwd_value_for<_Ht>(__ht_n->_M_v())); > this->_M_copy_code(*__this_n, *__ht_n); > _M_update_bbegin(__this_n); > > > __node_ptr __prev_n = __this_n; > for (__ht_n = __ht_n->_M_next(); __ht_n; __ht_n = __ht_n->_M_next()) > { > __this_n = __node_gen(__fwd_value_for<_Ht>(__ht_n->_M_v())); > __prev_n->_M_nxt = __this_n; > this->_M_copy_code(*__this_n, *__ht_n); > size_type __bkt = _M_bucket_index(*__this_n); > if (!_M_buckets[__bkt]) > _M_buckets[__bkt] = __prev_n; > __prev_n = __this_n; > } > } > catch(...) > { > clear(); > if (__buckets) > _M_deallocate_buckets(); > throw; > } > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_reset() noexcept > { > _M_rehash_policy._M_reset(); > _M_bucket_count = 1; > _M_single_bucket = nullptr; > _M_buckets = &_M_single_bucket; > _M_before_begin._M_nxt = nullptr; > _M_element_count = 0; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_move_assign(_Hashtable&& __ht, true_type) > { > if (__builtin_expect(std::__addressof(__ht) == this, false)) > return; > > this->_M_deallocate_nodes(_M_begin()); > _M_deallocate_buckets(); > __hashtable_base::operator=(std::move(__ht)); > _M_rehash_policy = __ht._M_rehash_policy; > if (!__ht._M_uses_single_bucket()) > _M_buckets = __ht._M_buckets; > else > { > _M_buckets = &_M_single_bucket; > _M_single_bucket = __ht._M_single_bucket; > } > > _M_bucket_count = __ht._M_bucket_count; > _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; > _M_element_count = __ht._M_element_count; > std::__alloc_on_move(this->_M_node_allocator(), __ht._M_node_allocator()); > > > _M_update_bbegin(); > __ht._M_reset(); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_move_assign(_Hashtable&& __ht, false_type) > { > if (__ht._M_node_allocator() == this->_M_node_allocator()) > _M_move_assign(std::move(__ht), true_type{}); > else > { > > _M_assign_elements(std::move(__ht)); > __ht.clear(); > } > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _Hashtable(const _Hashtable& __ht) > : __hashtable_base(__ht), > __map_base(__ht), > __rehash_base(__ht), > __hashtable_alloc( > __node_alloc_traits::_S_select_on_copy(__ht._M_node_allocator())), > __enable_default_ctor(__ht), > _M_buckets(nullptr), > _M_bucket_count(__ht._M_bucket_count), > _M_element_count(__ht._M_element_count), > _M_rehash_policy(__ht._M_rehash_policy) > { > __alloc_node_gen_t __alloc_node_gen(*this); > _M_assign(__ht, __alloc_node_gen); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, > true_type ) > noexcept(_S_nothrow_move()) > : __hashtable_base(__ht), > __map_base(__ht), > __rehash_base(__ht), > __hashtable_alloc(std::move(__a)), > __enable_default_ctor(__ht), > _M_buckets(__ht._M_buckets), > _M_bucket_count(__ht._M_bucket_count), > _M_before_begin(__ht._M_before_begin._M_nxt), > _M_element_count(__ht._M_element_count), > _M_rehash_policy(__ht._M_rehash_policy) > { > > if (__ht._M_uses_single_bucket()) > { > _M_buckets = &_M_single_bucket; > _M_single_bucket = __ht._M_single_bucket; > } > > > _M_update_bbegin(); > > __ht._M_reset(); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _Hashtable(const _Hashtable& __ht, const allocator_type& __a) > : __hashtable_base(__ht), > __map_base(__ht), > __rehash_base(__ht), > __hashtable_alloc(__node_alloc_type(__a)), > __enable_default_ctor(__ht), > _M_buckets(), > _M_bucket_count(__ht._M_bucket_count), > _M_element_count(__ht._M_element_count), > _M_rehash_policy(__ht._M_rehash_policy) > { > __alloc_node_gen_t __alloc_node_gen(*this); > _M_assign(__ht, __alloc_node_gen); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, > false_type ) > : __hashtable_base(__ht), > __map_base(__ht), > __rehash_base(__ht), > __hashtable_alloc(std::move(__a)), > __enable_default_ctor(__ht), > _M_buckets(nullptr), > _M_bucket_count(__ht._M_bucket_count), > _M_element_count(__ht._M_element_count), > _M_rehash_policy(__ht._M_rehash_policy) > { > if (__ht._M_node_allocator() == this->_M_node_allocator()) > { > if (__ht._M_uses_single_bucket()) > { > _M_buckets = &_M_single_bucket; > _M_single_bucket = __ht._M_single_bucket; > } > else > _M_buckets = __ht._M_buckets; > > > > _M_update_bbegin(__ht._M_begin()); > > __ht._M_reset(); > } > else > { > __alloc_node_gen_t __alloc_gen(*this); > > using _Fwd_Ht = __conditional_t< > __move_if_noexcept_cond<value_type>::value, > const _Hashtable&, _Hashtable&&>; > _M_assign(std::forward<_Fwd_Ht>(__ht), __alloc_gen); > __ht.clear(); > } > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > ~_Hashtable() noexcept > { > > > > static_assert(noexcept(declval<const __hash_code_base_access&>() > ._M_bucket_index(declval<const __node_value_type&>(), > (std::size_t)0)), > "Cache the hash code or qualify your functors involved" > " in hash code and bucket index computation with noexcept"); > > clear(); > _M_deallocate_buckets(); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > swap(_Hashtable& __x) > noexcept(__and_<__is_nothrow_swappable<_Hash>, > __is_nothrow_swappable<_Equal>>::value) > { > > > > this->_M_swap(__x); > > std::__alloc_on_swap(this->_M_node_allocator(), __x._M_node_allocator()); > std::swap(_M_rehash_policy, __x._M_rehash_policy); > > > if (this->_M_uses_single_bucket()) > { > if (!__x._M_uses_single_bucket()) > { > _M_buckets = __x._M_buckets; > __x._M_buckets = &__x._M_single_bucket; > } > } > else if (__x._M_uses_single_bucket()) > { > __x._M_buckets = _M_buckets; > _M_buckets = &_M_single_bucket; > } > else > std::swap(_M_buckets, __x._M_buckets); > > std::swap(_M_bucket_count, __x._M_bucket_count); > std::swap(_M_before_begin._M_nxt, __x._M_before_begin._M_nxt); > std::swap(_M_element_count, __x._M_element_count); > std::swap(_M_single_bucket, __x._M_single_bucket); > > > > _M_update_bbegin(); > __x._M_update_bbegin(); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > find(const key_type& __k) > -> iterator > { > if (size() <= __small_size_threshold()) > { > for (auto __it = begin(); __it != end(); ++__it) > if (this->_M_key_equals(__k, *__it._M_cur)) > return __it; > return end(); > } > > __hash_code __code = this->_M_hash_code(__k); > std::size_t __bkt = _M_bucket_index(__code); > return iterator(_M_find_node(__bkt, __k, __code)); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > find(const key_type& __k) const > -> const_iterator > { > if (size() <= __small_size_threshold()) > { > for (auto __it = begin(); __it != end(); ++__it) > if (this->_M_key_equals(__k, *__it._M_cur)) > return __it; > return end(); > } > > __hash_code __code = this->_M_hash_code(__k); > std::size_t __bkt = _M_bucket_index(__code); > return const_iterator(_M_find_node(__bkt, __k, __code)); > } ># 1724 "/usr/include/c++/13/bits/hashtable.h" 3 > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > count(const key_type& __k) const > -> size_type > { > auto __it = find(__k); > if (!__it._M_cur) > return 0; > > if (__unique_keys::value) > return 1; > > > > > size_type __result = 1; > for (auto __ref = __it++; > __it._M_cur && this->_M_node_equals(*__ref._M_cur, *__it._M_cur); > ++__it) > ++__result; > > return __result; > } ># 1785 "/usr/include/c++/13/bits/hashtable.h" 3 > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > equal_range(const key_type& __k) > -> pair<iterator, iterator> > { > auto __ite = find(__k); > if (!__ite._M_cur) > return { __ite, __ite }; > > auto __beg = __ite++; > if (__unique_keys::value) > return { __beg, __ite }; > > > > > while (__ite._M_cur && this->_M_node_equals(*__beg._M_cur, *__ite._M_cur)) > ++__ite; > > return { __beg, __ite }; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > equal_range(const key_type& __k) const > -> pair<const_iterator, const_iterator> > { > auto __ite = find(__k); > if (!__ite._M_cur) > return { __ite, __ite }; > > auto __beg = __ite++; > if (__unique_keys::value) > return { __beg, __ite }; > > > > > while (__ite._M_cur && this->_M_node_equals(*__beg._M_cur, *__ite._M_cur)) > ++__ite; > > return { __beg, __ite }; > } ># 1899 "/usr/include/c++/13/bits/hashtable.h" 3 > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_find_before_node(const key_type& __k) > -> __node_base_ptr > { > __node_base_ptr __prev_p = &_M_before_begin; > if (!__prev_p->_M_nxt) > return nullptr; > > for (__node_ptr __p = static_cast<__node_ptr>(__prev_p->_M_nxt); > __p != nullptr; > __p = __p->_M_next()) > { > if (this->_M_key_equals(__k, *__p)) > return __prev_p; > > __prev_p = __p; > } > > return nullptr; > } > > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_find_before_node(size_type __bkt, const key_type& __k, > __hash_code __code) const > -> __node_base_ptr > { > __node_base_ptr __prev_p = _M_buckets[__bkt]; > if (!__prev_p) > return nullptr; > > for (__node_ptr __p = static_cast<__node_ptr>(__prev_p->_M_nxt);; > __p = __p->_M_next()) > { > if (this->_M_equals(__k, __code, *__p)) > return __prev_p; > > if (!__p->_M_nxt || _M_bucket_index(*__p->_M_next()) != __bkt) > break; > __prev_p = __p; > } > > return nullptr; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _Kt> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_find_before_node_tr(size_type __bkt, const _Kt& __k, > __hash_code __code) const > -> __node_base_ptr > { > __node_base_ptr __prev_p = _M_buckets[__bkt]; > if (!__prev_p) > return nullptr; > > for (__node_ptr __p = static_cast<__node_ptr>(__prev_p->_M_nxt);; > __p = __p->_M_next()) > { > if (this->_M_equals_tr(__k, __code, *__p)) > return __prev_p; > > if (!__p->_M_nxt || _M_bucket_index(*__p->_M_next()) != __bkt) > break; > __prev_p = __p; > } > > return nullptr; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_insert_bucket_begin(size_type __bkt, __node_ptr __node) > { > if (_M_buckets[__bkt]) > { > > > __node->_M_nxt = _M_buckets[__bkt]->_M_nxt; > _M_buckets[__bkt]->_M_nxt = __node; > } > else > { > > > > __node->_M_nxt = _M_before_begin._M_nxt; > _M_before_begin._M_nxt = __node; > > if (__node->_M_nxt) > > > _M_buckets[_M_bucket_index(*__node->_M_next())] = __node; > > _M_buckets[__bkt] = &_M_before_begin; > } > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_remove_bucket_begin(size_type __bkt, __node_ptr __next, > size_type __next_bkt) > { > if (!__next || __next_bkt != __bkt) > { > > > if (__next) > _M_buckets[__next_bkt] = _M_buckets[__bkt]; > > > if (&_M_before_begin == _M_buckets[__bkt]) > _M_before_begin._M_nxt = __next; > _M_buckets[__bkt] = nullptr; > } > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_get_previous_node(size_type __bkt, __node_ptr __n) > -> __node_base_ptr > { > __node_base_ptr __prev_n = _M_buckets[__bkt]; > while (__prev_n->_M_nxt != __n) > __prev_n = __prev_n->_M_nxt; > return __prev_n; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename... _Args> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_emplace(true_type , _Args&&... __args) > -> pair<iterator, bool> > { > > _Scoped_node __node { this, std::forward<_Args>(__args)... }; > const key_type& __k = _ExtractKey{}(__node._M_node->_M_v()); > if (size() <= __small_size_threshold()) > { > for (auto __it = begin(); __it != end(); ++__it) > if (this->_M_key_equals(__k, *__it._M_cur)) > > return { __it, false }; > } > > __hash_code __code = this->_M_hash_code(__k); > size_type __bkt = _M_bucket_index(__code); > if (size() > __small_size_threshold()) > if (__node_ptr __p = _M_find_node(__bkt, __k, __code)) > > return { iterator(__p), false }; > > > auto __pos = _M_insert_unique_node(__bkt, __code, __node._M_node); > __node._M_node = nullptr; > return { __pos, true }; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename... _Args> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_emplace(const_iterator __hint, false_type , > _Args&&... __args) > -> iterator > { > > _Scoped_node __node { this, std::forward<_Args>(__args)... }; > const key_type& __k = _ExtractKey{}(__node._M_node->_M_v()); > > auto __res = this->_M_compute_hash_code(__hint, __k); > auto __pos > = _M_insert_multi_node(__res.first._M_cur, __res.second, > __node._M_node); > __node._M_node = nullptr; > return __pos; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_compute_hash_code(const_iterator __hint, const key_type& __k) const > -> pair<const_iterator, __hash_code> > { > if (size() <= __small_size_threshold()) > { > if (__hint != cend()) > { > for (auto __it = __hint; __it != cend(); ++__it) > if (this->_M_key_equals(__k, *__it._M_cur)) > return { __it, this->_M_hash_code(*__it._M_cur) }; > } > > for (auto __it = cbegin(); __it != __hint; ++__it) > if (this->_M_key_equals(__k, *__it._M_cur)) > return { __it, this->_M_hash_code(*__it._M_cur) }; > } > > return { __hint, this->_M_hash_code(__k) }; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_insert_unique_node(size_type __bkt, __hash_code __code, > __node_ptr __node, size_type __n_elt) > -> iterator > { > const __rehash_state& __saved_state = _M_rehash_policy._M_state(); > std::pair<bool, std::size_t> __do_rehash > = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, > __n_elt); > > if (__do_rehash.first) > { > _M_rehash(__do_rehash.second, __saved_state); > __bkt = _M_bucket_index(__code); > } > > this->_M_store_code(*__node, __code); > > > _M_insert_bucket_begin(__bkt, __node); > ++_M_element_count; > return iterator(__node); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_insert_multi_node(__node_ptr __hint, > __hash_code __code, __node_ptr __node) > -> iterator > { > const __rehash_state& __saved_state = _M_rehash_policy._M_state(); > std::pair<bool, std::size_t> __do_rehash > = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); > > if (__do_rehash.first) > _M_rehash(__do_rehash.second, __saved_state); > > this->_M_store_code(*__node, __code); > const key_type& __k = _ExtractKey{}(__node->_M_v()); > size_type __bkt = _M_bucket_index(__code); > > > > __node_base_ptr __prev > = __builtin_expect(__hint != nullptr, false) > && this->_M_equals(__k, __code, *__hint) > ? __hint > : _M_find_before_node(__bkt, __k, __code); > > if (__prev) > { > > __node->_M_nxt = __prev->_M_nxt; > __prev->_M_nxt = __node; > if (__builtin_expect(__prev == __hint, false)) > > > if (__node->_M_nxt > && !this->_M_equals(__k, __code, *__node->_M_next())) > { > size_type __next_bkt = _M_bucket_index(*__node->_M_next()); > if (__next_bkt != __bkt) > _M_buckets[__next_bkt] = __node; > } > } > else > > > > _M_insert_bucket_begin(__bkt, __node); > ++_M_element_count; > return iterator(__node); > } > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _Kt, typename _Arg, typename _NodeGenerator> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_insert_unique(_Kt&& __k, _Arg&& __v, > const _NodeGenerator& __node_gen) > -> pair<iterator, bool> > { > if (size() <= __small_size_threshold()) > for (auto __it = begin(); __it != end(); ++__it) > if (this->_M_key_equals_tr(__k, *__it._M_cur)) > return { __it, false }; > > __hash_code __code = this->_M_hash_code_tr(__k); > size_type __bkt = _M_bucket_index(__code); > > if (size() > __small_size_threshold()) > if (__node_ptr __node = _M_find_node_tr(__bkt, __k, __code)) > return { iterator(__node), false }; > > _Scoped_node __node { > __node_builder_t::_S_build(std::forward<_Kt>(__k), > std::forward<_Arg>(__v), > __node_gen), > this > }; > auto __pos > = _M_insert_unique_node(__bkt, __code, __node._M_node); > __node._M_node = nullptr; > return { __pos, true }; > } > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > template<typename _Arg, typename _NodeGenerator> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_insert(const_iterator __hint, _Arg&& __v, > const _NodeGenerator& __node_gen, > false_type ) > -> iterator > { > > _Scoped_node __node{ __node_gen(std::forward<_Arg>(__v)), this }; > > > auto __res = this->_M_compute_hash_code( > __hint, _ExtractKey{}(__node._M_node->_M_v())); > > auto __pos > = _M_insert_multi_node(__res.first._M_cur, __res.second, > __node._M_node); > __node._M_node = nullptr; > return __pos; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > erase(const_iterator __it) > -> iterator > { > __node_ptr __n = __it._M_cur; > std::size_t __bkt = _M_bucket_index(*__n); > > > > > __node_base_ptr __prev_n = _M_get_previous_node(__bkt, __n); > return _M_erase(__bkt, __prev_n, __n); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_erase(size_type __bkt, __node_base_ptr __prev_n, __node_ptr __n) > -> iterator > { > if (__prev_n == _M_buckets[__bkt]) > _M_remove_bucket_begin(__bkt, __n->_M_next(), > __n->_M_nxt ? _M_bucket_index(*__n->_M_next()) : 0); > else if (__n->_M_nxt) > { > size_type __next_bkt = _M_bucket_index(*__n->_M_next()); > if (__next_bkt != __bkt) > _M_buckets[__next_bkt] = __prev_n; > } > > __prev_n->_M_nxt = __n->_M_nxt; > iterator __result(__n->_M_next()); > this->_M_deallocate_node(__n); > --_M_element_count; > > return __result; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_erase(true_type , const key_type& __k) > -> size_type > { > __node_base_ptr __prev_n; > __node_ptr __n; > std::size_t __bkt; > if (size() <= __small_size_threshold()) > { > __prev_n = _M_find_before_node(__k); > if (!__prev_n) > return 0; > > > __n = static_cast<__node_ptr>(__prev_n->_M_nxt); > __bkt = _M_bucket_index(*__n); > } > else > { > __hash_code __code = this->_M_hash_code(__k); > __bkt = _M_bucket_index(__code); > > > __prev_n = _M_find_before_node(__bkt, __k, __code); > if (!__prev_n) > return 0; > > > __n = static_cast<__node_ptr>(__prev_n->_M_nxt); > } > > _M_erase(__bkt, __prev_n, __n); > return 1; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_erase(false_type , const key_type& __k) > -> size_type > { > std::size_t __bkt; > __node_base_ptr __prev_n; > __node_ptr __n; > if (size() <= __small_size_threshold()) > { > __prev_n = _M_find_before_node(__k); > if (!__prev_n) > return 0; > > > __n = static_cast<__node_ptr>(__prev_n->_M_nxt); > __bkt = _M_bucket_index(*__n); > } > else > { > __hash_code __code = this->_M_hash_code(__k); > __bkt = _M_bucket_index(__code); > > > __prev_n = _M_find_before_node(__bkt, __k, __code); > if (!__prev_n) > return 0; > > __n = static_cast<__node_ptr>(__prev_n->_M_nxt); > } > > > > > > > > __node_ptr __n_last = __n->_M_next(); > while (__n_last && this->_M_node_equals(*__n, *__n_last)) > __n_last = __n_last->_M_next(); > > std::size_t __n_last_bkt = __n_last ? _M_bucket_index(*__n_last) : __bkt; > > > size_type __result = 0; > do > { > __node_ptr __p = __n->_M_next(); > this->_M_deallocate_node(__n); > __n = __p; > ++__result; > } > while (__n != __n_last); > > _M_element_count -= __result; > if (__prev_n == _M_buckets[__bkt]) > _M_remove_bucket_begin(__bkt, __n_last, __n_last_bkt); > else if (__n_last_bkt != __bkt) > _M_buckets[__n_last_bkt] = __prev_n; > __prev_n->_M_nxt = __n_last; > return __result; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > auto > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > erase(const_iterator __first, const_iterator __last) > -> iterator > { > __node_ptr __n = __first._M_cur; > __node_ptr __last_n = __last._M_cur; > if (__n == __last_n) > return iterator(__n); > > std::size_t __bkt = _M_bucket_index(*__n); > > __node_base_ptr __prev_n = _M_get_previous_node(__bkt, __n); > bool __is_bucket_begin = __n == _M_bucket_begin(__bkt); > std::size_t __n_bkt = __bkt; > for (;;) > { > do > { > __node_ptr __tmp = __n; > __n = __n->_M_next(); > this->_M_deallocate_node(__tmp); > --_M_element_count; > if (!__n) > break; > __n_bkt = _M_bucket_index(*__n); > } > while (__n != __last_n && __n_bkt == __bkt); > if (__is_bucket_begin) > _M_remove_bucket_begin(__bkt, __n, __n_bkt); > if (__n == __last_n) > break; > __is_bucket_begin = true; > __bkt = __n_bkt; > } > > if (__n && (__n_bkt != __bkt || __is_bucket_begin)) > _M_buckets[__n_bkt] = __prev_n; > __prev_n->_M_nxt = __n; > return iterator(__n); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > clear() noexcept > { > this->_M_deallocate_nodes(_M_begin()); > __builtin_memset(_M_buckets, 0, > _M_bucket_count * sizeof(__node_base_ptr)); > _M_element_count = 0; > _M_before_begin._M_nxt = nullptr; > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > rehash(size_type __bkt_count) > { > const __rehash_state& __saved_state = _M_rehash_policy._M_state(); > __bkt_count > = std::max(_M_rehash_policy._M_bkt_for_elements(_M_element_count + 1), > __bkt_count); > __bkt_count = _M_rehash_policy._M_next_bkt(__bkt_count); > > if (__bkt_count != _M_bucket_count) > _M_rehash(__bkt_count, __saved_state); > else > > > _M_rehash_policy._M_reset(__saved_state); > } > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_rehash(size_type __bkt_count, const __rehash_state& __state) > { > try > { > _M_rehash_aux(__bkt_count, __unique_keys{}); > } > catch(...) > { > > > _M_rehash_policy._M_reset(__state); > throw; > } > } > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_rehash_aux(size_type __bkt_count, true_type ) > { > __buckets_ptr __new_buckets = _M_allocate_buckets(__bkt_count); > __node_ptr __p = _M_begin(); > _M_before_begin._M_nxt = nullptr; > std::size_t __bbegin_bkt = 0; > while (__p) > { > __node_ptr __next = __p->_M_next(); > std::size_t __bkt > = __hash_code_base::_M_bucket_index(*__p, __bkt_count); > if (!__new_buckets[__bkt]) > { > __p->_M_nxt = _M_before_begin._M_nxt; > _M_before_begin._M_nxt = __p; > __new_buckets[__bkt] = &_M_before_begin; > if (__p->_M_nxt) > __new_buckets[__bbegin_bkt] = __p; > __bbegin_bkt = __bkt; > } > else > { > __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; > __new_buckets[__bkt]->_M_nxt = __p; > } > > __p = __next; > } > > _M_deallocate_buckets(); > _M_bucket_count = __bkt_count; > _M_buckets = __new_buckets; > } > > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _Hash, typename _RangeHash, typename _Unused, > typename _RehashPolicy, typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: > _M_rehash_aux(size_type __bkt_count, false_type ) > { > __buckets_ptr __new_buckets = _M_allocate_buckets(__bkt_count); > __node_ptr __p = _M_begin(); > _M_before_begin._M_nxt = nullptr; > std::size_t __bbegin_bkt = 0; > std::size_t __prev_bkt = 0; > __node_ptr __prev_p = nullptr; > bool __check_bucket = false; > > while (__p) > { > __node_ptr __next = __p->_M_next(); > std::size_t __bkt > = __hash_code_base::_M_bucket_index(*__p, __bkt_count); > > if (__prev_p && __prev_bkt == __bkt) > { > > > > __p->_M_nxt = __prev_p->_M_nxt; > __prev_p->_M_nxt = __p; > > > > > > > __check_bucket = true; > } > else > { > if (__check_bucket) > { > > > if (__prev_p->_M_nxt) > { > std::size_t __next_bkt > = __hash_code_base::_M_bucket_index( > *__prev_p->_M_next(), __bkt_count); > if (__next_bkt != __prev_bkt) > __new_buckets[__next_bkt] = __prev_p; > } > __check_bucket = false; > } > > if (!__new_buckets[__bkt]) > { > __p->_M_nxt = _M_before_begin._M_nxt; > _M_before_begin._M_nxt = __p; > __new_buckets[__bkt] = &_M_before_begin; > if (__p->_M_nxt) > __new_buckets[__bbegin_bkt] = __p; > __bbegin_bkt = __bkt; > } > else > { > __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; > __new_buckets[__bkt]->_M_nxt = __p; > } > } > __prev_p = __p; > __prev_bkt = __bkt; > __p = __next; > } > > if (__check_bucket && __prev_p->_M_nxt) > { > std::size_t __next_bkt > = __hash_code_base::_M_bucket_index(*__prev_p->_M_next(), > __bkt_count); > if (__next_bkt != __prev_bkt) > __new_buckets[__next_bkt] = __prev_p; > } > > _M_deallocate_buckets(); > _M_bucket_count = __bkt_count; > _M_buckets = __new_buckets; > } > > > template<typename, typename, typename> class _Hash_merge_helper { }; > > > > > template<typename _Hash> > using _RequireNotAllocatorOrIntegral > = __enable_if_t<!__or_<is_integral<_Hash>, __is_allocator<_Hash>>::value>; > > > > >} ># 34 "/usr/include/c++/13/bits/unordered_map.h" 2 3 > > > > >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; ># 103 "/usr/include/c++/13/bits/unordered_map.h" 3 > 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; ># 155 "/usr/include/c++/13/bits/unordered_map.h" 3 > explicit > unordered_map(size_type __n, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__n, __hf, __eql, __a) > { } ># 176 "/usr/include/c++/13/bits/unordered_map.h" 3 > 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()) > : _M_h(__first, __last, __n, __hf, __eql, __a) > { } > > > unordered_map(const unordered_map&) = default; > > > unordered_map(unordered_map&&) = default; > > > > > > explicit > unordered_map(const allocator_type& __a) > : _M_h(__a) > { } > > > > > > > unordered_map(const unordered_map& __umap, > const allocator_type& __a) > : _M_h(__umap._M_h, __a) > { } > > > > > > > unordered_map(unordered_map&& __umap, > const allocator_type& __a) > noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) ) > : _M_h(std::move(__umap._M_h), __a) > { } ># 232 "/usr/include/c++/13/bits/unordered_map.h" 3 > 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()) > : _M_h(__l, __n, __hf, __eql, __a) > { } > > unordered_map(size_type __n, const allocator_type& __a) > : unordered_map(__n, hasher(), key_equal(), __a) > { } > > unordered_map(size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_map(__n, __hf, key_equal(), __a) > { } > > template<typename _InputIterator> > unordered_map(_InputIterator __first, _InputIterator __last, > size_type __n, > const allocator_type& __a) > : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) > { } > > template<typename _InputIterator> > unordered_map(_InputIterator __first, _InputIterator __last, > size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_map(__first, __last, __n, __hf, key_equal(), __a) > { } > > unordered_map(initializer_list<value_type> __l, > size_type __n, > const allocator_type& __a) > : unordered_map(__l, __n, hasher(), key_equal(), __a) > { } > > unordered_map(initializer_list<value_type> __l, > size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_map(__l, __n, __hf, key_equal(), __a) > { } > > > unordered_map& > operator=(const unordered_map&) = default; > > > unordered_map& > operator=(unordered_map&&) = default; ># 294 "/usr/include/c++/13/bits/unordered_map.h" 3 > unordered_map& > operator=(initializer_list<value_type> __l) > { > _M_h = __l; > return *this; > } > > > allocator_type > get_allocator() const noexcept > { return _M_h.get_allocator(); } > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_h.empty(); } > > > size_type > size() const noexcept > { return _M_h.size(); } > > > size_type > max_size() const noexcept > { return _M_h.max_size(); } > > > > > > > > iterator > begin() noexcept > { return _M_h.begin(); } > > > > > > > const_iterator > begin() const noexcept > { return _M_h.begin(); } > > const_iterator > cbegin() const noexcept > { return _M_h.begin(); } > > > > > > > iterator > end() noexcept > { return _M_h.end(); } > > > > > > > const_iterator > end() const noexcept > { return _M_h.end(); } > > const_iterator > cend() const noexcept > { return _M_h.end(); } ># 391 "/usr/include/c++/13/bits/unordered_map.h" 3 > template<typename... _Args> > std::pair<iterator, bool> > emplace(_Args&&... __args) > { return _M_h.emplace(std::forward<_Args>(__args)...); } ># 422 "/usr/include/c++/13/bits/unordered_map.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } > > > > node_type > extract(const_iterator __pos) > { > do { if (std::__is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); > return _M_h.extract(__pos); > } > > > node_type > extract(const key_type& __key) > { return _M_h.extract(__key); } > > > insert_return_type > insert(node_type&& __nh) > { return _M_h._M_reinsert_node(std::move(__nh)); } > > > iterator > insert(const_iterator, node_type&& __nh) > { return _M_h._M_reinsert_node(std::move(__nh)).position; } ># 474 "/usr/include/c++/13/bits/unordered_map.h" 3 > template <typename... _Args> > pair<iterator, bool> > try_emplace(const key_type& __k, _Args&&... __args) > { > return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...); > } > > > template <typename... _Args> > pair<iterator, bool> > try_emplace(key_type&& __k, _Args&&... __args) > { > return _M_h.try_emplace(cend(), std::move(__k), > std::forward<_Args>(__args)...); > } ># 518 "/usr/include/c++/13/bits/unordered_map.h" 3 > template <typename... _Args> > iterator > try_emplace(const_iterator __hint, const key_type& __k, > _Args&&... __args) > { > return _M_h.try_emplace(__hint, __k, > std::forward<_Args>(__args)...).first; > } > > > template <typename... _Args> > iterator > try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) > { > return _M_h.try_emplace(__hint, std::move(__k), > std::forward<_Args>(__args)...).first; > } ># 555 "/usr/include/c++/13/bits/unordered_map.h" 3 > std::pair<iterator, bool> > insert(const value_type& __x) > { return _M_h.insert(__x); } > > > > std::pair<iterator, bool> > insert(value_type&& __x) > { return _M_h.insert(std::move(__x)); } > > template<typename _Pair> > __enable_if_t<is_constructible<value_type, _Pair&&>::value, > pair<iterator, bool>> > insert(_Pair&& __x) > { return _M_h.emplace(std::forward<_Pair>(__x)); } ># 594 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > insert(const_iterator __hint, const value_type& __x) > { return _M_h.insert(__hint, __x); } > > > > iterator > insert(const_iterator __hint, value_type&& __x) > { return _M_h.insert(__hint, std::move(__x)); } > > template<typename _Pair> > __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator> > insert(const_iterator __hint, _Pair&& __x) > { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); } ># 619 "/usr/include/c++/13/bits/unordered_map.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_h.insert(__first, __last); } ># 631 "/usr/include/c++/13/bits/unordered_map.h" 3 > void > insert(initializer_list<value_type> __l) > { _M_h.insert(__l); } ># 657 "/usr/include/c++/13/bits/unordered_map.h" 3 > template <typename _Obj> > pair<iterator, bool> > insert_or_assign(const key_type& __k, _Obj&& __obj) > { > auto __ret = _M_h.try_emplace(cend(), __k, > std::forward<_Obj>(__obj)); > if (!__ret.second) > __ret.first->second = std::forward<_Obj>(__obj); > return __ret; > } > > > template <typename _Obj> > pair<iterator, bool> > insert_or_assign(key_type&& __k, _Obj&& __obj) > { > auto __ret = _M_h.try_emplace(cend(), std::move(__k), > std::forward<_Obj>(__obj)); > if (!__ret.second) > __ret.first->second = std::forward<_Obj>(__obj); > return __ret; > } ># 706 "/usr/include/c++/13/bits/unordered_map.h" 3 > template <typename _Obj> > iterator > insert_or_assign(const_iterator __hint, const key_type& __k, > _Obj&& __obj) > { > auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj)); > if (!__ret.second) > __ret.first->second = std::forward<_Obj>(__obj); > return __ret.first; > } > > > template <typename _Obj> > iterator > insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) > { > auto __ret = _M_h.try_emplace(__hint, std::move(__k), > std::forward<_Obj>(__obj)); > if (!__ret.second) > __ret.first->second = std::forward<_Obj>(__obj); > return __ret.first; > } ># 744 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > erase(const_iterator __position) > { return _M_h.erase(__position); } > > > iterator > erase(iterator __position) > { return _M_h.erase(__position); } ># 766 "/usr/include/c++/13/bits/unordered_map.h" 3 > size_type > erase(const key_type& __x) > { return _M_h.erase(__x); } ># 784 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_h.erase(__first, __last); } > > > > > > > > void > clear() noexcept > { _M_h.clear(); } ># 808 "/usr/include/c++/13/bits/unordered_map.h" 3 > void > swap(unordered_map& __x) > noexcept( noexcept(_M_h.swap(__x._M_h)) ) > { _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) > { > using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>; > _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); > } > > template<typename _H2, typename _P2> > void > merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) > { merge(__source); } > > template<typename _H2, typename _P2> > void > merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) > { > using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>; > _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); > } > > template<typename _H2, typename _P2> > void > merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) > { merge(__source); } > > > > > > > hasher > hash_function() const > { return _M_h.hash_function(); } > > > > key_equal > key_eq() const > { return _M_h.key_eq(); } ># 872 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > find(const key_type& __x) > { return _M_h.find(__x); } ># 883 "/usr/include/c++/13/bits/unordered_map.h" 3 > const_iterator > find(const key_type& __x) const > { return _M_h.find(__x); } ># 905 "/usr/include/c++/13/bits/unordered_map.h" 3 > size_type > count(const key_type& __x) const > { return _M_h.count(__x); } ># 945 "/usr/include/c++/13/bits/unordered_map.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_h.equal_range(__x); } ># 957 "/usr/include/c++/13/bits/unordered_map.h" 3 > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_h.equal_range(__x); } ># 983 "/usr/include/c++/13/bits/unordered_map.h" 3 > mapped_type& > operator[](const key_type& __k) > { return _M_h[__k]; } > > mapped_type& > operator[](key_type&& __k) > { return _M_h[std::move(__k)]; } ># 1000 "/usr/include/c++/13/bits/unordered_map.h" 3 > mapped_type& > at(const key_type& __k) > { return _M_h.at(__k); } > > const mapped_type& > at(const key_type& __k) const > { return _M_h.at(__k); } > > > > > > size_type > bucket_count() const noexcept > { return _M_h.bucket_count(); } > > > size_type > max_bucket_count() const noexcept > { return _M_h.max_bucket_count(); } > > > > > > > size_type > bucket_size(size_type __n) const > { return _M_h.bucket_size(__n); } > > > > > > > size_type > bucket(const key_type& __key) const > { return _M_h.bucket(__key); } > > > > > > > > local_iterator > begin(size_type __n) > { return _M_h.begin(__n); } ># 1056 "/usr/include/c++/13/bits/unordered_map.h" 3 > const_local_iterator > begin(size_type __n) const > { return _M_h.begin(__n); } > > const_local_iterator > cbegin(size_type __n) const > { return _M_h.cbegin(__n); } ># 1071 "/usr/include/c++/13/bits/unordered_map.h" 3 > local_iterator > end(size_type __n) > { return _M_h.end(__n); } ># 1082 "/usr/include/c++/13/bits/unordered_map.h" 3 > const_local_iterator > end(size_type __n) const > { return _M_h.end(__n); } > > const_local_iterator > cend(size_type __n) const > { return _M_h.cend(__n); } > > > > > > float > load_factor() const noexcept > { return _M_h.load_factor(); } > > > > float > max_load_factor() const noexcept > { return _M_h.max_load_factor(); } > > > > > > void > max_load_factor(float __z) > { _M_h.max_load_factor(__z); } ># 1119 "/usr/include/c++/13/bits/unordered_map.h" 3 > void > rehash(size_type __n) > { _M_h.rehash(__n); } ># 1130 "/usr/include/c++/13/bits/unordered_map.h" 3 > void > reserve(size_type __n) > { _M_h.reserve(__n); } > > template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1, > typename _Alloc1> > friend bool > operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, > const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); > }; > > > > 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 _InputIterator, typename _Hash, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireAllocator<_Allocator>> > unordered_map(_InputIterator, _InputIterator, > typename unordered_map<int, int>::size_type, > _Hash, _Allocator) > -> unordered_map<__iter_key_t<_InputIterator>, > __iter_val_t<_InputIterator>, _Hash, > equal_to<__iter_key_t<_InputIterator>>, _Allocator>; > > template<typename _Key, typename _Tp, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > unordered_map(initializer_list<pair<_Key, _Tp>>, > typename unordered_map<int, int>::size_type, > _Allocator) > -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; > > template<typename _Key, typename _Tp, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator) > -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; > > template<typename _Key, typename _Tp, typename _Hash, typename _Allocator, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireAllocator<_Allocator>> > unordered_map(initializer_list<pair<_Key, _Tp>>, > typename unordered_map<int, int>::size_type, > _Hash, _Allocator) > -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; ># 1246 "/usr/include/c++/13/bits/unordered_map.h" 3 > 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; > > > > > > unordered_multimap() = default; ># 1297 "/usr/include/c++/13/bits/unordered_map.h" 3 > explicit > unordered_multimap(size_type __n, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__n, __hf, __eql, __a) > { } ># 1318 "/usr/include/c++/13/bits/unordered_map.h" 3 > template<typename _InputIterator> > unordered_multimap(_InputIterator __first, _InputIterator __last, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__first, __last, __n, __hf, __eql, __a) > { } > > > unordered_multimap(const unordered_multimap&) = default; > > > unordered_multimap(unordered_multimap&&) = default; > > > > > > explicit > unordered_multimap(const allocator_type& __a) > : _M_h(__a) > { } > > > > > > > unordered_multimap(const unordered_multimap& __ummap, > const allocator_type& __a) > : _M_h(__ummap._M_h, __a) > { } > > > > > > > unordered_multimap(unordered_multimap&& __ummap, > const allocator_type& __a) > noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) ) > : _M_h(std::move(__ummap._M_h), __a) > { } ># 1374 "/usr/include/c++/13/bits/unordered_map.h" 3 > unordered_multimap(initializer_list<value_type> __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__l, __n, __hf, __eql, __a) > { } > > unordered_multimap(size_type __n, const allocator_type& __a) > : unordered_multimap(__n, hasher(), key_equal(), __a) > { } > > unordered_multimap(size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_multimap(__n, __hf, key_equal(), __a) > { } > > template<typename _InputIterator> > unordered_multimap(_InputIterator __first, _InputIterator __last, > size_type __n, > const allocator_type& __a) > : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) > { } > > template<typename _InputIterator> > unordered_multimap(_InputIterator __first, _InputIterator __last, > size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) > { } > > unordered_multimap(initializer_list<value_type> __l, > size_type __n, > const allocator_type& __a) > : unordered_multimap(__l, __n, hasher(), key_equal(), __a) > { } > > unordered_multimap(initializer_list<value_type> __l, > size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_multimap(__l, __n, __hf, key_equal(), __a) > { } > > > unordered_multimap& > operator=(const unordered_multimap&) = default; > > > unordered_multimap& > operator=(unordered_multimap&&) = default; ># 1436 "/usr/include/c++/13/bits/unordered_map.h" 3 > unordered_multimap& > operator=(initializer_list<value_type> __l) > { > _M_h = __l; > return *this; > } > > > allocator_type > get_allocator() const noexcept > { return _M_h.get_allocator(); } > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_h.empty(); } > > > size_type > size() const noexcept > { return _M_h.size(); } > > > size_type > max_size() const noexcept > { return _M_h.max_size(); } > > > > > > > > iterator > begin() noexcept > { return _M_h.begin(); } > > > > > > > const_iterator > begin() const noexcept > { return _M_h.begin(); } > > const_iterator > cbegin() const noexcept > { return _M_h.begin(); } > > > > > > > iterator > end() noexcept > { return _M_h.end(); } > > > > > > > const_iterator > end() const noexcept > { return _M_h.end(); } > > const_iterator > cend() const noexcept > { return _M_h.end(); } ># 1528 "/usr/include/c++/13/bits/unordered_map.h" 3 > template<typename... _Args> > iterator > emplace(_Args&&... __args) > { return _M_h.emplace(std::forward<_Args>(__args)...); } ># 1555 "/usr/include/c++/13/bits/unordered_map.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ># 1570 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > insert(const value_type& __x) > { return _M_h.insert(__x); } > > iterator > insert(value_type&& __x) > { return _M_h.insert(std::move(__x)); } > > template<typename _Pair> > __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator> > insert(_Pair&& __x) > { return _M_h.emplace(std::forward<_Pair>(__x)); } ># 1604 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > insert(const_iterator __hint, const value_type& __x) > { return _M_h.insert(__hint, __x); } > > > > iterator > insert(const_iterator __hint, value_type&& __x) > { return _M_h.insert(__hint, std::move(__x)); } > > template<typename _Pair> > __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator> > insert(const_iterator __hint, _Pair&& __x) > { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); } ># 1629 "/usr/include/c++/13/bits/unordered_map.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_h.insert(__first, __last); } ># 1642 "/usr/include/c++/13/bits/unordered_map.h" 3 > void > insert(initializer_list<value_type> __l) > { _M_h.insert(__l); } > > > > node_type > extract(const_iterator __pos) > { > do { if (std::__is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); > return _M_h.extract(__pos); > } > > > node_type > extract(const key_type& __key) > { return _M_h.extract(__key); } > > > iterator > insert(node_type&& __nh) > { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); } > > > iterator > insert(const_iterator __hint, node_type&& __nh) > { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); } ># 1685 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > erase(const_iterator __position) > { return _M_h.erase(__position); } > > > iterator > erase(iterator __position) > { return _M_h.erase(__position); } ># 1706 "/usr/include/c++/13/bits/unordered_map.h" 3 > size_type > erase(const key_type& __x) > { return _M_h.erase(__x); } ># 1725 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_h.erase(__first, __last); } > > > > > > > > void > clear() noexcept > { _M_h.clear(); } ># 1749 "/usr/include/c++/13/bits/unordered_map.h" 3 > void > swap(unordered_multimap& __x) > noexcept( noexcept(_M_h.swap(__x._M_h)) ) > { _M_h.swap(__x._M_h); } > > > template<typename, typename, typename> > friend class std::_Hash_merge_helper; > > template<typename _H2, typename _P2> > void > merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) > { > using _Merge_helper > = _Hash_merge_helper<unordered_multimap, _H2, _P2>; > _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); > } > > template<typename _H2, typename _P2> > void > merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) > { merge(__source); } > > template<typename _H2, typename _P2> > void > merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) > { > using _Merge_helper > = _Hash_merge_helper<unordered_multimap, _H2, _P2>; > _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); > } > > template<typename _H2, typename _P2> > void > merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) > { merge(__source); } > > > > > > > hasher > hash_function() const > { return _M_h.hash_function(); } > > > > key_equal > key_eq() const > { return _M_h.key_eq(); } ># 1815 "/usr/include/c++/13/bits/unordered_map.h" 3 > iterator > find(const key_type& __x) > { return _M_h.find(__x); } ># 1826 "/usr/include/c++/13/bits/unordered_map.h" 3 > const_iterator > find(const key_type& __x) const > { return _M_h.find(__x); } ># 1844 "/usr/include/c++/13/bits/unordered_map.h" 3 > size_type > count(const key_type& __x) const > { return _M_h.count(__x); } ># 1882 "/usr/include/c++/13/bits/unordered_map.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_h.equal_range(__x); } ># 1894 "/usr/include/c++/13/bits/unordered_map.h" 3 > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_h.equal_range(__x); } ># 1910 "/usr/include/c++/13/bits/unordered_map.h" 3 > size_type > bucket_count() const noexcept > { return _M_h.bucket_count(); } > > > size_type > max_bucket_count() const noexcept > { return _M_h.max_bucket_count(); } > > > > > > > size_type > bucket_size(size_type __n) const > { return _M_h.bucket_size(__n); } > > > > > > > size_type > bucket(const key_type& __key) const > { return _M_h.bucket(__key); } > > > > > > > > local_iterator > begin(size_type __n) > { return _M_h.begin(__n); } ># 1954 "/usr/include/c++/13/bits/unordered_map.h" 3 > const_local_iterator > begin(size_type __n) const > { return _M_h.begin(__n); } > > const_local_iterator > cbegin(size_type __n) const > { return _M_h.cbegin(__n); } ># 1969 "/usr/include/c++/13/bits/unordered_map.h" 3 > local_iterator > end(size_type __n) > { return _M_h.end(__n); } ># 1980 "/usr/include/c++/13/bits/unordered_map.h" 3 > const_local_iterator > end(size_type __n) const > { return _M_h.end(__n); } > > const_local_iterator > cend(size_type __n) const > { return _M_h.cend(__n); } > > > > > > float > load_factor() const noexcept > { return _M_h.load_factor(); } > > > > float > max_load_factor() const noexcept > { return _M_h.max_load_factor(); } > > > > > > void > max_load_factor(float __z) > { _M_h.max_load_factor(__z); } ># 2017 "/usr/include/c++/13/bits/unordered_map.h" 3 > void > rehash(size_type __n) > { _M_h.rehash(__n); } ># 2028 "/usr/include/c++/13/bits/unordered_map.h" 3 > void > reserve(size_type __n) > { _M_h.reserve(__n); } > > template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1, > typename _Alloc1> > friend bool > operator==(const unordered_multimap<_Key1, _Tp1, > _Hash1, _Pred1, _Alloc1>&, > const unordered_multimap<_Key1, _Tp1, > _Hash1, _Pred1, _Alloc1>&); > }; > > > > 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_multimap(_InputIterator, _InputIterator, > unordered_multimap<int, int>::size_type = {}, > _Hash = _Hash(), _Pred = _Pred(), > _Allocator = _Allocator()) > -> unordered_multimap<__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_multimap(initializer_list<pair<_Key, _Tp>>, > unordered_multimap<int, int>::size_type = {}, > _Hash = _Hash(), _Pred = _Pred(), > _Allocator = _Allocator()) > -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>; > > template<typename _InputIterator, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > unordered_multimap(_InputIterator, _InputIterator, > unordered_multimap<int, int>::size_type, _Allocator) > -> unordered_multimap<__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_multimap(_InputIterator, _InputIterator, _Allocator) > -> unordered_multimap<__iter_key_t<_InputIterator>, > __iter_val_t<_InputIterator>, > hash<__iter_key_t<_InputIterator>>, > equal_to<__iter_key_t<_InputIterator>>, _Allocator>; > > template<typename _InputIterator, typename _Hash, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireAllocator<_Allocator>> > unordered_multimap(_InputIterator, _InputIterator, > unordered_multimap<int, int>::size_type, _Hash, > _Allocator) > -> unordered_multimap<__iter_key_t<_InputIterator>, > __iter_val_t<_InputIterator>, _Hash, > equal_to<__iter_key_t<_InputIterator>>, _Allocator>; > > template<typename _Key, typename _Tp, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > unordered_multimap(initializer_list<pair<_Key, _Tp>>, > unordered_multimap<int, int>::size_type, > _Allocator) > -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; > > template<typename _Key, typename _Tp, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > unordered_multimap(initializer_list<pair<_Key, _Tp>>, _Allocator) > -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; > > template<typename _Key, typename _Tp, typename _Hash, typename _Allocator, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireAllocator<_Allocator>> > unordered_multimap(initializer_list<pair<_Key, _Tp>>, > unordered_multimap<int, int>::size_type, > _Hash, _Allocator) > -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; > > > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline void > swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline void > swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline bool > operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { return __x._M_h._M_equal(__y._M_h); } > > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline bool > operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { return !(__x == __y); } > > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline bool > operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { return __x._M_h._M_equal(__y._M_h); } > > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline bool > operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { return !(__x == __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) > { return __map._M_h; } > > static auto& > _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) > { return __map._M_h; } > }; > > > 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) > { return __map._M_h; } > > static auto& > _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) > { return __map._M_h; } > }; > > > >} ># 42 "/usr/include/c++/13/unordered_map" 2 3 > ># 1 "/usr/include/c++/13/bits/erase_if.h" 1 3 ># 33 "/usr/include/c++/13/bits/erase_if.h" 3 > ># 34 "/usr/include/c++/13/bits/erase_if.h" 3 > > > > > >namespace std >{ > > > > > > > namespace __detail > { > template<typename _Container, typename _UnsafeContainer, > typename _Predicate> > typename _Container::size_type > __erase_nodes_if(_Container& __cont, _UnsafeContainer& __ucont, > _Predicate __pred) > { > typename _Container::size_type __num = 0; > for (auto __iter = __ucont.begin(), __last = __ucont.end(); > __iter != __last;) > { > if (__pred(*__iter)) > { > __iter = __cont.erase(__iter); > ++__num; > } > else > ++__iter; > } > return __num; > } > } > > >} ># 44 "/usr/include/c++/13/unordered_map" 2 3 > > > > > > > >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>>>; > } > >} ># 64 "/usr/include/c++/13/functional" 2 3 ># 1 "/usr/include/c++/13/vector" 1 3 ># 58 "/usr/include/c++/13/vector" 3 > ># 59 "/usr/include/c++/13/vector" 3 ># 81 "/usr/include/c++/13/vector" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > namespace pmr { > template<typename _Tp> > using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; > } > > > > > > > > >} ># 65 "/usr/include/c++/13/functional" 2 3 ># 1 "/usr/include/c++/13/array" 1 3 ># 32 "/usr/include/c++/13/array" 3 > ># 33 "/usr/include/c++/13/array" 3 > > > > > ># 1 "/usr/include/c++/13/compare" 1 3 ># 33 "/usr/include/c++/13/compare" 3 > ># 34 "/usr/include/c++/13/compare" 3 ># 39 "/usr/include/c++/13/array" 2 3 ># 48 "/usr/include/c++/13/array" 3 >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 { __builtin_trap(); } > > > __attribute__((__always_inline__)) > constexpr operator _Tp*() const noexcept { return nullptr; } > }; > > using _Is_swappable = true_type; > using _Is_nothrow_swappable = true_type; > }; ># 93 "/usr/include/c++/13/array" 3 > 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; > > > > > void > fill(const value_type& __u) > { std::fill_n(begin(), size(), __u); } > > void > swap(array& __other) > noexcept(__array_traits<_Tp, _Nm>::_Is_nothrow_swappable::value) > { std::swap_ranges(begin(), end(), __other.begin()); } > > > [[__gnu__::__const__, __nodiscard__]] > constexpr iterator > begin() noexcept > { return iterator(data()); } > > [[__nodiscard__]] > constexpr const_iterator > begin() const noexcept > { return const_iterator(data()); } > > [[__gnu__::__const__, __nodiscard__]] > constexpr iterator > end() noexcept > { return iterator(data() + _Nm); } > > [[__nodiscard__]] > constexpr const_iterator > end() const noexcept > { return const_iterator(data() + _Nm); } > > [[__gnu__::__const__, __nodiscard__]] > constexpr reverse_iterator > rbegin() noexcept > { return reverse_iterator(end()); } > > [[__nodiscard__]] > constexpr const_reverse_iterator > rbegin() const noexcept > { return const_reverse_iterator(end()); } > > [[__gnu__::__const__, __nodiscard__]] > constexpr reverse_iterator > rend() noexcept > { return reverse_iterator(begin()); } > > [[__nodiscard__]] > constexpr const_reverse_iterator > rend() const noexcept > { return const_reverse_iterator(begin()); } > > [[__nodiscard__]] > constexpr const_iterator > cbegin() const noexcept > { return const_iterator(data()); } > > [[__nodiscard__]] > constexpr const_iterator > cend() const noexcept > { return const_iterator(data() + _Nm); } > > [[__nodiscard__]] > constexpr const_reverse_iterator > crbegin() const noexcept > { return const_reverse_iterator(end()); } > > [[__nodiscard__]] > constexpr const_reverse_iterator > crend() const noexcept > { return const_reverse_iterator(begin()); } > > > [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]] > constexpr size_type > size() const noexcept { return _Nm; } > > [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]] > constexpr size_type > max_size() const noexcept { return _Nm; } > > [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]] > constexpr bool > empty() const noexcept { return size() == 0; } > > > [[__nodiscard__]] > constexpr reference > operator[](size_type __n) noexcept > { > ; > return _M_elems[__n]; > } > > [[__nodiscard__]] > constexpr const_reference > operator[](size_type __n) const noexcept > { > > ; > > return _M_elems[__n]; > } > > constexpr reference > at(size_type __n) > { > if (__n >= _Nm) > std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") > , > __n, _Nm); > return _M_elems[__n]; > } > > constexpr const_reference > at(size_type __n) const > { > > > return __n < _Nm ? _M_elems[__n] > : (std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") > , > __n, _Nm), > _M_elems[__n]); > } > > [[__nodiscard__]] > constexpr reference > front() noexcept > { > ; > return _M_elems[0]; > } > > [[__nodiscard__]] > constexpr const_reference > front() const noexcept > { > > ; > > return _M_elems[0]; > } > > [[__nodiscard__]] > constexpr reference > back() noexcept > { > ; > return _M_elems[_Nm - 1]; > } > > [[__nodiscard__]] > constexpr const_reference > back() const noexcept > { > > ; > > return _M_elems[_Nm - 1]; > } > > [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]] > constexpr pointer > data() noexcept > { return _M_elems; } > > [[__nodiscard__]] > constexpr const_pointer > data() const noexcept > { return _M_elems; } > }; > > > 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__]] > > inline bool > operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) > { return std::equal(__one.begin(), __one.end(), __two.begin()); } ># 322 "/usr/include/c++/13/array" 3 > template<typename _Tp, std::size_t _Nm> > [[__nodiscard__]] > > inline bool > operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) > { return !(__one == __two); } > > template<typename _Tp, std::size_t _Nm> > [[__nodiscard__]] > > inline bool > operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) > { > return std::lexicographical_compare(__a.begin(), __a.end(), > __b.begin(), __b.end()); > } > > template<typename _Tp, std::size_t _Nm> > [[__nodiscard__]] > > inline bool > operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) > { return __two < __one; } > > template<typename _Tp, std::size_t _Nm> > [[__nodiscard__]] > > inline bool > operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) > { return !(__one > __two); } > > template<typename _Tp, std::size_t _Nm> > [[__nodiscard__]] > > inline bool > operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) > { return !(__one < __two); } > > > > template<typename _Tp, std::size_t _Nm> > > inline > > > __enable_if_t<__array_traits<_Tp, _Nm>::_Is_swappable::value> > > > > swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) > noexcept(noexcept(__one.swap(__two))) > { __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 > { > static_assert(_Int < _Nm, "array index is within bounds"); > return __arr._M_elems[_Int]; > } > > template<std::size_t _Int, typename _Tp, std::size_t _Nm> > [[__nodiscard__]] > constexpr _Tp&& > get(array<_Tp, _Nm>&& __arr) noexcept > { > static_assert(_Int < _Nm, "array index is within bounds"); > return std::move(std::get<_Int>(__arr)); > } > > template<std::size_t _Int, typename _Tp, std::size_t _Nm> > [[__nodiscard__]] > constexpr const _Tp& > get(const array<_Tp, _Nm>& __arr) noexcept > { > static_assert(_Int < _Nm, "array index is within bounds"); > return __arr._M_elems[_Int]; > } > > template<std::size_t _Int, typename _Tp, std::size_t _Nm> > [[__nodiscard__]] > constexpr const _Tp&& > get(const array<_Tp, _Nm>&& __arr) noexcept > { > static_assert(_Int < _Nm, "array index is within bounds"); > return std::move(std::get<_Int>(__arr)); > } ># 460 "/usr/include/c++/13/array" 3 > 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 > { }; > > >} ># 66 "/usr/include/c++/13/functional" 2 3 ># 79 "/usr/include/c++/13/functional" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > template<int _Num> struct _Placeholder { }; ># 108 "/usr/include/c++/13/functional" 3 > template<typename _Callable, typename... _Args> > inline invoke_result_t<_Callable, _Args...> > invoke(_Callable&& __fn, _Args&&... __args) > noexcept(is_nothrow_invocable_v<_Callable, _Args...>) > { > return std::__invoke(std::forward<_Callable>(__fn), > std::forward<_Args>(__args)...); > } ># 141 "/usr/include/c++/13/functional" 3 > 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) noexcept : _M_pmf(__pmf) { } > > template<typename... _Args> > > auto > operator()(_Args&&... __args) const > noexcept(noexcept( > std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) > -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) > { return 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) noexcept : _M_pm(__pm) { } > > template<typename _Tp> > > auto > operator()(_Tp&& __obj) const > noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) > -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) > { return 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; > }; ># 234 "/usr/include/c++/13/functional" 3 > template<typename _Tp, typename _Class> > > inline _Mem_fn<_Tp _Class::*> > mem_fn(_Tp _Class::* __pm) noexcept > { > return _Mem_fn<_Tp _Class::*>(__pm); > } ># 253 "/usr/include/c++/13/functional" 3 > template<typename _Tp> > struct is_bind_expression > : public false_type { }; ># 265 "/usr/include/c++/13/functional" 3 > 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 > { ># 294 "/usr/include/c++/13/functional" 3 > 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; ># 362 "/usr/include/c++/13/functional" 3 > 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> > > _Tp& > operator()(_CVRef& __arg, _Tuple&) const volatile > { return __arg.get(); } > }; > > > > > > > > template<typename _Arg> > class _Mu<_Arg, true, false> > { > public: > template<typename _CVArg, typename... _Args> > > auto > operator()(_CVArg& __arg, > tuple<_Args...>& __tuple) const volatile > -> decltype(__arg(declval<_Args>()...)) > { > > typedef typename _Build_index_tuple<sizeof...(_Args)>::__type > _Indexes; > return this->__call(__arg, __tuple, _Indexes()); > } > > private: > > > template<typename _CVArg, typename... _Args, std::size_t... _Indexes> > > auto > __call(_CVArg& __arg, tuple<_Args...>& __tuple, > const _Index_tuple<_Indexes...>&) const volatile > -> decltype(__arg(declval<_Args>()...)) > { > return __arg(std::get<_Indexes>(std::move(__tuple))...); > } > }; > > > > > > > template<typename _Arg> > class _Mu<_Arg, false, true> > { > public: > template<typename _Tuple> > > _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& > operator()(const volatile _Arg&, _Tuple& __tuple) const volatile > { > return > ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple)); > } > }; > > > > > > > template<typename _Arg> > class _Mu<_Arg, false, false> > { > public: > template<typename _CVArg, typename _Tuple> > > _CVArg&& > operator()(_CVArg&& __arg, _Tuple&) const volatile > { return std::forward<_CVArg>(__arg); } > }; > > > template<std::size_t _Ind, typename... _Tp> > inline auto > __volget(volatile tuple<_Tp...>& __tuple) > -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& > { return std::get<_Ind>(const_cast<tuple<_Tp...>&>(__tuple)); } > > > template<std::size_t _Ind, typename... _Tp> > inline auto > __volget(const volatile tuple<_Tp...>& __tuple) > -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& > { return std::get<_Ind>(const_cast<const tuple<_Tp...>&>(__tuple)); } ># 487 "/usr/include/c++/13/functional" 3 > 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> > > _Result > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) > { > return std::__invoke(_M_f, > _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... > ); > } > > > template<typename _Result, typename... _Args, std::size_t... _Indexes> > > _Result > __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const > { > return std::__invoke(_M_f, > _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... > ); > } > > > > template<typename _Result, typename... _Args, std::size_t... _Indexes> > _Result > __call_v(tuple<_Args...>&& __args, > _Index_tuple<_Indexes...>) volatile > { > return std::__invoke(_M_f, > _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... > ); > } > > > template<typename _Result, typename... _Args, std::size_t... _Indexes> > _Result > __call_c_v(tuple<_Args...>&& __args, > _Index_tuple<_Indexes...>) const volatile > { > return std::__invoke(_M_f, > _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... > ); > } > > > 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 > _Bind(const _Functor& __f, _Args&&... __args) > : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) > { } > > template<typename... _Args> > explicit > _Bind(_Functor&& __f, _Args&&... __args) > : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) > { } > > _Bind(const _Bind&) = default; > _Bind(_Bind&&) = default; > > > template<typename... _Args, > typename _Result = _Res_type<tuple<_Args...>>> > > _Result > operator()(_Args&&... __args) > { > return this->__call<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > > template<typename... _Args, > typename _Result = _Res_type_cv<tuple<_Args...>, add_const>> > > _Result > operator()(_Args&&... __args) const > { > return this->__call_c<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > > > template<typename... _Args, > typename _Result = _Res_type_cv<tuple<_Args...>, add_volatile>> > [[deprecated("std::bind does not support volatile in C++17")]] > _Result > operator()(_Args&&... __args) volatile > { > return this->__call_v<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > > template<typename... _Args, > typename _Result = _Res_type_cv<tuple<_Args...>, add_cv>> > [[deprecated("std::bind does not support volatile in C++17")]] > _Result > operator()(_Args&&... __args) const volatile > { > return this->__call_c_v<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > }; > > > 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> > > _Res > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) > { > return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() > (std::get<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > > _Res > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const > { > return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() > (std::get<_Indexes>(_M_bound_args), __args)...); > } > > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > _Res > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile > { > return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() > (__volget<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > _Res > __call(tuple<_Args...>&& __args, > _Index_tuple<_Indexes...>) const volatile > { > return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() > (__volget<_Indexes>(_M_bound_args), __args)...); > } > > > public: > typedef _Result result_type; > > template<typename... _Args> > explicit > _Bind_result(const _Functor& __f, _Args&&... __args) > : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) > { } > > template<typename... _Args> > explicit > _Bind_result(_Functor&& __f, _Args&&... __args) > : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) > { } > > _Bind_result(const _Bind_result&) = default; > _Bind_result(_Bind_result&&) = default; > > > template<typename... _Args> > > result_type > operator()(_Args&&... __args) > { > return this->__call<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > > template<typename... _Args> > > result_type > operator()(_Args&&... __args) const > { > return this->__call<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > > > template<typename... _Args> > [[deprecated("std::bind does not support volatile in C++17")]] > result_type > operator()(_Args&&... __args) volatile > { > return this->__call<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > > template<typename... _Args> > [[deprecated("std::bind does not support volatile in C++17")]] > result_type > operator()(_Args&&... __args) const volatile > { > return this->__call<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > > > > }; ># 764 "/usr/include/c++/13/functional" 3 > 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> > inline typename > _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type > bind(_Func&& __f, _BoundArgs&&... __args) > { > typedef _Bind_helper<false, _Func, _BoundArgs...> __helper_type; > return typename __helper_type::type(std::forward<_Func>(__f), > std::forward<_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> > inline > typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type > bind(_Func&& __f, _BoundArgs&&... __args) > { > typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; > return typename __helper_type::type(std::forward<_Func>(__f), > std::forward<_BoundArgs>(__args)...); > } ># 1084 "/usr/include/c++/13/functional" 3 > 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) > : _M_fn(std::forward<_Fn2>(__fn)) { } > > _Not_fn(const _Not_fn& __fn) = default; > _Not_fn(_Not_fn&& __fn) = default; > ~_Not_fn() = default; ># 1118 "/usr/include/c++/13/functional" 3 > template<typename... _Args> 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...>>())) { return !std::__invoke(std::forward< _Fn & >(_M_fn), std::forward<_Args>(__args)...); } > template<typename... _Args> 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...>>())) { return !std::__invoke(std::forward< _Fn const & >(_M_fn), std::forward<_Args>(__args)...); } > template<typename... _Args> 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...>>())) { return !std::__invoke(std::forward< _Fn && >(_M_fn), std::forward<_Args>(__args)...); } > template<typename... _Args> 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...>>())) { return !std::__invoke(std::forward< _Fn const && >(_M_fn), std::forward<_Args>(__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 { }; ># 1165 "/usr/include/c++/13/functional" 3 > template<typename _Fn> > > inline auto > not_fn(_Fn&& __fn) > noexcept(std::is_nothrow_constructible<std::decay_t<_Fn>, _Fn&&>::value) > { > return _Not_fn<std::decay_t<_Fn>>{std::forward<_Fn>(__fn), 0}; > } > > > > template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>> > class default_searcher > { > public: > > default_searcher(_ForwardIterator1 __pat_first, > _ForwardIterator1 __pat_last, > _BinaryPredicate __pred = _BinaryPredicate()) > : _M_m(__pat_first, __pat_last, std::move(__pred)) > { } > > template<typename _ForwardIterator2> > > pair<_ForwardIterator2, _ForwardIterator2> > operator()(_ForwardIterator2 __first, _ForwardIterator2 __last) const > { > _ForwardIterator2 __first_ret = > std::search(__first, __last, std::get<0>(_M_m), std::get<1>(_M_m), > std::get<2>(_M_m)); > auto __ret = std::make_pair(__first_ret, __first_ret); > if (__ret.first != __last) > std::advance(__ret.second, std::distance(std::get<0>(_M_m), > std::get<1>(_M_m))); > return __ret; > } > > 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) > : _M_bad_char{ __patlen, std::move(__hf), std::move(__pred) } > { > if (__patlen > 0) > for (__diff_type __i = 0; __i < __patlen - 1; ++__i) > _M_bad_char[__pat[__i]] = __patlen - 1 - __i; > } > > using __diff_type = _Tp; > > __diff_type > _M_lookup(_Key __key, __diff_type __not_found) const > { > auto __iter = _M_bad_char.find(__key); > if (__iter == _M_bad_char.end()) > return __not_found; > return __iter->second; > } > > _Pred > _M_pred() const { return _M_bad_char.key_eq(); } > > 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) > : _M_bad_char{ array<_Tp, _Len>{}, std::move(__pred) } > { > std::get<0>(_M_bad_char).fill(__patlen); > if (__patlen > 0) > for (__diff_type __i = 0; __i < __patlen - 1; ++__i) > { > auto __ch = __pat[__i]; > using _UCh = make_unsigned_t<decltype(__ch)>; > auto __uch = static_cast<_UCh>(__ch); > std::get<0>(_M_bad_char)[__uch] = __patlen - 1 - __i; > } > } > > using __diff_type = _Tp; > > template<typename _Key> > __diff_type > _M_lookup(_Key __key, __diff_type __not_found) const > { > auto __ukey = static_cast<make_unsigned_t<_Key>>(__key); > if (__ukey >= _Len) > return __not_found; > return std::get<0>(_M_bad_char)[__ukey]; > } > > const _Pred& > _M_pred() const { return std::get<1>(_M_bad_char); } > > 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) > { > const auto& __pred = this->_M_pred(); > __diff_type __suffixlen = __len - __pos; > for (__diff_type __i = 0; __i < __suffixlen; ++__i) > if (!__pred(__word[__i], __word[__pos + __i])) > return false; > return true; > } > > __diff_type > _M_suffix_length(_RAIter __word, __diff_type __len, > __diff_type __pos) > { > const auto& __pred = this->_M_pred(); > __diff_type __i = 0; > while (__pred(__word[__pos - __i], __word[__len - 1 - __i]) > && __i < __pos) > { > ++__i; > } > return __i; > } > > template<typename _Tp> > __diff_type > _M_bad_char_shift(_Tp __c) const > { return this->_M_lookup(__c, _M_pat_end - _M_pat); } > > _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()) > : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)), > _M_pat(__pat), _M_pat_end(__pat_end) > { } > > template<typename _RandomAccessIterator2> > pair<_RandomAccessIterator2, _RandomAccessIterator2> > operator()(_RandomAccessIterator2 __first, > _RandomAccessIterator2 __last) const > { > const auto& __pred = this->_M_pred(); > auto __patlen = _M_pat_end - _M_pat; > if (__patlen == 0) > return std::make_pair(__first, __first); > auto __len = __last - __first; > while (__len >= __patlen) > { > for (auto __scan = __patlen - 1; > __pred(__first[__scan], _M_pat[__scan]); --__scan) > if (__scan == 0) > return std::make_pair(__first, __first + __patlen); > auto __shift = _M_bad_char_shift(__first[__patlen - 1]); > __len -= __shift; > __first += __shift; > } > return std::make_pair(__last, __last); > } > > private: > template<typename _Tp> > __diff_type > _M_bad_char_shift(_Tp __c) const > { return this->_M_lookup(__c, _M_pat_end - _M_pat); } > > _RAIter _M_pat; > _RAIter _M_pat_end; > }; > > template<typename _RAIter, typename _Hash, typename _BinaryPredicate> > boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>:: > boyer_moore_searcher(_RAIter __pat, _RAIter __pat_end, > _Hash __hf, _BinaryPredicate __pred) > : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)), > _M_pat(__pat), _M_pat_end(__pat_end), _M_good_suffix(__pat_end - __pat) > { > auto __patlen = __pat_end - __pat; > if (__patlen == 0) > return; > __diff_type __last_prefix = __patlen - 1; > for (__diff_type __p = __patlen - 1; __p >= 0; --__p) > { > if (_M_is_prefix(__pat, __patlen, __p + 1)) > __last_prefix = __p + 1; > _M_good_suffix[__p] = __last_prefix + (__patlen - 1 - __p); > } > for (__diff_type __p = 0; __p < __patlen - 1; ++__p) > { > auto __slen = _M_suffix_length(__pat, __patlen, __p); > auto __pos = __patlen - 1 - __slen; > if (!__pred(__pat[__p - __slen], __pat[__pos])) > _M_good_suffix[__pos] = __patlen - 1 - __p + __slen; > } > } > > template<typename _RAIter, typename _Hash, typename _BinaryPredicate> > template<typename _RandomAccessIterator2> > pair<_RandomAccessIterator2, _RandomAccessIterator2> > boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>:: > operator()(_RandomAccessIterator2 __first, > _RandomAccessIterator2 __last) const > { > auto __patlen = _M_pat_end - _M_pat; > if (__patlen == 0) > return std::make_pair(__first, __first); > const auto& __pred = this->_M_pred(); > __diff_type __i = __patlen - 1; > auto __stringlen = __last - __first; > while (__i < __stringlen) > { > __diff_type __j = __patlen - 1; > while (__j >= 0 && __pred(__first[__i], _M_pat[__j])) > { > --__i; > --__j; > } > if (__j < 0) > { > const auto __match = __first + __i + 1; > return std::make_pair(__match, __match + __patlen); > } > __i += std::max(_M_bad_char_shift(__first[__i]), > _M_good_suffix[__j]); > } > return std::make_pair(__last, __last); > } > > > > > > > >} ># 18 "/usr/include/boost/system/detail/error_category.hpp" 2 3 4 > > > > ># 1 "/usr/include/c++/13/atomic" 1 3 4 ># 35 "/usr/include/c++/13/atomic" 3 4 > ># 36 "/usr/include/c++/13/atomic" 3 > > > > > ># 1 "/usr/include/c++/13/bits/atomic_base.h" 1 3 ># 33 "/usr/include/c++/13/bits/atomic_base.h" 3 > ># 34 "/usr/include/c++/13/bits/atomic_base.h" 3 > > > > ># 1 "/usr/include/c++/13/bits/atomic_lockfree_defines.h" 1 3 ># 33 "/usr/include/c++/13/bits/atomic_lockfree_defines.h" 3 > ># 34 "/usr/include/c++/13/bits/atomic_lockfree_defines.h" 3 ># 39 "/usr/include/c++/13/bits/atomic_base.h" 2 3 ># 49 "/usr/include/c++/13/bits/atomic_base.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 79 "/usr/include/c++/13/bits/atomic_base.h" 3 > typedef enum memory_order > { > memory_order_relaxed, > memory_order_consume, > memory_order_acquire, > memory_order_release, > memory_order_acq_rel, > memory_order_seq_cst > } memory_order; > > > > enum __memory_order_modifier > { > __memory_order_mask = 0x0ffff, > __memory_order_modifier_mask = 0xffff0000, > __memory_order_hle_acquire = 0x10000, > __memory_order_hle_release = 0x20000 > }; > > > constexpr memory_order > operator|(memory_order __m, __memory_order_modifier __mod) > { > return memory_order(int(__m) | int(__mod)); > } > > constexpr memory_order > operator&(memory_order __m, __memory_order_modifier __mod) > { > return memory_order(int(__m) & int(__mod)); > } > > > > > constexpr memory_order > __cmpexch_failure_order2(memory_order __m) noexcept > { > return __m == memory_order_acq_rel ? memory_order_acquire > : __m == memory_order_release ? memory_order_relaxed : __m; > } > > constexpr memory_order > __cmpexch_failure_order(memory_order __m) noexcept > { > return memory_order(__cmpexch_failure_order2(__m & __memory_order_mask) > | __memory_order_modifier(__m & __memory_order_modifier_mask)); > } > > constexpr bool > __is_valid_cmpexch_failure_order(memory_order __m) noexcept > { > return (__m & __memory_order_mask) != memory_order_release > && (__m & __memory_order_mask) != memory_order_acq_rel; > } > > > template<typename _IntTp> > struct __atomic_base; > > > > inline __attribute__((__always_inline__)) void > atomic_thread_fence(memory_order __m) noexcept > { __atomic_thread_fence(int(__m)); } > > inline __attribute__((__always_inline__)) void > atomic_signal_fence(memory_order __m) noexcept > { __atomic_signal_fence(int(__m)); } > > > template<typename _Tp> > inline _Tp > kill_dependency(_Tp __y) noexcept > { > _Tp __ret(__y); > return __ret; > } ># 173 "/usr/include/c++/13/bits/atomic_base.h" 3 > template<typename _Tp> > struct atomic; > > template<typename _Tp> > struct atomic<_Tp*>; > > > > typedef bool __atomic_flag_data_type; ># 198 "/usr/include/c++/13/bits/atomic_base.h" 3 > extern "C" { > > struct __atomic_flag_base > { > __atomic_flag_data_type _M_i ; > }; > > } > > > > > > > struct atomic_flag : public __atomic_flag_base > { > atomic_flag() noexcept = default; > ~atomic_flag() noexcept = default; > atomic_flag(const atomic_flag&) = delete; > atomic_flag& operator=(const atomic_flag&) = delete; > atomic_flag& operator=(const atomic_flag&) volatile = delete; > > > constexpr atomic_flag(bool __i) noexcept > : __atomic_flag_base{ _S_init(__i) } > { } > > inline __attribute__((__always_inline__)) bool > test_and_set(memory_order __m = memory_order_seq_cst) noexcept > { > return __atomic_test_and_set (&_M_i, int(__m)); > } > > inline __attribute__((__always_inline__)) bool > test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept > { > return __atomic_test_and_set (&_M_i, int(__m)); > } ># 284 "/usr/include/c++/13/bits/atomic_base.h" 3 > inline __attribute__((__always_inline__)) void > clear(memory_order __m = memory_order_seq_cst) noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > > __atomic_clear (&_M_i, int(__m)); > } > > inline __attribute__((__always_inline__)) void > clear(memory_order __m = memory_order_seq_cst) volatile noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > > __atomic_clear (&_M_i, int(__m)); > } > > private: > static constexpr __atomic_flag_data_type > _S_init(bool __i) > { return __i ? 1 : 0; } > }; ># 340 "/usr/include/c++/13/bits/atomic_base.h" 3 > 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 ; > > public: > __atomic_base() noexcept = default; > ~__atomic_base() noexcept = default; > __atomic_base(const __atomic_base&) = delete; > __atomic_base& operator=(const __atomic_base&) = delete; > __atomic_base& operator=(const __atomic_base&) volatile = delete; > > > constexpr __atomic_base(__int_type __i) noexcept : _M_i (__i) { } > > operator __int_type() const noexcept > { return load(); } > > operator __int_type() const volatile noexcept > { return load(); } > > __int_type > operator=(__int_type __i) noexcept > { > store(__i); > return __i; > } > > __int_type > operator=(__int_type __i) volatile noexcept > { > store(__i); > return __i; > } > > __int_type > operator++(int) noexcept > { return fetch_add(1); } > > __int_type > operator++(int) volatile noexcept > { return fetch_add(1); } > > __int_type > operator--(int) noexcept > { return fetch_sub(1); } > > __int_type > operator--(int) volatile noexcept > { return fetch_sub(1); } > > __int_type > operator++() noexcept > { return __atomic_add_fetch(&_M_i, 1, int(memory_order_seq_cst)); } > > __int_type > operator++() volatile noexcept > { return __atomic_add_fetch(&_M_i, 1, int(memory_order_seq_cst)); } > > __int_type > operator--() noexcept > { return __atomic_sub_fetch(&_M_i, 1, int(memory_order_seq_cst)); } > > __int_type > operator--() volatile noexcept > { return __atomic_sub_fetch(&_M_i, 1, int(memory_order_seq_cst)); } > > __int_type > operator+=(__int_type __i) noexcept > { return __atomic_add_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator+=(__int_type __i) volatile noexcept > { return __atomic_add_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator-=(__int_type __i) noexcept > { return __atomic_sub_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator-=(__int_type __i) volatile noexcept > { return __atomic_sub_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator&=(__int_type __i) noexcept > { return __atomic_and_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator&=(__int_type __i) volatile noexcept > { return __atomic_and_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator|=(__int_type __i) noexcept > { return __atomic_or_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator|=(__int_type __i) volatile noexcept > { return __atomic_or_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator^=(__int_type __i) noexcept > { return __atomic_xor_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > __int_type > operator^=(__int_type __i) volatile noexcept > { return __atomic_xor_fetch(&_M_i, __i, int(memory_order_seq_cst)); } > > bool > is_lock_free() const noexcept > { > > return __atomic_is_lock_free(sizeof(_M_i), > reinterpret_cast<void *>(-_S_alignment)); > } > > bool > is_lock_free() const volatile noexcept > { > > return __atomic_is_lock_free(sizeof(_M_i), > reinterpret_cast<void *>(-_S_alignment)); > } > > inline __attribute__((__always_inline__)) void > store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); > > __atomic_store_n(&_M_i, __i, int(__m)); > } > > inline __attribute__((__always_inline__)) void > store(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); > > __atomic_store_n(&_M_i, __i, int(__m)); > } > > inline __attribute__((__always_inline__)) __int_type > load(memory_order __m = memory_order_seq_cst) const noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_release)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > > return __atomic_load_n(&_M_i, int(__m)); > } > > inline __attribute__((__always_inline__)) __int_type > load(memory_order __m = memory_order_seq_cst) const volatile noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_release)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > > return __atomic_load_n(&_M_i, int(__m)); > } > > inline __attribute__((__always_inline__)) __int_type > exchange(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { > return __atomic_exchange_n(&_M_i, __i, int(__m)); > } > > > inline __attribute__((__always_inline__)) __int_type > exchange(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return __atomic_exchange_n(&_M_i, __i, int(__m)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_weak(__int_type& __i1, __int_type __i2, > memory_order __m1, memory_order __m2) noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__m2))) __builtin_unreachable(); } while (false); > > return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, > int(__m1), int(__m2)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_weak(__int_type& __i1, __int_type __i2, > memory_order __m1, > memory_order __m2) volatile noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__m2))) __builtin_unreachable(); } while (false); > > return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, > int(__m1), int(__m2)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_weak(__int_type& __i1, __int_type __i2, > memory_order __m = memory_order_seq_cst) noexcept > { > return compare_exchange_weak(__i1, __i2, __m, > __cmpexch_failure_order(__m)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_weak(__int_type& __i1, __int_type __i2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return compare_exchange_weak(__i1, __i2, __m, > __cmpexch_failure_order(__m)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_strong(__int_type& __i1, __int_type __i2, > memory_order __m1, memory_order __m2) noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__m2))) __builtin_unreachable(); } while (false); > > return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, > int(__m1), int(__m2)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_strong(__int_type& __i1, __int_type __i2, > memory_order __m1, > memory_order __m2) volatile noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__m2))) __builtin_unreachable(); } while (false); > > return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, > int(__m1), int(__m2)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_strong(__int_type& __i1, __int_type __i2, > memory_order __m = memory_order_seq_cst) noexcept > { > return compare_exchange_strong(__i1, __i2, __m, > __cmpexch_failure_order(__m)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_strong(__int_type& __i1, __int_type __i2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return compare_exchange_strong(__i1, __i2, __m, > __cmpexch_failure_order(__m)); > } ># 632 "/usr/include/c++/13/bits/atomic_base.h" 3 > inline __attribute__((__always_inline__)) __int_type > fetch_add(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_add(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_add(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_add(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_sub(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_sub(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_sub(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_sub(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_and(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_and(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_and(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_and(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_or(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_or(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_or(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_or(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_xor(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_xor(&_M_i, __i, int(__m)); } > > inline __attribute__((__always_inline__)) __int_type > fetch_xor(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_xor(&_M_i, __i, int(__m)); } > }; > > > > template<typename _PTp> > struct __atomic_base<_PTp*> > { > private: > typedef _PTp* __pointer_type; > > __pointer_type _M_p ; > > > constexpr ptrdiff_t > _M_type_size(ptrdiff_t __d) const { return __d * sizeof(_PTp); } > > constexpr ptrdiff_t > _M_type_size(ptrdiff_t __d) const volatile { return __d * sizeof(_PTp); } > > public: > __atomic_base() noexcept = default; > ~__atomic_base() noexcept = default; > __atomic_base(const __atomic_base&) = delete; > __atomic_base& operator=(const __atomic_base&) = delete; > __atomic_base& operator=(const __atomic_base&) volatile = delete; > > > constexpr __atomic_base(__pointer_type __p) noexcept : _M_p (__p) { } > > operator __pointer_type() const noexcept > { return load(); } > > operator __pointer_type() const volatile noexcept > { return load(); } > > __pointer_type > operator=(__pointer_type __p) noexcept > { > store(__p); > return __p; > } > > __pointer_type > operator=(__pointer_type __p) volatile noexcept > { > store(__p); > return __p; > } > > __pointer_type > operator++(int) noexcept > { return fetch_add(1); } > > __pointer_type > operator++(int) volatile noexcept > { return fetch_add(1); } > > __pointer_type > operator--(int) noexcept > { return fetch_sub(1); } > > __pointer_type > operator--(int) volatile noexcept > { return fetch_sub(1); } > > __pointer_type > operator++() noexcept > { return __atomic_add_fetch(&_M_p, _M_type_size(1), > int(memory_order_seq_cst)); } > > __pointer_type > operator++() volatile noexcept > { return __atomic_add_fetch(&_M_p, _M_type_size(1), > int(memory_order_seq_cst)); } > > __pointer_type > operator--() noexcept > { return __atomic_sub_fetch(&_M_p, _M_type_size(1), > int(memory_order_seq_cst)); } > > __pointer_type > operator--() volatile noexcept > { return __atomic_sub_fetch(&_M_p, _M_type_size(1), > int(memory_order_seq_cst)); } > > __pointer_type > operator+=(ptrdiff_t __d) noexcept > { return __atomic_add_fetch(&_M_p, _M_type_size(__d), > int(memory_order_seq_cst)); } > > __pointer_type > operator+=(ptrdiff_t __d) volatile noexcept > { return __atomic_add_fetch(&_M_p, _M_type_size(__d), > int(memory_order_seq_cst)); } > > __pointer_type > operator-=(ptrdiff_t __d) noexcept > { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), > int(memory_order_seq_cst)); } > > __pointer_type > operator-=(ptrdiff_t __d) volatile noexcept > { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), > int(memory_order_seq_cst)); } > > bool > is_lock_free() const noexcept > { > > return __atomic_is_lock_free(sizeof(_M_p), > reinterpret_cast<void *>(-__alignof(_M_p))); > } > > bool > is_lock_free() const volatile noexcept > { > > return __atomic_is_lock_free(sizeof(_M_p), > reinterpret_cast<void *>(-__alignof(_M_p))); > } > > inline __attribute__((__always_inline__)) void > store(__pointer_type __p, > memory_order __m = memory_order_seq_cst) noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); > > __atomic_store_n(&_M_p, __p, int(__m)); > } > > inline __attribute__((__always_inline__)) void > store(__pointer_type __p, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); > > __atomic_store_n(&_M_p, __p, int(__m)); > } > > inline __attribute__((__always_inline__)) __pointer_type > load(memory_order __m = memory_order_seq_cst) const noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_release)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > > return __atomic_load_n(&_M_p, int(__m)); > } > > inline __attribute__((__always_inline__)) __pointer_type > load(memory_order __m = memory_order_seq_cst) const volatile noexcept > { > memory_order __b __attribute__ ((__unused__)) > = __m & __memory_order_mask; > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_release)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); > > return __atomic_load_n(&_M_p, int(__m)); > } > > inline __attribute__((__always_inline__)) __pointer_type > exchange(__pointer_type __p, > memory_order __m = memory_order_seq_cst) noexcept > { > return __atomic_exchange_n(&_M_p, __p, int(__m)); > } > > > inline __attribute__((__always_inline__)) __pointer_type > exchange(__pointer_type __p, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return __atomic_exchange_n(&_M_p, __p, int(__m)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, > memory_order __m2) noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__m2))) __builtin_unreachable(); } while (false); > > return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 1, > int(__m1), int(__m2)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, > memory_order __m2) volatile noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__m2))) __builtin_unreachable(); } while (false); > > return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 1, > int(__m1), int(__m2)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, > memory_order __m2) noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__m2))) __builtin_unreachable(); } while (false); > > return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, > int(__m1), int(__m2)); > } > > inline __attribute__((__always_inline__)) bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, > memory_order __m2) volatile noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__m2))) __builtin_unreachable(); } while (false); > > return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, > int(__m1), int(__m2)); > } ># 935 "/usr/include/c++/13/bits/atomic_base.h" 3 > inline __attribute__((__always_inline__)) __pointer_type > fetch_add(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_add(&_M_p, _M_type_size(__d), int(__m)); } > > inline __attribute__((__always_inline__)) __pointer_type > fetch_add(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_add(&_M_p, _M_type_size(__d), int(__m)); } > > inline __attribute__((__always_inline__)) __pointer_type > fetch_sub(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), int(__m)); } > > inline __attribute__((__always_inline__)) __pointer_type > fetch_sub(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), int(__m)); } > }; > > namespace __atomic_impl > { > > > template<typename _Tp> > constexpr bool > __maybe_has_padding() > { > > > > return !__has_unique_object_representations(_Tp) > && !is_same<_Tp, float>::value && !is_same<_Tp, double>::value; > > > > } > > template<typename _Tp> > inline __attribute__((__always_inline__)) _Tp* > __clear_padding(_Tp& __val) noexcept > { > auto* __ptr = std::__addressof(__val); > > if constexpr (__atomic_impl::__maybe_has_padding<_Tp>()) > __builtin_clear_padding(__ptr); > > return __ptr; > } > > > template<typename _Tp> > using _Val = typename remove_volatile<_Tp>::type; > > template<typename _Tp> > inline __attribute__((__always_inline__)) bool > __compare_exchange(_Tp& __val, _Val<_Tp>& __e, _Val<_Tp>& __i, > bool __is_weak, > memory_order __s, memory_order __f) noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__is_valid_cmpexch_failure_order(__f))) __builtin_unreachable(); } while (false); > > using _Vp = _Val<_Tp>; > > if constexpr (__atomic_impl::__maybe_has_padding<_Vp>()) > { > > > alignas(_Vp) unsigned char __buf[sizeof(_Vp)]; > _Vp* __exp = ::new((void*)__buf) _Vp(__e); > __atomic_impl::__clear_padding(*__exp); > if (__atomic_compare_exchange(std::__addressof(__val), __exp, > __atomic_impl::__clear_padding(__i), > __is_weak, int(__s), int(__f))) > return true; > __builtin_memcpy(std::__addressof(__e), __exp, sizeof(_Vp)); > return false; > } > else > return __atomic_compare_exchange(std::__addressof(__val), > std::__addressof(__e), > std::__addressof(__i), > __is_weak, int(__s), int(__f)); > } > } ># 2020 "/usr/include/c++/13/bits/atomic_base.h" 3 > >} ># 42 "/usr/include/c++/13/atomic" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 56 "/usr/include/c++/13/atomic" 3 > template<typename _Tp> > struct atomic; > > > > template<> > struct atomic<bool> > { > using value_type = bool; > > private: > __atomic_base<bool> _M_base; > > public: > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(bool __i) noexcept : _M_base(__i) { } > > bool > operator=(bool __i) noexcept > { return _M_base.operator=(__i); } > > bool > operator=(bool __i) volatile noexcept > { return _M_base.operator=(__i); } > > operator bool() const noexcept > { return _M_base.load(); } > > operator bool() const volatile noexcept > { return _M_base.load(); } > > bool > is_lock_free() const noexcept { return _M_base.is_lock_free(); } > > bool > is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } > > > static constexpr bool is_always_lock_free = 2 == 2; > > > void > store(bool __i, memory_order __m = memory_order_seq_cst) noexcept > { _M_base.store(__i, __m); } > > void > store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept > { _M_base.store(__i, __m); } > > bool > load(memory_order __m = memory_order_seq_cst) const noexcept > { return _M_base.load(__m); } > > bool > load(memory_order __m = memory_order_seq_cst) const volatile noexcept > { return _M_base.load(__m); } > > bool > exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept > { return _M_base.exchange(__i, __m); } > > bool > exchange(bool __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_base.exchange(__i, __m); } > > bool > compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, > memory_order __m2) noexcept > { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } > > bool > compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, > memory_order __m2) volatile noexcept > { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } > > bool > compare_exchange_weak(bool& __i1, bool __i2, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_base.compare_exchange_weak(__i1, __i2, __m); } > > bool > compare_exchange_weak(bool& __i1, bool __i2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_base.compare_exchange_weak(__i1, __i2, __m); } > > bool > compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, > memory_order __m2) noexcept > { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } > > bool > compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, > memory_order __m2) volatile noexcept > { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } > > bool > compare_exchange_strong(bool& __i1, bool __i2, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_base.compare_exchange_strong(__i1, __i2, __m); } > > bool > compare_exchange_strong(bool& __i1, bool __i2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_base.compare_exchange_strong(__i1, __i2, __m); } ># 182 "/usr/include/c++/13/atomic" 3 > }; ># 197 "/usr/include/c++/13/atomic" 3 > 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 ; > > 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"); ># 226 "/usr/include/c++/13/atomic" 3 > public: > atomic() = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(_Tp __i) noexcept : _M_i(__i) > { > > if constexpr (__atomic_impl::__maybe_has_padding<_Tp>()) > __builtin_clear_padding(std::__addressof(_M_i)); > > } > > operator _Tp() const noexcept > { return load(); } > > operator _Tp() const volatile noexcept > { return load(); } > > _Tp > operator=(_Tp __i) noexcept > { store(__i); return __i; } > > _Tp > operator=(_Tp __i) volatile noexcept > { store(__i); return __i; } > > bool > is_lock_free() const noexcept > { > > return __atomic_is_lock_free(sizeof(_M_i), > reinterpret_cast<void *>(-_S_alignment)); > } > > bool > is_lock_free() const volatile noexcept > { > > return __atomic_is_lock_free(sizeof(_M_i), > reinterpret_cast<void *>(-_S_alignment)); > } > > > 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 > { > __atomic_store(std::__addressof(_M_i), > __atomic_impl::__clear_padding(__i), > int(__m)); > } > > void > store(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept > { > __atomic_store(std::__addressof(_M_i), > __atomic_impl::__clear_padding(__i), > int(__m)); > } > > _Tp > load(memory_order __m = memory_order_seq_cst) const noexcept > { > alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; > _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); > __atomic_load(std::__addressof(_M_i), __ptr, int(__m)); > return *__ptr; > } > > _Tp > load(memory_order __m = memory_order_seq_cst) const volatile noexcept > { > alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; > _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); > __atomic_load(std::__addressof(_M_i), __ptr, int(__m)); > return *__ptr; > } > > _Tp > exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept > { > alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; > _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); > __atomic_exchange(std::__addressof(_M_i), > __atomic_impl::__clear_padding(__i), > __ptr, int(__m)); > return *__ptr; > } > > _Tp > exchange(_Tp __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; > _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); > __atomic_exchange(std::__addressof(_M_i), > __atomic_impl::__clear_padding(__i), > __ptr, int(__m)); > return *__ptr; > } > > bool > compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, > memory_order __f) noexcept > { > return __atomic_impl::__compare_exchange(_M_i, __e, __i, true, > __s, __f); > } > > bool > compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, > memory_order __f) volatile noexcept > { > return __atomic_impl::__compare_exchange(_M_i, __e, __i, true, > __s, __f); > } > > bool > compare_exchange_weak(_Tp& __e, _Tp __i, > memory_order __m = memory_order_seq_cst) noexcept > { return compare_exchange_weak(__e, __i, __m, > __cmpexch_failure_order(__m)); } > > bool > compare_exchange_weak(_Tp& __e, _Tp __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return compare_exchange_weak(__e, __i, __m, > __cmpexch_failure_order(__m)); } > > bool > compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, > memory_order __f) noexcept > { > return __atomic_impl::__compare_exchange(_M_i, __e, __i, false, > __s, __f); > } > > bool > compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, > memory_order __f) volatile noexcept > { > return __atomic_impl::__compare_exchange(_M_i, __e, __i, false, > __s, __f); > } > > bool > compare_exchange_strong(_Tp& __e, _Tp __i, > memory_order __m = memory_order_seq_cst) noexcept > { return compare_exchange_strong(__e, __i, __m, > __cmpexch_failure_order(__m)); } > > bool > compare_exchange_strong(_Tp& __e, _Tp __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return compare_exchange_strong(__e, __i, __m, > __cmpexch_failure_order(__m)); } ># 408 "/usr/include/c++/13/atomic" 3 > }; > > > > 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) noexcept : _M_b(__p) { } > > operator __pointer_type() const noexcept > { return __pointer_type(_M_b); } > > operator __pointer_type() const volatile noexcept > { return __pointer_type(_M_b); } > > __pointer_type > operator=(__pointer_type __p) noexcept > { return _M_b.operator=(__p); } > > __pointer_type > operator=(__pointer_type __p) volatile noexcept > { return _M_b.operator=(__p); } > > __pointer_type > operator++(int) noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b++; > } > > __pointer_type > operator++(int) volatile noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b++; > } > > __pointer_type > operator--(int) noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b--; > } > > __pointer_type > operator--(int) volatile noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b--; > } > > __pointer_type > operator++() noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return ++_M_b; > } > > __pointer_type > operator++() volatile noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return ++_M_b; > } > > __pointer_type > operator--() noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return --_M_b; > } > > __pointer_type > operator--() volatile noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return --_M_b; > } > > __pointer_type > operator+=(ptrdiff_t __d) noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b.operator+=(__d); > } > > __pointer_type > operator+=(ptrdiff_t __d) volatile noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b.operator+=(__d); > } > > __pointer_type > operator-=(ptrdiff_t __d) noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b.operator-=(__d); > } > > __pointer_type > operator-=(ptrdiff_t __d) volatile noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b.operator-=(__d); > } > > bool > is_lock_free() const noexcept > { return _M_b.is_lock_free(); } > > bool > is_lock_free() const volatile noexcept > { return _M_b.is_lock_free(); } > > > static constexpr bool is_always_lock_free > = 2 == 2; > > > void > store(__pointer_type __p, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_b.store(__p, __m); } > > void > store(__pointer_type __p, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_b.store(__p, __m); } > > __pointer_type > load(memory_order __m = memory_order_seq_cst) const noexcept > { return _M_b.load(__m); } > > __pointer_type > load(memory_order __m = memory_order_seq_cst) const volatile noexcept > { return _M_b.load(__m); } > > __pointer_type > exchange(__pointer_type __p, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_b.exchange(__p, __m); } > > __pointer_type > exchange(__pointer_type __p, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_b.exchange(__p, __m); } > > bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, memory_order __m2) noexcept > { return _M_b.compare_exchange_weak(__p1, __p2, __m1, __m2); } > > bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, > memory_order __m2) volatile noexcept > { return _M_b.compare_exchange_weak(__p1, __p2, __m1, __m2); } > > bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m = memory_order_seq_cst) noexcept > { > return compare_exchange_weak(__p1, __p2, __m, > __cmpexch_failure_order(__m)); > } > > bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return compare_exchange_weak(__p1, __p2, __m, > __cmpexch_failure_order(__m)); > } > > bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, memory_order __m2) noexcept > { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } > > bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, > memory_order __m2) volatile noexcept > { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } > > bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m = memory_order_seq_cst) noexcept > { > return _M_b.compare_exchange_strong(__p1, __p2, __m, > __cmpexch_failure_order(__m)); > } > > bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return _M_b.compare_exchange_strong(__p1, __p2, __m, > __cmpexch_failure_order(__m)); > } ># 663 "/usr/include/c++/13/atomic" 3 > __pointer_type > fetch_add(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b.fetch_add(__d, __m); > } > > __pointer_type > fetch_add(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b.fetch_add(__d, __m); > } > > __pointer_type > fetch_sub(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b.fetch_sub(__d, __m); > } > > __pointer_type > fetch_sub(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > > static_assert( is_object<_Tp>::value, "pointer to object type" ); > > return _M_b.fetch_sub(__d, __m); > } > }; > > > > 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) 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<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) 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<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) 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<short> : __atomic_base<short> > { > typedef short __integral_type; > typedef __atomic_base<short> __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<unsigned short> : __atomic_base<unsigned short> > { > typedef unsigned short __integral_type; > typedef __atomic_base<unsigned short> __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<int> : __atomic_base<int> > { > typedef int __integral_type; > typedef __atomic_base<int> __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<unsigned int> : __atomic_base<unsigned int> > { > typedef unsigned int __integral_type; > typedef __atomic_base<unsigned int> __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<long> : __atomic_base<long> > { > typedef long __integral_type; > typedef __atomic_base<long> __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<unsigned long> : __atomic_base<unsigned long> > { > typedef unsigned long __integral_type; > typedef __atomic_base<unsigned long> __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<long long> : __atomic_base<long long> > { > typedef long long __integral_type; > typedef __atomic_base<long long> __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<unsigned long long> : __atomic_base<unsigned long long> > { > typedef unsigned long long __integral_type; > typedef __atomic_base<unsigned long long> __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<wchar_t> : __atomic_base<wchar_t> > { > typedef wchar_t __integral_type; > typedef __atomic_base<wchar_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; > > }; ># 1008 "/usr/include/c++/13/atomic" 3 > template<> > struct atomic<char16_t> : __atomic_base<char16_t> > { > typedef char16_t __integral_type; > typedef __atomic_base<char16_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<char32_t> : __atomic_base<char32_t> > { > typedef char32_t __integral_type; > typedef __atomic_base<char32_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; > > }; > > > > 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<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; > > > > inline bool > atomic_flag_test_and_set_explicit(atomic_flag* __a, > memory_order __m) noexcept > { return __a->test_and_set(__m); } > > inline bool > atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, > memory_order __m) noexcept > { return __a->test_and_set(__m); } ># 1237 "/usr/include/c++/13/atomic" 3 > inline void > atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept > { __a->clear(__m); } > > inline void > atomic_flag_clear_explicit(volatile atomic_flag* __a, > memory_order __m) noexcept > { __a->clear(__m); } > > inline bool > atomic_flag_test_and_set(atomic_flag* __a) noexcept > { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } > > inline bool > atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept > { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } > > inline void > atomic_flag_clear(atomic_flag* __a) noexcept > { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } > > inline void > atomic_flag_clear(volatile atomic_flag* __a) noexcept > { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } ># 1284 "/usr/include/c++/13/atomic" 3 > template<typename _Tp> > using __atomic_val_t = __type_identity_t<_Tp>; > template<typename _Tp> > using __atomic_diff_t = typename atomic<_Tp>::difference_type; > > > > > template<typename _ITp> > inline bool > atomic_is_lock_free(const atomic<_ITp>* __a) noexcept > { return __a->is_lock_free(); } > > template<typename _ITp> > inline bool > atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept > { return __a->is_lock_free(); } > > template<typename _ITp> > inline void > atomic_init(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept > { __a->store(__i, memory_order_relaxed); } > > template<typename _ITp> > inline void > atomic_init(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept > { __a->store(__i, memory_order_relaxed); } > > template<typename _ITp> > inline void > atomic_store_explicit(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { __a->store(__i, __m); } > > template<typename _ITp> > inline void > atomic_store_explicit(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { __a->store(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept > { return __a->load(__m); } > > template<typename _ITp> > inline _ITp > atomic_load_explicit(const volatile atomic<_ITp>* __a, > memory_order __m) noexcept > { return __a->load(__m); } > > template<typename _ITp> > inline _ITp > atomic_exchange_explicit(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { return __a->exchange(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_exchange_explicit(volatile atomic<_ITp>* __a, > __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { return __a->exchange(__i, __m); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a, > __atomic_val_t<_ITp>* __i1, > __atomic_val_t<_ITp> __i2, > memory_order __m1, > memory_order __m2) noexcept > { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a, > __atomic_val_t<_ITp>* __i1, > __atomic_val_t<_ITp> __i2, > memory_order __m1, > memory_order __m2) noexcept > { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a, > __atomic_val_t<_ITp>* __i1, > __atomic_val_t<_ITp> __i2, > memory_order __m1, > memory_order __m2) noexcept > { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a, > __atomic_val_t<_ITp>* __i1, > __atomic_val_t<_ITp> __i2, > memory_order __m1, > memory_order __m2) noexcept > { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } > > > template<typename _ITp> > inline void > atomic_store(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept > { atomic_store_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline void > atomic_store(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept > { atomic_store_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_load(const atomic<_ITp>* __a) noexcept > { return atomic_load_explicit(__a, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_load(const volatile atomic<_ITp>* __a) noexcept > { return atomic_load_explicit(__a, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_exchange(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept > { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_exchange(volatile atomic<_ITp>* __a, > __atomic_val_t<_ITp> __i) noexcept > { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_weak(atomic<_ITp>* __a, > __atomic_val_t<_ITp>* __i1, > __atomic_val_t<_ITp> __i2) noexcept > { > return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, > memory_order_seq_cst, > memory_order_seq_cst); > } > > template<typename _ITp> > inline bool > atomic_compare_exchange_weak(volatile atomic<_ITp>* __a, > __atomic_val_t<_ITp>* __i1, > __atomic_val_t<_ITp> __i2) noexcept > { > return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, > memory_order_seq_cst, > memory_order_seq_cst); > } > > template<typename _ITp> > inline bool > atomic_compare_exchange_strong(atomic<_ITp>* __a, > __atomic_val_t<_ITp>* __i1, > __atomic_val_t<_ITp> __i2) noexcept > { > return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, > memory_order_seq_cst, > memory_order_seq_cst); > } > > template<typename _ITp> > inline bool > atomic_compare_exchange_strong(volatile atomic<_ITp>* __a, > __atomic_val_t<_ITp>* __i1, > __atomic_val_t<_ITp> __i2) noexcept > { > return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, > memory_order_seq_cst, > memory_order_seq_cst); > } ># 1490 "/usr/include/c++/13/atomic" 3 > template<typename _ITp> > inline _ITp > atomic_fetch_add_explicit(atomic<_ITp>* __a, > __atomic_diff_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_add(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_add_explicit(volatile atomic<_ITp>* __a, > __atomic_diff_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_add(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_sub_explicit(atomic<_ITp>* __a, > __atomic_diff_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_sub(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_sub_explicit(volatile atomic<_ITp>* __a, > __atomic_diff_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_sub(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_and(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_and(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_or(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_or(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_xor(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i, > memory_order __m) noexcept > { return __a->fetch_xor(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_add(atomic<_ITp>* __a, > __atomic_diff_t<_ITp> __i) noexcept > { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_add(volatile atomic<_ITp>* __a, > __atomic_diff_t<_ITp> __i) noexcept > { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_sub(atomic<_ITp>* __a, > __atomic_diff_t<_ITp> __i) noexcept > { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_sub(volatile atomic<_ITp>* __a, > __atomic_diff_t<_ITp> __i) noexcept > { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_and(__atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i) noexcept > { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_and(volatile __atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i) noexcept > { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_or(__atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i) noexcept > { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_or(volatile __atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i) noexcept > { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_xor(__atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i) noexcept > { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, > __atomic_val_t<_ITp> __i) noexcept > { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } ># 1790 "/usr/include/c++/13/atomic" 3 > >} ># 23 "/usr/include/boost/system/detail/error_category.hpp" 2 3 4 > > >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; ># 75 "/usr/include/boost/system/detail/error_category.hpp" 3 4 >private: > > boost::ulong_long_type id_; > > > > mutable std::atomic< boost::system::detail::std_category* > ps_; > > > > > > > >protected: > > > > ~error_category() = default; ># 106 "/usr/include/boost/system/detail/error_category.hpp" 3 4 > constexpr error_category() noexcept: id_( 0 ), ps_() > { > } > > explicit constexpr error_category( boost::ulong_long_type id ) noexcept: id_( id ), ps_() > { > } > >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 > { > return ev != 0; > } > > friend constexpr bool operator==( error_category const & lhs, error_category const & rhs ) noexcept > { > return rhs.id_ == 0? &lhs == &rhs: lhs.id_ == rhs.id_; > } > > friend constexpr bool operator!=( error_category const & lhs, error_category const & rhs ) noexcept > { > return !( lhs == rhs ); > } > > friend constexpr bool operator<( error_category const & lhs, error_category const & rhs ) noexcept > { > if( lhs.id_ < rhs.id_ ) > { > return true; > } > > if( lhs.id_ > rhs.id_ ) > { > return false; > } > > if( rhs.id_ != 0 ) > { > return false; > } > > return std::less<error_category const *>()( &lhs, &rhs ); > } > > > > > > 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 inline bool failed_impl( int ev, error_category const & cat ) >{ > if( cat.id_ == system_category_id || cat.id_ == generic_category_id ) > { > return ev != 0; > } > else > { > return cat.failed( ev ); > } >} > >} > >} > >} ># 11 "/usr/include/boost/system/error_category.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/error_category_impl.hpp" 1 3 4 ># 14 "/usr/include/boost/system/detail/error_category_impl.hpp" 3 4 ># 1 "/usr/include/boost/system/detail/error_condition.hpp" 1 3 4 ># 14 "/usr/include/boost/system/detail/error_condition.hpp" 3 4 ># 1 "/usr/include/boost/system/detail/generic_category.hpp" 1 3 4 ># 14 "/usr/include/boost/system/detail/generic_category.hpp" 3 4 ># 1 "/usr/include/boost/system/detail/generic_category_message.hpp" 1 3 4 ># 15 "/usr/include/boost/system/detail/generic_category_message.hpp" 3 4 ># 1 "/usr/include/c++/13/cstring" 1 3 4 ># 39 "/usr/include/c++/13/cstring" 3 4 > ># 40 "/usr/include/c++/13/cstring" 3 > > ># 1 "/usr/include/string.h" 1 3 4 ># 26 "/usr/include/string.h" 3 4 ># 1 "/usr/include/bits/libc-header-start.h" 1 3 4 ># 27 "/usr/include/string.h" 2 3 4 > >extern "C" { > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 34 "/usr/include/string.h" 2 3 4 ># 43 "/usr/include/string.h" 3 4 >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))) __attribute__ ((__access__ (__write_only__, 1, 4))); > > > > >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))); ># 80 "/usr/include/string.h" 3 4 >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))); ># 105 "/usr/include/string.h" 3 4 >} ># 115 "/usr/include/string.h" 3 4 >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))) > __attribute__ ((__access__ (__read_only__, 1, 3))); >extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) > noexcept (true) __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) > __attribute__ ((__access__ (__read_only__, 1, 3))); ># 141 "/usr/include/string.h" 3 4 >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))) __attribute__ ((__access__ (__write_only__, 1, 3))); > > > > > > >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))) > __attribute__ ((__access__ (__write_only__, 1, 3))); > > > > > >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))); ># 224 "/usr/include/string.h" 3 4 >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))); ># 244 "/usr/include/string.h" 3 4 >} > > > > > > >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))); ># 271 "/usr/include/string.h" 3 4 >} ># 281 "/usr/include/string.h" 3 4 >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))); ># 293 "/usr/include/string.h" 3 4 >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))); ># 321 "/usr/include/string.h" 3 4 >} > > > > > > >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))); ># 348 "/usr/include/string.h" 3 4 >} > > > > > > > >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))); ># 389 "/usr/include/string.h" 3 4 >extern void *memmem (const void *__haystack, size_t __haystacklen, > const void *__needle, size_t __needlelen) > noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))) > __attribute__ ((__access__ (__read_only__, 1, 2))) > __attribute__ ((__access__ (__read_only__, 3, 4))); > > > >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); ># 444 "/usr/include/string.h" 3 4 >extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) > noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3))); > > > > >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); > > > ># 1 "/usr/include/strings.h" 1 3 4 ># 23 "/usr/include/strings.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 24 "/usr/include/strings.h" 2 3 4 > > > > > > >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 "C++" >{ >extern char *index (char *__s, int __c) > noexcept (true) __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); >extern const char *index (const char *__s, int __c) > noexcept (true) __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 66 "/usr/include/strings.h" 3 4 >} > > > > > > > >extern "C++" >{ >extern char *rindex (char *__s, int __c) > noexcept (true) __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); >extern const char *rindex (const char *__s, int __c) > noexcept (true) __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 94 "/usr/include/strings.h" 3 4 >} ># 104 "/usr/include/strings.h" 3 4 >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))); > > >} ># 463 "/usr/include/string.h" 2 3 4 > > > >extern void explicit_bzero (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))) > __attribute__ ((__access__ (__write_only__, 1, 2))); > > > >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 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))) > __attribute__ ((__access__ (__read_write__, 1, 2))); > > > > > > > >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))); ># 539 "/usr/include/string.h" 3 4 >} ># 43 "/usr/include/c++/13/cstring" 2 3 ># 71 "/usr/include/c++/13/cstring" 3 >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; ># 122 "/usr/include/c++/13/cstring" 3 > >} >} ># 16 "/usr/include/boost/system/detail/generic_category_message.hpp" 2 3 4 > >namespace boost >{ > >namespace system >{ > >namespace detail >{ > > > > > >inline char const * strerror_r_helper( char const * r, char const * ) noexcept >{ > return r; >} > >inline char const * strerror_r_helper( int r, char const * buffer ) noexcept >{ > return r == 0? buffer: "Unknown error"; >} > >inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) noexcept >{ > return strerror_r_helper( strerror_r( ev, buffer, len ), buffer ); >} > >inline std::string generic_error_category_message( int ev ) >{ > char buffer[ 128 ]; > return generic_error_category_message( ev, buffer, sizeof( buffer ) ); >} ># 102 "/usr/include/boost/system/detail/generic_category_message.hpp" 3 4 >} > >} > >} ># 15 "/usr/include/boost/system/detail/generic_category.hpp" 2 3 4 > > > >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 ); >} > >inline std::string generic_error_category::message( int ev ) const >{ > return generic_error_category_message( ev ); >} > >} > > > > > >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 >{ > return detail::generic_cat_holder<void>::instance; >} ># 119 "/usr/include/boost/system/detail/generic_category.hpp" 3 4 >} > >} ># 15 "/usr/include/boost/system/detail/error_condition.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/enable_if.hpp" 1 3 4 > > > > > > > >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> >{ >}; > >} > >} > >} ># 16 "/usr/include/boost/system/detail/error_condition.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/is_same.hpp" 1 3 4 > > > > > > > >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 }; >}; > >} > >} > >} ># 17 "/usr/include/boost/system/detail/error_condition.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/errc.hpp" 1 3 4 ># 13 "/usr/include/boost/system/detail/errc.hpp" 3 4 ># 1 "/usr/include/boost/system/is_error_condition_enum.hpp" 1 3 4 ># 13 "/usr/include/boost/system/is_error_condition_enum.hpp" 3 4 >namespace boost >{ > >namespace system >{ > >class error_condition; > >template<class T> struct is_error_condition_enum >{ > static const bool value = false; >}; > >} > >} ># 14 "/usr/include/boost/system/detail/errc.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/cerrno.hpp" 1 3 4 ># 11 "/usr/include/boost/system/detail/cerrno.hpp" 3 4 ># 1 "/usr/include/c++/13/cerrno" 1 3 4 ># 39 "/usr/include/c++/13/cerrno" 3 4 > ># 40 "/usr/include/c++/13/cerrno" 3 ># 12 "/usr/include/boost/system/detail/cerrno.hpp" 2 3 4 ># 15 "/usr/include/boost/system/detail/errc.hpp" 2 3 4 > >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 >}; > >} ># 117 "/usr/include/boost/system/detail/errc.hpp" 3 4 >template<> struct is_error_condition_enum<errc::errc_t> >{ > static const bool value = true; >}; > >} > >} ># 18 "/usr/include/boost/system/detail/error_condition.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/append_int.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/system/detail/snprintf.hpp" 1 3 4 ># 12 "/usr/include/boost/system/detail/snprintf.hpp" 3 4 ># 1 "/usr/include/c++/13/cstdio" 1 3 4 ># 39 "/usr/include/c++/13/cstdio" 3 4 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 13 "/usr/include/boost/system/detail/snprintf.hpp" 2 3 4 ># 1 "/usr/include/c++/13/cstdarg" 1 3 4 ># 39 "/usr/include/c++/13/cstdarg" 3 4 > ># 40 "/usr/include/c++/13/cstdarg" 3 > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stdarg.h" 1 3 4 ># 44 "/usr/include/c++/13/cstdarg" 2 3 ># 53 "/usr/include/c++/13/cstdarg" 3 >namespace std >{ > using ::va_list; >} ># 14 "/usr/include/boost/system/detail/snprintf.hpp" 2 3 4 > > > >namespace boost >{ > >namespace system >{ > >namespace detail >{ ># 53 "/usr/include/boost/system/detail/snprintf.hpp" 3 4 >__attribute__((__format__ (__printf__, 3, 4))) > >inline void snprintf( char * buffer, std::size_t len, char const * format, ... ) >{ > va_list args; > __builtin_va_start(args,format); > > std::vsnprintf( buffer, len, format, args ); > > __builtin_va_end(args); >} > > > >} > >} > >} ># 9 "/usr/include/boost/system/detail/append_int.hpp" 2 3 4 > > > > >namespace boost >{ >namespace system >{ >namespace detail >{ > >inline void append_int( std::string& s, int v ) >{ > char buffer[ 32 ]; > detail::snprintf( buffer, sizeof( buffer ), ":%d", v ); > > s += buffer; >} > >} >} >} ># 19 "/usr/include/boost/system/detail/error_condition.hpp" 2 3 4 > > > > >namespace boost >{ > >namespace system >{ > > > > > >namespace detail >{ > >struct generic_value_tag >{ > int value; > constexpr explicit generic_value_tag( int v ): value( v ) {} >}; > >} > >class error_condition >{ >private: > > int val_; > error_category const * cat_; > >private: > > boost::ulong_long_type cat_id() const noexcept > { > return cat_? cat_->id_: detail::generic_category_id; > } > >public: > > > > constexpr error_condition() noexcept: > val_( 0 ), cat_( 0 ) > { > } > > constexpr error_condition( int val, const error_category & cat ) noexcept: > val_( val ), cat_( &cat ) > { > } > > constexpr explicit error_condition( boost::system::detail::generic_value_tag vt ) noexcept: > val_( vt.value ), cat_( 0 ) > { > } > > 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 > { > *this = make_error_condition( e ); > } > > template<class ErrorConditionEnum> constexpr error_condition( ErrorConditionEnum e, > typename detail::enable_if<boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value>::type* = 0) noexcept: > val_( e ), cat_( 0 ) > { > } > > > > constexpr void assign( int val, const error_category & cat ) noexcept > { > val_ = val; > cat_ = &cat; > } > > template<typename ErrorConditionEnum> > constexpr typename detail::enable_if<is_error_condition_enum<ErrorConditionEnum>::value, error_condition>::type & > operator=( ErrorConditionEnum val ) noexcept > { > *this = error_condition( val ); > return *this; > } > > constexpr void clear() noexcept > { > val_ = 0; > cat_ = 0; > } > > > > constexpr int value() const noexcept > { > return val_; > } > > constexpr const error_category & category() const noexcept > { > return cat_? *cat_: generic_category(); > } > > std::string message() const > { > if( cat_ ) > { > return cat_->message( value() ); > } > else > { > return detail::generic_error_category_message( value() ); > } > } > > char const * message( char * buffer, std::size_t len ) const noexcept > { > if( cat_ ) > { > return cat_->message( value(), buffer, len ); > } > else > { > return detail::generic_error_category_message( value(), buffer, len ); > } > } > > constexpr bool failed() const noexcept > { > if( cat_ ) > { > return detail::failed_impl( val_, *cat_ ); > } > else > { > return val_ != 0; > } > } > > > > constexpr explicit operator bool() const noexcept > { > return failed(); > } ># 189 "/usr/include/boost/system/detail/error_condition.hpp" 3 4 > constexpr inline friend bool operator==( const error_condition & lhs, const error_condition & rhs ) noexcept > { > if( lhs.val_ != rhs.val_ ) > { > return false; > } > else if( lhs.cat_ == 0 ) > { > return rhs.cat_id() == detail::generic_category_id; > } > else if( rhs.cat_ == 0 ) > { > return lhs.cat_id() == detail::generic_category_id; > } > else > { > return *lhs.cat_ == *rhs.cat_; > } > } > > constexpr inline friend bool operator<( const error_condition & lhs, const error_condition & rhs ) noexcept > { > error_category const& lcat = lhs.category(); > error_category const& rcat = rhs.category(); > return lcat < rcat || ( lcat == rcat && lhs.val_ < rhs.val_ ); > } > > constexpr inline friend bool operator!=( const error_condition & lhs, const error_condition & rhs ) noexcept > { > return !( lhs == rhs ); > } > > > > operator std::error_condition () const > { > > > > > > > > if( cat_ ) > { > return std::error_condition( val_, *cat_ ); > } > else > { > return std::error_condition( val_, std::generic_category() ); > } > > > } > > inline friend bool operator==( std::error_code const & lhs, error_condition const & rhs ) noexcept > { > return lhs == static_cast< std::error_condition >( rhs ); > } > > inline friend bool operator==( error_condition const & lhs, std::error_code const & rhs ) noexcept > { > return static_cast< std::error_condition >( lhs ) == rhs; > } > > inline friend bool operator!=( std::error_code const & lhs, error_condition const & rhs ) noexcept > { > return !( lhs == rhs ); > } > > inline friend bool operator!=( error_condition const & lhs, std::error_code 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; > } >}; > >} > >} ># 15 "/usr/include/boost/system/detail/error_category_impl.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/error_code.hpp" 1 3 4 ># 13 "/usr/include/boost/system/detail/error_code.hpp" 3 4 ># 1 "/usr/include/boost/system/is_error_code_enum.hpp" 1 3 4 ># 13 "/usr/include/boost/system/is_error_code_enum.hpp" 3 4 >namespace boost >{ > >namespace system >{ > >class error_code; > >template<class T> struct is_error_code_enum >{ > static const bool value = false; >}; > >} > >} ># 14 "/usr/include/boost/system/detail/error_code.hpp" 2 3 4 > > ># 1 "/usr/include/boost/system/detail/system_category.hpp" 1 3 4 ># 17 "/usr/include/boost/system/detail/system_category.hpp" 3 4 >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 > { > return "system"; > } > > 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 >{ > return detail::system_cat_holder<void>::instance; >} ># 106 "/usr/include/boost/system/detail/system_category.hpp" 3 4 >} > >} ># 17 "/usr/include/boost/system/detail/error_code.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/system_category_impl.hpp" 1 3 4 ># 56 "/usr/include/boost/system/detail/system_category_impl.hpp" 3 4 >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 generic_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 generic_error_category_message( ev, buffer, len ); >} ># 18 "/usr/include/boost/system/detail/error_code.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/interop_category.hpp" 1 3 4 ># 18 "/usr/include/boost/system/detail/interop_category.hpp" 3 4 >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 > { > return "std:unknown"; > } > > 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 * interop_error_category::message( int ev, char * buffer, std::size_t len ) const noexcept >{ > detail::snprintf( buffer, len, "Unknown interop error %d", ev ); > return buffer; >} > >inline std::string interop_error_category::message( int ev ) const >{ > char buffer[ 48 ]; > return message( ev, buffer, sizeof( buffer ) ); >} > > > > > >template<class T> struct __attribute__((__visibility__("default"))) interop_cat_holder >{ > static constexpr interop_error_category instance{}; >}; > > > > > > >constexpr error_category const & interop_category() noexcept >{ > return interop_cat_holder<void>::instance; >} ># 101 "/usr/include/boost/system/detail/interop_category.hpp" 3 4 >} > >} > >} ># 19 "/usr/include/boost/system/detail/error_code.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/assert/source_location.hpp" 1 3 4 ># 10 "/usr/include/boost/assert/source_location.hpp" 3 4 ># 1 "/usr/include/boost/current_function.hpp" 1 3 4 ># 22 "/usr/include/boost/current_function.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > >inline void current_function_helper() >{ ># 69 "/usr/include/boost/current_function.hpp" 3 4 >} > >} > >} ># 11 "/usr/include/boost/assert/source_location.hpp" 2 3 4 > ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 13 "/usr/include/boost/assert/source_location.hpp" 2 3 4 > > ># 1 "/usr/include/c++/13/cstdio" 1 3 4 ># 39 "/usr/include/c++/13/cstdio" 3 4 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 16 "/usr/include/boost/assert/source_location.hpp" 2 3 4 > >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() noexcept: file_( "(unknown)" ), function_( "(unknown)" ), line_( 0 ), column_( 0 ) > { > } > > constexpr source_location( char const * file, boost::uint_least32_t ln, char const * function, boost::uint_least32_t col = 0 ) noexcept: file_( file ), function_( function ), line_( ln ), column_( col ) > { > } > > constexpr char const * file_name() const noexcept > { > return file_; > } > > constexpr char const * function_name() const noexcept > { > return function_; > } > > constexpr boost::uint_least32_t line() const noexcept > { > return line_; > } > > constexpr boost::uint_least32_t column() const noexcept > { > return column_; > } > > > > > > > std::string to_string() const > { > if( line() == 0 ) > { > return "(unknown source location)"; > } > > std::string r = file_name(); > > char buffer[ 16 ]; > > std::sprintf( buffer, ":%ld", static_cast<long>( line() ) ); > r += buffer; > > if( column() ) > { > std::sprintf( buffer, ":%ld", static_cast<long>( column() ) ); > r += buffer; > } > > r += " in function '"; > r += function_name(); > r += '\''; > > return r; > } > > > > > >}; > >template<class E, class T> std::basic_ostream<E, T> & operator<<( std::basic_ostream<E, T> & os, source_location const & loc ) >{ > os << loc.to_string(); > return os; >} > >} ># 25 "/usr/include/boost/system/detail/error_code.hpp" 2 3 4 ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 26 "/usr/include/boost/system/detail/error_code.hpp" 2 3 4 > > > ># 1 "/usr/include/c++/13/cstdio" 1 3 4 ># 39 "/usr/include/c++/13/cstdio" 3 4 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 30 "/usr/include/boost/system/detail/error_code.hpp" 2 3 4 ># 40 "/usr/include/boost/system/detail/error_code.hpp" 3 4 >namespace boost >{ > >namespace system >{ ># 55 "/usr/include/boost/system/detail/error_code.hpp" 3 4 >std::size_t hash_value( error_code const & ec ); > >class error_code >{ >private: > > 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_; > >public: > > > > constexpr error_code() noexcept: > d1_(), lc_flags_( 0 ) > { > } > > constexpr error_code( int val, const error_category & cat ) noexcept: > d1_(), lc_flags_( 2 + detail::failed_impl( val, cat ) ) > { > d1_.val_ = val; > d1_.cat_ = &cat; > } > > error_code( int val, const error_category & cat, source_location const * loc ) noexcept: > d1_(), lc_flags_( ( loc? reinterpret_cast<boost::uintptr_t>( loc ): 2 ) | +detail::failed_impl( val, cat ) ) > { > d1_.val_ = val; > d1_.cat_ = &cat; > } > > 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 ) noexcept: d1_(), lc_flags_( 0 ) > { > *this = make_error_code( e ); > } > > template<class ErrorCodeEnum> error_code( ErrorCodeEnum e, source_location const * loc, > typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value>::type* = 0 ) noexcept: > d1_(), lc_flags_( 0 ) > { > error_code e2 = make_error_code( e ); > > if( e2.lc_flags_ == 0 || e2.lc_flags_ == 1 ) > { > *this = e2; > } > else > { > *this = error_code( e2.d1_.val_, *e2.d1_.cat_, loc ); > } > } > > > > error_code( std::error_code const& ec ) noexcept: > lc_flags_( 1 ) > { > ::new( d2_ ) std::error_code( ec ); > } > > > > > > constexpr void assign( int val, const error_category & cat ) noexcept > { > *this = error_code( val, cat ); > } > > void assign( int val, const error_category & cat, source_location const * loc ) noexcept > { > *this = error_code( val, cat, loc ); > } > > template<typename ErrorCodeEnum> > constexpr typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value, error_code>::type & > operator=( ErrorCodeEnum val ) noexcept > { > *this = make_error_code( val ); > return *this; > } > > template<typename ErrorCodeEnum> > typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value, void>::type > assign( ErrorCodeEnum val, source_location const * loc ) noexcept > { > *this = error_code( val, loc ); > } > > constexpr void clear() noexcept > { > *this = error_code(); > } > > > > constexpr int value() const noexcept > { > if( lc_flags_ != 1 ) > { > return d1_.val_; > } > else > { > > > std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ ); > return ec.value() + 1000 * static_cast<unsigned>( reinterpret_cast<boost::uintptr_t>( &ec.category() ) % 2097143 ); > > > > > } > } > > constexpr const error_category & category() const noexcept > { > if( lc_flags_ == 0 ) > { > return system_category(); > } > else if( lc_flags_ == 1 ) > { > return detail::interop_category(); > } > else > { > return *d1_.cat_; > } > } > > > error_condition default_error_condition() const noexcept > { > return category().default_error_condition( value() ); > } > > std::string message() const > { > > > if( lc_flags_ == 1 ) > { > std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ ); > return ec.message(); > } > > > > return category().message( value() ); > } > > char const * message( char * buffer, std::size_t len ) const noexcept > { > > if( lc_flags_ == 1 ) > { > > try > > { > std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ ); > detail::snprintf( buffer, len, "%s", ec.message().c_str() ); > return buffer; > } > > catch( ... ) > { > } > > } > > > return category().message( value(), buffer, len ); > } > > constexpr bool failed() const noexcept > { > if( lc_flags_ & 1 ) > { > > if( lc_flags_ == 1 ) > { > std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ ); > return ec.value() != 0; > } > > return true; > } > else > { > return false; > } > } > > > > constexpr explicit operator bool() const noexcept > { > return failed(); > } ># 303 "/usr/include/boost/system/detail/error_code.hpp" 3 4 > bool has_location() const noexcept > { > return lc_flags_ >= 4; > } > > source_location const & location() const noexcept > { > static constexpr source_location loc; > return lc_flags_ >= 4? *reinterpret_cast<source_location const*>( lc_flags_ &~ static_cast<boost::uintptr_t>( 1 ) ): loc; > } > > > >private: > > > > friend class error_category; > > constexpr bool equals( int val, error_category const& cat ) const noexcept > { > if( lc_flags_ == 0 ) > { > return val == 0 && cat.id_ == detail::system_category_id; > } > else if( lc_flags_ == 1 ) > { > return cat.id_ == detail::interop_category_id && val == value(); > } > else > { > return val == d1_.val_ && cat == *d1_.cat_; > } > } > >public: > > > > > constexpr inline friend bool operator==( const error_code & lhs, const error_code & rhs ) noexcept > { > > > if( lhs.lc_flags_ == 1 && rhs.lc_flags_ == 1 ) > { > std::error_code const& e1 = *reinterpret_cast<std::error_code const*>( lhs.d2_ ); > std::error_code const& e2 = *reinterpret_cast<std::error_code const*>( rhs.d2_ ); > > return e1 == e2; > } > else > > { > return lhs.value() == rhs.value() && lhs.category() == rhs.category(); > } > } > > constexpr inline friend bool operator<( const error_code & lhs, const error_code & rhs ) noexcept > { > > > if( lhs.lc_flags_ == 1 && rhs.lc_flags_ == 1 ) > { > std::error_code const& e1 = *reinterpret_cast<std::error_code const*>( lhs.d2_ ); > std::error_code const& e2 = *reinterpret_cast<std::error_code const*>( rhs.d2_ ); > > return e1 < e2; > } > else > > { > return lhs.category() < rhs.category() || (lhs.category() == rhs.category() && lhs.value() < rhs.value()); > } > } > > constexpr inline friend bool operator!=( const error_code & lhs, const error_code & rhs ) noexcept > { > return !( lhs == rhs ); > } > > inline friend bool operator==( const error_code & code, const error_condition & condition ) noexcept > { > > > if( code.lc_flags_ == 1 ) > { > return static_cast<std::error_code>( code ) == static_cast<std::error_condition>( condition ); > } > else > > > { > return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() ); > } > } > > inline friend bool operator==( const error_condition & condition, const error_code & code ) noexcept > { > > > if( code.lc_flags_ == 1 ) > { > return static_cast<std::error_code>( code ) == static_cast<std::error_condition>( condition ); > } > else > > > { > return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() ); > } > } > > inline friend bool operator!=( const error_code & lhs, const error_condition & rhs ) noexcept > { > return !( lhs == rhs ); > } > > inline friend bool operator!=( const error_condition & lhs, const error_code & rhs ) noexcept > { > return !( lhs == rhs ); > } > > > > inline friend bool operator==( std::error_code const & lhs, error_code const & rhs ) noexcept > { > return lhs == static_cast< std::error_code >( rhs ); > } > > inline friend bool operator==( error_code const & lhs, std::error_code const & rhs ) noexcept > { > return static_cast< std::error_code >( lhs ) == rhs; > } > > inline friend bool operator!=( std::error_code const & lhs, error_code const & rhs ) noexcept > { > return !( lhs == rhs ); > } > > inline friend bool operator!=( error_code 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> > 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 ); > } ># 526 "/usr/include/boost/system/detail/error_code.hpp" 3 4 > operator std::error_code () const > { > if( lc_flags_ == 1 ) > { > return *reinterpret_cast<std::error_code const*>( d2_ ); > } > else if( lc_flags_ == 0 ) > { > > > > > > > > return std::error_code(); > > > } > else > { > return std::error_code( d1_.val_, *d1_.cat_ ); > } > } > > operator std::error_code () > { > return const_cast<error_code const&>( *this ); > } > > template<class T, > class E = typename detail::enable_if<detail::is_same<T, std::error_code>::value>::type> > operator T& () > { > if( lc_flags_ != 1 ) > { > std::error_code e2( *this ); > ::new( d2_ ) std::error_code( e2 ); > lc_flags_ = 1; > } > > return *reinterpret_cast<std::error_code*>( d2_ ); > } ># 580 "/usr/include/boost/system/detail/error_code.hpp" 3 4 > std::string to_string() const > { > > > if( lc_flags_ == 1 ) > { > std::error_code const& e2 = *reinterpret_cast<std::error_code const*>( d2_ ); > > std::string r( "std:" ); > r += e2.category().name(); > detail::append_int( r, e2.value() ); > > return r; > } > else > > { > std::string r = category().name(); > 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_code const & ec) > { > return os << ec.to_string(); > } > > std::string what() const > { > std::string r = message(); > > r += " ["; > r += to_string(); > > if( has_location() ) > { > r += " at "; > r += location().to_string(); > } > > r += "]"; > return r; > } >}; > >inline std::size_t hash_value( error_code const & ec ) >{ > > > if( ec.lc_flags_ == 1 ) > { > std::error_code const& e2 = *reinterpret_cast<std::error_code const*>( ec.d2_ ); > return std::hash<std::error_code>()( e2 ); > } > > > > error_category const & cat = ec.category(); > > boost::ulong_long_type id_ = cat.id_; > > if( id_ == 0 ) > { > id_ = reinterpret_cast<boost::uintptr_t>( &cat ); > } > > boost::ulong_long_type hv = ( boost::ulong_long_type( 0xCBF29CE4 ) << 32 ) + 0x84222325; > boost::ulong_long_type const prime = ( boost::ulong_long_type( 0x00000100 ) << 32 ) + 0x000001B3; > > > > hv ^= id_; > hv *= prime; > > > > hv ^= static_cast<unsigned>( ec.value() ); > hv *= prime; > > return static_cast<std::size_t>( hv ); >} > >} > >} ># 16 "/usr/include/boost/system/detail/error_category_impl.hpp" 2 3 4 > > > ># 1 "/usr/include/c++/13/cstring" 1 3 4 ># 39 "/usr/include/c++/13/cstring" 3 4 > ># 40 "/usr/include/c++/13/cstring" 3 ># 20 "/usr/include/boost/system/detail/error_category_impl.hpp" 2 3 4 > >namespace boost >{ >namespace system >{ > > > >inline error_condition error_category::default_error_condition( int ev ) const noexcept >{ > return error_condition( ev, *this ); >} > >inline bool error_category::equivalent( int code, const error_condition & condition ) const noexcept >{ > return default_error_condition( code ) == condition; >} > >inline bool error_category::equivalent( const error_code & code, int condition ) const noexcept >{ > return code.equals( condition, *this ); >} > >inline char const * error_category::message( int ev, char * buffer, std::size_t len ) const noexcept >{ > if( len == 0 ) > { > return buffer; > } > > if( len == 1 ) > { > buffer[0] = 0; > return buffer; > } > > > try > > { > std::string m = this->message( ev ); ># 72 "/usr/include/boost/system/detail/error_category_impl.hpp" 3 4 > std::strncpy( buffer, m.c_str(), len - 1 ); > buffer[ len-1 ] = 0; > > > > > > > > return buffer; > } > > catch( ... ) > { > detail::snprintf( buffer, len, "No message text available for error %d", ev ); > return buffer; > } > >} > >} >} > > > > > ># 1 "/usr/include/boost/system/detail/std_category.hpp" 1 3 4 ># 21 "/usr/include/boost/system/detail/std_category.hpp" 3 4 >namespace boost >{ > >namespace system >{ > >namespace detail >{ > >class __attribute__((__visibility__("default"))) std_category: public std::error_category >{ >private: > > boost::system::error_category const * pc_; > >public: > > explicit std_category( boost::system::error_category const * pc, unsigned id ): pc_( pc ) > { > if( id != 0 ) > { ># 51 "/usr/include/boost/system/detail/std_category.hpp" 3 4 > } > } > > const char * name() const noexcept override > { > return pc_->name(); > } > > std::string message( int ev ) const override > { > return pc_->message( ev ); > } > > std::error_condition default_error_condition( int ev ) const noexcept override > { > return pc_->default_error_condition( ev ); > } > > bool equivalent( int code, const std::error_condition & condition ) const noexcept override; > bool equivalent( const std::error_code & code, int condition ) const noexcept override; >}; > >inline bool std_category::equivalent( int code, const std::error_condition & condition ) const noexcept >{ > if( condition.category() == *this ) > { > boost::system::error_condition bn( condition.value(), *pc_ ); > return pc_->equivalent( code, bn ); > } > else if( condition.category() == std::generic_category() || condition.category() == boost::system::generic_category() ) > { > boost::system::error_condition bn( condition.value(), boost::system::generic_category() ); > return pc_->equivalent( code, bn ); > } > > > > else if( std_category const* pc2 = dynamic_cast< std_category const* >( &condition.category() ) ) > { > boost::system::error_condition bn( condition.value(), *pc2->pc_ ); > return pc_->equivalent( code, bn ); > } > > > > else > { > return default_error_condition( code ) == condition; > } >} > >inline bool std_category::equivalent( const std::error_code & code, int condition ) const noexcept >{ > if( code.category() == *this ) > { > boost::system::error_code bc( code.value(), *pc_ ); > return pc_->equivalent( bc, condition ); > } > else if( code.category() == std::generic_category() || code.category() == boost::system::generic_category() ) > { > boost::system::error_code bc( code.value(), boost::system::generic_category() ); > return pc_->equivalent( bc, condition ); > } > > > > else if( std_category const* pc2 = dynamic_cast< std_category const* >( &code.category() ) ) > { > boost::system::error_code bc( code.value(), *pc2->pc_ ); > return pc_->equivalent( bc, condition ); > } > > > > else if( *pc_ == boost::system::generic_category() ) > { > return std::generic_category().equivalent( code, condition ); > } > else > { > return false; > } >} > >} > >} > >} ># 100 "/usr/include/boost/system/detail/error_category_impl.hpp" 2 3 4 > >namespace boost >{ >namespace system >{ > >inline error_category::operator std::error_category const & () const >{ > if( id_ == detail::generic_category_id ) > { ># 118 "/usr/include/boost/system/detail/error_category_impl.hpp" 3 4 > return std::generic_category(); > > > } > > if( id_ == detail::system_category_id ) > { ># 136 "/usr/include/boost/system/detail/error_category_impl.hpp" 3 4 > return std::system_category(); > > > } > > detail::std_category* p = ps_.load( std::memory_order_acquire ); > > if( p != 0 ) > { > return *p; > } > > detail::std_category* q = new detail::std_category( this, 0 ); > > if( ps_.compare_exchange_strong( p, q, std::memory_order_release, std::memory_order_acquire ) ) > { > return *q; > } > else > { > delete q; > return *p; > } >} > >} >} ># 12 "/usr/include/boost/system/error_category.hpp" 2 3 4 ># 15 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_array.hpp" 1 3 4 ># 17 "/usr/include/boost/type_traits/is_array.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/integral_constant.hpp" 1 3 4 ># 31 "/usr/include/boost/type_traits/integral_constant.hpp" 3 4 >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 > { > static const char data[sizeof(long)] = { 0 }; > static const void* pdata = data; > return *(reinterpret_cast<const mpl::integral_c<T, val>*>(pdata)); > } > constexpr operator T()const { return val; } > }; > > 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 > { > static const char data[sizeof(long)] = { 0 }; > static const void* pdata = data; > return *(reinterpret_cast<const mpl::bool_<val>*>(pdata)); > } > constexpr operator bool()const { return val; } > }; > > template <bool val> > bool const integral_constant<bool, val>::value; > > typedef integral_constant<bool, true> true_type; > typedef integral_constant<bool, false> false_type; > >} ># 18 "/usr/include/boost/type_traits/is_array.hpp" 2 3 4 > > >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{}; > > > > > >} ># 16 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/decay.hpp" 1 3 4 ># 13 "/usr/include/boost/type_traits/decay.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_function.hpp" 1 3 4 ># 14 "/usr/include/boost/type_traits/is_function.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/detail/config.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/detail/config.hpp" 3 4 ># 1 "/usr/include/boost/version.hpp" 1 3 4 ># 16 "/usr/include/boost/type_traits/detail/config.hpp" 2 3 4 ># 15 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/type_traits/detail/is_function_cxx_11.hpp" 1 3 4 ># 16 "/usr/include/boost/type_traits/detail/is_function_cxx_11.hpp" 3 4 >namespace boost { > > template <class T> > struct is_function : public false_type {}; ># 36 "/usr/include/boost/type_traits/detail/is_function_cxx_11.hpp" 3 4 > 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 {}; ># 669 "/usr/include/boost/type_traits/detail/is_function_cxx_11.hpp" 3 4 >} ># 20 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 ># 14 "/usr/include/boost/type_traits/decay.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/remove_bounds.hpp" 1 3 4 ># 12 "/usr/include/boost/type_traits/remove_bounds.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/remove_extent.hpp" 1 3 4 ># 16 "/usr/include/boost/type_traits/remove_extent.hpp" 3 4 >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; > > > >} ># 13 "/usr/include/boost/type_traits/remove_bounds.hpp" 2 3 4 > >namespace boost >{ > >template <class T> struct remove_bounds : public remove_extent<T> {}; > > > >template <class T> using remove_bounds_t = typename remove_bounds<T>::type; > > > > >} ># 15 "/usr/include/boost/type_traits/decay.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/add_pointer.hpp" 1 3 4 ># 12 "/usr/include/boost/type_traits/add_pointer.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/remove_reference.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/remove_reference.hpp" 3 4 >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; }; ># 53 "/usr/include/boost/type_traits/remove_reference.hpp" 3 4 > template <class T> using remove_reference_t = typename remove_reference<T>::type; > > > >} ># 13 "/usr/include/boost/type_traits/add_pointer.hpp" 2 3 4 > >namespace boost { ># 50 "/usr/include/boost/type_traits/add_pointer.hpp" 3 4 >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; > > > >} ># 16 "/usr/include/boost/type_traits/decay.hpp" 2 3 4 > ># 1 "/usr/include/boost/type_traits/remove_cv.hpp" 1 3 4 ># 18 "/usr/include/boost/type_traits/remove_cv.hpp" 3 4 >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; > > > >} ># 18 "/usr/include/boost/type_traits/decay.hpp" 2 3 4 > >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; > > > >} ># 17 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 ># 1 "/usr/include/boost/core/enable_if.hpp" 1 3 4 ># 24 "/usr/include/boost/core/enable_if.hpp" 3 4 >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> {}; > >} ># 18 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 > ># 1 "/usr/include/c++/13/cwchar" 1 3 4 ># 39 "/usr/include/c++/13/cwchar" 3 4 > ># 40 "/usr/include/c++/13/cwchar" 3 ># 20 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 > > ># 1 "/usr/include/c++/13/list" 1 3 4 ># 58 "/usr/include/c++/13/list" 3 4 > ># 59 "/usr/include/c++/13/list" 3 > > > > > > ># 1 "/usr/include/c++/13/bits/stl_list.h" 1 3 ># 68 "/usr/include/c++/13/bits/stl_list.h" 3 >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 > { _M_init(); } > > > _List_node_header(_List_node_header&& __x) noexcept > : _List_node_base{ __x._M_next, __x._M_prev } > > , _M_size(__x._M_size) > > { > if (__x._M_base()->_M_next == __x._M_base()) > this->_M_next = this->_M_prev = this; > else > { > this->_M_next->_M_prev = this->_M_prev->_M_next = this->_M_base(); > __x._M_init(); > } > } > > void > _M_move_nodes(_List_node_header&& __x) > { > _List_node_base* const __xnode = __x._M_base(); > if (__xnode->_M_next == __xnode) > _M_init(); > else > { > _List_node_base* const __node = this->_M_base(); > __node->_M_next = __xnode->_M_next; > __node->_M_prev = __xnode->_M_prev; > __node->_M_next->_M_prev = __node->_M_prev->_M_next = __node; > > _M_size = __x._M_size; > > __x._M_init(); > } > } > > > void > _M_init() noexcept > { > this->_M_next = this->_M_prev = this; > > this->_M_size = 0; > > } > > private: > _List_node_base* _M_base() { return this; } > }; > > > struct _Scratch_list : _List_node_base > { > _Scratch_list() { _M_next = _M_prev = this; } > > bool empty() const { return _M_next == this; } > > void swap(_List_node_base& __l) { _List_node_base::swap(*this, __l); } > > template<typename _Iter, typename _Cmp> > struct _Ptr_cmp > { > _Cmp _M_cmp; > > bool > operator()(__detail::_List_node_base* __lhs, > __detail::_List_node_base* __rhs) > { return _M_cmp(*_Iter(__lhs), *_Iter(__rhs)); } > }; > > template<typename _Iter> > struct _Ptr_cmp<_Iter, void> > { > bool > operator()(__detail::_List_node_base* __lhs, > __detail::_List_node_base* __rhs) const > { return *_Iter(__lhs) < *_Iter(__rhs); } > }; > > > template<typename _Cmp> > void > merge(_List_node_base& __x, _Cmp __comp) > { > _List_node_base* __first1 = _M_next; > _List_node_base* const __last1 = this; > _List_node_base* __first2 = __x._M_next; > _List_node_base* const __last2 = std::__addressof(__x); > > while (__first1 != __last1 && __first2 != __last2) > { > if (__comp(__first2, __first1)) > { > _List_node_base* __next = __first2->_M_next; > __first1->_M_transfer(__first2, __next); > __first2 = __next; > } > else > __first1 = __first1->_M_next; > } > if (__first2 != __last2) > this->_M_transfer(__first2, __last2); > } > > > void _M_take_one(_List_node_base* __i) > { this->_M_transfer(__i, __i->_M_next); } > > > void _M_put_all(_List_node_base* __i) > { > if (!empty()) > __i->_M_transfer(_M_next, this); > } > }; > > } > > > > > template<typename _Tp> > struct _List_node : public __detail::_List_node_base > { > > __gnu_cxx::__aligned_membuf<_Tp> _M_storage; > _Tp* _M_valptr() { return _M_storage._M_ptr(); } > _Tp const* _M_valptr() const { return _M_storage._M_ptr(); } > > > > > > }; > > > > > > > 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() noexcept > : _M_node() { } > > explicit > _List_iterator(__detail::_List_node_base* __x) noexcept > : _M_node(__x) { } > > _Self > _M_const_cast() const noexcept > { return *this; } > > > [[__nodiscard__]] > reference > operator*() const noexcept > { return *static_cast<_Node*>(_M_node)->_M_valptr(); } > > [[__nodiscard__]] > pointer > operator->() const noexcept > { return static_cast<_Node*>(_M_node)->_M_valptr(); } > > _Self& > operator++() noexcept > { > _M_node = _M_node->_M_next; > return *this; > } > > _Self > operator++(int) noexcept > { > _Self __tmp = *this; > _M_node = _M_node->_M_next; > return __tmp; > } > > _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; } > > > [[__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) > noexcept > : _M_node(__x) { } > > _List_const_iterator(const iterator& __x) noexcept > : _M_node(__x._M_node) { } > > iterator > _M_const_cast() const noexcept > { return iterator(const_cast<__detail::_List_node_base*>(_M_node)); } > > > [[__nodiscard__]] > reference > operator*() const noexcept > { return *static_cast<_Node*>(_M_node)->_M_valptr(); } > > [[__nodiscard__]] > pointer > operator->() const noexcept > { return static_cast<_Node*>(_M_node)->_M_valptr(); } > > _Self& > operator++() noexcept > { > _M_node = _M_node->_M_next; > return *this; > } > > _Self > operator++(int) noexcept > { > _Self __tmp = *this; > _M_node = _M_node->_M_next; > return __tmp; > } > > _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; } > > > [[__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) > > : _Node_alloc_type() > { } > > _List_impl(const _Node_alloc_type& __a) noexcept > : _Node_alloc_type(__a) > { } > > > _List_impl(_List_impl&&) = default; > > _List_impl(_Node_alloc_type&& __a, _List_impl&& __x) > : _Node_alloc_type(std::move(__a)), _M_node(std::move(__x._M_node)) > { } > > _List_impl(_Node_alloc_type&& __a) noexcept > : _Node_alloc_type(std::move(__a)) > { } > > }; > > _List_impl _M_impl; > > > size_t _M_get_size() const { return _M_impl._M_node._M_size; } > > void _M_set_size(size_t __n) { _M_impl._M_node._M_size = __n; } > > void _M_inc_size(size_t __n) { _M_impl._M_node._M_size += __n; } > > void _M_dec_size(size_t __n) { _M_impl._M_node._M_size -= __n; } > > > size_t > _M_distance(const __detail::_List_node_base* __first, > const __detail::_List_node_base* __last) const > { return _S_distance(__first, __last); } > > > size_t _M_node_count() const { return _M_get_size(); } ># 516 "/usr/include/c++/13/bits/stl_list.h" 3 > typename _Node_alloc_traits::pointer > _M_get_node() > { return _Node_alloc_traits::allocate(_M_impl, 1); } > > void > _M_put_node(typename _Node_alloc_traits::pointer __p) noexcept > { _Node_alloc_traits::deallocate(_M_impl, __p, 1); } > > public: > typedef _Alloc allocator_type; > > _Node_alloc_type& > _M_get_Node_allocator() noexcept > { return _M_impl; } > > const _Node_alloc_type& > _M_get_Node_allocator() const noexcept > { return _M_impl; } > > > _List_base() = default; > > > > > _List_base(const _Node_alloc_type& __a) noexcept > : _M_impl(__a) > { } > > > _List_base(_List_base&&) = default; > > > _List_base(_List_base&& __x, _Node_alloc_type&& __a) > : _M_impl(std::move(__a)) > { > if (__x._M_get_Node_allocator() == _M_get_Node_allocator()) > _M_move_nodes(std::move(__x)); > > } > > > > _List_base(_Node_alloc_type&& __a, _List_base&& __x) > : _M_impl(std::move(__a), std::move(__x._M_impl)) > { } > > > _List_base(_Node_alloc_type&& __a) > : _M_impl(std::move(__a)) > { } > > void > _M_move_nodes(_List_base&& __x) > { _M_impl._M_node._M_move_nodes(std::move(__x._M_impl._M_node)); } > > > > ~_List_base() noexcept > { _M_clear(); } > > void > _M_clear() noexcept; > > void > _M_init() noexcept > { this->_M_impl._M_node._M_init(); } > }; ># 631 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _Tp, typename _Alloc = std::allocator<_Tp> > > class list : protected _List_base<_Tp, _Alloc> > { ># 644 "/usr/include/c++/13/bits/stl_list.h" 3 > 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; ># 706 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename... _Args> > _Node* > _M_create_node(_Args&&... __args) > { > auto __p = this->_M_get_node(); > auto& __alloc = _M_get_Node_allocator(); > __allocated_ptr<_Node_alloc_type> __guard{__alloc, __p}; > _Node_alloc_traits::construct(__alloc, __p->_M_valptr(), > std::forward<_Args>(__args)...); > __guard = nullptr; > return __p; > } > > > > static size_t > _S_distance(const_iterator __first, const_iterator __last) > { return std::distance(__first, __last); } > > > size_t > _M_node_count() const > { return this->_M_get_size(); } ># 741 "/usr/include/c++/13/bits/stl_list.h" 3 > public: > > > > > > > > list() = default; ># 758 "/usr/include/c++/13/bits/stl_list.h" 3 > explicit > list(const allocator_type& __a) noexcept > : _Base(_Node_alloc_type(__a)) { } ># 771 "/usr/include/c++/13/bits/stl_list.h" 3 > explicit > list(size_type __n, const allocator_type& __a = allocator_type()) > : _Base(_Node_alloc_type(__a)) > { _M_default_initialize(__n); } ># 784 "/usr/include/c++/13/bits/stl_list.h" 3 > list(size_type __n, const value_type& __value, > const allocator_type& __a = allocator_type()) > : _Base(_Node_alloc_type(__a)) > { _M_fill_initialize(__n, __value); } ># 811 "/usr/include/c++/13/bits/stl_list.h" 3 > list(const list& __x) > : _Base(_Node_alloc_traits:: > _S_select_on_copy(__x._M_get_Node_allocator())) > { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } ># 824 "/usr/include/c++/13/bits/stl_list.h" 3 > list(list&&) = default; ># 834 "/usr/include/c++/13/bits/stl_list.h" 3 > list(initializer_list<value_type> __l, > const allocator_type& __a = allocator_type()) > : _Base(_Node_alloc_type(__a)) > { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); } > > list(const list& __x, const __type_identity_t<allocator_type>& __a) > : _Base(_Node_alloc_type(__a)) > { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } > > private: > list(list&& __x, const allocator_type& __a, true_type) noexcept > : _Base(_Node_alloc_type(__a), std::move(__x)) > { } > > list(list&& __x, const allocator_type& __a, false_type) > : _Base(_Node_alloc_type(__a)) > { > if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) > this->_M_move_nodes(std::move(__x)); > else > insert(begin(), std::__make_move_if_noexcept_iterator(__x.begin()), > std::__make_move_if_noexcept_iterator(__x.end())); > } > > public: > list(list&& __x, const __type_identity_t<allocator_type>& __a) > noexcept(_Node_alloc_traits::_S_always_equal()) > : list(std::move(__x), __a, > typename _Node_alloc_traits::is_always_equal{}) > { } ># 877 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > list(_InputIterator __first, _InputIterator __last, > const allocator_type& __a = allocator_type()) > : _Base(_Node_alloc_type(__a)) > { _M_initialize_dispatch(__first, __last, __false_type()); } ># 903 "/usr/include/c++/13/bits/stl_list.h" 3 > ~list() = default; ># 914 "/usr/include/c++/13/bits/stl_list.h" 3 > list& > operator=(const list& __x); ># 928 "/usr/include/c++/13/bits/stl_list.h" 3 > list& > operator=(list&& __x) > noexcept(_Node_alloc_traits::_S_nothrow_move()) > { > constexpr bool __move_storage = > _Node_alloc_traits::_S_propagate_on_move_assign() > || _Node_alloc_traits::_S_always_equal(); > _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); > return *this; > } ># 946 "/usr/include/c++/13/bits/stl_list.h" 3 > list& > operator=(initializer_list<value_type> __l) > { > this->assign(__l.begin(), __l.end()); > return *this; > } ># 964 "/usr/include/c++/13/bits/stl_list.h" 3 > void > assign(size_type __n, const value_type& __val) > { _M_fill_assign(__n, __val); } ># 981 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > void > assign(_InputIterator __first, _InputIterator __last) > { _M_assign_dispatch(__first, __last, __false_type()); } ># 1005 "/usr/include/c++/13/bits/stl_list.h" 3 > void > assign(initializer_list<value_type> __l) > { this->_M_assign_dispatch(__l.begin(), __l.end(), __false_type()); } > > > > allocator_type > get_allocator() const noexcept > { return allocator_type(_Base::_M_get_Node_allocator()); } > > > > > > > [[__nodiscard__]] > iterator > begin() noexcept > { return iterator(this->_M_impl._M_node._M_next); } > > > > > > > [[__nodiscard__]] > const_iterator > begin() const noexcept > { return const_iterator(this->_M_impl._M_node._M_next); } > > > > > > > [[__nodiscard__]] > iterator > end() noexcept > { return iterator(&this->_M_impl._M_node); } > > > > > > > [[__nodiscard__]] > const_iterator > end() const noexcept > { return const_iterator(&this->_M_impl._M_node); } > > > > > > > [[__nodiscard__]] > reverse_iterator > rbegin() noexcept > { return reverse_iterator(end()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > rbegin() const noexcept > { return const_reverse_iterator(end()); } > > > > > > > [[__nodiscard__]] > reverse_iterator > rend() noexcept > { return reverse_iterator(begin()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > rend() const noexcept > { return const_reverse_iterator(begin()); } > > > > > > > > [[__nodiscard__]] > const_iterator > cbegin() const noexcept > { return const_iterator(this->_M_impl._M_node._M_next); } > > > > > > > [[__nodiscard__]] > const_iterator > cend() const noexcept > { return const_iterator(&this->_M_impl._M_node); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > crbegin() const noexcept > { return const_reverse_iterator(end()); } > > > > > > > [[__nodiscard__]] > const_reverse_iterator > crend() const noexcept > { return const_reverse_iterator(begin()); } > > > > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } > > > [[__nodiscard__]] > size_type > size() const noexcept > { return _M_node_count(); } > > > [[__nodiscard__]] > size_type > max_size() const noexcept > { return _Node_alloc_traits::max_size(_M_get_Node_allocator()); } ># 1168 "/usr/include/c++/13/bits/stl_list.h" 3 > void > resize(size_type __new_size); ># 1181 "/usr/include/c++/13/bits/stl_list.h" 3 > void > resize(size_type __new_size, const value_type& __x); ># 1203 "/usr/include/c++/13/bits/stl_list.h" 3 > [[__nodiscard__]] > reference > front() noexcept > { return *begin(); } > > > > > > [[__nodiscard__]] > const_reference > front() const noexcept > { return *begin(); } > > > > > > [[__nodiscard__]] > reference > back() noexcept > { > iterator __tmp = end(); > --__tmp; > return *__tmp; > } > > > > > > [[__nodiscard__]] > const_reference > back() const noexcept > { > const_iterator __tmp = end(); > --__tmp; > return *__tmp; > } ># 1254 "/usr/include/c++/13/bits/stl_list.h" 3 > void > push_front(const value_type& __x) > { this->_M_insert(begin(), __x); } > > > void > push_front(value_type&& __x) > { this->_M_insert(begin(), std::move(__x)); } > > template<typename... _Args> > > reference > > > > emplace_front(_Args&&... __args) > { > this->_M_insert(begin(), std::forward<_Args>(__args)...); > > return front(); > > } ># 1290 "/usr/include/c++/13/bits/stl_list.h" 3 > void > pop_front() noexcept > { this->_M_erase(begin()); } ># 1304 "/usr/include/c++/13/bits/stl_list.h" 3 > void > push_back(const value_type& __x) > { this->_M_insert(end(), __x); } > > > void > push_back(value_type&& __x) > { this->_M_insert(end(), std::move(__x)); } > > template<typename... _Args> > > reference > > > > emplace_back(_Args&&... __args) > { > this->_M_insert(end(), std::forward<_Args>(__args)...); > > return back(); > > } ># 1339 "/usr/include/c++/13/bits/stl_list.h" 3 > void > pop_back() noexcept > { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } ># 1356 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename... _Args> > iterator > emplace(const_iterator __position, _Args&&... __args); ># 1371 "/usr/include/c++/13/bits/stl_list.h" 3 > iterator > insert(const_iterator __position, const value_type& __x); ># 1401 "/usr/include/c++/13/bits/stl_list.h" 3 > iterator > insert(const_iterator __position, value_type&& __x) > { return emplace(__position, std::move(__x)); } ># 1420 "/usr/include/c++/13/bits/stl_list.h" 3 > iterator > insert(const_iterator __p, initializer_list<value_type> __l) > { return this->insert(__p, __l.begin(), __l.end()); } ># 1440 "/usr/include/c++/13/bits/stl_list.h" 3 > iterator > insert(const_iterator __position, size_type __n, const value_type& __x); ># 1479 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > iterator > insert(const_iterator __position, _InputIterator __first, > _InputIterator __last); ># 1523 "/usr/include/c++/13/bits/stl_list.h" 3 > iterator > > erase(const_iterator __position) noexcept; ># 1548 "/usr/include/c++/13/bits/stl_list.h" 3 > iterator > > erase(const_iterator __first, const_iterator __last) noexcept > > > > { > while (__first != __last) > __first = erase(__first); > return __last._M_const_cast(); > } ># 1571 "/usr/include/c++/13/bits/stl_list.h" 3 > void > swap(list& __x) noexcept > { > __detail::_List_node_base::swap(this->_M_impl._M_node, > __x._M_impl._M_node); > > size_t __xsize = __x._M_get_size(); > __x._M_set_size(this->_M_get_size()); > this->_M_set_size(__xsize); > > _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), > __x._M_get_Node_allocator()); > } > > > > > > > > void > clear() noexcept > { > _Base::_M_clear(); > _Base::_M_init(); > } ># 1610 "/usr/include/c++/13/bits/stl_list.h" 3 > void > > splice(const_iterator __position, list&& __x) noexcept > > > > { > if (!__x.empty()) > { > _M_check_equal_allocators(__x); > > this->_M_transfer(__position._M_const_cast(), > __x.begin(), __x.end()); > > this->_M_inc_size(__x._M_get_size()); > __x._M_set_size(0); > } > } > > > void > splice(const_iterator __position, list& __x) noexcept > { splice(__position, std::move(__x)); } ># 1646 "/usr/include/c++/13/bits/stl_list.h" 3 > void > splice(const_iterator __position, list&& __x, const_iterator __i) noexcept ># 1661 "/usr/include/c++/13/bits/stl_list.h" 3 > { > iterator __j = __i._M_const_cast(); > ++__j; > if (__position == __i || __position == __j) > return; > > if (this != std::__addressof(__x)) > _M_check_equal_allocators(__x); > > this->_M_transfer(__position._M_const_cast(), > __i._M_const_cast(), __j); > > this->_M_inc_size(1); > __x._M_dec_size(1); > } ># 1688 "/usr/include/c++/13/bits/stl_list.h" 3 > void > splice(const_iterator __position, list& __x, const_iterator __i) noexcept > { splice(__position, std::move(__x), __i); } ># 1707 "/usr/include/c++/13/bits/stl_list.h" 3 > void > splice(const_iterator __position, list&& __x, const_iterator __first, > const_iterator __last) noexcept ># 1727 "/usr/include/c++/13/bits/stl_list.h" 3 > { > if (__first != __last) > { > if (this != std::__addressof(__x)) > _M_check_equal_allocators(__x); > > size_t __n = _S_distance(__first, __last); > this->_M_inc_size(__n); > __x._M_dec_size(__n); > > this->_M_transfer(__position._M_const_cast(), > __first._M_const_cast(), > __last._M_const_cast()); > } > } ># 1757 "/usr/include/c++/13/bits/stl_list.h" 3 > void > splice(const_iterator __position, list& __x, const_iterator __first, > const_iterator __last) noexcept > { splice(__position, std::move(__x), __first, __last); } > > > private: > > > > > > > typedef void __remove_return_type; > > > public: ># 1786 "/usr/include/c++/13/bits/stl_list.h" 3 > > __remove_return_type > remove(const _Tp& __value); ># 1801 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _Predicate> > __remove_return_type > remove_if(_Predicate); ># 1815 "/usr/include/c++/13/bits/stl_list.h" 3 > > __remove_return_type > unique(); ># 1831 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _BinaryPredicate> > __remove_return_type > unique(_BinaryPredicate); ># 1847 "/usr/include/c++/13/bits/stl_list.h" 3 > void > merge(list&& __x); > > void > merge(list& __x) > { merge(std::move(__x)); } ># 1872 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _StrictWeakOrdering> > void > merge(list&& __x, _StrictWeakOrdering __comp); > > template<typename _StrictWeakOrdering> > void > merge(list& __x, _StrictWeakOrdering __comp) > { merge(std::move(__x), __comp); } ># 1891 "/usr/include/c++/13/bits/stl_list.h" 3 > void > reverse() noexcept > { this->_M_impl._M_node._M_reverse(); } > > > > > > > > void > sort(); > > > > > > > > template<typename _StrictWeakOrdering> > void > sort(_StrictWeakOrdering); > > protected: > > > > > > > template<typename _Integer> > void > _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) > { _M_fill_initialize(static_cast<size_type>(__n), __x); } > > > template<typename _InputIterator> > void > _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, > __false_type) > { > for (; __first != __last; ++__first) > > emplace_back(*__first); > > > > } > > > > void > _M_fill_initialize(size_type __n, const value_type& __x) > { > for (; __n; --__n) > push_back(__x); > } > > > > void > _M_default_initialize(size_type __n) > { > for (; __n; --__n) > emplace_back(); > } > > > void > _M_default_append(size_type __n); ># 1969 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _Integer> > void > _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) > { _M_fill_assign(__n, __val); } > > > template<typename _InputIterator> > void > _M_assign_dispatch(_InputIterator __first, _InputIterator __last, > __false_type); > > > > void > _M_fill_assign(size_type __n, const value_type& __val); > > > > void > _M_transfer(iterator __position, iterator __first, iterator __last) > { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } ># 2001 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename... _Args> > void > _M_insert(iterator __position, _Args&&... __args) > { > _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); > __tmp->_M_hook(__position._M_node); > this->_M_inc_size(1); > } > > > > void > _M_erase(iterator __position) noexcept > { > this->_M_dec_size(1); > __position._M_node->_M_unhook(); > _Node* __n = static_cast<_Node*>(__position._M_node); > > _Node_alloc_traits::destroy(_M_get_Node_allocator(), __n->_M_valptr()); > > > > > _M_put_node(__n); > } > > > void > _M_check_equal_allocators(const list& __x) noexcept > { > if (_M_get_Node_allocator() != __x._M_get_Node_allocator()) > __builtin_abort(); > } > > > const_iterator > _M_resize_pos(size_type& __new_size) const; > > > void > _M_move_assign(list&& __x, true_type) noexcept > { > this->clear(); > this->_M_move_nodes(std::move(__x)); > std::__alloc_on_move(this->_M_get_Node_allocator(), > __x._M_get_Node_allocator()); > } > > void > _M_move_assign(list&& __x, false_type) > { > if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) > _M_move_assign(std::move(__x), true_type{}); > else > > > _M_assign_dispatch(std::make_move_iterator(__x.begin()), > std::make_move_iterator(__x.end()), > __false_type{}); > } > > > > > struct _Finalize_merge > { > explicit > _Finalize_merge(list& __dest, list& __src, const iterator& __src_next) > : _M_dest(__dest), _M_src(__src), _M_next(__src_next) > { } > > ~_Finalize_merge() > { > > > > const size_t __num_unmerged = std::distance(_M_next, _M_src.end()); > const size_t __orig_size = _M_src._M_get_size(); > _M_dest._M_inc_size(__orig_size - __num_unmerged); > _M_src._M_set_size(__num_unmerged); > } > > list& _M_dest; > list& _M_src; > const iterator& _M_next; > > > _Finalize_merge(const _Finalize_merge&) = delete; > > }; > > > > > > }; > > > template<typename _InputIterator, typename _ValT > = typename iterator_traits<_InputIterator>::value_type, > typename _Allocator = allocator<_ValT>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > list(_InputIterator, _InputIterator, _Allocator = _Allocator()) > -> list<_ValT, _Allocator>; > > >} ># 2120 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) > { > > if (__x.size() != __y.size()) > return false; > > > typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; > const_iterator __end1 = __x.end(); > const_iterator __end2 = __y.end(); > > const_iterator __i1 = __x.begin(); > const_iterator __i2 = __y.begin(); > while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) > { > ++__i1; > ++__i2; > } > return __i1 == __end1 && __i2 == __end2; > } ># 2177 "/usr/include/c++/13/bits/stl_list.h" 3 > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) > { return std::lexicographical_compare(__x.begin(), __x.end(), > __y.begin(), __y.end()); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) > { return !(__x == __y); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) > { return __y < __x; } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) > { return !(__y < __x); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) > { return !(__x < __y); } > > > > template<typename _Tp, typename _Alloc> > inline void > swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > > > > > > template<typename _Tp> > inline ptrdiff_t > __distance(std::_List_iterator<_Tp> __first, > std::_List_iterator<_Tp> __last, > input_iterator_tag __tag) > { > typedef std::_List_const_iterator<_Tp> _CIter; > return std::__distance(_CIter(__first), _CIter(__last), __tag); > } > > template<typename _Tp> > inline ptrdiff_t > __distance(std::_List_const_iterator<_Tp> __first, > std::_List_const_iterator<_Tp> __last, > input_iterator_tag) > { > typedef __detail::_List_node_header _Sentinel; > std::_List_const_iterator<_Tp> __beyond = __last; > ++__beyond; > const bool __whole = __first == __beyond; > if (__builtin_constant_p (__whole) && __whole) > return static_cast<const _Sentinel*>(__last._M_node)->_M_size; > > ptrdiff_t __n = 0; > while (__first != __last) > { > ++__first; > ++__n; > } > return __n; > } > > > >} ># 66 "/usr/include/c++/13/list" 2 3 ># 1 "/usr/include/c++/13/bits/list.tcc" 1 3 ># 59 "/usr/include/c++/13/bits/list.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _Tp, typename _Alloc> > void > _List_base<_Tp, _Alloc>:: > _M_clear() noexcept > { > typedef _List_node<_Tp> _Node; > __detail::_List_node_base* __cur = _M_impl._M_node._M_next; > while (__cur != &_M_impl._M_node) > { > _Node* __tmp = static_cast<_Node*>(__cur); > __cur = __tmp->_M_next; > _Tp* __val = __tmp->_M_valptr(); > > _Node_alloc_traits::destroy(_M_get_Node_allocator(), __val); > > > > _M_put_node(__tmp); > } > } > > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > typename list<_Tp, _Alloc>::iterator > list<_Tp, _Alloc>:: > emplace(const_iterator __position, _Args&&... __args) > { > _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); > __tmp->_M_hook(__position._M_const_cast()._M_node); > this->_M_inc_size(1); > return iterator(__tmp); > } > > > template<typename _Tp, typename _Alloc> > typename list<_Tp, _Alloc>::iterator > list<_Tp, _Alloc>:: > > insert(const_iterator __position, const value_type& __x) > > > > { > _Node* __tmp = _M_create_node(__x); > __tmp->_M_hook(__position._M_const_cast()._M_node); > this->_M_inc_size(1); > return iterator(__tmp); > } > > > template<typename _Tp, typename _Alloc> > typename list<_Tp, _Alloc>::iterator > list<_Tp, _Alloc>:: > insert(const_iterator __position, size_type __n, const value_type& __x) > { > if (__n) > { > list __tmp(__n, __x, get_allocator()); > iterator __it = __tmp.begin(); > splice(__position, __tmp); > return __it; > } > return __position._M_const_cast(); > } > > template<typename _Tp, typename _Alloc> > template<typename _InputIterator, typename> > typename list<_Tp, _Alloc>::iterator > list<_Tp, _Alloc>:: > insert(const_iterator __position, _InputIterator __first, > _InputIterator __last) > { > list __tmp(__first, __last, get_allocator()); > if (!__tmp.empty()) > { > iterator __it = __tmp.begin(); > splice(__position, __tmp); > return __it; > } > return __position._M_const_cast(); > } > > > template<typename _Tp, typename _Alloc> > typename list<_Tp, _Alloc>::iterator > list<_Tp, _Alloc>:: > > erase(const_iterator __position) noexcept > > > > { > iterator __ret = iterator(__position._M_node->_M_next); > _M_erase(__position._M_const_cast()); > return __ret; > } ># 173 "/usr/include/c++/13/bits/list.tcc" 3 > template<typename _Tp, typename _Alloc> > typename list<_Tp, _Alloc>::const_iterator > list<_Tp, _Alloc>:: > _M_resize_pos(size_type& __new_size) const > { > const_iterator __i; > > const size_type __len = size(); > if (__new_size < __len) > { > if (__new_size <= __len / 2) > { > __i = begin(); > std::advance(__i, __new_size); > } > else > { > __i = end(); > ptrdiff_t __num_erase = __len - __new_size; > std::advance(__i, -__num_erase); > } > __new_size = 0; > return __i; > } > else > __i = end(); > > > > > > __new_size -= __len; > return __i; > } > > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > _M_default_append(size_type __n) > { > size_type __i = 0; > try > { > for (; __i < __n; ++__i) > emplace_back(); > } > catch(...) > { > for (; __i; --__i) > pop_back(); > throw; > } > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > resize(size_type __new_size) > { > const_iterator __i = _M_resize_pos(__new_size); > if (__new_size) > _M_default_append(__new_size); > else > erase(__i, end()); > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > resize(size_type __new_size, const value_type& __x) > { > const_iterator __i = _M_resize_pos(__new_size); > if (__new_size) > insert(end(), __new_size, __x); > else > erase(__i, end()); > } ># 265 "/usr/include/c++/13/bits/list.tcc" 3 > template<typename _Tp, typename _Alloc> > list<_Tp, _Alloc>& > list<_Tp, _Alloc>:: > operator=(const list& __x) > { > if (this != std::__addressof(__x)) > { > > if (_Node_alloc_traits::_S_propagate_on_copy_assign()) > { > auto& __this_alloc = this->_M_get_Node_allocator(); > auto& __that_alloc = __x._M_get_Node_allocator(); > if (!_Node_alloc_traits::_S_always_equal() > && __this_alloc != __that_alloc) > { > > clear(); > } > std::__alloc_on_copy(__this_alloc, __that_alloc); > } > > _M_assign_dispatch(__x.begin(), __x.end(), __false_type()); > } > return *this; > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > _M_fill_assign(size_type __n, const value_type& __val) > { > iterator __i = begin(); > for (; __i != end() && __n > 0; ++__i, --__n) > *__i = __val; > if (__n > 0) > insert(end(), __n, __val); > else > erase(__i, end()); > } > > template<typename _Tp, typename _Alloc> > template <typename _InputIterator> > void > list<_Tp, _Alloc>:: > _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, > __false_type) > { > iterator __first1 = begin(); > iterator __last1 = end(); > for (; __first1 != __last1 && __first2 != __last2; > ++__first1, (void)++__first2) > *__first1 = *__first2; > if (__first2 == __last2) > erase(__first1, __last1); > else > insert(__last1, __first2, __last2); > } > > > > > > > > template<typename _Tp, typename _Alloc> > typename list<_Tp, _Alloc>::__remove_return_type > list<_Tp, _Alloc>:: > remove(const value_type& __value) > { > > > > list __to_destroy(get_allocator()); > iterator __first = begin(); > iterator __last = end(); > while (__first != __last) > { > iterator __next = __first; > ++__next; > if (*__first == __value) > { > > > > __to_destroy.splice(__to_destroy.begin(), *this, __first); > > > > } > > __first = __next; > } > > > > > return ; > > } > > template<typename _Tp, typename _Alloc> > typename list<_Tp, _Alloc>::__remove_return_type > list<_Tp, _Alloc>:: > unique() > { > iterator __first = begin(); > iterator __last = end(); > if (__first == __last) > return ; > > > > list __to_destroy(get_allocator()); > iterator __next = __first; > while (++__next != __last) > { > if (*__first == *__next) > { > __to_destroy.splice(__to_destroy.begin(), *this, __next); > > > > } > else > __first = __next; > __next = __first; > } > > > > > return ; > > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > > merge(list&& __x) > > > > { > > > if (this != std::__addressof(__x)) > { > _M_check_equal_allocators(__x); > > iterator __first1 = begin(); > iterator __last1 = end(); > iterator __first2 = __x.begin(); > iterator __last2 = __x.end(); > > const _Finalize_merge __fin(*this, __x, __first2); > > while (__first1 != __last1 && __first2 != __last2) > if (*__first2 < *__first1) > { > iterator __next = __first2; > _M_transfer(__first1, __first2, ++__next); > __first2 = __next; > } > else > ++__first1; > if (__first2 != __last2) > { > _M_transfer(__last1, __first2, __last2); > __first2 = __last2; > } > } > } > > template<typename _Tp, typename _Alloc> > template <typename _StrictWeakOrdering> > void > list<_Tp, _Alloc>:: > > merge(list&& __x, _StrictWeakOrdering __comp) > > > > { > > > if (this != std::__addressof(__x)) > { > _M_check_equal_allocators(__x); > > iterator __first1 = begin(); > iterator __last1 = end(); > iterator __first2 = __x.begin(); > iterator __last2 = __x.end(); > > const _Finalize_merge __fin(*this, __x, __first2); > > while (__first1 != __last1 && __first2 != __last2) > if (__comp(*__first2, *__first1)) > { > iterator __next = __first2; > _M_transfer(__first1, __first2, ++__next); > __first2 = __next; > } > else > ++__first1; > if (__first2 != __last2) > { > _M_transfer(__last1, __first2, __last2); > __first2 = __last2; > } > } > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > sort() > { > > if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node > && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) > { > using __detail::_Scratch_list; ># 497 "/usr/include/c++/13/bits/list.tcc" 3 > _Scratch_list __carry; > _Scratch_list __tmp[64]; > _Scratch_list* __fill = __tmp; > _Scratch_list* __counter; > > _Scratch_list::_Ptr_cmp<iterator, void> __ptr_comp; > > try > { > do > { > __carry._M_take_one(begin()._M_node); > > for(__counter = __tmp; > __counter != __fill && !__counter->empty(); > ++__counter) > { > > __counter->merge(__carry, __ptr_comp); > __carry.swap(*__counter); > } > __carry.swap(*__counter); > if (__counter == __fill) > ++__fill; > } > while ( !empty() ); > > for (__counter = __tmp + 1; __counter != __fill; ++__counter) > __counter->merge(__counter[-1], __ptr_comp); > __fill[-1].swap(this->_M_impl._M_node); > } > catch(...) > { > > __carry._M_put_all(end()._M_node); > for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) > __tmp[__i]._M_put_all(end()._M_node); > throw; > } > } > } > > template<typename _Tp, typename _Alloc> > template <typename _Predicate> > typename list<_Tp, _Alloc>::__remove_return_type > list<_Tp, _Alloc>:: > remove_if(_Predicate __pred) > { > > > > list __to_destroy(get_allocator()); > iterator __first = begin(); > iterator __last = end(); > while (__first != __last) > { > iterator __next = __first; > ++__next; > if (__pred(*__first)) > { > __to_destroy.splice(__to_destroy.begin(), *this, __first); > > > > } > __first = __next; > } > > > > > return ; > > } > > template<typename _Tp, typename _Alloc> > template <typename _BinaryPredicate> > typename list<_Tp, _Alloc>::__remove_return_type > list<_Tp, _Alloc>:: > unique(_BinaryPredicate __binary_pred) > { > iterator __first = begin(); > iterator __last = end(); > if (__first == __last) > return ; > > > > list __to_destroy(get_allocator()); > iterator __next = __first; > while (++__next != __last) > { > if (__binary_pred(*__first, *__next)) > { > __to_destroy.splice(__to_destroy.begin(), *this, __next); > > > > } > else > __first = __next; > __next = __first; > } > > > > > return ; > > } > > > > template<typename _Tp, typename _Alloc> > template <typename _StrictWeakOrdering> > void > list<_Tp, _Alloc>:: > sort(_StrictWeakOrdering __comp) > { > > if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node > && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) > { > using __detail::_Scratch_list; > _Scratch_list __carry; > _Scratch_list __tmp[64]; > _Scratch_list* __fill = __tmp; > _Scratch_list* __counter; > > _Scratch_list::_Ptr_cmp<iterator, _StrictWeakOrdering> __ptr_comp > = { __comp }; > > try > { > do > { > __carry._M_take_one(begin()._M_node); > > for(__counter = __tmp; > __counter != __fill && !__counter->empty(); > ++__counter) > { > > __counter->merge(__carry, __ptr_comp); > __carry.swap(*__counter); > } > __carry.swap(*__counter); > if (__counter == __fill) > ++__fill; > } > while ( !empty() ); > > for (__counter = __tmp + 1; __counter != __fill; ++__counter) > __counter->merge(__counter[-1], __ptr_comp); > __fill[-1].swap(this->_M_impl._M_node); > } > catch(...) > { > > __carry._M_put_all(end()._M_node); > for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) > __tmp[__i]._M_put_all(end()._M_node); > throw; > } > } > } > > > >} ># 67 "/usr/include/c++/13/list" 2 3 > > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > namespace pmr > { > template<typename _Tp> > using list = std::list<_Tp, polymorphic_allocator<_Tp>>; > } > >} ># 23 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 ># 1 "/usr/include/c++/13/iterator" 1 3 4 ># 58 "/usr/include/c++/13/iterator" 3 4 > ># 59 "/usr/include/c++/13/iterator" 3 > > > > > > ># 1 "/usr/include/c++/13/bits/stream_iterator.h" 1 3 ># 33 "/usr/include/c++/13/bits/stream_iterator.h" 3 > ># 34 "/usr/include/c++/13/bits/stream_iterator.h" 3 > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > > ># 50 "/usr/include/c++/13/bits/stream_iterator.h" 3 >#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) > : _M_stream(0), _M_value(), _M_ok(false) {} > > > istream_iterator(istream_type& __s) > : _M_stream(std::__addressof(__s)), _M_ok(true) > { _M_read(); } > > constexpr > istream_iterator(const istream_iterator& __obj) > noexcept(is_nothrow_copy_constructible<_Tp>::value) > : _M_stream(__obj._M_stream), _M_value(__obj._M_value), > _M_ok(__obj._M_ok) > { } ># 98 "/usr/include/c++/13/bits/stream_iterator.h" 3 > istream_iterator& operator=(const istream_iterator&) = default; > ~istream_iterator() = default; > > > [[__nodiscard__]] > const _Tp& > operator*() const noexcept > { > > > ; > return _M_value; > } > > [[__nodiscard__]] > const _Tp* > operator->() const noexcept > { return std::__addressof((operator*())); } > > istream_iterator& > operator++() > { > > > ; > _M_read(); > return *this; > } > > istream_iterator > operator++(int) > { > > > ; > istream_iterator __tmp = *this; > _M_read(); > return __tmp; > } > > 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& __x, const istream_iterator& __y) > noexcept > { return !__x._M_equal(__y); } ># 181 "/usr/include/c++/13/bits/stream_iterator.h" 3 > }; ># 194 "/usr/include/c++/13/bits/stream_iterator.h" 3 > template<typename _Tp, typename _CharT = char, > typename _Traits = char_traits<_CharT> > > class ostream_iterator > : public iterator<output_iterator_tag, void, void, void, void> > { > public: > > > > > > 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) {} ># 229 "/usr/include/c++/13/bits/stream_iterator.h" 3 > ostream_iterator(ostream_type& __s, const _CharT* __c) noexcept > : _M_stream(std::__addressof(__s)), _M_string(__c) { } > > > ostream_iterator(const ostream_iterator& __obj) noexcept > : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } > > > ostream_iterator& operator=(const ostream_iterator&) = default; > > > > > ostream_iterator& > operator=(const _Tp& __value) > { > > > ; > *_M_stream << __value; > if (_M_string) > *_M_stream << _M_string; > return *this; > } > > [[__nodiscard__]] > ostream_iterator& > operator*() noexcept > { return *this; } > > ostream_iterator& > operator++() noexcept > { return *this; } > > ostream_iterator& > operator++(int) noexcept > { return *this; } > }; >#pragma GCC diagnostic pop > > > > >} ># 66 "/usr/include/c++/13/iterator" 2 3 ># 24 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 > ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 26 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 > ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 > ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 28 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 > >namespace boost { >namespace filesystem { > > const system::error_category& codecvt_error_category(); ># 43 "/usr/include/boost/filesystem/path_traits.hpp" 3 4 >class directory_entry; > >namespace path_traits { > >typedef std::codecvt< wchar_t, char, std::mbstate_t > codecvt_type; > > > >template< class T > >struct is_pathable >{ > static const bool value = false; >}; > >template<> >struct is_pathable< char* > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< const char* > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< wchar_t* > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< const wchar_t* > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< std::string > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< std::wstring > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< std::vector< char > > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< std::vector< wchar_t > > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< std::list< char > > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< std::list< wchar_t > > >{ > static const bool value = true; >}; > >template<> >struct is_pathable< directory_entry > >{ > static const bool value = true; >}; > > > >template< class Container > >inline > > > typename boost::disable_if< boost::is_array< Container >, bool >::type > empty(Container const& c) >{ > return c.begin() == c.end(); >} > >template< class T > >inline bool empty(T* const& c_str) >{ > (static_cast <bool> (c_str) ? void (0) : __assert_fail ("c_str", "/usr/include/boost/filesystem/path_traits.hpp", 138, __extension__ __PRETTY_FUNCTION__)); > return !*c_str; >} > >template< typename T, std::size_t N > >inline bool empty(T (&x)[N]) >{ > return !x[0]; >} > > > > > > > > >void convert(const char* from, > const char* from_end, > std::wstring& to, codecvt_type const& cvt); > > >void convert(const wchar_t* from, > const wchar_t* from_end, > std::string& to, codecvt_type const& cvt); > >inline void convert(const char* from, std::wstring& to, codecvt_type const& cvt) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 166, __extension__ __PRETTY_FUNCTION__)); > convert(from, 0, to, cvt); >} > >inline void convert(const wchar_t* from, std::string& to, codecvt_type const& cvt) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 172, __extension__ __PRETTY_FUNCTION__)); > convert(from, 0, to, cvt); >} > > > >inline void convert(const char* from, > const char* from_end, > std::wstring& to); > >inline void convert(const wchar_t* from, > const wchar_t* from_end, > std::string& to); > >inline void convert(const char* from, std::wstring& to); > >inline void convert(const wchar_t* from, std::string& to); > > > > > >inline void convert(const char* from, const char* from_end, std::string& to, codecvt_type const&) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 196, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (from_end) ? void (0) : __assert_fail ("from_end", "/usr/include/boost/filesystem/path_traits.hpp", 197, __extension__ __PRETTY_FUNCTION__)); > to.append(from, from_end); >} > >inline void convert(const char* from, std::string& to, codecvt_type const&) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 203, __extension__ __PRETTY_FUNCTION__)); > to += from; >} > > > >inline void convert(const wchar_t* from, const wchar_t* from_end, std::wstring& to, codecvt_type const&) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 211, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (from_end) ? void (0) : __assert_fail ("from_end", "/usr/include/boost/filesystem/path_traits.hpp", 212, __extension__ __PRETTY_FUNCTION__)); > to.append(from, from_end); >} > >inline void convert(const wchar_t* from, std::wstring& to, codecvt_type const&) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 218, __extension__ __PRETTY_FUNCTION__)); > to += from; >} > > > >inline void convert(const char* from, const char* from_end, std::string& to) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 226, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (from_end) ? void (0) : __assert_fail ("from_end", "/usr/include/boost/filesystem/path_traits.hpp", 227, __extension__ __PRETTY_FUNCTION__)); > to.append(from, from_end); >} > >inline void convert(const char* from, std::string& to) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 233, __extension__ __PRETTY_FUNCTION__)); > to += from; >} > > > >inline void convert(const wchar_t* from, const wchar_t* from_end, std::wstring& to) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 241, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (from_end) ? void (0) : __assert_fail ("from_end", "/usr/include/boost/filesystem/path_traits.hpp", 242, __extension__ __PRETTY_FUNCTION__)); > to.append(from, from_end); >} > >inline void convert(const wchar_t* from, std::wstring& to) >{ > (static_cast <bool> (from) ? void (0) : __assert_fail ("from", "/usr/include/boost/filesystem/path_traits.hpp", 248, __extension__ __PRETTY_FUNCTION__)); > to += from; >} > > > > >template< class U > >inline void dispatch(std::string const& c, U& to, codecvt_type const& cvt) >{ > if (!c.empty()) > convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); >} >template< class U > >inline void dispatch(std::wstring const& c, U& to, codecvt_type const& cvt) >{ > if (!c.empty()) > convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); >} >template< class U > >inline void dispatch(std::vector< char > const& c, U& to, codecvt_type const& cvt) >{ > if (!c.empty()) > convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); >} >template< class U > >inline void dispatch(std::vector< wchar_t > const& c, U& to, codecvt_type const& cvt) >{ > if (!c.empty()) > convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); >} > > >template< class U > >inline void dispatch(std::string const& c, U& to) >{ > if (!c.empty()) > convert(&*c.begin(), &*c.begin() + c.size(), to); >} >template< class U > >inline void dispatch(std::wstring const& c, U& to) >{ > if (!c.empty()) > convert(&*c.begin(), &*c.begin() + c.size(), to); >} >template< class U > >inline void dispatch(std::vector< char > const& c, U& to) >{ > if (!c.empty()) > convert(&*c.begin(), &*c.begin() + c.size(), to); >} >template< class U > >inline void dispatch(std::vector< wchar_t > const& c, U& to) >{ > if (!c.empty()) > convert(&*c.begin(), &*c.begin() + c.size(), to); >} > > >template< class Container, class U > >inline > > > typename boost::disable_if< boost::is_array< Container >, void >::type > dispatch(Container const& c, U& to, codecvt_type const& cvt) >{ > if (!c.empty()) > { > std::basic_string< typename Container::value_type > s(c.begin(), c.end()); > convert(s.c_str(), s.c_str() + s.size(), to, cvt); > } >} > > >template< class T, class U > >inline void dispatch(T* const& c_str, U& to, codecvt_type const& cvt) >{ > > (static_cast <bool> (c_str) ? void (0) : __assert_fail ("c_str", "/usr/include/boost/filesystem/path_traits.hpp", 326, __extension__ __PRETTY_FUNCTION__)); > convert(c_str, to, cvt); >} > > > > > >void dispatch(directory_entry const& de, > > > > std::string& to, > > codecvt_type const&); > > >template< class Container, class U > >inline > > > typename boost::disable_if< boost::is_array< Container >, void >::type > dispatch(Container const& c, U& to) >{ > if (!c.empty()) > { > std::basic_string< typename Container::value_type > seq(c.begin(), c.end()); > convert(seq.c_str(), seq.c_str() + seq.size(), to); > } >} > > >template< class T, class U > >inline void dispatch(T* const& c_str, U& to) >{ > > (static_cast <bool> (c_str) ? void (0) : __assert_fail ("c_str", "/usr/include/boost/filesystem/path_traits.hpp", 362, __extension__ __PRETTY_FUNCTION__)); > convert(c_str, to); >} > > > > > >void dispatch(directory_entry const& de, > > > > std::string& to > >); > >} >} >} > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 383 "/usr/include/boost/filesystem/path_traits.hpp" 2 3 4 ># 22 "/usr/include/boost/filesystem/path.hpp" 2 3 4 ># 1 "/usr/include/boost/iterator/iterator_facade.hpp" 1 3 4 ># 11 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 ># 1 "/usr/include/boost/iterator/interoperable.hpp" 1 3 4 ># 10 "/usr/include/boost/iterator/interoperable.hpp" 3 4 ># 1 "/usr/include/boost/mpl/bool.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/bool.hpp" 3 4 ># 1 "/usr/include/boost/mpl/bool_fwd.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/bool_fwd.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/adl.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/config/adl.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/msvc.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/intel.hpp" 1 3 4 ># 19 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/gcc.hpp" 1 3 4 ># 20 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/workaround.hpp" 1 3 4 ># 21 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 ># 18 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 2 3 4 ># 33 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4 >namespace mpl_ { namespace aux {} } >namespace boost { namespace mpl { using namespace mpl_; >namespace aux { using namespace mpl_::aux; } >}} ># 18 "/usr/include/boost/mpl/bool_fwd.hpp" 2 3 4 > >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_; } } ># 18 "/usr/include/boost/mpl/bool.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/integral_c_tag.hpp" 1 3 4 ># 19 "/usr/include/boost/mpl/integral_c_tag.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/static_constant.hpp" 1 3 4 ># 20 "/usr/include/boost/mpl/integral_c_tag.hpp" 2 3 4 > >namespace mpl_ { >struct integral_c_tag { static const int value = 0; }; >} >namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } ># 19 "/usr/include/boost/mpl/bool.hpp" 2 3 4 > > >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 { return this->value; } >}; > > >template< bool C_ > >bool const bool_<C_>::value; > > >} ># 11 "/usr/include/boost/iterator/interoperable.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/or.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/or.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/use_preprocessed.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/or.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/mpl/aux_/nested_type_wknd.hpp" 1 3 4 ># 25 "/usr/include/boost/mpl/aux_/nested_type_wknd.hpp" 3 4 >namespace boost { namespace mpl { namespace aux { >template< typename T > struct nested_type_wknd > : T::type >{ >}; >}}} ># 24 "/usr/include/boost/mpl/or.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/na_spec.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/na_spec.hpp" 3 4 ># 1 "/usr/include/boost/mpl/lambda_fwd.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/lambda_fwd.hpp" 3 4 ># 1 "/usr/include/boost/mpl/void_fwd.hpp" 1 3 4 ># 19 "/usr/include/boost/mpl/void_fwd.hpp" 3 4 >namespace mpl_ { > >struct void_; > >} >namespace boost { namespace mpl { using ::mpl_::void_; } } ># 18 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/na.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/na.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 1 3 4 ># 19 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 3 4 >namespace mpl_ { > > >struct na >{ > typedef na type; > enum { value = 0 }; >}; > >} >namespace boost { namespace mpl { using ::mpl_::na; } } ># 19 "/usr/include/boost/mpl/aux_/na.hpp" 2 3 4 > ># 1 "/usr/include/boost/mpl/aux_/config/ctps.hpp" 1 3 4 ># 21 "/usr/include/boost/mpl/aux_/na.hpp" 2 3 4 > >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; >}; ># 93 "/usr/include/boost/mpl/aux_/na.hpp" 3 4 >}} ># 19 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 2 3 4 ># 20 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/mpl/int.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/int.hpp" 3 4 ># 1 "/usr/include/boost/mpl/int_fwd.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/int_fwd.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/nttp.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 2 3 4 ># 19 "/usr/include/boost/mpl/int_fwd.hpp" 2 3 4 > >namespace mpl_ { > >template< int N > struct int_; > >} >namespace boost { namespace mpl { using ::mpl_::int_; } } ># 18 "/usr/include/boost/mpl/int.hpp" 2 3 4 > > ># 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/static_cast.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/preprocessor/cat.hpp" 1 3 4 ># 17 "/usr/include/boost/preprocessor/cat.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/config/config.hpp" 1 3 4 ># 18 "/usr/include/boost/preprocessor/cat.hpp" 2 3 4 ># 23 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 ># 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 >namespace mpl_ { > >template< int N > >struct int_ >{ > static const int value = N; > > > > > > typedef int_ type; > > typedef int value_type; > typedef integral_c_tag tag; ># 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 > typedef mpl_::int_< static_cast<int>((value + 1)) > next; > typedef mpl_::int_< static_cast<int>((value - 1)) > prior; > > > > > > > constexpr operator int() const { return static_cast<int>(this->value); } >}; > > >template< int N > >int const mpl_::int_< N >::value; > > >} ># 21 "/usr/include/boost/mpl/int.hpp" 2 3 4 ># 24 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/lambda_arity_param.hpp" 1 3 4 ># 25 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 3 4 >namespace boost { namespace mpl { namespace aux { > >template< typename F > struct template_arity; > >}}} ># 26 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 > >namespace boost { namespace mpl { > >template< > typename T = na > , typename Tag = void_ > , typename Arity = int_< aux::template_arity<T>::value > > > > > >struct lambda; > >}} ># 19 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/mpl/aux_/arity.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/arity.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/dtp.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/arity.hpp" 2 3 4 ># 23 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/preprocessor.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 ># 49 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/comma_if.hpp" 1 3 4 ># 15 "/usr/include/boost/preprocessor/comma_if.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 1 3 4 ># 18 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/control/if.hpp" 1 3 4 ># 18 "/usr/include/boost/preprocessor/control/if.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/control/iif.hpp" 1 3 4 ># 19 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/logical/bool.hpp" 1 3 4 ># 293 "/usr/include/boost/preprocessor/logical/bool.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/config/limits.hpp" 1 3 4 ># 294 "/usr/include/boost/preprocessor/logical/bool.hpp" 2 3 4 > > ># 1 "/usr/include/boost/preprocessor/logical/limits/bool_256.hpp" 1 3 4 ># 297 "/usr/include/boost/preprocessor/logical/bool.hpp" 2 3 4 ># 20 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4 ># 19 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/facilities/empty.hpp" 1 3 4 ># 20 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/punctuation/comma.hpp" 1 3 4 ># 21 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 ># 16 "/usr/include/boost/preprocessor/comma_if.hpp" 2 3 4 ># 50 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/repeat.hpp" 1 3 4 ># 15 "/usr/include/boost/preprocessor/repeat.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 1 3 4 ># 20 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/debug/error.hpp" 1 3 4 ># 21 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 ># 318 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp" 1 3 4 ># 319 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 2 3 4 ># 22 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/tuple/eat.hpp" 1 3 4 ># 23 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 ># 833 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp" 1 3 4 ># 834 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 ># 16 "/usr/include/boost/preprocessor/repeat.hpp" 2 3 4 ># 51 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/inc.hpp" 1 3 4 ># 15 "/usr/include/boost/preprocessor/inc.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/inc.hpp" 1 3 4 ># 307 "/usr/include/boost/preprocessor/arithmetic/inc.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp" 1 3 4 ># 308 "/usr/include/boost/preprocessor/arithmetic/inc.hpp" 2 3 4 ># 16 "/usr/include/boost/preprocessor/inc.hpp" 2 3 4 ># 52 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 ># 27 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessor/enum.hpp" 1 3 4 ># 28 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4 ># 1 "/usr/include/boost/mpl/limits/arity.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/preprocessor/logical/and.hpp" 1 3 4 ># 19 "/usr/include/boost/preprocessor/logical/and.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/logical/bitand.hpp" 1 3 4 ># 20 "/usr/include/boost/preprocessor/logical/and.hpp" 2 3 4 ># 23 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/identity.hpp" 1 3 4 ># 15 "/usr/include/boost/preprocessor/identity.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/facilities/identity.hpp" 1 3 4 ># 16 "/usr/include/boost/preprocessor/identity.hpp" 2 3 4 ># 24 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/empty.hpp" 1 3 4 ># 25 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 ># 66 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 1 3 4 ># 57 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/dec.hpp" 1 3 4 ># 308 "/usr/include/boost/preprocessor/arithmetic/dec.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp" 1 3 4 ># 309 "/usr/include/boost/preprocessor/arithmetic/dec.hpp" 2 3 4 ># 58 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 > > ># 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 ># 322 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 ># 323 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/list/fold_left.hpp" 1 3 4 ># 312 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 ># 313 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 > ># 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 ># 315 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 ># 345 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 1 3 4 ># 286 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/control/expr_iif.hpp" 1 3 4 ># 287 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 > ># 1 "/usr/include/boost/preprocessor/list/adt.hpp" 1 3 4 ># 18 "/usr/include/boost/preprocessor/list/adt.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 1 3 4 ># 16 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/check.hpp" 1 3 4 ># 17 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 2 3 4 ># 19 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/logical/compl.hpp" 1 3 4 ># 20 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4 ># 289 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp" 1 3 4 ># 294 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 ># 346 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/preprocessor/list/limits/fold_left_256.hpp" 1 3 4 ># 352 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 ># 324 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/list/fold_right.hpp" 1 3 4 ># 51 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 ># 52 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 ># 79 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 1 3 4 ># 285 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/list/reverse.hpp" 1 3 4 ># 286 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp" 1 3 4 ># 290 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 2 3 4 ># 80 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 ># 325 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 ># 361 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/control/detail/while.hpp" 1 3 4 ># 549 "/usr/include/boost/preprocessor/control/detail/while.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/control/detail/limits/while_256.hpp" 1 3 4 ># 550 "/usr/include/boost/preprocessor/control/detail/while.hpp" 2 3 4 ># 362 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 ># 375 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/control/limits/while_256.hpp" 1 3 4 ># 376 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 ># 61 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 > > ># 1 "/usr/include/boost/preprocessor/logical/bitor.hpp" 1 3 4 ># 64 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 > > ># 1 "/usr/include/boost/preprocessor/tuple/elem.hpp" 1 3 4 ># 20 "/usr/include/boost/preprocessor/tuple/elem.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/facilities/expand.hpp" 1 3 4 ># 21 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/facilities/overload.hpp" 1 3 4 ># 17 "/usr/include/boost/preprocessor/facilities/overload.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/variadic/size.hpp" 1 3 4 ># 21 "/usr/include/boost/preprocessor/variadic/size.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/facilities/check_empty.hpp" 1 3 4 ># 14 "/usr/include/boost/preprocessor/facilities/check_empty.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/variadic/has_opt.hpp" 1 3 4 ># 15 "/usr/include/boost/preprocessor/facilities/check_empty.hpp" 2 3 4 ># 22 "/usr/include/boost/preprocessor/variadic/size.hpp" 2 3 4 ># 54 "/usr/include/boost/preprocessor/variadic/size.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/variadic/limits/size_64.hpp" 1 3 4 ># 55 "/usr/include/boost/preprocessor/variadic/size.hpp" 2 3 4 ># 18 "/usr/include/boost/preprocessor/facilities/overload.hpp" 2 3 4 ># 22 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/tuple/rem.hpp" 1 3 4 ># 22 "/usr/include/boost/preprocessor/tuple/rem.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp" 1 3 4 ># 23 "/usr/include/boost/preprocessor/tuple/rem.hpp" 2 3 4 ># 23 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/variadic/elem.hpp" 1 3 4 ># 102 "/usr/include/boost/preprocessor/variadic/elem.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/variadic/limits/elem_64.hpp" 1 3 4 ># 103 "/usr/include/boost/preprocessor/variadic/elem.hpp" 2 3 4 ># 24 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 ># 67 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp" 1 3 4 ># 17 "/usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/comparison/equal.hpp" 1 3 4 ># 17 "/usr/include/boost/preprocessor/comparison/equal.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/comparison/not_equal.hpp" 1 3 4 ># 843 "/usr/include/boost/preprocessor/comparison/not_equal.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp" 1 3 4 ># 844 "/usr/include/boost/preprocessor/comparison/not_equal.hpp" 2 3 4 ># 18 "/usr/include/boost/preprocessor/comparison/equal.hpp" 2 3 4 ># 18 "/usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp" 1 3 4 ># 19 "/usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp" 2 3 4 ># 68 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp" 1 3 4 ># 17 "/usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/logical/not.hpp" 1 3 4 ># 18 "/usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp" 2 3 4 ># 69 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 ># 67 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/sub.hpp" 1 3 4 ># 68 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 ># 29 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 > > ># 1 "/usr/include/boost/mpl/aux_/config/eti.hpp" 1 3 4 ># 32 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/mpl/aux_/config/overload_resolution.hpp" 1 3 4 ># 36 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 ># 25 "/usr/include/boost/mpl/or.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 1 3 4 ># 26 "/usr/include/boost/mpl/or.hpp" 2 3 4 ># 43 "/usr/include/boost/mpl/or.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 16 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/compiler.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/preprocessor/stringize.hpp" 1 3 4 ># 21 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp" 3 4 >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> { }; } > > > > > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 44 "/usr/include/boost/mpl/or.hpp" 2 3 4 ># 12 "/usr/include/boost/iterator/interoperable.hpp" 2 3 4 > ># 1 "/usr/include/boost/type_traits/is_convertible.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/intrinsics.hpp" 1 3 4 ># 16 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 > ># 1 "/usr/include/boost/type_traits/is_complete.hpp" 1 3 4 ># 12 "/usr/include/boost/type_traits/is_complete.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/declval.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/declval.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_void.hpp" 1 3 4 ># 14 "/usr/include/boost/type_traits/is_void.hpp" 3 4 >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{}; > >} ># 16 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_reference.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/is_reference.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 1 3 4 ># 26 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 3 4 >namespace boost { > > > > > > template <class T> struct is_lvalue_reference : public false_type{}; > template <class T> struct is_lvalue_reference<T&> : public true_type{}; ># 47 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 3 4 >} ># 16 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_rvalue_reference.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/is_rvalue_reference.hpp" 3 4 >namespace boost { > >template <class T> struct is_rvalue_reference : public false_type {}; > >template <class T> struct is_rvalue_reference<T&&> : public true_type {}; > > >} ># 17 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 > >namespace boost { > >template <class T> struct is_reference > : public > integral_constant< > bool, > ::boost::is_lvalue_reference<T>::value || ::boost::is_rvalue_reference<T>::value> >{}; > >} ># 17 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 2 3 4 ># 31 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 3 4 >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; > > > >} ># 16 "/usr/include/boost/type_traits/declval.hpp" 2 3 4 ># 37 "/usr/include/boost/type_traits/declval.hpp" 3 4 >namespace boost { > > template <typename T> > typename add_rvalue_reference<T>::type declval() noexcept; > >} ># 13 "/usr/include/boost/type_traits/is_complete.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 1 3 4 ># 14 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 3 4 >namespace boost { >namespace type_traits { > >typedef char yes_type; >struct no_type >{ > char padding[8]; >}; > >} >} ># 17 "/usr/include/boost/type_traits/is_complete.hpp" 2 3 4 ># 31 "/usr/include/boost/type_traits/is_complete.hpp" 3 4 >namespace boost { ># 41 "/usr/include/boost/type_traits/is_complete.hpp" 3 4 > namespace detail{ > > template <unsigned 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))> {}; ># 90 "/usr/include/boost/type_traits/is_complete.hpp" 3 4 >} ># 18 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 > > ># 1 "/usr/include/boost/static_assert.hpp" 1 3 4 ># 21 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/type_traits/is_arithmetic.hpp" 1 3 4 ># 12 "/usr/include/boost/type_traits/is_arithmetic.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_integral.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 >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{}; ># 67 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 >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{}; > > > > >} ># 13 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_floating_point.hpp" 1 3 4 ># 13 "/usr/include/boost/type_traits/is_floating_point.hpp" 3 4 >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{}; > > > > > >} ># 14 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4 > >namespace boost { > >template <class T> >struct is_arithmetic : public integral_constant<bool, is_integral<T>::value || is_floating_point<T>::value> {}; > >} ># 26 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 > > ># 1 "/usr/include/boost/type_traits/is_abstract.hpp" 1 3 4 ># 63 "/usr/include/boost/type_traits/is_abstract.hpp" 3 4 >namespace boost { > >namespace detail{ > > >template <class T> >struct is_abstract_imp >{ > static const bool value = __is_abstract(T); >}; ># 140 "/usr/include/boost/type_traits/is_abstract.hpp" 3 4 >} > > >template <class T> struct is_abstract : public integral_constant<bool, ::boost::detail::is_abstract_imp<T>::value> {}; > > > > >} ># 29 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 > ># 1 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 1 3 4 ># 9 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/add_reference.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/add_reference.hpp" 3 4 >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; > > > > >} ># 10 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 2 3 4 > >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; > > > >} ># 31 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 ># 45 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 >namespace boost { ># 59 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 >namespace detail { > > > > > > > > template <class A, class B, class C> > struct or_helper > { > static const bool value = (A::value || B::value || C::value); > }; > > template<typename From, typename To, bool b = or_helper<boost::is_void<From>, boost::is_function<To>, boost::is_array<To> >::value> > struct is_convertible_basic_impl > { > > static const bool value = is_void<To>::value; > }; > > template<typename From, typename To> > class is_convertible_basic_impl<From, To, false> > { > typedef char one; > typedef int two; > > template<typename To1> > static void test_aux(To1); > > template<typename From1, typename To1> > static decltype(test_aux<To1>(boost::declval<From1>()), one()) test(int); > > template<typename, typename> > static two test(...); > > public: > static const bool value = sizeof(test<From, To>(0)) == 1; > }; ># 362 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 >template <typename From, typename To> >struct is_convertible_impl >{ > static const bool value = ( ::boost::detail::is_convertible_basic_impl<From, To>::value && !::boost::is_array<To>::value && !::boost::is_function<To>::value); >}; > > >template <bool trivial1, bool trivial2, bool abstract_target> >struct is_convertible_impl_select >{ > template <class From, class To> > struct rebind > { > typedef is_convertible_impl<From, To> type; > }; >}; > >template <> >struct is_convertible_impl_select<true, true, false> >{ > template <class From, class To> > struct rebind > { > typedef true_type type; > }; >}; > >template <> >struct is_convertible_impl_select<false, false, true> >{ > template <class From, class To> > struct rebind > { > typedef false_type type; > }; >}; > >template <> >struct is_convertible_impl_select<true, false, true> >{ > template <class From, class To> > struct rebind > { > typedef false_type type; > }; >}; > >template <typename From, typename To> >struct is_convertible_impl_dispatch_base >{ > > typedef is_convertible_impl_select< > ::boost::is_arithmetic<From>::value, > ::boost::is_arithmetic<To>::value, > > > > > false > > > selector; > > > > typedef typename selector::template rebind<From, To> isc_binder; > typedef typename isc_binder::type type; >}; > >template <typename From, typename To> >struct is_convertible_impl_dispatch > : public is_convertible_impl_dispatch_base<From, To>::type >{}; ># 442 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 >template <> struct is_convertible_impl_dispatch<void, void> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void, void const> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void, void const volatile> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void, void volatile> : public true_type{}; > >template <> struct is_convertible_impl_dispatch<void const, void> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void const, void const> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void const, void const volatile> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void const, void volatile> : public true_type{}; > >template <> struct is_convertible_impl_dispatch<void const volatile, void> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void const volatile, void const> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void const volatile, void const volatile> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void const volatile, void volatile> : public true_type{}; > >template <> struct is_convertible_impl_dispatch<void volatile, void> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void volatile, void const> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void volatile, void const volatile> : public true_type{}; >template <> struct is_convertible_impl_dispatch<void volatile, void volatile> : public true_type{}; > > > > > >template <class To> struct is_convertible_impl_dispatch<void, To> : public false_type{}; >template <class From> struct is_convertible_impl_dispatch<From, void> : public false_type{}; > > >template <class To> struct is_convertible_impl_dispatch<void const, To> : public false_type{}; >template <class From> struct is_convertible_impl_dispatch<From, void const> : public false_type{}; >template <class To> struct is_convertible_impl_dispatch<void const volatile, To> : public false_type{}; >template <class From> struct is_convertible_impl_dispatch<From, void const volatile> : public false_type{}; >template <class To> struct is_convertible_impl_dispatch<void volatile, To> : public false_type{}; >template <class From> struct is_convertible_impl_dispatch<From, void volatile> : public false_type{}; > > >} > >template <class From, class To> >struct is_convertible : public integral_constant<bool, ::boost::detail::is_convertible_impl_dispatch<From, To>::value> >{ > 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"); >}; ># 504 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 >} ># 14 "/usr/include/boost/iterator/interoperable.hpp" 2 3 4 > ># 1 "/usr/include/boost/iterator/detail/config_def.hpp" 1 3 4 ># 16 "/usr/include/boost/iterator/interoperable.hpp" 2 3 4 > >namespace boost { >namespace iterators { ># 34 "/usr/include/boost/iterator/interoperable.hpp" 3 4 > template <typename A, typename B> > struct is_interoperable > > > > : mpl::or_< > is_convertible< A, B > > , is_convertible< B, A > > > > { > }; > >} > >using iterators::is_interoperable; > >} > ># 1 "/usr/include/boost/iterator/detail/config_undef.hpp" 1 3 4 ># 53 "/usr/include/boost/iterator/interoperable.hpp" 2 3 4 ># 12 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 ># 1 "/usr/include/boost/iterator/iterator_traits.hpp" 1 3 4 ># 12 "/usr/include/boost/iterator/iterator_traits.hpp" 3 4 >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; > >} ># 13 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 ># 1 "/usr/include/boost/iterator/iterator_categories.hpp" 1 3 4 ># 10 "/usr/include/boost/iterator/iterator_categories.hpp" 3 4 ># 1 "/usr/include/boost/iterator/detail/config_def.hpp" 1 3 4 ># 11 "/usr/include/boost/iterator/iterator_categories.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/mpl/eval_if.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/eval_if.hpp" 3 4 ># 1 "/usr/include/boost/mpl/if.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/if.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/integral.hpp" 1 3 4 ># 19 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 2 3 4 ># 73 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 >namespace boost { namespace mpl { namespace aux { > >template< typename T > struct value_type_wknd >{ > typedef typename T::value_type type; >}; ># 87 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 >}}} ># 18 "/usr/include/boost/mpl/if.hpp" 2 3 4 > > > > > > > >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; > > >}; ># 131 "/usr/include/boost/mpl/if.hpp" 3 4 >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> { }; } > >}} ># 18 "/usr/include/boost/mpl/eval_if.hpp" 2 3 4 > > > > > > >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> { }; } > >}} ># 15 "/usr/include/boost/iterator/iterator_categories.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/identity.hpp" 1 3 4 ># 20 "/usr/include/boost/mpl/identity.hpp" 3 4 >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> { }; } > >}} ># 16 "/usr/include/boost/iterator/iterator_categories.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/placeholders.hpp" 1 3 4 ># 24 "/usr/include/boost/mpl/placeholders.hpp" 3 4 ># 1 "/usr/include/boost/mpl/arg.hpp" 1 3 4 ># 23 "/usr/include/boost/mpl/arg.hpp" 3 4 ># 1 "/usr/include/boost/mpl/arg_fwd.hpp" 1 3 4 ># 21 "/usr/include/boost/mpl/arg_fwd.hpp" 3 4 >namespace mpl_ { > >template< int N > struct arg; > >} >namespace boost { namespace mpl { using ::mpl_::arg; } } ># 24 "/usr/include/boost/mpl/arg.hpp" 2 3 4 > ># 1 "/usr/include/boost/mpl/aux_/na_assert.hpp" 1 3 4 ># 23 "/usr/include/boost/mpl/aux_/na_assert.hpp" 3 4 ># 1 "/usr/include/boost/mpl/assert.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/assert.hpp" 3 4 ># 1 "/usr/include/boost/mpl/not.hpp" 1 3 4 ># 23 "/usr/include/boost/mpl/not.hpp" 3 4 >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> { }; } > >}} ># 18 "/usr/include/boost/mpl/assert.hpp" 2 3 4 > > ># 1 "/usr/include/boost/mpl/aux_/yes_no.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/arrays.hpp" 1 3 4 ># 19 "/usr/include/boost/mpl/aux_/yes_no.hpp" 2 3 4 > > > > >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< long n > struct weighted_tag >{ > > typedef char (&type)[n]; > > > > >}; ># 56 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4 >}}} ># 21 "/usr/include/boost/mpl/assert.hpp" 2 3 4 > > > > > > > ># 1 "/usr/include/boost/mpl/aux_/config/gpu.hpp" 1 3 4 ># 29 "/usr/include/boost/mpl/assert.hpp" 2 3 4 > ># 1 "/usr/include/boost/mpl/aux_/config/pp_counter.hpp" 1 3 4 ># 31 "/usr/include/boost/mpl/assert.hpp" 2 3 4 ># 66 "/usr/include/boost/mpl/assert.hpp" 3 4 >namespace mpl_ { > >struct failed {}; ># 79 "/usr/include/boost/mpl/assert.hpp" 3 4 >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 }; >}; ># 127 "/usr/include/boost/mpl/assert.hpp" 3 4 >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 {}; ># 171 "/usr/include/boost/mpl/assert.hpp" 3 4 >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; >}; > > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wparentheses" > > >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 ) > ); > > > >#pragma GCC diagnostic pop > > >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 ); ># 257 "/usr/include/boost/mpl/assert.hpp" 3 4 >} ># 24 "/usr/include/boost/mpl/aux_/na_assert.hpp" 2 3 4 ># 26 "/usr/include/boost/mpl/arg.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/arity_spec.hpp" 1 3 4 ># 27 "/usr/include/boost/mpl/arg.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/arg_typedef.hpp" 1 3 4 ># 28 "/usr/include/boost/mpl/arg.hpp" 2 3 4 ># 37 "/usr/include/boost/mpl/arg.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp" 1 3 4 ># 13 "/usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp" 3 4 >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>))0, 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>))0, 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>))0, 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>))0, 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>))0, 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>))0, 1 ) ) ) }; > }; >}; > > > >} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 38 "/usr/include/boost/mpl/arg.hpp" 2 3 4 ># 25 "/usr/include/boost/mpl/placeholders.hpp" 2 3 4 ># 43 "/usr/include/boost/mpl/placeholders.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp" 1 3 4 ># 13 "/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp" 3 4 >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; >} > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 44 "/usr/include/boost/mpl/placeholders.hpp" 2 3 4 ># 17 "/usr/include/boost/iterator/iterator_categories.hpp" 2 3 4 ># 25 "/usr/include/boost/iterator/iterator_categories.hpp" 3 4 >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 > > >{}; ># 146 "/usr/include/boost/iterator/iterator_categories.hpp" 3 4 >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> >{}; ># 194 "/usr/include/boost/iterator/iterator_categories.hpp" 3 4 >} > >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; >} > >} > ># 1 "/usr/include/boost/iterator/detail/config_undef.hpp" 1 3 4 ># 215 "/usr/include/boost/iterator/iterator_categories.hpp" 2 3 4 ># 14 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 > ># 1 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 1 3 4 > > > > > > ># 1 "/usr/include/boost/core/use_default.hpp" 1 3 4 ># 11 "/usr/include/boost/core/use_default.hpp" 3 4 >namespace boost { > >struct use_default { }; > >} ># 8 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/mpl/and.hpp" 1 3 4 ># 42 "/usr/include/boost/mpl/and.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp" 3 4 >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> { }; } > > > > > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 43 "/usr/include/boost/mpl/and.hpp" 2 3 4 ># 13 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/type_traits/is_same.hpp" 1 3 4 ># 26 "/usr/include/boost/type_traits/is_same.hpp" 3 4 >namespace boost { > > > template <class T, class U> struct is_same : public false_type {}; > template <class T> struct is_same<T,T> : public true_type {}; > > > > > > > >} ># 19 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_const.hpp" 1 3 4 ># 27 "/usr/include/boost/type_traits/is_const.hpp" 3 4 >namespace boost { ># 36 "/usr/include/boost/type_traits/is_const.hpp" 3 4 > 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{}; > > > >} ># 20 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/iterator/detail/config_def.hpp" 1 3 4 ># 26 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 2 3 4 > > ># 1 "/usr/include/boost/detail/indirect_traits.hpp" 1 3 4 ># 10 "/usr/include/boost/detail/indirect_traits.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_pointer.hpp" 1 3 4 ># 26 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 >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{}; ># 45 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 >} ># 11 "/usr/include/boost/detail/indirect_traits.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_class.hpp" 1 3 4 ># 31 "/usr/include/boost/type_traits/is_class.hpp" 3 4 >namespace boost { > >namespace detail { ># 96 "/usr/include/boost/type_traits/is_class.hpp" 3 4 >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> {}; > > > > > > >} ># 12 "/usr/include/boost/detail/indirect_traits.hpp" 2 3 4 > ># 1 "/usr/include/boost/type_traits/is_volatile.hpp" 1 3 4 ># 27 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4 >namespace boost { ># 36 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4 > 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{}; > > > >} ># 14 "/usr/include/boost/detail/indirect_traits.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 1 3 4 ># 18 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp" 1 3 4 ># 16 "/usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp" 3 4 >namespace boost { ># 25 "/usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp" 3 4 > 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> {}; ># 47 "/usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp" 3 4 > 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 {}; ># 695 "/usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp" 3 4 >} ># 19 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 2 3 4 ># 15 "/usr/include/boost/detail/indirect_traits.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_member_pointer.hpp" 1 3 4 ># 27 "/usr/include/boost/type_traits/is_member_pointer.hpp" 3 4 >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{}; > > > > >} ># 16 "/usr/include/boost/detail/indirect_traits.hpp" 2 3 4 > > ># 1 "/usr/include/boost/type_traits/remove_pointer.hpp" 1 3 4 ># 20 "/usr/include/boost/type_traits/remove_pointer.hpp" 3 4 >namespace boost { ># 68 "/usr/include/boost/type_traits/remove_pointer.hpp" 3 4 >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; > > > >} ># 19 "/usr/include/boost/detail/indirect_traits.hpp" 2 3 4 > > ># 1 "/usr/include/boost/detail/select_type.hpp" 1 3 4 ># 16 "/usr/include/boost/detail/select_type.hpp" 3 4 >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; }; > }; >}} ># 22 "/usr/include/boost/detail/indirect_traits.hpp" 2 3 4 > > >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 >{ >}; ># 45 "/usr/include/boost/detail/indirect_traits.hpp" 3 4 >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 >{ >}; ># 137 "/usr/include/boost/detail/indirect_traits.hpp" 3 4 >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; > >}} ># 29 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 2 3 4 > > > > > > >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 > { > return std::output_iterator_tag(); > } >}; > > > > > > >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> > > > > > >{}; ># 84 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 3 4 >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 >{ > > > > enum { mpl_assertion_in_line_142 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) ( is_convertible< typename iterator_category_to_traversal<Category>::type , Traversal >))0, 1 ) ) ) } > > > > ; > > enum { mpl_assertion_in_line_148 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (is_iterator_category<Category>))0, 1 ) ) ) }; > enum { mpl_assertion_in_line_149 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (is_iterator_category<Traversal>))0, 1 ) ) ) }; > enum { mpl_assertion_in_line_150 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (is_iterator_traversal<Category>))0, 1 ) ) ) }; > > enum { mpl_assertion_in_line_152 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (is_iterator_traversal<Traversal>))0, 1 ) ) ) }; > >}; > > > >template <class Traversal, class ValueParam, class Reference> >struct facade_iterator_category_impl >{ > enum { mpl_assertion_in_line_161 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (is_iterator_category<Traversal>))0, 1 ) ) ) }; > > 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> > > >{ >}; > >}}} > ># 1 "/usr/include/boost/iterator/detail/config_undef.hpp" 1 3 4 ># 193 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 2 3 4 ># 16 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 ># 1 "/usr/include/boost/iterator/detail/enable_if.hpp" 1 3 4 ># 13 "/usr/include/boost/iterator/detail/enable_if.hpp" 3 4 ># 1 "/usr/include/boost/iterator/detail/config_def.hpp" 1 3 4 ># 14 "/usr/include/boost/iterator/detail/enable_if.hpp" 2 3 4 > > > > > > > >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 > { ># 62 "/usr/include/boost/iterator/detail/enable_if.hpp" 3 4 > }; > }; > > > template <class Cond, > class Return> > struct enable_if > > : enabled<(Cond::value)>::template base<Return> > > > > { > }; > > } > >} > ># 1 "/usr/include/boost/iterator/detail/config_undef.hpp" 1 3 4 ># 82 "/usr/include/boost/iterator/detail/enable_if.hpp" 2 3 4 ># 17 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 > > ># 1 "/usr/include/boost/core/addressof.hpp" 1 3 4 ># 34 "/usr/include/boost/core/addressof.hpp" 3 4 >namespace boost { > >template<class T> >constexpr inline T* >addressof(T& o) noexcept >{ > return __builtin_addressof(o); >} > >} ># 266 "/usr/include/boost/core/addressof.hpp" 3 4 >namespace boost { > >template<class T> >const T* addressof(const T&&) = delete; > >} ># 20 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 > > ># 1 "/usr/include/boost/type_traits/add_const.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/add_const.hpp" 3 4 >namespace boost { ># 30 "/usr/include/boost/type_traits/add_const.hpp" 3 4 > 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; > > > >} ># 23 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 > > ># 1 "/usr/include/boost/type_traits/remove_const.hpp" 1 3 4 ># 18 "/usr/include/boost/type_traits/remove_const.hpp" 3 4 >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; > > > >} ># 26 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 > > ># 1 "/usr/include/boost/type_traits/is_pod.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/is_pod.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_scalar.hpp" 1 3 4 ># 13 "/usr/include/boost/type_traits/is_scalar.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_enum.hpp" 1 3 4 ># 32 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 >namespace boost { ># 160 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 >template <class T> struct is_enum : public integral_constant<bool, __is_enum(T)> {}; > > > >} ># 14 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4 > > > > >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> >{}; > >} ># 16 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4 ># 30 "/usr/include/boost/type_traits/is_pod.hpp" 3 4 >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>{}; > >} ># 29 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 > > > > > > ># 1 "/usr/include/boost/mpl/always.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/always.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessor/default_params.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/always.hpp" 2 3 4 > > > >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; > }; >}; > > > >}} ># 36 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/apply.hpp" 1 3 4 ># 22 "/usr/include/boost/mpl/apply.hpp" 3 4 ># 1 "/usr/include/boost/mpl/apply_fwd.hpp" 1 3 4 ># 31 "/usr/include/boost/mpl/apply_fwd.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp" 3 4 >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; > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 32 "/usr/include/boost/mpl/apply_fwd.hpp" 2 3 4 ># 23 "/usr/include/boost/mpl/apply.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 ># 23 "/usr/include/boost/mpl/apply_wrap.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/has_apply.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/aux_/has_apply.hpp" 3 4 ># 1 "/usr/include/boost/mpl/has_xxx.hpp" 1 3 4 ># 21 "/usr/include/boost/mpl/has_xxx.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 1 3 4 ># 20 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 3 4 >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; >}; > > > > > > > >}}} ># 22 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 > > ># 1 "/usr/include/boost/mpl/aux_/config/has_xxx.hpp" 1 3 4 ># 25 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/msvc_typename.hpp" 1 3 4 ># 26 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/preprocessor/array/elem.hpp" 1 3 4 ># 15 "/usr/include/boost/preprocessor/array/elem.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/array/data.hpp" 1 3 4 ># 16 "/usr/include/boost/preprocessor/array/elem.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/array/size.hpp" 1 3 4 ># 17 "/usr/include/boost/preprocessor/array/elem.hpp" 2 3 4 ># 31 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 > > ># 1 "/usr/include/boost/preprocessor/repetition/enum_params.hpp" 1 3 4 ># 34 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp" 1 3 4 ># 35 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 ># 18 "/usr/include/boost/mpl/aux_/has_apply.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/has_apply.hpp" 1 3 4 ># 19 "/usr/include/boost/mpl/aux_/has_apply.hpp" 2 3 4 > >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; }; > > > > > > > >}}} ># 24 "/usr/include/boost/mpl/apply_wrap.hpp" 2 3 4 > ># 1 "/usr/include/boost/mpl/aux_/msvc_never_true.hpp" 1 3 4 ># 26 "/usr/include/boost/mpl/apply_wrap.hpp" 2 3 4 ># 34 "/usr/include/boost/mpl/apply_wrap.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp" 3 4 >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 > >{ >}; > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 35 "/usr/include/boost/mpl/apply_wrap.hpp" 2 3 4 ># 24 "/usr/include/boost/mpl/apply.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/placeholders.hpp" 1 3 4 ># 25 "/usr/include/boost/mpl/apply.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/lambda.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/lambda.hpp" 3 4 ># 1 "/usr/include/boost/mpl/bind.hpp" 1 3 4 ># 23 "/usr/include/boost/mpl/bind.hpp" 3 4 ># 1 "/usr/include/boost/mpl/bind_fwd.hpp" 1 3 4 ># 25 "/usr/include/boost/mpl/bind_fwd.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/config/bind.hpp" 1 3 4 ># 26 "/usr/include/boost/mpl/bind_fwd.hpp" 2 3 4 > > > > > > ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp" 3 4 >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; > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 33 "/usr/include/boost/mpl/bind_fwd.hpp" 2 3 4 ># 24 "/usr/include/boost/mpl/bind.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/placeholders.hpp" 1 3 4 ># 25 "/usr/include/boost/mpl/bind.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/next.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/next.hpp" 3 4 ># 1 "/usr/include/boost/mpl/next_prior.hpp" 1 3 4 ># 17 "/usr/include/boost/mpl/next_prior.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/common_name_wknd.hpp" 1 3 4 ># 18 "/usr/include/boost/mpl/next_prior.hpp" 2 3 4 > > > >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> { }; } > >}} ># 18 "/usr/include/boost/mpl/next.hpp" 2 3 4 ># 26 "/usr/include/boost/mpl/bind.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/protect.hpp" 1 3 4 ># 23 "/usr/include/boost/mpl/protect.hpp" 3 4 >namespace boost { namespace mpl { > >template< > typename T = na > , int not_le_ = 0 > > >struct protect : T >{ > > > > typedef protect type; > >}; ># 48 "/usr/include/boost/mpl/protect.hpp" 3 4 >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> { }; } > > >}} ># 27 "/usr/include/boost/mpl/bind.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 ># 28 "/usr/include/boost/mpl/bind.hpp" 2 3 4 ># 50 "/usr/include/boost/mpl/bind.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp" 1 3 4 ># 13 "/usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp" 3 4 >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; > }; >}; > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 51 "/usr/include/boost/mpl/bind.hpp" 2 3 4 ># 19 "/usr/include/boost/mpl/lambda.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/mpl/aux_/full_lambda.hpp" 1 3 4 ># 23 "/usr/include/boost/mpl/aux_/full_lambda.hpp" 3 4 ># 1 "/usr/include/boost/mpl/bind_fwd.hpp" 1 3 4 ># 24 "/usr/include/boost/mpl/aux_/full_lambda.hpp" 2 3 4 > ># 1 "/usr/include/boost/mpl/quote.hpp" 1 3 4 ># 22 "/usr/include/boost/mpl/quote.hpp" 3 4 ># 1 "/usr/include/boost/mpl/void.hpp" 1 3 4 ># 23 "/usr/include/boost/mpl/void.hpp" 3 4 >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> { }; } > >}} ># 23 "/usr/include/boost/mpl/quote.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/aux_/has_type.hpp" 1 3 4 ># 19 "/usr/include/boost/mpl/aux_/has_type.hpp" 3 4 >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; }; >}}} ># 24 "/usr/include/boost/mpl/quote.hpp" 2 3 4 > > ># 1 "/usr/include/boost/mpl/aux_/config/bcc.hpp" 1 3 4 ># 27 "/usr/include/boost/mpl/quote.hpp" 2 3 4 ># 45 "/usr/include/boost/mpl/quote.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp" 3 4 >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 > > > > { > }; >}; > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 46 "/usr/include/boost/mpl/quote.hpp" 2 3 4 ># 26 "/usr/include/boost/mpl/aux_/full_lambda.hpp" 2 3 4 ># 1 "/usr/include/boost/mpl/arg.hpp" 1 3 4 ># 27 "/usr/include/boost/mpl/aux_/full_lambda.hpp" 2 3 4 > > ># 1 "/usr/include/boost/mpl/aux_/template_arity.hpp" 1 3 4 ># 43 "/usr/include/boost/mpl/aux_/template_arity.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp" 3 4 >namespace boost { namespace mpl { namespace aux { >template< int N > struct arity_tag >{ > typedef char (&type)[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; >}; > >}}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 44 "/usr/include/boost/mpl/aux_/template_arity.hpp" 2 3 4 ># 30 "/usr/include/boost/mpl/aux_/full_lambda.hpp" 2 3 4 ># 44 "/usr/include/boost/mpl/aux_/full_lambda.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp" 3 4 >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> { }; } > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 45 "/usr/include/boost/mpl/aux_/full_lambda.hpp" 2 3 4 ># 23 "/usr/include/boost/mpl/lambda.hpp" 2 3 4 ># 26 "/usr/include/boost/mpl/apply.hpp" 2 3 4 ># 36 "/usr/include/boost/mpl/apply.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 ># 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 ># 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp" 1 3 4 ># 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp" 3 4 >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 > >{ >}; > >}} ># 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 ># 37 "/usr/include/boost/mpl/apply.hpp" 2 3 4 ># 37 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/iterator/detail/config_def.hpp" 1 3 4 ># 42 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 > >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; ># 145 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 > }; > > > > > > > > template <class Iterator> > class postfix_increment_proxy > { > typedef typename iterator_value<Iterator>::type value_type; > public: > explicit postfix_increment_proxy(Iterator const& x) > : stored_value(*x) > {} > > > > > > value_type& > operator*() const > { > return this->stored_value; > } > private: > 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) > : stored_value(*x) > , stored_iterator(x) > {} > > > > > > writable_postfix_increment_proxy const& > operator*() const > { > return *this; > } > > > operator value_type&() const > { > return stored_value; > } > > > template <class T> > T const& operator=(T const& x) const > { > *this->stored_iterator = x; > return x; > } > > > template <class T> > T& operator=(T& x) const > { > *this->stored_iterator = x; > return x; > } > > > operator Iterator const&() const > { > return stored_iterator; > } > > private: > mutable value_type stored_value; > Iterator stored_iterator; > }; ># 259 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 > template <class Reference, class Value> > struct is_non_proxy_reference > : is_convertible< > typename remove_reference<Reference>::type > const volatile* > , Value const volatile* > > > {}; ># 284 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 > 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) : m_ref(x) {} > Reference* operator->() { return boost::addressof(m_ref); } > > > operator Reference*() { return boost::addressof(m_ref); } > Reference m_ref; > }; > typedef proxy result_type; > static result_type apply(Reference const & x) > { > return result_type(x); > } > }; > > template <class T, class Pointer> > struct operator_arrow_dispatch<T&, Pointer> > { > typedef Pointer result_type; > static result_type apply(T& x) > { > return boost::addressof(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) > : m_iter(iter) > {} > > operator reference() const > { > return *m_iter; > } > > operator_brackets_proxy& operator=(value_type const& val) > { > *m_iter = val; > return *this; > } > > 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_) > { > return operator_brackets_proxy<Iterator>(iter); > } > > template <class Iterator> > typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) > { > return *iter; > } > > 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; > > } ># 497 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 > 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 inline 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 inline 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) > { > return f.dereference(); > } > > template <class Facade> > static void increment(Facade& f) > { > f.increment(); > } > > template <class Facade> > static void decrement(Facade& f) > { > f.decrement(); > } > > template <class Facade1, class Facade2> > static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) > { > return f1.equal(f2); > } > > template <class Facade1, class Facade2> > static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) > { > return f2.equal(f1); > } > > template <class Facade> > static void advance(Facade& f, typename Facade::difference_type n) > { > f.advance(n); > } > > template <class Facade1, class Facade2> > static typename Facade1::difference_type distance_from( > Facade1 const& f1, Facade2 const& f2, mpl::true_) > { > return -f1.distance_to(f2); > } > > template <class Facade1, class Facade2> > static typename Facade2::difference_type distance_from( > Facade1 const& f1, Facade2 const& f2, mpl::false_) > { > return f2.distance_to(f1); > } > > > > > template <class I, class V, class TC, class R, class D> > static I& derived(iterator_facade<I,V,TC,R,D>& facade) > { > return *static_cast<I*>(&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) > { > return *static_cast<I 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 > { > return iterator_core_access::dereference(this->derived()); > } > > pointer operator->() const > { > return operator_arrow_dispatch_::apply(*this->derived()); > } > > Derived& operator++() > { > iterator_core_access::increment(this->derived()); > return this->derived(); > } > > protected: > > > > Derived& derived() > { > return *static_cast<Derived*>(this); > } > > Derived const& derived() const > { > return *static_cast<Derived const*>(this); > } > }; > > > 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--() > { > iterator_core_access::decrement(this->derived()); > return this->derived(); > } > > Derived operator--(int) > { > Derived tmp(this->derived()); > --*this; > return tmp; > } > }; > > > 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 > { > typedef boost::iterators::detail::use_operator_brackets_proxy<Value, Reference> use_proxy; > > return boost::iterators::detail::make_operator_brackets_result<Derived>( > this->derived() + n > , use_proxy() > ); > } > > Derived& operator+=(difference_type n) > { > iterator_core_access::advance(this->derived(), n); > return this->derived(); > } > > Derived& operator-=(difference_type n) > { > iterator_core_access::advance(this->derived(), -n); > return this->derived(); > } > > Derived operator-(difference_type x) const > { > Derived result(this->derived()); > return result -= x; > } > }; > > } > > > > > > 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> > inline typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type > operator++( > iterator_facade<I,V,TC,R,D>& i > , int > ) > { > typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type > tmp(*static_cast<I*>(&i)); > > ++i; > > return tmp; > } ># 900 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 > template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline 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) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return iterator_core_access::equal( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); } > template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline 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) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return ! iterator_core_access::equal( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); } ># 930 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 > template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline 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) { static_assert(( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value ), "( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value )"); return 0 > iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); } > template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline 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) { static_assert(( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value ), "( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value )"); return 0 < iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); } > template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline 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) { static_assert(( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value ), "( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value )"); return 0 >= iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); } > template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline 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) { static_assert(( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value ), "( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value )"); return 0 <= iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); } > > > > > template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline 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) { static_assert(( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value ), "( is_interoperable< Derived1, Derived2 >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value )"); return iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); } ># 955 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 > template <class Derived, class V, class TC, class R, class D> inline 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 ) { Derived tmp(static_cast<Derived const&>(i)); return tmp += n; } > > > > > template <class Derived, class V, class TC, class R, class D> inline 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 ) { Derived tmp(static_cast<Derived const&>(i)); return tmp += n; } ># 972 "/usr/include/boost/iterator/iterator_facade.hpp" 3 4 >} > >using iterators::iterator_core_access; >using iterators::iterator_facade; > >} > ># 1 "/usr/include/boost/iterator/detail/config_undef.hpp" 1 3 4 ># 980 "/usr/include/boost/iterator/iterator_facade.hpp" 2 3 4 ># 23 "/usr/include/boost/filesystem/path.hpp" 2 3 4 > > ># 1 "/usr/include/boost/io/quoted.hpp" 1 3 4 ># 13 "/usr/include/boost/io/quoted.hpp" 3 4 ># 1 "/usr/include/boost/io/detail/buffer_fill.hpp" 1 3 4 ># 14 "/usr/include/boost/io/detail/buffer_fill.hpp" 3 4 >namespace boost { >namespace io { >namespace detail { > >template<class charT, class traits> >inline bool >buffer_fill(std::basic_streambuf<charT, traits>& buf, charT ch, > std::size_t size) >{ > charT fill[] = { ch, ch, ch, ch, ch, ch, ch, ch }; > enum { > chunk = sizeof fill / sizeof(charT) > }; > for (; size > chunk; size -= chunk) { > if (static_cast<std::size_t>(buf.sputn(fill, chunk)) != chunk) { > return false; > } > } > return static_cast<std::size_t>(buf.sputn(fill, size)) == size; >} > >} >} >} ># 14 "/usr/include/boost/io/quoted.hpp" 2 3 4 ># 1 "/usr/include/boost/io/detail/ostream_guard.hpp" 1 3 4 ># 14 "/usr/include/boost/io/detail/ostream_guard.hpp" 3 4 >namespace boost { >namespace io { >namespace detail { > >template<class Char, class Traits> >class ostream_guard { >public: > explicit ostream_guard(std::basic_ostream<Char, Traits>& os) noexcept > : os_(&os) { } > > ~ostream_guard() noexcept((false)) { > if (os_) { > os_->setstate(std::basic_ostream<Char, Traits>::badbit); > } > } > > void release() noexcept { > os_ = 0; > } > >private: > ostream_guard(const ostream_guard&); > ostream_guard& operator=(const ostream_guard&); > > std::basic_ostream<Char, Traits>* os_; >}; > >} >} >} ># 15 "/usr/include/boost/io/quoted.hpp" 2 3 4 ># 1 "/usr/include/boost/io/ios_state.hpp" 1 3 4 ># 11 "/usr/include/boost/io/ios_state.hpp" 3 4 ># 1 "/usr/include/boost/io_fwd.hpp" 1 3 4 ># 12 "/usr/include/boost/io_fwd.hpp" 3 4 >namespace boost { >namespace io { > >class ios_flags_saver; >class ios_precision_saver; >class ios_width_saver; >class ios_base_all_saver; > >template<class Ch, class Tr = std::char_traits<Ch> > >class basic_ios_iostate_saver; > >template<class Ch, class Tr = std::char_traits<Ch> > >class basic_ios_exception_saver; > >template<class Ch, class Tr = std::char_traits<Ch> > >class basic_ios_tie_saver; > >template<class Ch, class Tr = std::char_traits<Ch> > >class basic_ios_rdbuf_saver; > >template<class Ch, class Tr = std::char_traits<Ch> > >class basic_ios_fill_saver; > >template<class Ch, class Tr = std::char_traits<Ch> > >class basic_ios_locale_saver; > >template<class Ch, class Tr = std::char_traits<Ch> > >class basic_ios_all_saver; > >typedef basic_ios_iostate_saver<char> ios_iostate_saver; >typedef basic_ios_iostate_saver<wchar_t> wios_iostate_saver; >typedef basic_ios_exception_saver<char> ios_exception_saver; >typedef basic_ios_exception_saver<wchar_t> wios_exception_saver; >typedef basic_ios_tie_saver<char> ios_tie_saver; >typedef basic_ios_tie_saver<wchar_t> wios_tie_saver; >typedef basic_ios_rdbuf_saver<char> ios_rdbuf_saver; >typedef basic_ios_rdbuf_saver<wchar_t> wios_rdbuf_saver; >typedef basic_ios_fill_saver<char> ios_fill_saver; >typedef basic_ios_fill_saver<wchar_t> wios_fill_saver; >typedef basic_ios_locale_saver<char> ios_locale_saver; >typedef basic_ios_locale_saver<wchar_t> wios_locale_saver; >typedef basic_ios_all_saver<char> ios_all_saver; >typedef basic_ios_all_saver<wchar_t> wios_all_saver; > >class ios_iword_saver; >class ios_pword_saver; >class ios_all_word_saver; > >} >} ># 12 "/usr/include/boost/io/ios_state.hpp" 2 3 4 ># 20 "/usr/include/boost/io/ios_state.hpp" 3 4 >namespace boost { >namespace io { > >class ios_flags_saver { >public: > typedef std::ios_base state_type; > typedef std::ios_base::fmtflags aspect_type; > > explicit ios_flags_saver(state_type& s) > : s_save_(s) > , a_save_(s.flags()) { } > > ios_flags_saver(state_type& s, aspect_type a) > : s_save_(s) > , a_save_(s.flags(a)) { } > > ~ios_flags_saver() { > this->restore(); > } > > void restore() { > s_save_.flags(a_save_); > } > >private: > ios_flags_saver(const ios_flags_saver&); > ios_flags_saver& operator=(const ios_flags_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > >class ios_precision_saver { >public: > typedef std::ios_base state_type; > typedef std::streamsize aspect_type; > > explicit ios_precision_saver(state_type& s) > : s_save_(s) > , a_save_(s.precision()) { } > > ios_precision_saver(state_type& s, aspect_type a) > : s_save_(s) > , a_save_(s.precision(a)) { } > > ~ios_precision_saver() { > this->restore(); > } > > void restore() { > s_save_.precision(a_save_); > } > >private: > ios_precision_saver(const ios_precision_saver&); > ios_precision_saver& operator=(const ios_precision_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > >class ios_width_saver { >public: > typedef std::ios_base state_type; > typedef std::streamsize aspect_type; > > explicit ios_width_saver(state_type& s) > : s_save_(s) > , a_save_(s.width()) { } > > ios_width_saver(state_type& s, aspect_type a) > : s_save_(s) > , a_save_(s.width(a)) { } > > ~ios_width_saver() { > this->restore(); > } > > void restore() { > s_save_.width(a_save_); > } > >private: > ios_width_saver(const ios_width_saver&); > ios_width_saver& operator=(const ios_width_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > >template<class Ch, class Tr> >class basic_ios_iostate_saver { >public: > typedef std::basic_ios<Ch, Tr> state_type; > typedef std::ios_base::iostate aspect_type; > > explicit basic_ios_iostate_saver(state_type& s) > : s_save_(s) > , a_save_(s.rdstate()) { } > > basic_ios_iostate_saver(state_type& s, aspect_type a) > : s_save_(s) > , a_save_(s.rdstate()) { > s.clear(a); > } > > ~basic_ios_iostate_saver() { > this->restore(); > } > > void restore() { > s_save_.clear(a_save_); > } > >private: > basic_ios_iostate_saver(const basic_ios_iostate_saver&); > basic_ios_iostate_saver& operator=(const basic_ios_iostate_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > >template<class Ch, class Tr> >class basic_ios_exception_saver { >public: > typedef std::basic_ios<Ch, Tr> state_type; > typedef std::ios_base::iostate aspect_type; > > explicit basic_ios_exception_saver(state_type& s) > : s_save_(s) > , a_save_(s.exceptions()) { } > > basic_ios_exception_saver(state_type& s, aspect_type a) > : s_save_(s) > , a_save_(s.exceptions()) { > s.exceptions(a); > } > > ~basic_ios_exception_saver() { > this->restore(); > } > > void restore() { > s_save_.exceptions(a_save_); > } > >private: > basic_ios_exception_saver(const basic_ios_exception_saver&); > basic_ios_exception_saver& operator=(const basic_ios_exception_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > >template<class Ch, class Tr> >class basic_ios_tie_saver { >public: > typedef std::basic_ios<Ch, Tr> state_type; > typedef std::basic_ostream<Ch, Tr>* aspect_type; > > explicit basic_ios_tie_saver(state_type& s) > : s_save_(s) > , a_save_(s.tie()) { } > > basic_ios_tie_saver(state_type& s, aspect_type a) > : s_save_(s) > , a_save_(s.tie(a)) { } > > ~basic_ios_tie_saver() { > this->restore(); > } > > void restore() { > s_save_.tie(a_save_); > } > >private: > basic_ios_tie_saver(const basic_ios_tie_saver&); > basic_ios_tie_saver& operator=(const basic_ios_tie_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > >template<class Ch, class Tr> >class basic_ios_rdbuf_saver { >public: > typedef std::basic_ios<Ch, Tr> state_type; > typedef std::basic_streambuf<Ch, Tr>* aspect_type; > > explicit basic_ios_rdbuf_saver(state_type& s) > : s_save_(s) > , a_save_(s.rdbuf()) { } > > basic_ios_rdbuf_saver(state_type& s, aspect_type a) > : s_save_(s) > , a_save_(s.rdbuf(a)) { } > > ~basic_ios_rdbuf_saver() { > this->restore(); > } > > void restore() { > s_save_.rdbuf(a_save_); > } > >private: > basic_ios_rdbuf_saver(const basic_ios_rdbuf_saver&); > basic_ios_rdbuf_saver& operator=(const basic_ios_rdbuf_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > >template<class Ch, class Tr> >class basic_ios_fill_saver { >public: > typedef std::basic_ios<Ch, Tr> state_type; > typedef typename state_type::char_type aspect_type; > > explicit basic_ios_fill_saver(state_type& s) > : s_save_(s) > , a_save_(s.fill()) { } > > basic_ios_fill_saver(state_type& s, aspect_type a) > : s_save_(s) > , a_save_(s.fill(a)) { } > > ~basic_ios_fill_saver() { > this->restore(); > } > > void restore() { > s_save_.fill(a_save_); > } > >private: > basic_ios_fill_saver(const basic_ios_fill_saver&); > basic_ios_fill_saver& operator=(const basic_ios_fill_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > > >template<class Ch, class Tr> >class basic_ios_locale_saver { >public: > typedef std::basic_ios<Ch, Tr> state_type; > typedef std::locale aspect_type; > > explicit basic_ios_locale_saver(state_type& s) > : s_save_(s) > , a_save_(s.getloc()) { } > > basic_ios_locale_saver(state_type& s, const aspect_type& a) > : s_save_(s) > , a_save_(s.imbue(a)) { } > > ~basic_ios_locale_saver() { > this->restore(); > } > > void restore() { > s_save_.imbue(a_save_); > } > >private: > basic_ios_locale_saver(const basic_ios_locale_saver&); > basic_ios_locale_saver& operator=(const basic_ios_locale_saver&); > > state_type& s_save_; > aspect_type a_save_; >}; > > >class ios_iword_saver { >public: > typedef std::ios_base state_type; > typedef int index_type; > typedef long aspect_type; > > explicit ios_iword_saver(state_type& s, index_type i) > : s_save_(s) > , a_save_(s.iword(i)) > , i_save_(i) { } > > ios_iword_saver(state_type& s, index_type i, aspect_type a) > : s_save_(s) > , a_save_(s.iword(i)) > , i_save_(i) { > s.iword(i) = a; > } > > ~ios_iword_saver() { > this->restore(); > } > > void restore() { > s_save_.iword(i_save_) = a_save_; > } > >private: > ios_iword_saver(const ios_iword_saver&); > ios_iword_saver& operator=(const ios_iword_saver&); > > state_type& s_save_; > aspect_type a_save_; > index_type i_save_; >}; > >class ios_pword_saver { >public: > typedef std::ios_base state_type; > typedef int index_type; > typedef void* aspect_type; > > explicit ios_pword_saver(state_type& s, index_type i) > : s_save_(s) > , a_save_(s.pword(i)) > , i_save_(i) { } > > ios_pword_saver(state_type& s, index_type i, aspect_type a) > : s_save_(s) > , a_save_(s.pword(i)) > , i_save_(i) { > s.pword(i) = a; > } > > ~ios_pword_saver() { > this->restore(); > } > > void restore() { > s_save_.pword(i_save_) = a_save_; > } > >private: > ios_pword_saver(const ios_pword_saver&); > ios_pword_saver operator=(const ios_pword_saver&); > > state_type& s_save_; > aspect_type a_save_; > index_type i_save_; >}; > >class ios_base_all_saver { >public: > typedef std::ios_base state_type; > > explicit ios_base_all_saver(state_type& s) > : s_save_(s) > , a1_save_(s.flags()) > , a2_save_(s.precision()) > , a3_save_(s.width()) { } > > ~ios_base_all_saver() { > this->restore(); > } > > void restore() { > s_save_.width(a3_save_); > s_save_.precision(a2_save_); > s_save_.flags(a1_save_); > } > >private: > ios_base_all_saver(const ios_base_all_saver&); > ios_base_all_saver& operator=(const ios_base_all_saver&); > > state_type& s_save_; > state_type::fmtflags a1_save_; > std::streamsize a2_save_; > std::streamsize a3_save_; >}; > >template<class Ch, class Tr> >class basic_ios_all_saver { >public: > typedef std::basic_ios<Ch, Tr> state_type; > > explicit basic_ios_all_saver(state_type& s) > : s_save_(s) > , a1_save_(s.flags()) > , a2_save_(s.precision()) > , a3_save_(s.width()) > , a4_save_(s.rdstate()) > , a5_save_(s.exceptions()) > , a6_save_(s.tie()) > , a7_save_(s.rdbuf()) > , a8_save_(s.fill()) > > , a9_save_(s.getloc()) > > { } > > ~basic_ios_all_saver() { > this->restore(); > } > > void restore() { > > s_save_.imbue(a9_save_); > > s_save_.fill(a8_save_); > s_save_.rdbuf(a7_save_); > s_save_.tie(a6_save_); > s_save_.exceptions(a5_save_); > s_save_.clear(a4_save_); > s_save_.width(a3_save_); > s_save_.precision(a2_save_); > s_save_.flags(a1_save_); > } > >private: > basic_ios_all_saver(const basic_ios_all_saver&); > basic_ios_all_saver& operator=(const basic_ios_all_saver&); > > state_type& s_save_; > typename state_type::fmtflags a1_save_; > std::streamsize a2_save_; > std::streamsize a3_save_; > typename state_type::iostate a4_save_; > typename state_type::iostate a5_save_; > std::basic_ostream<Ch, Tr>* a6_save_; > std::basic_streambuf<Ch, Tr>* a7_save_; > typename state_type::char_type a8_save_; > > std::locale a9_save_; > >}; > >class ios_all_word_saver { >public: > typedef std::ios_base state_type; > typedef int index_type; > > ios_all_word_saver(state_type& s, index_type i) > : s_save_(s) > , i_save_(i) > , a1_save_(s.iword(i)) > , a2_save_(s.pword(i)) { } > > ~ios_all_word_saver() { > this->restore(); > } > > void restore() { > s_save_.pword(i_save_) = a2_save_; > s_save_.iword(i_save_) = a1_save_; > } > >private: > ios_all_word_saver(const ios_all_word_saver&); > ios_all_word_saver& operator=(const ios_all_word_saver&); > > state_type& s_save_; > index_type i_save_; > long a1_save_; > void* a2_save_; >}; > >} >} ># 16 "/usr/include/boost/io/quoted.hpp" 2 3 4 > >namespace boost { >namespace io { >namespace detail { > >template<class String, class Char> >struct quoted_proxy { > String string; > Char escape; > Char delim; >}; > >template<class Char> >struct quoted_state { > const Char* string; > std::size_t size; > std::size_t count; >}; > >template<class Char> >inline quoted_state<Char> >quoted_start(const Char* string, Char escape, Char delim) >{ > const Char* end = string; > std::size_t count = 2; > for (Char ch; (ch = *end) != 0; ++end) { > count += 1 + (ch == escape || ch == delim); > } > quoted_state<Char> state = { string, > static_cast<std::size_t>(end - string), count }; > return state; >} > >template<class Char, class String> >inline quoted_state<Char> >quoted_start(const String* string, Char escape, Char delim) >{ > const Char* begin = string->data(); > std::size_t size = string->size(); > std::size_t count = 2; > for (const Char *it = begin, *end = begin + size; it != end; ++it) { > Char ch = *it; > count += 1 + (ch == escape || ch == delim); > } > quoted_state<Char> state = { begin, size, count }; > return state; >} > >template<class Char, class Traits> >inline bool >quoted_put(std::basic_streambuf<Char, Traits>& buf, const Char* string, > std::size_t size, std::size_t count, Char escape, Char delim) >{ > if (buf.sputc(delim) == Traits::eof()) { > return false; > } > if (size == count) { > if (static_cast<std::size_t>(buf.sputn(string, size)) != size) { > return false; > } > } else { > for (const Char* end = string + size; string != end; ++string) { > Char ch = *string; > if ((ch == escape || ch == delim) && > buf.sputc(escape) == Traits::eof()) { > return false; > } > if (buf.sputc(ch) == Traits::eof()) { > return false; > } > } > } > return buf.sputc(delim) != Traits::eof(); >} > >template<class Char, class Traits, class String> >inline std::basic_ostream<Char, Traits>& >quoted_out(std::basic_ostream<Char, Traits>& os, String* string, Char escape, > Char delim) >{ > typedef std::basic_ostream<Char, Traits> stream; > ostream_guard<Char, Traits> guard(os); > typename stream::sentry entry(os); > if (entry) { > quoted_state<Char> state = boost::io::detail::quoted_start(string, > escape, delim); > std::basic_streambuf<Char, Traits>& buf = *os.rdbuf(); > std::size_t width = static_cast<std::size_t>(os.width()); > if (width <= state.count) { > if (!boost::io::detail::quoted_put(buf, state.string, state.size, > state.count, escape, delim)) { > return os; > } > } else if ((os.flags() & stream::adjustfield) == stream::left) { > if (!boost::io::detail::quoted_put(buf, state.string, state.size, > state.count, escape, delim) || > !boost::io::detail::buffer_fill(buf, os.fill(), > width - state.count)) { > return os; > } > } else if (!boost::io::detail::buffer_fill(buf, os.fill(), > width - state.count) || > !boost::io::detail::quoted_put(buf, state.string, state.size, > state.count, escape, delim)) { > return os; > } > os.width(0); > } > guard.release(); > return os; >} > >template<class Char, class Traits> >inline std::basic_ostream<Char, Traits>& >operator<<(std::basic_ostream<Char, Traits>& os, > const quoted_proxy<const Char*, Char>& proxy) >{ > return boost::io::detail::quoted_out(os, proxy.string, proxy.escape, > proxy.delim); >} > >template <class Char, class Traits, class Alloc> >inline std::basic_ostream<Char, Traits>& >operator<<(std::basic_ostream<Char, Traits>& os, > const quoted_proxy<const std::basic_string<Char, Traits, Alloc>*, > Char>& proxy) >{ > return boost::io::detail::quoted_out(os, proxy.string, proxy.escape, > proxy.delim); >} > >template<class Char, class Traits, class Alloc> >inline std::basic_ostream<Char, Traits>& >operator<<(std::basic_ostream<Char, Traits>& os, > const quoted_proxy<std::basic_string<Char, Traits, Alloc>*, Char>& proxy) >{ > return boost::io::detail::quoted_out(os, proxy.string, proxy.escape, > proxy.delim); >} > >template<class Char, class Traits, class Alloc> >inline std::basic_istream<Char, Traits>& >operator>>(std::basic_istream<Char, Traits>& is, > const quoted_proxy<std::basic_string<Char, Traits, Alloc>*, Char>& proxy) >{ > Char ch; > if (!(is >> ch)) { > return is; > } > if (ch != proxy.delim) { > is.unget(); > return is >> *proxy.string; > } > { > boost::io::ios_flags_saver ifs(is); > std::noskipws(is); > proxy.string->clear(); > while ((is >> ch) && ch != proxy.delim) { > if (ch == proxy.escape && !(is >> ch)) { > break; > } > proxy.string->push_back(ch); > } > } > return is; >} > >} > >template<class Char, class Traits, class Alloc> >inline detail::quoted_proxy<const std::basic_string<Char, Traits, Alloc>*, > Char> >quoted(const std::basic_string<Char, Traits, Alloc>& s, Char escape='\\', > Char delim='\"') >{ > detail::quoted_proxy<const std::basic_string<Char, Traits, Alloc>*, > Char> proxy = { &s, escape, delim }; > return proxy; >} > >template<class Char, class Traits, class Alloc> >inline detail::quoted_proxy<std::basic_string<Char, Traits, Alloc>*, Char> >quoted(std::basic_string<Char, Traits, Alloc>& s, Char escape='\\', > Char delim='\"') >{ > detail::quoted_proxy<std::basic_string<Char, Traits, Alloc>*, > Char> proxy = { &s, escape, delim }; > return proxy; >} > >template<class Char> >inline detail::quoted_proxy<const Char*, Char> >quoted(const Char* s, Char escape='\\', Char delim='\"') >{ > detail::quoted_proxy<const Char*, Char> proxy = { s, escape, delim }; > return proxy; >} > >} >} ># 26 "/usr/include/boost/filesystem/path.hpp" 2 3 4 ># 1 "/usr/include/boost/functional/hash_fwd.hpp" 1 3 4 > > > > > ># 1 "/usr/include/boost/container_hash/hash_fwd.hpp" 1 3 4 ># 17 "/usr/include/boost/container_hash/hash_fwd.hpp" 3 4 > > > > >namespace boost >{ > template <class T> struct hash; > > template <class T> void hash_combine(std::size_t& seed, T const& v); > > template <class It> std::size_t hash_range(It, It); > template <class It> void hash_range(std::size_t&, It, It); > > > > > >} ># 7 "/usr/include/boost/functional/hash_fwd.hpp" 2 3 4 ># 27 "/usr/include/boost/filesystem/path.hpp" 2 3 4 > > > > > > > ># 1 "/usr/include/c++/13/cwchar" 1 3 4 ># 39 "/usr/include/c++/13/cwchar" 3 4 > ># 40 "/usr/include/c++/13/cwchar" 3 ># 35 "/usr/include/boost/filesystem/path.hpp" 2 3 4 > > > > ># 1 "/usr/include/c++/13/utility" 1 3 4 ># 58 "/usr/include/c++/13/utility" 3 4 > ># 59 "/usr/include/c++/13/utility" 3 ># 68 "/usr/include/c++/13/utility" 3 ># 1 "/usr/include/c++/13/bits/stl_relops.h" 1 3 ># 62 "/usr/include/c++/13/bits/stl_relops.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > namespace rel_ops > { ># 86 "/usr/include/c++/13/bits/stl_relops.h" 3 > template <class _Tp> > inline bool > operator!=(const _Tp& __x, const _Tp& __y) > { return !(__x == __y); } ># 99 "/usr/include/c++/13/bits/stl_relops.h" 3 > template <class _Tp> > inline bool > operator>(const _Tp& __x, const _Tp& __y) > { return __y < __x; } ># 112 "/usr/include/c++/13/bits/stl_relops.h" 3 > template <class _Tp> > inline bool > operator<=(const _Tp& __x, const _Tp& __y) > { return !(__y < __x); } ># 125 "/usr/include/c++/13/bits/stl_relops.h" 3 > template <class _Tp> > inline bool > operator>=(const _Tp& __x, const _Tp& __y) > { return !(__x < __y); } > } > > >} ># 69 "/usr/include/c++/13/utility" 2 3 ># 82 "/usr/include/c++/13/utility" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 94 "/usr/include/c++/13/utility" 3 > template <typename _Tp, typename _Up = _Tp> > > inline _Tp > exchange(_Tp& __obj, _Up&& __new_val) > noexcept(__and_<is_nothrow_move_constructible<_Tp>, > is_nothrow_assignable<_Tp&, _Up>>::value) > { return std::__exchange(__obj, std::forward<_Up>(__new_val)); } > > > > > template<typename _Tp> > [[nodiscard]] > constexpr add_const_t<_Tp>& > as_const(_Tp& __t) noexcept > { return __t; } > > template<typename _Tp> > void as_const(const _Tp&&) = delete; ># 224 "/usr/include/c++/13/utility" 3 > >} ># 40 "/usr/include/boost/filesystem/path.hpp" 2 3 4 > ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 42 "/usr/include/boost/filesystem/path.hpp" 2 3 4 > >namespace boost { >namespace filesystem { > >class path; > >namespace path_detail { > >template< typename Char, Char Separator, Char PreferredSeparator, Char Dot > >struct path_constants >{ > typedef path_constants< Char, Separator, PreferredSeparator, Dot > path_constants_base; > typedef Char value_type; > static constexpr value_type separator = Separator; > static constexpr value_type preferred_separator = PreferredSeparator; > static constexpr value_type dot = Dot; >}; ># 73 "/usr/include/boost/filesystem/path.hpp" 3 4 >struct substring >{ > std::size_t pos; > std::size_t size; >}; > >template< typename T > >struct is_native_char_ptr_impl : public boost::false_type {}; > > > > > > > >template< > >struct is_native_char_ptr_impl< char* > : public boost::true_type {}; >template< > >struct is_native_char_ptr_impl< const char* > : public boost::true_type {}; > > >template< typename T > >struct is_native_char_ptr : public is_native_char_ptr_impl< typename boost::remove_cv< typename boost::remove_reference< T >::type >::type > {}; > >template< typename T > >struct is_native_pathable_impl : public boost::false_type {}; > >template< typename T > >struct is_native_pathable_impl< T* > : public is_native_char_ptr_impl< T* > {}; ># 111 "/usr/include/boost/filesystem/path.hpp" 3 4 >template< > >struct is_native_pathable_impl< const char[] > : public boost::true_type {}; >template< std::size_t N > >struct is_native_pathable_impl< const char[N] > : public boost::true_type {}; >template< > >struct is_native_pathable_impl< std::basic_string< char > > : public boost::true_type {}; > >template< > >struct is_native_pathable_impl< filesystem::path > : public boost::true_type {}; > >template< typename T > >struct is_native_pathable : public is_native_pathable_impl< typename boost::remove_cv< typename boost::remove_reference< T >::type >::type > {}; > >} > > > > > > > >class path : > public filesystem::path_detail::path_constants< > > > > char, '/', '/', '.' > > > >{ >public: > > > > typedef path_constants_base::value_type value_type; > typedef std::basic_string< value_type > string_type; > typedef std::codecvt< wchar_t, char, std::mbstate_t > codecvt_type; ># 206 "/usr/include/boost/filesystem/path.hpp" 3 4 > path() noexcept {} > path(path const& p) : m_pathname(p.m_pathname) {} > > template< class Source > > path(Source const& source, typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value > >::type* = 0) > { > path_traits::dispatch(source, m_pathname); > } > > path(const value_type* s) : m_pathname(s) {} > path(string_type const& s) : m_pathname(s) {} > > > > > > > path(path&& p) noexcept : m_pathname(std::move(p.m_pathname)) > { > } > path(path&& p, codecvt_type const&) noexcept : m_pathname(std::move(p.m_pathname)) > { > } > path& operator=(path&& p) noexcept > { > m_pathname = std::move(p.m_pathname); > return *this; > } > path& assign(path&& p) noexcept > { > m_pathname = std::move(p.m_pathname); > return *this; > } > path& assign(path&& p, codecvt_type const&) noexcept > { > m_pathname = std::move(p.m_pathname); > return *this; > } > > path(string_type&& s) noexcept : m_pathname(std::move(s)) > { > } > path(string_type&& s, codecvt_type const&) noexcept : m_pathname(std::move(s)) > { > } > path& operator=(string_type&& p) noexcept > { > m_pathname = std::move(p); > return *this; > } > path& assign(string_type&& p) noexcept > { > m_pathname = std::move(p); > return *this; > } > path& assign(string_type&& p, codecvt_type const&) noexcept > { > m_pathname = std::move(p); > return *this; > } > > > path(path const& p, codecvt_type const&) : m_pathname(p.m_pathname) {} > path(const value_type* s, codecvt_type const&) : m_pathname(s) {} > path(string_type const& s, codecvt_type const&) : m_pathname(s) {} > > template< class Source > > path(Source const& source, codecvt_type const& cvt, typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value > >::type* = 0) > { > path_traits::dispatch(source, m_pathname, cvt); > } > > path(const value_type* begin, const value_type* end) : m_pathname(begin, end) {} > > template< class InputIterator > > path(InputIterator begin, InputIterator end, typename boost::disable_if< path_detail::is_native_char_ptr< InputIterator > >::type* = 0) > { > if (begin != end) > { > > std::basic_string< typename std::iterator_traits< InputIterator >::value_type > seq(begin, end); > path_traits::convert(seq.c_str(), seq.c_str() + seq.size(), m_pathname); > } > } > > path(const value_type* begin, const value_type* end, codecvt_type const&) : m_pathname(begin, end) {} > > template< class InputIterator > > path(InputIterator begin, InputIterator end, codecvt_type const& cvt, typename boost::disable_if< path_detail::is_native_char_ptr< InputIterator > >::type* = 0) > { > if (begin != end) > { > > std::basic_string< typename std::iterator_traits< InputIterator >::value_type > seq(begin, end); > path_traits::convert(seq.c_str(), seq.c_str() + seq.size(), m_pathname, cvt); > } > } > > > > > path& operator=(path const& p) > { > return assign(p); > } > > path& operator=(string_type const& s) > { > return assign(s); > } > > path& operator=(const value_type* ptr) > { > return assign(ptr); > } > > template< class Source > > typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value, > path& > >::type operator=(Source const& source) > { > return assign(source); > } > > path& assign(path const& p) > { > m_pathname = p.m_pathname; > return *this; > } > > path& assign(string_type const& s) > { > m_pathname = s; > return *this; > } > > path& assign(const value_type* ptr) > { > m_pathname = ptr; > return *this; > } > > template< class Source > > typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value, > path& > >::type assign(Source const& source) > { > m_pathname.clear(); > path_traits::dispatch(source, m_pathname); > return *this; > } > > path& assign(path const& p, codecvt_type const&) > { > m_pathname = p.m_pathname; > return *this; > } > > path& assign(string_type const& s, codecvt_type const&) > { > m_pathname = s; > return *this; > } > > path& assign(const value_type* ptr, codecvt_type const&) > { > m_pathname = ptr; > return *this; > } > > template< class Source > > typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value, > path& > >::type assign(Source const& source, codecvt_type const& cvt) > { > m_pathname.clear(); > path_traits::dispatch(source, m_pathname, cvt); > return *this; > } > > path& assign(const value_type* begin, const value_type* end) > { > m_pathname.assign(begin, end); > return *this; > } > > template< class InputIterator > > typename boost::disable_if< path_detail::is_native_char_ptr< InputIterator >, path& >::type > assign(InputIterator begin, InputIterator end) > { > m_pathname.clear(); > if (begin != end) > { > std::basic_string< typename std::iterator_traits< InputIterator >::value_type > seq(begin, end); > path_traits::convert(seq.c_str(), seq.c_str() + seq.size(), m_pathname); > } > return *this; > } > > path& assign(const value_type* begin, const value_type* end, codecvt_type const&) > { > m_pathname.assign(begin, end); > return *this; > } > > template< class InputIterator > > typename boost::disable_if< path_detail::is_native_char_ptr< InputIterator >, path& >::type > assign(InputIterator begin, InputIterator end, codecvt_type const& cvt) > { > m_pathname.clear(); > if (begin != end) > { > std::basic_string< typename std::iterator_traits< InputIterator >::value_type > seq(begin, end); > path_traits::convert(seq.c_str(), seq.c_str() + seq.size(), m_pathname, cvt); > } > return *this; > } > > > > template< class Source > > typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value || path_detail::is_native_pathable< Source >::value, > path& > >::type operator+=(Source const& source) > { > return concat(source); > } > > path& operator+=(value_type c) > { > m_pathname.push_back(c); > return *this; > } > > template< class CharT > > typename boost::enable_if< boost::is_integral< CharT >, path& >::type > operator+=(CharT c) > { > CharT tmp[2]; > tmp[0] = c; > tmp[1] = static_cast< CharT >(0); > return concat(tmp); > } > > path& concat(path const& p) > { > m_pathname += p.m_pathname; > return *this; > } > > path& concat(const value_type* ptr) > { > m_pathname += ptr; > return *this; > } > > path& concat(string_type const& s) > { > m_pathname += s; > return *this; > } > > template< class Source > > typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value, > path& > >::type concat(Source const& source) > { > path_traits::dispatch(source, m_pathname); > return *this; > } > > path& concat(path const& p, codecvt_type const&) > { > m_pathname += p.m_pathname; > return *this; > } > > path& concat(const value_type* ptr, codecvt_type const&) > { > m_pathname += ptr; > return *this; > } > > path& concat(string_type const& s, codecvt_type const&) > { > m_pathname += s; > return *this; > } > > template< class Source > > typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value, > path& > >::type concat(Source const& source, codecvt_type const& cvt) > { > path_traits::dispatch(source, m_pathname, cvt); > return *this; > } > > path& concat(const value_type* begin, const value_type* end) > { > m_pathname.append(begin, end); > return *this; > } > > template< class InputIterator > > typename boost::disable_if< path_detail::is_native_char_ptr< InputIterator >, path& >::type > concat(InputIterator begin, InputIterator end) > { > if (begin != end) > { > std::basic_string< typename std::iterator_traits< InputIterator >::value_type > seq(begin, end); > path_traits::convert(seq.c_str(), seq.c_str() + seq.size(), m_pathname); > } > return *this; > } > > path& concat(const value_type* begin, const value_type* end, codecvt_type const&) > { > m_pathname.append(begin, end); > return *this; > } > > template< class InputIterator > > typename boost::disable_if< path_detail::is_native_char_ptr< InputIterator >, path& >::type > concat(InputIterator begin, InputIterator end, codecvt_type const& cvt) > { > if (begin != end) > { > std::basic_string< typename std::iterator_traits< InputIterator >::value_type > seq(begin, end); > path_traits::convert(seq.c_str(), seq.c_str() + seq.size(), m_pathname, cvt); > } > return *this; > } > > > > > > > template< class Source > > inline __attribute__ ((__always_inline__)) typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value || path_detail::is_native_pathable< Source >::value, > path& > >::type operator/=(Source const& source) > { > return append(source); > } > > inline __attribute__ ((__always_inline__)) path& append(path const& p) > { > append_v3(p); > return *this; > } > > inline __attribute__ ((__always_inline__)) path& append(string_type const& p) > { > append_v3(p.c_str(), p.c_str() + p.size()); > return *this; > } > > inline __attribute__ ((__always_inline__)) path& append(const value_type* ptr) > { > append_v3(ptr, ptr + string_type::traits_type::length(ptr)); > return *this; > } > > template< class Source > > typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value, > path& > >::type append(Source const& source) > { > path p; > path_traits::dispatch(source, p.m_pathname); > return append(p); > } > > inline __attribute__ ((__always_inline__)) path& append(path const& p, codecvt_type const&) > { > append_v3(p); > return *this; > } > > inline __attribute__ ((__always_inline__)) path& append(string_type const& p, codecvt_type const&) > { > append_v3(p.c_str(), p.c_str() + p.size()); > return *this; > } > > inline __attribute__ ((__always_inline__)) path& append(const value_type* ptr, codecvt_type const&) > { > append_v3(ptr, ptr + string_type::traits_type::length(ptr)); > return *this; > } > > template< class Source > > typename boost::enable_if_c< > path_traits::is_pathable< typename boost::decay< Source >::type >::value && !path_detail::is_native_pathable< Source >::value, > path& > >::type append(Source const& source, codecvt_type const& cvt) > { > path p; > path_traits::dispatch(source, p.m_pathname, cvt); > return append(p); > } > > inline __attribute__ ((__always_inline__)) path& append(const value_type* begin, const value_type* end) > { > append_v3(begin, end); > return *this; > } > > template< class InputIterator > > typename boost::disable_if< path_detail::is_native_char_ptr< InputIterator >, path& >::type > append(InputIterator begin, InputIterator end) > { > path p; > if (begin != end) > { > std::basic_string< typename std::iterator_traits< InputIterator >::value_type > seq(begin, end); > path_traits::convert(seq.c_str(), seq.c_str() + seq.size(), p.m_pathname); > } > return append(p); > } > > inline __attribute__ ((__always_inline__)) path& append(const value_type* begin, const value_type* end, codecvt_type const&) > { > append_v3(begin, end); > return *this; > } > > template< class InputIterator > > typename boost::disable_if< path_detail::is_native_char_ptr< InputIterator >, path& >::type > append(InputIterator begin, InputIterator end, const codecvt_type& cvt) > { > path p; > if (begin != end) > { > std::basic_string< typename std::iterator_traits< InputIterator >::value_type > seq(begin, end); > path_traits::convert(seq.c_str(), seq.c_str() + seq.size(), p.m_pathname, cvt); > } > return append(p); > } > > > > void clear() noexcept { m_pathname.clear(); } > > path& make_preferred() > { > > return *this; > } > > > > path& remove_filename(); > path& remove_trailing_separator(); > path& replace_extension(path const& new_extension = path()); > void swap(path& rhs) noexcept { m_pathname.swap(rhs.m_pathname); } ># 698 "/usr/include/boost/filesystem/path.hpp" 3 4 > string_type const& native() const noexcept { return m_pathname; } > const value_type* c_str() const noexcept { return m_pathname.c_str(); } > string_type::size_type size() const noexcept { return m_pathname.size(); } > > template< class String > > String string() const; > > template< class String > > String string(codecvt_type const& cvt) const; ># 729 "/usr/include/boost/filesystem/path.hpp" 3 4 > std::string const& string() const { return m_pathname; } > std::string const& string(codecvt_type const&) const { return m_pathname; } > > std::wstring wstring() const > { > std::wstring tmp; > if (!m_pathname.empty()) > path_traits::convert(m_pathname.c_str(), m_pathname.c_str() + m_pathname.size(), tmp); > return tmp; > } > std::wstring wstring(codecvt_type const& cvt) const > { > std::wstring tmp; > if (!m_pathname.empty()) > path_traits::convert(m_pathname.c_str(), m_pathname.c_str() + m_pathname.size(), tmp, cvt); > return tmp; > } ># 756 "/usr/include/boost/filesystem/path.hpp" 3 4 > path generic_path() const { return path(*this); } > > > template< class String > > String generic_string() const; > > template< class String > > String generic_string(codecvt_type const& cvt) const; ># 772 "/usr/include/boost/filesystem/path.hpp" 3 4 > std::string const& generic_string() const { return m_pathname; } > std::string const& generic_string(codecvt_type const&) const { return m_pathname; } > std::wstring generic_wstring() const { return this->wstring(); } > std::wstring generic_wstring(codecvt_type const& cvt) const { return this->wstring(cvt); } > > > > > inline __attribute__ ((__always_inline__)) int compare(path const& p) const noexcept > { > return compare_v3(p); > } > int compare(std::string const& s) const { return compare(path(s)); } > int compare(const value_type* s) const { return compare(path(s)); } > > > > path root_path() const { return path(m_pathname.c_str(), m_pathname.c_str() + find_root_path_size()); } > > path root_name() const { return path(m_pathname.c_str(), m_pathname.c_str() + find_root_name_size()); } > > > path root_directory() const > { > path_detail::substring root_dir = find_root_directory(); > const value_type* p = m_pathname.c_str() + root_dir.pos; > return path(p, p + root_dir.size); > } > > path relative_path() const > { > path_detail::substring root_dir = find_relative_path(); > const value_type* p = m_pathname.c_str() + root_dir.pos; > return path(p, p + root_dir.size); > } > > path parent_path() const { return path(m_pathname.c_str(), m_pathname.c_str() + find_parent_path_size()); } > > inline __attribute__ ((__always_inline__)) path filename() const { return filename_v3(); } > inline __attribute__ ((__always_inline__)) path stem() const { return stem_v3(); } > inline __attribute__ ((__always_inline__)) path extension() const { return extension_v3(); } > > > > bool empty() const noexcept { return m_pathname.empty(); } > bool filename_is_dot() const; > bool filename_is_dot_dot() const; > bool has_root_path() const { return find_root_path_size() > 0; } > bool has_root_name() const { return find_root_name_size() > 0; } > bool has_root_directory() const { return find_root_directory().size > 0; } > bool has_relative_path() const { return find_relative_path().size > 0; } > bool has_parent_path() const { return find_parent_path_size() > 0; } > inline __attribute__ ((__always_inline__)) bool has_filename() const { return has_filename_v3(); } > bool has_stem() const { return !stem().empty(); } > bool has_extension() const { return !extension().empty(); } > bool is_relative() const { return !is_absolute(); } > bool is_absolute() const > { > > > > > return has_root_directory(); > > } > > > > inline __attribute__ ((__always_inline__)) path lexically_normal() const { return lexically_normal_v3(); } > path lexically_relative(path const& base) const; > path lexically_proximate(path const& base) const > { > path tmp(lexically_relative(base)); > return tmp.empty() ? *this : tmp; > } > > > > class iterator; > friend class iterator; > typedef iterator const_iterator; > class reverse_iterator; > typedef reverse_iterator const_reverse_iterator; > > iterator begin() const; > iterator end() const; > reverse_iterator rbegin() const; > reverse_iterator rend() const; > > > > static std::locale imbue(std::locale const& loc); > static codecvt_type const& codecvt(); > > > > > > path& normalize() > { > path tmp(lexically_normal()); > m_pathname.swap(tmp.m_pathname); > return *this; > } > path& remove_leaf() { return remove_filename(); } > path leaf() const { return filename(); } > path branch_path() const { return parent_path(); } > path generic() const { return generic_path(); } > bool has_leaf() const { return !m_pathname.empty(); } > bool has_branch_path() const { return !parent_path().empty(); } > bool is_complete() const { return is_absolute(); } ># 899 "/usr/include/boost/filesystem/path.hpp" 3 4 >private: > bool has_filename_v3() const { return !m_pathname.empty(); } > bool has_filename_v4() const { return find_filename_v4_size() > 0; } > path filename_v3() const; > path filename_v4() const > { > string_type::size_type filename_size = find_filename_v4_size(); > string_type::size_type pos = m_pathname.size() - filename_size; > const value_type* p = m_pathname.c_str() + pos; > return path(p, p + filename_size); > } > path stem_v3() const; > path stem_v4() const; > path extension_v3() const; > path extension_v4() const; > > path lexically_normal_v3() const; > path lexically_normal_v4() const; > > int compare_v3(path const& p) const noexcept; > int compare_v4(path const& p) const noexcept; > > void append_v3(const value_type* b, const value_type* e); > void append_v4(const value_type* b, const value_type* e); > void append_v3(path const& p); > void append_v4(path const& p); > > > > string_type::size_type append_separator_if_needed(); > void erase_redundant_separator(string_type::size_type sep_pos); > > string_type::size_type find_root_name_size() const; > string_type::size_type find_root_path_size() const; > path_detail::substring find_root_directory() const; > path_detail::substring find_relative_path() const; > string_type::size_type find_parent_path_size() const; > string_type::size_type find_filename_v4_size() const; > >private: ># 947 "/usr/include/boost/filesystem/path.hpp" 3 4 > string_type m_pathname; > >}; > >namespace detail { > int lex_compare_v3(path::iterator first1, path::iterator last1, path::iterator first2, path::iterator last2); > int lex_compare_v4(path::iterator first1, path::iterator last1, path::iterator first2, path::iterator last2); > path const& dot_path(); > path const& dot_dot_path(); >} > > >typedef path wpath; > > > > > > >class path::iterator : > public boost::iterator_facade< > path::iterator, > const path, > boost::bidirectional_traversal_tag > > >{ >private: > friend class boost::iterator_core_access; > friend class boost::filesystem::path; > friend class boost::filesystem::path::reverse_iterator; > friend int detail::lex_compare_v3(path::iterator first1, path::iterator last1, path::iterator first2, path::iterator last2); > > path const& dereference() const { return m_element; } > > bool equal(iterator const& rhs) const > { > return m_path_ptr == rhs.m_path_ptr && m_pos == rhs.m_pos; > } > > inline __attribute__ ((__always_inline__)) void increment() { increment_v3(); } > inline __attribute__ ((__always_inline__)) void decrement() { decrement_v3(); } > >private: > void increment_v3(); > void increment_v4(); > void decrement_v3(); > void decrement_v4(); > >private: > > path m_element; > > const path* m_path_ptr; > > > > > > string_type::size_type m_pos; >}; > > > > > >class path::reverse_iterator : > public boost::iterator_facade< > path::reverse_iterator, > const path, > boost::bidirectional_traversal_tag > > >{ >public: > explicit reverse_iterator(iterator itr) : > m_itr(itr) > { > if (itr != itr.m_path_ptr->begin()) > m_element = *--itr; > } > >private: > friend class boost::iterator_core_access; > friend class boost::filesystem::path; > > path const& dereference() const { return m_element; } > bool equal(reverse_iterator const& rhs) const { return m_itr == rhs.m_itr; } > > void increment() > { > --m_itr; > if (m_itr != m_itr.m_path_ptr->begin()) > { > iterator tmp = m_itr; > m_element = *--tmp; > } > } > > void decrement() > { > m_element = *m_itr; > ++m_itr; > } > >private: > iterator m_itr; > path m_element; >}; ># 1063 "/usr/include/boost/filesystem/path.hpp" 3 4 >inline bool lexicographical_compare(path::iterator first1, path::iterator last1, path::iterator first2, path::iterator last2) >{ > return detail::lex_compare_v3(first1, last1, first2, last2) < 0; >} > >inline bool operator==(path const& lhs, path const& rhs) >{ > return lhs.compare(rhs) == 0; >} > >inline bool operator==(path const& lhs, path::string_type const& rhs) >{ > return lhs.compare(rhs) == 0; >} > >inline bool operator==(path::string_type const& lhs, path const& rhs) >{ > return rhs.compare(lhs) == 0; >} > >inline bool operator==(path const& lhs, const path::value_type* rhs) >{ > return lhs.compare(rhs) == 0; >} > >inline bool operator==(const path::value_type* lhs, path const& rhs) >{ > return rhs.compare(lhs) == 0; >} > >inline bool operator!=(path const& lhs, path const& rhs) >{ > return lhs.compare(rhs) != 0; >} > >inline bool operator!=(path const& lhs, path::string_type const& rhs) >{ > return lhs.compare(rhs) != 0; >} > >inline bool operator!=(path::string_type const& lhs, path const& rhs) >{ > return rhs.compare(lhs) != 0; >} > >inline bool operator!=(path const& lhs, const path::value_type* rhs) >{ > return lhs.compare(rhs) != 0; >} > >inline bool operator!=(const path::value_type* lhs, path const& rhs) >{ > return rhs.compare(lhs) != 0; >} > > > >inline bool operator<(path const& lhs, path const& rhs) >{ > return lhs.compare(rhs) < 0; >} >inline bool operator<=(path const& lhs, path const& rhs) >{ > return !(rhs < lhs); >} >inline bool operator>(path const& lhs, path const& rhs) >{ > return rhs < lhs; >} >inline bool operator>=(path const& lhs, path const& rhs) >{ > return !(lhs < rhs); >} > > >template< typename T > >inline typename boost::enable_if< boost::is_same< T, path >, std::size_t >::type hash_value(T const& p) noexcept >{ > > > > > > > return hash_range(p.native().begin(), p.native().end()); > >} > >inline void swap(path& lhs, path& rhs) noexcept >{ > lhs.swap(rhs); >} > >inline path operator/(path const& lhs, path const& rhs) >{ > path p = lhs; > p /= rhs; > return p; >} > > >inline path operator/(path&& lhs, path const& rhs) >{ > lhs /= rhs; > return std::move(lhs); >} > > > > > > >template< class Char, class Traits > >inline std::basic_ostream< Char, Traits >& >operator<<(std::basic_ostream< Char, Traits >& os, path const& p) >{ > return os << boost::io::quoted(p.template string< std::basic_string< Char > >(), static_cast< Char >('&')); >} > >template< class Char, class Traits > >inline std::basic_istream< Char, Traits >& >operator>>(std::basic_istream< Char, Traits >& is, path& p) >{ > std::basic_string< Char > str; > is >> boost::io::quoted(str, static_cast< Char >('&')); > p = str; > return is; >} > > > > > > > bool portable_posix_name(std::string const& name); > bool windows_name(std::string const& name); > bool portable_name(std::string const& name); > bool portable_directory_name(std::string const& name); > bool portable_file_name(std::string const& name); > bool native(std::string const& name); > >namespace detail { > > > > > >inline bool is_directory_separator(path::value_type c) noexcept >{ > return c == path::separator > > > > ; >} > >inline bool is_element_separator(path::value_type c) noexcept >{ > return c == path::separator > > > > ; >} > >} > > > > > >inline path::reverse_iterator path::rbegin() const >{ > return reverse_iterator(end()); >} >inline path::reverse_iterator path::rend() const >{ > return reverse_iterator(begin()); >} > >inline bool path::filename_is_dot() const >{ > > > path p(filename()); > return p.size() == 1 && *p.c_str() == dot; >} > >inline bool path::filename_is_dot_dot() const >{ > return size() >= 2 && m_pathname[size() - 1] == dot && m_pathname[size() - 2] == dot && (m_pathname.size() == 2 || detail::is_element_separator(m_pathname[size() - 3])); > > >} > > > > > >template<> >inline std::string path::string< std::string >() const >{ > return string(); >} > >template<> >inline std::wstring path::string< std::wstring >() const >{ > return wstring(); >} > >template<> >inline std::string path::string< std::string >(const codecvt_type& cvt) const >{ > return string(cvt); >} > >template<> >inline std::wstring path::string< std::wstring >(const codecvt_type& cvt) const >{ > return wstring(cvt); >} > >template<> >inline std::string path::generic_string< std::string >() const >{ > return generic_string(); >} > >template<> >inline std::wstring path::generic_string< std::wstring >() const >{ > return generic_wstring(); >} > >template<> >inline std::string path::generic_string< std::string >(codecvt_type const& cvt) const >{ > return generic_string(cvt); >} > >template<> >inline std::wstring path::generic_string< std::wstring >(codecvt_type const& cvt) const >{ > return generic_wstring(cvt); >} > > > > > > >namespace path_traits { > >inline void convert(const char* from, > const char* from_end, > std::wstring& to) >{ > convert(from, from_end, to, path::codecvt()); >} > >inline void convert(const wchar_t* from, > const wchar_t* from_end, > std::string& to) >{ > convert(from, from_end, to, path::codecvt()); >} > >inline void convert(const char* from, std::wstring& to) >{ > (static_cast <bool> (!!from) ? void (0) : __assert_fail ("!!from", "/usr/include/boost/filesystem/path.hpp", 1333, __extension__ __PRETTY_FUNCTION__)); > convert(from, 0, to, path::codecvt()); >} > >inline void convert(const wchar_t* from, std::string& to) >{ > (static_cast <bool> (!!from) ? void (0) : __assert_fail ("!!from", "/usr/include/boost/filesystem/path.hpp", 1339, __extension__ __PRETTY_FUNCTION__)); > convert(from, 0, to, path::codecvt()); >} > >} >} >} > > > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 1350 "/usr/include/boost/filesystem/path.hpp" 2 3 4 ># 17 "/usr/include/boost/filesystem.hpp" 2 3 4 ># 1 "/usr/include/boost/filesystem/exception.hpp" 1 3 4 ># 18 "/usr/include/boost/filesystem/exception.hpp" 3 4 ># 1 "/usr/include/boost/system/error_code.hpp" 1 3 4 ># 15 "/usr/include/boost/system/error_code.hpp" 3 4 ># 1 "/usr/include/boost/system/error_condition.hpp" 1 3 4 ># 16 "/usr/include/boost/system/error_code.hpp" 2 3 4 ># 1 "/usr/include/boost/system/errc.hpp" 1 3 4 ># 21 "/usr/include/boost/system/errc.hpp" 3 4 >namespace boost >{ > >namespace system >{ > > > >namespace errc >{ > > >constexpr inline error_code make_error_code( errc_t e ) noexcept >{ > return error_code( e, generic_category() ); >} > > >constexpr inline error_condition make_error_condition( errc_t e ) noexcept >{ > return error_condition( e, generic_category() ); >} > >} > >} > >} ># 17 "/usr/include/boost/system/error_code.hpp" 2 3 4 ># 1 "/usr/include/boost/system/generic_category.hpp" 1 3 4 ># 18 "/usr/include/boost/system/error_code.hpp" 2 3 4 ># 1 "/usr/include/boost/system/system_category.hpp" 1 3 4 ># 19 "/usr/include/boost/system/error_code.hpp" 2 3 4 ># 1 "/usr/include/boost/system/detail/throws.hpp" 1 3 4 ># 13 "/usr/include/boost/system/detail/throws.hpp" 3 4 >namespace boost >{ > >namespace system >{ > >class error_code; > >} > > > >namespace detail >{ ># 36 "/usr/include/boost/system/detail/throws.hpp" 3 4 >inline system::error_code* throws() >{ ># 47 "/usr/include/boost/system/detail/throws.hpp" 3 4 > return reinterpret_cast<system::error_code*>(8); >} > >} > >inline system::error_code& throws() >{ > return *detail::throws(); >} > >} ># 20 "/usr/include/boost/system/error_code.hpp" 2 3 4 ># 19 "/usr/include/boost/filesystem/exception.hpp" 2 3 4 ># 1 "/usr/include/boost/system/system_error.hpp" 1 3 4 ># 13 "/usr/include/boost/system/system_error.hpp" 3 4 ># 1 "/usr/include/c++/13/cassert" 1 3 4 ># 41 "/usr/include/c++/13/cassert" 3 4 > ># 42 "/usr/include/c++/13/cassert" 3 > > ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 45 "/usr/include/c++/13/cassert" 2 3 ># 14 "/usr/include/boost/system/system_error.hpp" 2 3 4 > >namespace boost >{ >namespace system >{ > >class __attribute__((__visibility__("default"))) system_error: public std::runtime_error >{ >private: > > error_code code_; > >private: > > static std::string build_message( char const * prefix, error_code const & ec ) > { > std::string r; > > if( prefix ) > { > r += prefix; > r += ": "; > } > > r += ec.what(); > return r; > } > > static std::string build_message( char const * prefix, int ev, error_category const & cat ) > { > return build_message( prefix, error_code( ev, cat ) ); > } > >public: > > explicit system_error( error_code const & ec ) > : std::runtime_error( build_message( 0, ec ) ), code_( ec ) {} > > system_error( error_code const & ec, std::string const & prefix ) > : std::runtime_error( build_message( prefix.c_str(), ec ) ), code_( ec ) {} > > system_error( error_code const & ec, char const * prefix ) > : std::runtime_error( build_message( prefix, ec ) ), code_( ec ) {} > > system_error( int ev, error_category const & ecat ) > : std::runtime_error( build_message( 0, ev, ecat ) ), code_( ev, ecat ) {} > > system_error( int ev, error_category const & ecat, std::string const & prefix ) > : std::runtime_error( build_message( prefix.c_str(), ev, ecat ) ), code_( ev, ecat ) {} > > system_error( int ev, error_category const & ecat, char const * prefix ) > : std::runtime_error( build_message( prefix, ev, ecat ) ), code_( ev, ecat ) {} > > error_code code() const noexcept > { > return code_; > } >}; > >} >} ># 20 "/usr/include/boost/filesystem/exception.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 1 3 4 ># 18 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 19 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 2 3 4 > ># 1 "/usr/include/boost/smart_ptr/detail/sp_convertible.hpp" 1 3 4 ># 35 "/usr/include/boost/smart_ptr/detail/sp_convertible.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > >template< class Y, class T > struct sp_convertible >{ > typedef char (&yes) [1]; > typedef char (&no) [2]; > > static yes f( T* ); > static no f( ... ); > > enum _vt { value = sizeof( (f)( static_cast<Y*>(0) ) ) == sizeof(yes) }; >}; > >template< class Y, class T > struct sp_convertible< Y, T[] > >{ > enum _vt { value = false }; >}; > >template< class Y, class T > struct sp_convertible< Y[], T[] > >{ > enum _vt { value = sp_convertible< Y[1], T[1] >::value }; >}; > >template< class Y, std::size_t N, class T > struct sp_convertible< Y[N], T[] > >{ > enum _vt { value = sp_convertible< Y[1], T[1] >::value }; >}; > >struct sp_empty >{ >}; > >template< bool > struct sp_enable_if_convertible_impl; > >template<> struct sp_enable_if_convertible_impl<true> >{ > typedef sp_empty type; >}; > >template<> struct sp_enable_if_convertible_impl<false> >{ >}; > >template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > >{ >}; > >} > >} ># 21 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp" 1 3 4 ># 23 "/usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > > > > > > > > typedef std::nullptr_t sp_nullptr_t; > > > >} > >} ># 22 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_noexcept.hpp" 1 3 4 ># 23 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 2 3 4 > ># 1 "/usr/include/boost/config/no_tr1/functional.hpp" 1 3 4 ># 25 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 2 3 4 ># 35 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 3 4 >namespace boost >{ ># 53 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 3 4 >template<class T> class intrusive_ptr >{ >private: > > typedef intrusive_ptr this_type; > >public: > > typedef T element_type; > > constexpr intrusive_ptr() noexcept : px( 0 ) > { > } > > intrusive_ptr( T * p, bool add_ref = true ): px( p ) > { > if( px != 0 && add_ref ) intrusive_ptr_add_ref( px ); > } > > > > template<class U> > > > intrusive_ptr( intrusive_ptr<U> const & rhs, typename boost::detail::sp_enable_if_convertible<U,T>::type = boost::detail::sp_empty() ) > > > > > > > : px( rhs.get() ) > { > if( px != 0 ) intrusive_ptr_add_ref( px ); > } > > > > intrusive_ptr(intrusive_ptr const & rhs): px( rhs.px ) > { > if( px != 0 ) intrusive_ptr_add_ref( px ); > } > > ~intrusive_ptr() > { > if( px != 0 ) intrusive_ptr_release( px ); > } > > > > template<class U> intrusive_ptr & operator=(intrusive_ptr<U> const & rhs) > { > this_type(rhs).swap(*this); > return *this; > } > > > > > > > > intrusive_ptr(intrusive_ptr && rhs) noexcept : px( rhs.px ) > { > rhs.px = 0; > } > > intrusive_ptr & operator=(intrusive_ptr && rhs) noexcept > { > this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this); > return *this; > } > > template<class U> friend class intrusive_ptr; > > template<class U> > > > intrusive_ptr(intrusive_ptr<U> && rhs, typename boost::detail::sp_enable_if_convertible<U,T>::type = boost::detail::sp_empty()) > > > > > > > : px( rhs.px ) > { > rhs.px = 0; > } > > template<class U> > intrusive_ptr & operator=(intrusive_ptr<U> && rhs) noexcept > { > this_type( static_cast< intrusive_ptr<U> && >( rhs ) ).swap(*this); > return *this; > } > > > > intrusive_ptr & operator=(intrusive_ptr const & rhs) > { > this_type(rhs).swap(*this); > return *this; > } > > intrusive_ptr & operator=(T * rhs) > { > this_type(rhs).swap(*this); > return *this; > } > > void reset() > { > this_type().swap( *this ); > } > > void reset( T * rhs ) > { > this_type( rhs ).swap( *this ); > } > > void reset( T * rhs, bool add_ref ) > { > this_type( rhs, add_ref ).swap( *this ); > } > > T * get() const noexcept > { > return px; > } > > T * detach() noexcept > { > T * ret = px; > px = 0; > return ret; > } > > T & operator*() const noexcept > { > (static_cast <bool> (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/intrusive_ptr.hpp", 193, __extension__ __PRETTY_FUNCTION__)); > return *px; > } > > T * operator->() const noexcept > { > (static_cast <bool> (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/intrusive_ptr.hpp", 199, __extension__ __PRETTY_FUNCTION__)); > return px; > } > > ># 1 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 1 3 4 ># 12 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 > explicit operator bool () const noexcept > { > return px != 0; > } ># 61 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 > bool operator! () const noexcept > { > return px == 0; > } ># 205 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 2 3 4 > > void swap(intrusive_ptr & rhs) noexcept > { > T * tmp = px; > px = rhs.px; > rhs.px = tmp; > } > >private: > > T * px; >}; > >template<class T, class U> inline bool operator==(intrusive_ptr<T> const & a, intrusive_ptr<U> const & b) noexcept >{ > return a.get() == b.get(); >} > >template<class T, class U> inline bool operator!=(intrusive_ptr<T> const & a, intrusive_ptr<U> const & b) noexcept >{ > return a.get() != b.get(); >} > >template<class T, class U> inline bool operator==(intrusive_ptr<T> const & a, U * b) noexcept >{ > return a.get() == b; >} > >template<class T, class U> inline bool operator!=(intrusive_ptr<T> const & a, U * b) noexcept >{ > return a.get() != b; >} > >template<class T, class U> inline bool operator==(T * a, intrusive_ptr<U> const & b) noexcept >{ > return a == b.get(); >} > >template<class T, class U> inline bool operator!=(T * a, intrusive_ptr<U> const & b) noexcept >{ > return a != b.get(); >} ># 261 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 3 4 >template<class T> inline bool operator==( intrusive_ptr<T> const & p, boost::detail::sp_nullptr_t ) noexcept >{ > return p.get() == 0; >} > >template<class T> inline bool operator==( boost::detail::sp_nullptr_t, intrusive_ptr<T> const & p ) noexcept >{ > return p.get() == 0; >} > >template<class T> inline bool operator!=( intrusive_ptr<T> const & p, boost::detail::sp_nullptr_t ) noexcept >{ > return p.get() != 0; >} > >template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, intrusive_ptr<T> const & p ) noexcept >{ > return p.get() != 0; >} > > > >template<class T> inline bool operator<(intrusive_ptr<T> const & a, intrusive_ptr<T> const & b) noexcept >{ > return std::less<T *>()(a.get(), b.get()); >} > >template<class T> void swap(intrusive_ptr<T> & lhs, intrusive_ptr<T> & rhs) noexcept >{ > lhs.swap(rhs); >} > > > >template<class T> T * get_pointer(intrusive_ptr<T> const & p) noexcept >{ > return p.get(); >} > > > >template<class T, class U> intrusive_ptr<T> static_pointer_cast(intrusive_ptr<U> const & p) >{ > return static_cast<T *>(p.get()); >} > >template<class T, class U> intrusive_ptr<T> const_pointer_cast(intrusive_ptr<U> const & p) >{ > return const_cast<T *>(p.get()); >} > >template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast(intrusive_ptr<U> const & p) >{ > return dynamic_cast<T *>(p.get()); >} > > > >template<class T, class U> intrusive_ptr<T> static_pointer_cast( intrusive_ptr<U> && p ) noexcept >{ > return intrusive_ptr<T>( static_cast<T*>( p.detach() ), false ); >} > >template<class T, class U> intrusive_ptr<T> const_pointer_cast( intrusive_ptr<U> && p ) noexcept >{ > return intrusive_ptr<T>( const_cast<T*>( p.detach() ), false ); >} > >template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast( intrusive_ptr<U> && p ) noexcept >{ > T * p2 = dynamic_cast<T*>( p.get() ); > > intrusive_ptr<T> r( p2, false ); > > if( p2 ) p.detach(); > > return r; >} ># 364 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 3 4 >template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, intrusive_ptr<Y> const & p) > >{ > os << p.get(); > return os; >} ># 379 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp" 3 4 >template< class T > struct hash; > >template< class T > std::size_t hash_value( boost::intrusive_ptr<T> const & p ) noexcept >{ > return boost::hash< T* >()( p.get() ); >} > >} > > > > > >namespace std >{ > >template<class T> struct hash< ::boost::intrusive_ptr<T> > >{ > std::size_t operator()( ::boost::intrusive_ptr<T> const & p ) const noexcept > { > return std::hash< T* >()( p.get() ); > } >}; > >} ># 21 "/usr/include/boost/filesystem/exception.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/intrusive_ref_counter.hpp" 1 3 4 ># 19 "/usr/include/boost/smart_ptr/intrusive_ref_counter.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/atomic_count.hpp" 1 3 4 ># 46 "/usr/include/boost/smart_ptr/detail/atomic_count.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp" 1 3 4 ># 47 "/usr/include/boost/smart_ptr/detail/atomic_count.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp" 1 3 4 ># 48 "/usr/include/boost/smart_ptr/detail/atomic_count.hpp" 2 3 4 ># 78 "/usr/include/boost/smart_ptr/detail/atomic_count.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp" 1 3 4 ># 13 "/usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp" 3 4 ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 14 "/usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp" 2 3 4 ># 22 "/usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > >class atomic_count >{ >public: > > explicit atomic_count( long v ): value_( static_cast< boost::int_least32_t >( v ) ) > { > } > > long operator++() > { > return __atomic_add_fetch( &value_, +1, 4 ); > } > > long operator--() > { > return __atomic_add_fetch( &value_, -1, 4 ); > } > > operator long() const > { > return __atomic_load_n( &value_, 2 ); > } > >private: > > atomic_count(atomic_count const &); > atomic_count & operator=(atomic_count const &); > > boost::int_least32_t value_; >}; > >} > >} ># 79 "/usr/include/boost/smart_ptr/detail/atomic_count.hpp" 2 3 4 ># 20 "/usr/include/boost/smart_ptr/intrusive_ref_counter.hpp" 2 3 4 > > > > ># 34 "/usr/include/boost/smart_ptr/intrusive_ref_counter.hpp" 3 4 >namespace boost { > >namespace sp_adl_block { ># 45 "/usr/include/boost/smart_ptr/intrusive_ref_counter.hpp" 3 4 >struct thread_unsafe_counter >{ > typedef unsigned int type; > > static unsigned int load(unsigned int const& counter) noexcept > { > return counter; > } > > static void increment(unsigned int& counter) noexcept > { > ++counter; > } > > static unsigned int decrement(unsigned int& counter) noexcept > { > return --counter; > } >}; > > > > > > > >struct thread_safe_counter >{ > typedef boost::detail::atomic_count type; > > static unsigned int load(boost::detail::atomic_count const& counter) noexcept > { > return static_cast< unsigned int >(static_cast< long >(counter)); > } > > static void increment(boost::detail::atomic_count& counter) noexcept > { > ++counter; > } > > static unsigned int decrement(boost::detail::atomic_count& counter) noexcept > { > return static_cast< unsigned int >(--counter); > } >}; > >template< typename DerivedT, typename CounterPolicyT = thread_safe_counter > >class intrusive_ref_counter; > >template< typename DerivedT, typename CounterPolicyT > >void intrusive_ptr_add_ref(const intrusive_ref_counter< DerivedT, CounterPolicyT >* p) noexcept; >template< typename DerivedT, typename CounterPolicyT > >void intrusive_ptr_release(const intrusive_ref_counter< DerivedT, CounterPolicyT >* p) noexcept; ># 110 "/usr/include/boost/smart_ptr/intrusive_ref_counter.hpp" 3 4 >template< typename DerivedT, typename CounterPolicyT > >class intrusive_ref_counter >{ >private: > > typedef typename CounterPolicyT::type counter_type; > > mutable counter_type m_ref_counter; > >public: > > > > > > intrusive_ref_counter() noexcept : m_ref_counter(0) > { > } > > > > > > > intrusive_ref_counter(intrusive_ref_counter const&) noexcept : m_ref_counter(0) > { > } > > > > > > > intrusive_ref_counter& operator= (intrusive_ref_counter const&) noexcept { return *this; } > > > > > unsigned int use_count() const noexcept > { > return CounterPolicyT::load(m_ref_counter); > } > >protected: > > > > ~intrusive_ref_counter() = default; > > friend void intrusive_ptr_add_ref< DerivedT, CounterPolicyT >(const intrusive_ref_counter< DerivedT, CounterPolicyT >* p) noexcept; > friend void intrusive_ptr_release< DerivedT, CounterPolicyT >(const intrusive_ref_counter< DerivedT, CounterPolicyT >* p) noexcept; >}; > >template< typename DerivedT, typename CounterPolicyT > >inline void intrusive_ptr_add_ref(const intrusive_ref_counter< DerivedT, CounterPolicyT >* p) noexcept >{ > CounterPolicyT::increment(p->m_ref_counter); >} > >template< typename DerivedT, typename CounterPolicyT > >inline void intrusive_ptr_release(const intrusive_ref_counter< DerivedT, CounterPolicyT >* p) noexcept >{ > if (CounterPolicyT::decrement(p->m_ref_counter) == 0) > delete static_cast< const DerivedT* >(p); >} > >} > >using sp_adl_block::intrusive_ref_counter; >using sp_adl_block::thread_unsafe_counter; >using sp_adl_block::thread_safe_counter; > >} ># 22 "/usr/include/boost/filesystem/exception.hpp" 2 3 4 > ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 24 "/usr/include/boost/filesystem/exception.hpp" 2 3 4 > >namespace boost { >namespace filesystem { > > > > > > > >class __attribute__((__visibility__("default"))) filesystem_error : > public system::system_error >{ > > >public: > filesystem_error(const char* what_arg, system::error_code ec); > filesystem_error(std::string const& what_arg, system::error_code ec); > filesystem_error(const char* what_arg, path const& path1_arg, system::error_code ec); > filesystem_error(std::string const& what_arg, path const& path1_arg, system::error_code ec); > filesystem_error(const char* what_arg, path const& path1_arg, path const& path2_arg, system::error_code ec); > filesystem_error(std::string const& what_arg, path const& path1_arg, path const& path2_arg, system::error_code ec); > > filesystem_error(filesystem_error const& that); > filesystem_error& operator=(filesystem_error const& that); > > ~filesystem_error() noexcept; > > path const& path1() const noexcept > { > return m_imp_ptr.get() ? m_imp_ptr->m_path1 : get_empty_path(); > } > path const& path2() const noexcept > { > return m_imp_ptr.get() ? m_imp_ptr->m_path2 : get_empty_path(); > } > > const char* what() const noexcept override; > >private: > static path const& get_empty_path() noexcept; > >private: > struct impl : > public boost::intrusive_ref_counter< impl > > { > path m_path1; > path m_path2; > std::string m_what; > > impl() = default; > explicit impl(path const& path1) : > m_path1(path1) > { > } > impl(path const& path1, path const& path2) : > m_path1(path1), m_path2(path2) > { > } > }; > boost::intrusive_ptr< impl > m_imp_ptr; >}; > >} >} > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 91 "/usr/include/boost/filesystem/exception.hpp" 2 3 4 ># 18 "/usr/include/boost/filesystem.hpp" 2 3 4 ># 1 "/usr/include/boost/filesystem/directory.hpp" 1 3 4 ># 21 "/usr/include/boost/filesystem/directory.hpp" 3 4 ># 1 "/usr/include/boost/filesystem/file_status.hpp" 1 3 4 ># 20 "/usr/include/boost/filesystem/file_status.hpp" 3 4 ># 1 "/usr/include/boost/detail/bitmask.hpp" 1 3 4 ># 21 "/usr/include/boost/detail/bitmask.hpp" 3 4 ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 22 "/usr/include/boost/detail/bitmask.hpp" 2 3 4 ># 21 "/usr/include/boost/filesystem/file_status.hpp" 2 3 4 > ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 23 "/usr/include/boost/filesystem/file_status.hpp" 2 3 4 > > > >namespace boost { >namespace filesystem { > > > > > >enum file_type >{ > status_error, > > status_unknown = status_error, > > file_not_found, > regular_file, > directory_file, > > symlink_file, > block_file, > character_file, > fifo_file, > socket_file, > reparse_file, > type_unknown > >}; > > > > > >enum perms >{ > no_perms = 0, > > > > > > > owner_read = 0400, > owner_write = 0200, > owner_exe = 0100, > owner_all = 0700, > > group_read = 040, > group_write = 020, > group_exe = 010, > group_all = 070, > > others_read = 04, > others_write = 02, > others_exe = 01, > others_all = 07, > > all_all = 0777, > > > > set_uid_on_exe = 04000, > set_gid_on_exe = 02000, > sticky_bit = 01000, > > > > > > > perms_mask = 07777, > > perms_not_known = 0xFFFF, > > > > add_perms = 0x1000, > remove_perms = 0x2000, > > > > > symlink_perms = 0x4000, > > > _detail_extend_perms_32_1 = 0x7fffffff, > _detail_extend_perms_32_2 = -0x7fffffff - 1 >}; > >inline constexpr perms operator| (perms x , perms y ) { return static_cast<perms>( static_cast<boost::int_least32_t>(x) | static_cast<boost::int_least32_t>(y)); } inline constexpr perms operator& (perms x , perms y ) { return static_cast<perms>( static_cast<boost::int_least32_t>(x) & static_cast<boost::int_least32_t>(y)); } inline constexpr perms operator^ (perms x , perms y ) { return static_cast<perms>( static_cast<boost::int_least32_t>(x) ^ static_cast<boost::int_least32_t>(y)); } inline constexpr perms operator~ (perms x ) { return static_cast<perms>(~static_cast<boost::int_least32_t>(x)); } inline perms & operator&=(perms& x , perms y) { x = x & y ; return x ; } inline perms & operator|=(perms& x , perms y) { x = x | y ; return x ; } inline perms & operator^=(perms& x , perms y) { x = x ^ y ; return x ; } inline constexpr bool operator!(perms x) { return !static_cast<int>(x); } inline constexpr bool bitmask_set(perms x) { return !!x; } > > > > > >class file_status >{ >public: > constexpr file_status() noexcept : > m_value(status_error), > m_perms(perms_not_known) > { > } > explicit constexpr file_status(file_type v) noexcept : > m_value(v), > m_perms(perms_not_known) > { > } > constexpr file_status(file_type v, perms prms) noexcept : > m_value(v), > m_perms(prms) > { > } > > > > > > constexpr file_status(const file_status& rhs) noexcept : > m_value(rhs.m_value), > m_perms(rhs.m_perms) > { > } > constexpr file_status& operator=(const file_status& rhs) noexcept > { > m_value = rhs.m_value; > m_perms = rhs.m_perms; > return *this; > } > > > > constexpr file_status(file_status&& rhs) noexcept : > m_value(static_cast< file_type&& >(rhs.m_value)), > m_perms(static_cast< enum perms&& >(rhs.m_perms)) > { > } > constexpr file_status& operator=(file_status&& rhs) noexcept > { > m_value = static_cast< file_type&& >(rhs.m_value); > m_perms = static_cast< enum perms&& >(rhs.m_perms); > return *this; > } > > > > constexpr file_type type() const noexcept { return m_value; } > constexpr perms permissions() const noexcept { return m_perms; } > > > constexpr void type(file_type v) noexcept { m_value = v; } > constexpr void permissions(perms prms) noexcept { m_perms = prms; } > > constexpr bool operator==(const file_status& rhs) const noexcept > { > return type() == rhs.type() && permissions() == rhs.permissions(); > } > constexpr bool operator!=(const file_status& rhs) const noexcept > { > return !(*this == rhs); > } > >private: > file_type m_value; > enum perms m_perms; >}; > >inline constexpr bool type_present(file_status f) noexcept >{ > return f.type() != status_error; >} > >inline constexpr bool permissions_present(file_status f) noexcept >{ > return f.permissions() != perms_not_known; >} > >inline constexpr bool status_known(file_status f) noexcept >{ > return filesystem::type_present(f) && filesystem::permissions_present(f); >} > >inline constexpr bool exists(file_status f) noexcept >{ > return f.type() != status_error && f.type() != file_not_found; >} > >inline constexpr bool is_regular_file(file_status f) noexcept >{ > return f.type() == regular_file; >} > >inline constexpr bool is_directory(file_status f) noexcept >{ > return f.type() == directory_file; >} > >inline constexpr bool is_symlink(file_status f) noexcept >{ > return f.type() == symlink_file; >} > >inline constexpr bool is_other(file_status f) noexcept >{ > return filesystem::exists(f) && !filesystem::is_regular_file(f) && !filesystem::is_directory(f) && !filesystem::is_symlink(f); >} > > >inline bool is_regular(file_status f) noexcept >{ > return filesystem::is_regular_file(f); >} > > >} >} > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 242 "/usr/include/boost/filesystem/file_status.hpp" 2 3 4 ># 22 "/usr/include/boost/filesystem/directory.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 28 "/usr/include/boost/filesystem/directory.hpp" 2 3 4 ># 1 "/usr/include/boost/core/scoped_enum.hpp" 1 3 4 ># 16 "/usr/include/boost/core/scoped_enum.hpp" 3 4 > > > >namespace boost >{ ># 72 "/usr/include/boost/core/scoped_enum.hpp" 3 4 > template <typename EnumType> > struct native_type > { > typedef EnumType type; > }; > > template <typename UnderlyingType, typename EnumType> > inline > constexpr UnderlyingType underlying_cast(EnumType v) noexcept > { > return static_cast<UnderlyingType>(v); > } > > template <typename EnumType> > inline > constexpr EnumType native_value(EnumType e) noexcept > { > return e; > } > > >} ># 29 "/usr/include/boost/filesystem/directory.hpp" 2 3 4 > > > > > > > ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 37 "/usr/include/boost/filesystem/directory.hpp" 2 3 4 > > > >namespace boost { >namespace filesystem { ># 53 "/usr/include/boost/filesystem/directory.hpp" 3 4 >class directory_entry >{ >public: > typedef boost::filesystem::path::value_type value_type; > > directory_entry() noexcept {} > > explicit directory_entry(boost::filesystem::path const& p) : > m_path(p), m_status(file_status()), m_symlink_status(file_status()) > { > } > > directory_entry(boost::filesystem::path const& p, file_status st, file_status symlink_st = file_status()) : > m_path(p), m_status(st), m_symlink_status(symlink_st) > { > } > > directory_entry(directory_entry const& rhs) : > m_path(rhs.m_path), m_status(rhs.m_status), m_symlink_status(rhs.m_symlink_status) > { > } > > directory_entry& operator=(directory_entry const& rhs) > { > m_path = rhs.m_path; > m_status = rhs.m_status; > m_symlink_status = rhs.m_symlink_status; > return *this; > } > > > > > > > directory_entry(directory_entry&& rhs) noexcept : > m_path(std::move(rhs.m_path)), > m_status(std::move(rhs.m_status)), > m_symlink_status(std::move(rhs.m_symlink_status)) > { > } > > directory_entry& operator=(directory_entry&& rhs) noexcept > { > m_path = std::move(rhs.m_path); > m_status = std::move(rhs.m_status); > m_symlink_status = std::move(rhs.m_symlink_status); > return *this; > } > > > void assign(boost::filesystem::path const& p, file_status st = file_status(), file_status symlink_st = file_status()) > { > m_path = p; > m_status = st; > m_symlink_status = symlink_st; > } > > void replace_filename(boost::filesystem::path const& p, file_status st = file_status(), file_status symlink_st = file_status()) > { > m_path.remove_filename(); > m_path /= p; > m_status = st; > m_symlink_status = symlink_st; > } > > > void replace_leaf(boost::filesystem::path const& p, file_status st, file_status symlink_st) > { > replace_filename(p, st, symlink_st); > } > > > boost::filesystem::path const& path() const noexcept > { > return m_path; > } > operator boost::filesystem::path const&() const noexcept { return m_path; } > file_status status() const { return get_status(); } > file_status status(system::error_code& ec) const noexcept { return get_status(&ec); } > file_status symlink_status() const { return get_symlink_status(); } > file_status symlink_status(system::error_code& ec) const noexcept { return get_symlink_status(&ec); } > > bool operator==(directory_entry const& rhs) const noexcept { return m_path == rhs.m_path; } > bool operator!=(directory_entry const& rhs) const noexcept { return m_path != rhs.m_path; } > bool operator<(directory_entry const& rhs) const noexcept { return m_path < rhs.m_path; } > bool operator<=(directory_entry const& rhs) const noexcept { return m_path <= rhs.m_path; } > bool operator>(directory_entry const& rhs) const noexcept { return m_path > rhs.m_path; } > bool operator>=(directory_entry const& rhs) const noexcept { return m_path >= rhs.m_path; } > >private: > file_status get_status(system::error_code* ec = 0) const; > file_status get_symlink_status(system::error_code* ec = 0) const; > >private: > boost::filesystem::path m_path; > mutable file_status m_status; > mutable file_status m_symlink_status; >}; ># 165 "/usr/include/boost/filesystem/directory.hpp" 3 4 >inline file_status status(directory_entry const& e) >{ > return e.status(); >} >inline file_status status(directory_entry const& e, system::error_code& ec) noexcept >{ > return e.status(ec); >} >inline bool type_present(directory_entry const& e) >{ > return filesystem::type_present(e.status()); >} >inline bool type_present(directory_entry const& e, system::error_code& ec) noexcept >{ > return filesystem::type_present(e.status(ec)); >} >inline bool status_known(directory_entry const& e) >{ > return filesystem::status_known(e.status()); >} >inline bool status_known(directory_entry const& e, system::error_code& ec) noexcept >{ > return filesystem::status_known(e.status(ec)); >} >inline bool exists(directory_entry const& e) >{ > return filesystem::exists(e.status()); >} >inline bool exists(directory_entry const& e, system::error_code& ec) noexcept >{ > return filesystem::exists(e.status(ec)); >} >inline bool is_regular_file(directory_entry const& e) >{ > return filesystem::is_regular_file(e.status()); >} >inline bool is_regular_file(directory_entry const& e, system::error_code& ec) noexcept >{ > return filesystem::is_regular_file(e.status(ec)); >} >inline bool is_directory(directory_entry const& e) >{ > return filesystem::is_directory(e.status()); >} >inline bool is_directory(directory_entry const& e, system::error_code& ec) noexcept >{ > return filesystem::is_directory(e.status(ec)); >} >inline bool is_symlink(directory_entry const& e) >{ > return filesystem::is_symlink(e.symlink_status()); >} >inline bool is_symlink(directory_entry const& e, system::error_code& ec) noexcept >{ > return filesystem::is_symlink(e.symlink_status(ec)); >} >inline bool is_other(directory_entry const& e) >{ > return filesystem::is_other(e.status()); >} >inline bool is_other(directory_entry const& e, system::error_code& ec) noexcept >{ > return filesystem::is_other(e.status(ec)); >} > >inline bool is_regular(directory_entry const& e) >{ > return filesystem::is_regular(e.status()); >} ># 242 "/usr/include/boost/filesystem/directory.hpp" 3 4 >enum class directory_options : unsigned int >{ > none = 0u, > skip_permission_denied = 1u, > follow_directory_symlink = 1u << 1, > skip_dangling_symlinks = 1u << 2, > pop_on_error = 1u << 3, > > _detail_no_push = 1u << 4 >} >; > >inline constexpr directory_options operator| (directory_options x , directory_options y ) { return static_cast<directory_options>( static_cast<boost::int_least32_t>(x) | static_cast<boost::int_least32_t>(y)); } inline constexpr directory_options operator& (directory_options x , directory_options y ) { return static_cast<directory_options>( static_cast<boost::int_least32_t>(x) & static_cast<boost::int_least32_t>(y)); } inline constexpr directory_options operator^ (directory_options x , directory_options y ) { return static_cast<directory_options>( static_cast<boost::int_least32_t>(x) ^ static_cast<boost::int_least32_t>(y)); } inline constexpr directory_options operator~ (directory_options x ) { return static_cast<directory_options>(~static_cast<boost::int_least32_t>(x)); } inline directory_options & operator&=(directory_options& x , directory_options y) { x = x & y ; return x ; } inline directory_options & operator|=(directory_options& x , directory_options y) { x = x | y ; return x ; } inline directory_options & operator^=(directory_options& x , directory_options y) { x = x ^ y ; return x ; } inline constexpr bool operator!(directory_options x) { return !static_cast<int>(x); } inline constexpr bool bitmask_set(directory_options x) { return !!x; } > >class directory_iterator; > >namespace detail { > > >system::error_code dir_itr_close( > void*& handle > > , void*& buffer > > ) noexcept; > >struct dir_itr_imp : > public boost::intrusive_ref_counter< dir_itr_imp > >{ > directory_entry dir_entry; > void* handle; > > > void* buffer; > > > dir_itr_imp() noexcept : > handle(0) > > , buffer(0) > > { > } > > ~dir_itr_imp() noexcept > { > dir_itr_close(handle > > , buffer > > ); > } >}; > > void directory_iterator_construct(directory_iterator& it, path const& p, unsigned int opts, system::error_code* ec); > void directory_iterator_increment(directory_iterator& it, system::error_code* ec); > >} > > > > > > > >class directory_iterator : > public boost::iterator_facade< > directory_iterator, > directory_entry, > boost::single_pass_traversal_tag > > >{ > friend class boost::iterator_core_access; > > friend void detail::directory_iterator_construct(directory_iterator& it, path const& p, unsigned int opts, system::error_code* ec); > friend void detail::directory_iterator_increment(directory_iterator& it, system::error_code* ec); > >public: > directory_iterator() noexcept {} > > > > explicit directory_iterator(path const& p, directory_options opts = directory_options::none) > { > detail::directory_iterator_construct(*this, p, static_cast< unsigned int >(opts), 0); > } > > directory_iterator(path const& p, system::error_code& ec) noexcept > { > detail::directory_iterator_construct(*this, p, static_cast< unsigned int >(directory_options::none), &ec); > } > > directory_iterator(path const& p, directory_options opts, system::error_code& ec) noexcept > { > detail::directory_iterator_construct(*this, p, static_cast< unsigned int >(opts), &ec); > } > > directory_iterator(directory_iterator const& that) = default; > directory_iterator& operator=(directory_iterator const& that) = default; > > > directory_iterator(directory_iterator&& that) noexcept : > m_imp(std::move(that.m_imp)) > { > } > > directory_iterator& operator=(directory_iterator&& that) noexcept > { > m_imp = std::move(that.m_imp); > return *this; > } > > > directory_iterator& increment(system::error_code& ec) noexcept > { > detail::directory_iterator_increment(*this, &ec); > return *this; > } > >private: > boost::iterator_facade< > directory_iterator, > directory_entry, > boost::single_pass_traversal_tag > >::reference dereference() const > { > (static_cast <bool> ((!is_end())&&("attempt to dereference end directory iterator")) ? void (0) : __assert_fail ("(!is_end())&&(\"attempt to dereference end directory iterator\")", "/usr/include/boost/filesystem/directory.hpp", 368, __extension__ __PRETTY_FUNCTION__)); > return m_imp->dir_entry; > } > > void increment() { detail::directory_iterator_increment(*this, 0); } > > bool equal(directory_iterator const& rhs) const noexcept > { > return m_imp == rhs.m_imp || (is_end() && rhs.is_end()); > } > > bool is_end() const noexcept > { > > > return !m_imp || !m_imp->handle; > } > >private: > > > boost::intrusive_ptr< detail::dir_itr_imp > m_imp; >}; > > > > > > >inline directory_iterator const& begin(directory_iterator const& iter) noexcept >{ > return iter; >} > >inline directory_iterator end(directory_iterator const&) noexcept >{ > return directory_iterator(); >} > > >inline directory_iterator const& cbegin(directory_iterator const& iter) noexcept >{ > return iter; >} > >inline directory_iterator cend(directory_iterator const&) noexcept >{ > return directory_iterator(); >} > > > >inline directory_iterator& range_begin(directory_iterator& iter) noexcept >{ > return iter; >} > >inline directory_iterator range_begin(directory_iterator const& iter) noexcept >{ > return iter; >} > >inline directory_iterator range_end(directory_iterator&) noexcept >{ > return directory_iterator(); >} > >inline directory_iterator range_end(directory_iterator const&) noexcept >{ > return directory_iterator(); >} > >} > > >template< typename C, typename Enabler > >struct range_mutable_iterator; > >template<> >struct range_mutable_iterator< boost::filesystem::directory_iterator, void > >{ > typedef boost::filesystem::directory_iterator type; >}; > >template< typename C, typename Enabler > >struct range_const_iterator; > >template<> >struct range_const_iterator< boost::filesystem::directory_iterator, void > >{ > typedef boost::filesystem::directory_iterator type; >}; > >namespace filesystem { ># 471 "/usr/include/boost/filesystem/directory.hpp" 3 4 >enum class symlink_option : unsigned int >{ > none = static_cast< unsigned int >(directory_options::none), > no_recurse = none, > recurse = static_cast< unsigned int >(directory_options::follow_directory_symlink), > _detail_no_push = static_cast< unsigned int >(directory_options::_detail_no_push) >} >; > >inline constexpr symlink_option operator| (symlink_option x , symlink_option y ) { return static_cast<symlink_option>( static_cast<boost::int_least32_t>(x) | static_cast<boost::int_least32_t>(y)); } inline constexpr symlink_option operator& (symlink_option x , symlink_option y ) { return static_cast<symlink_option>( static_cast<boost::int_least32_t>(x) & static_cast<boost::int_least32_t>(y)); } inline constexpr symlink_option operator^ (symlink_option x , symlink_option y ) { return static_cast<symlink_option>( static_cast<boost::int_least32_t>(x) ^ static_cast<boost::int_least32_t>(y)); } inline constexpr symlink_option operator~ (symlink_option x ) { return static_cast<symlink_option>(~static_cast<boost::int_least32_t>(x)); } inline symlink_option & operator&=(symlink_option& x , symlink_option y) { x = x & y ; return x ; } inline symlink_option & operator|=(symlink_option& x , symlink_option y) { x = x | y ; return x ; } inline symlink_option & operator^=(symlink_option& x , symlink_option y) { x = x ^ y ; return x ; } inline constexpr bool operator!(symlink_option x) { return !static_cast<int>(x); } inline constexpr bool bitmask_set(symlink_option x) { return !!x; } > > >class recursive_directory_iterator; > >namespace detail { > >struct recur_dir_itr_imp : > public boost::intrusive_ref_counter< recur_dir_itr_imp > >{ > typedef directory_iterator element_type; > std::vector< element_type > m_stack; > > unsigned int m_options; > > explicit recur_dir_itr_imp(unsigned int opts) noexcept : m_options(opts) {} >}; > > void recursive_directory_iterator_construct(recursive_directory_iterator& it, path const& dir_path, unsigned int opts, system::error_code* ec); > void recursive_directory_iterator_increment(recursive_directory_iterator& it, system::error_code* ec); > void recursive_directory_iterator_pop(recursive_directory_iterator& it, system::error_code* ec); > >} > > > > > > > >class recursive_directory_iterator : > public boost::iterator_facade< > recursive_directory_iterator, > directory_entry, > boost::single_pass_traversal_tag > > >{ > friend class boost::iterator_core_access; > > friend void detail::recursive_directory_iterator_construct(recursive_directory_iterator& it, path const& dir_path, unsigned int opts, system::error_code* ec); > friend void detail::recursive_directory_iterator_increment(recursive_directory_iterator& it, system::error_code* ec); > friend void detail::recursive_directory_iterator_pop(recursive_directory_iterator& it, system::error_code* ec); > >public: > recursive_directory_iterator() noexcept {} > > explicit recursive_directory_iterator(path const& dir_path) > { > detail::recursive_directory_iterator_construct(*this, dir_path, static_cast< unsigned int >(directory_options::none), 0); > } > > recursive_directory_iterator(path const& dir_path, system::error_code& ec) > { > detail::recursive_directory_iterator_construct(*this, dir_path, static_cast< unsigned int >(directory_options::none), &ec); > } > > recursive_directory_iterator(path const& dir_path, directory_options opts) > { > detail::recursive_directory_iterator_construct(*this, dir_path, static_cast< unsigned int >(opts), 0); > } > > recursive_directory_iterator(path const& dir_path, directory_options opts, system::error_code& ec) > { > detail::recursive_directory_iterator_construct(*this, dir_path, static_cast< unsigned int >(opts), &ec); > } > > > > recursive_directory_iterator(path const& dir_path, symlink_option opts) > { > detail::recursive_directory_iterator_construct(*this, dir_path, static_cast< unsigned int >(opts), 0); > } > > recursive_directory_iterator(path const& dir_path, symlink_option opts, system::error_code& ec) noexcept > { > detail::recursive_directory_iterator_construct(*this, dir_path, static_cast< unsigned int >(opts), &ec); > } > > > recursive_directory_iterator(recursive_directory_iterator const& that) = default; > recursive_directory_iterator& operator=(recursive_directory_iterator const& that) = default; > > > recursive_directory_iterator(recursive_directory_iterator&& that) noexcept : > m_imp(std::move(that.m_imp)) > { > } > > recursive_directory_iterator& operator=(recursive_directory_iterator&& that) noexcept > { > m_imp = std::move(that.m_imp); > return *this; > } > > > recursive_directory_iterator& increment(system::error_code& ec) noexcept > { > detail::recursive_directory_iterator_increment(*this, &ec); > return *this; > } > > int depth() const noexcept > { > (static_cast <bool> ((!is_end())&&("depth() on end recursive_directory_iterator")) ? void (0) : __assert_fail ("(!is_end())&&(\"depth() on end recursive_directory_iterator\")", "/usr/include/boost/filesystem/directory.hpp", 583, __extension__ __PRETTY_FUNCTION__)); > return static_cast< int >(m_imp->m_stack.size() - 1u); > } > > bool recursion_pending() const noexcept > { > (static_cast <bool> ((!is_end())&&("recursion_pending() on end recursive_directory_iterator")) ? void (0) : __assert_fail ("(!is_end())&&(\"recursion_pending() on end recursive_directory_iterator\")", "/usr/include/boost/filesystem/directory.hpp", 589, __extension__ __PRETTY_FUNCTION__)); > return (m_imp->m_options & static_cast< unsigned int >(directory_options::_detail_no_push)) == 0u; > } > > > int level() const noexcept > { > return depth(); > } > bool no_push_pending() const noexcept { return !recursion_pending(); } > bool no_push_request() const noexcept { return !recursion_pending(); } > > > void pop() > { > detail::recursive_directory_iterator_pop(*this, 0); > } > > void pop(system::error_code& ec) noexcept > { > detail::recursive_directory_iterator_pop(*this, &ec); > } > > void disable_recursion_pending(bool value = true) noexcept > { > (static_cast <bool> ((!is_end())&&("disable_recursion_pending() on end recursive_directory_iterator")) ? void (0) : __assert_fail ("(!is_end())&&(\"disable_recursion_pending() on end recursive_directory_iterator\")", "/usr/include/boost/filesystem/directory.hpp", 614, __extension__ __PRETTY_FUNCTION__)); > if (value) > m_imp->m_options |= static_cast< unsigned int >(directory_options::_detail_no_push); > else > m_imp->m_options &= ~static_cast< unsigned int >(directory_options::_detail_no_push); > } > > > void no_push(bool value = true) noexcept > { > disable_recursion_pending(value); > } > > > file_status status() const > { > (static_cast <bool> ((!is_end())&&("status() on end recursive_directory_iterator")) ? void (0) : __assert_fail ("(!is_end())&&(\"status() on end recursive_directory_iterator\")", "/usr/include/boost/filesystem/directory.hpp", 630, __extension__ __PRETTY_FUNCTION__)); > return m_imp->m_stack.back()->status(); > } > > file_status symlink_status() const > { > (static_cast <bool> ((!is_end())&&("symlink_status() on end recursive_directory_iterator")) ? void (0) : __assert_fail ("(!is_end())&&(\"symlink_status() on end recursive_directory_iterator\")", "/usr/include/boost/filesystem/directory.hpp", 636, __extension__ __PRETTY_FUNCTION__)); > return m_imp->m_stack.back()->symlink_status(); > } > >private: > boost::iterator_facade< > recursive_directory_iterator, > directory_entry, > boost::single_pass_traversal_tag > >::reference dereference() const > { > (static_cast <bool> ((!is_end())&&("dereference of end recursive_directory_iterator")) ? void (0) : __assert_fail ("(!is_end())&&(\"dereference of end recursive_directory_iterator\")", "/usr/include/boost/filesystem/directory.hpp", 647, __extension__ __PRETTY_FUNCTION__)); > return *m_imp->m_stack.back(); > } > > void increment() { detail::recursive_directory_iterator_increment(*this, 0); } > > bool equal(recursive_directory_iterator const& rhs) const noexcept > { > return m_imp == rhs.m_imp || (is_end() && rhs.is_end()); > } > > bool is_end() const noexcept > { > > > return !m_imp || m_imp->m_stack.empty(); > } > >private: > > > boost::intrusive_ptr< detail::recur_dir_itr_imp > m_imp; >}; > > >typedef recursive_directory_iterator wrecursive_directory_iterator; > > > > > > > >inline recursive_directory_iterator const& begin(recursive_directory_iterator const& iter) noexcept >{ > return iter; >} > >inline recursive_directory_iterator end(recursive_directory_iterator const&) noexcept >{ > return recursive_directory_iterator(); >} > > >inline recursive_directory_iterator const& cbegin(recursive_directory_iterator const& iter) noexcept >{ > return iter; >} > >inline recursive_directory_iterator cend(recursive_directory_iterator const&) noexcept >{ > return recursive_directory_iterator(); >} > > > >inline recursive_directory_iterator& range_begin(recursive_directory_iterator& iter) noexcept >{ > return iter; >} > >inline recursive_directory_iterator range_begin(recursive_directory_iterator const& iter) noexcept >{ > return iter; >} > >inline recursive_directory_iterator range_end(recursive_directory_iterator&) noexcept >{ > return recursive_directory_iterator(); >} > >inline recursive_directory_iterator range_end(recursive_directory_iterator const&) noexcept >{ > return recursive_directory_iterator(); >} > >} > > >template<> >struct range_mutable_iterator< boost::filesystem::recursive_directory_iterator, void > >{ > typedef boost::filesystem::recursive_directory_iterator type; >}; > >template<> >struct range_const_iterator< boost::filesystem::recursive_directory_iterator, void > >{ > typedef boost::filesystem::recursive_directory_iterator type; >}; > >} > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 741 "/usr/include/boost/filesystem/directory.hpp" 2 3 4 ># 19 "/usr/include/boost/filesystem.hpp" 2 3 4 ># 1 "/usr/include/boost/filesystem/operations.hpp" 1 3 4 ># 32 "/usr/include/boost/filesystem/operations.hpp" 3 4 ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 33 "/usr/include/boost/filesystem/operations.hpp" 2 3 4 > ># 1 "/usr/include/c++/13/ctime" 1 3 4 ># 39 "/usr/include/c++/13/ctime" 3 4 > ># 40 "/usr/include/c++/13/ctime" 3 ># 35 "/usr/include/boost/filesystem/operations.hpp" 2 3 4 > ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 37 "/usr/include/boost/filesystem/operations.hpp" 2 3 4 > > > >namespace boost { >namespace filesystem { > >struct space_info >{ > > boost::uintmax_t capacity; > boost::uintmax_t free; > boost::uintmax_t available; >}; > >enum class copy_options : unsigned int >{ > none = 0u, > > > skip_existing = 1u, > overwrite_existing = 1u << 1, > update_existing = 1u << 2, > synchronize_data = 1u << 3, > synchronize = 1u << 4, > > > recursive = 1u << 8, > copy_symlinks = 1u << 9, > skip_symlinks = 1u << 10, > directories_only = 1u << 11, > create_symlinks = 1u << 12, > create_hard_links = 1u << 13, > _detail_recursing = 1u << 14 >} >; > >inline constexpr copy_options operator| (copy_options x , copy_options y ) { return static_cast<copy_options>( static_cast<boost::int_least32_t>(x) | static_cast<boost::int_least32_t>(y)); } inline constexpr copy_options operator& (copy_options x , copy_options y ) { return static_cast<copy_options>( static_cast<boost::int_least32_t>(x) & static_cast<boost::int_least32_t>(y)); } inline constexpr copy_options operator^ (copy_options x , copy_options y ) { return static_cast<copy_options>( static_cast<boost::int_least32_t>(x) ^ static_cast<boost::int_least32_t>(y)); } inline constexpr copy_options operator~ (copy_options x ) { return static_cast<copy_options>(~static_cast<boost::int_least32_t>(x)); } inline copy_options & operator&=(copy_options& x , copy_options y) { x = x & y ; return x ; } inline copy_options & operator|=(copy_options& x , copy_options y) { x = x | y ; return x ; } inline copy_options & operator^=(copy_options& x , copy_options y) { x = x ^ y ; return x ; } inline constexpr bool operator!(copy_options x) { return !static_cast<int>(x); } inline constexpr bool bitmask_set(copy_options x) { return !!x; } > > >enum class copy_option >{ > none = static_cast< unsigned int >(copy_options::none), > fail_if_exists = none, > overwrite_if_exists = static_cast< unsigned int >(copy_options::overwrite_existing) >} >; > > > > > > >namespace detail { > > >path absolute(path const& p, path const& base, system::error_code* ec = 0); > >file_status status(path const& p, system::error_code* ec = 0); > >file_status symlink_status(path const& p, system::error_code* ec = 0); > >bool is_empty(path const& p, system::error_code* ec = 0); > >path initial_path(system::error_code* ec = 0); > >path canonical(path const& p, path const& base, system::error_code* ec = 0); > >void copy(path const& from, path const& to, unsigned int options, system::error_code* ec = 0); > > >void copy_directory(path const& from, path const& to, system::error_code* ec = 0); > > >bool copy_file(path const& from, path const& to, > unsigned int options, system::error_code* ec = 0); > >void copy_symlink(path const& existing_symlink, path const& new_symlink, system::error_code* ec = 0); > >bool create_directories(path const& p, system::error_code* ec = 0); > >bool create_directory(path const& p, const path* existing, system::error_code* ec = 0); > >void create_directory_symlink(path const& to, path const& from, system::error_code* ec = 0); > >void create_hard_link(path const& to, path const& from, system::error_code* ec = 0); > >void create_symlink(path const& to, path const& from, system::error_code* ec = 0); > >path current_path(system::error_code* ec = 0); > >void current_path(path const& p, system::error_code* ec = 0); > >bool equivalent(path const& p1, path const& p2, system::error_code* ec = 0); > >boost::uintmax_t file_size(path const& p, system::error_code* ec = 0); > >boost::uintmax_t hard_link_count(path const& p, system::error_code* ec = 0); > >std::time_t creation_time(path const& p, system::error_code* ec = 0); > >std::time_t last_write_time(path const& p, system::error_code* ec = 0); > >void last_write_time(path const& p, const std::time_t new_time, system::error_code* ec = 0); > >void permissions(path const& p, perms prms, system::error_code* ec = 0); > >path read_symlink(path const& p, system::error_code* ec = 0); > >path relative(path const& p, path const& base, system::error_code* ec = 0); > >bool remove(path const& p, system::error_code* ec = 0); > >boost::uintmax_t remove_all(path const& p, system::error_code* ec = 0); > >void rename(path const& old_p, path const& new_p, system::error_code* ec = 0); > >void resize_file(path const& p, uintmax_t size, system::error_code* ec = 0); > >space_info space(path const& p, system::error_code* ec = 0); > >path system_complete(path const& p, system::error_code* ec = 0); > >path temp_directory_path(system::error_code* ec = 0); > >path unique_path(path const& p, system::error_code* ec = 0); > >path weakly_canonical(path const& p, path const& base, system::error_code* ec = 0); > >} > > > > > > > >inline file_status status(path const& p) >{ > return detail::status(p); >} > >inline file_status status(path const& p, system::error_code& ec) >{ > return detail::status(p, &ec); >} > >inline file_status symlink_status(path const& p) >{ > return detail::symlink_status(p); >} > >inline file_status symlink_status(path const& p, system::error_code& ec) >{ > return detail::symlink_status(p, &ec); >} > >inline bool exists(path const& p) >{ > return exists(detail::status(p)); >} > >inline bool exists(path const& p, system::error_code& ec) >{ > return exists(detail::status(p, &ec)); >} > >inline bool is_directory(path const& p) >{ > return is_directory(detail::status(p)); >} > >inline bool is_directory(path const& p, system::error_code& ec) >{ > return is_directory(detail::status(p, &ec)); >} > >inline bool is_regular_file(path const& p) >{ > return is_regular_file(detail::status(p)); >} > >inline bool is_regular_file(path const& p, system::error_code& ec) >{ > return is_regular_file(detail::status(p, &ec)); >} > >inline bool is_other(path const& p) >{ > return is_other(detail::status(p)); >} > >inline bool is_other(path const& p, system::error_code& ec) >{ > return is_other(detail::status(p, &ec)); >} > >inline bool is_symlink(path const& p) >{ > return is_symlink(detail::symlink_status(p)); >} > >inline bool is_symlink(path const& p, system::error_code& ec) >{ > return is_symlink(detail::symlink_status(p, &ec)); >} > > >inline bool is_regular(path const& p) >{ > return is_regular(detail::status(p)); >} > >inline bool is_regular(path const& p, system::error_code& ec) >{ > return is_regular(detail::status(p, &ec)); >} > > >inline bool is_empty(path const& p) >{ > return detail::is_empty(p); >} > >inline bool is_empty(path const& p, system::error_code& ec) >{ > return detail::is_empty(p, &ec); >} > > > > > > > >inline path initial_path() >{ > return detail::initial_path(); >} > >inline path initial_path(system::error_code& ec) >{ > return detail::initial_path(&ec); >} > >template< class Path > >path initial_path() >{ > return initial_path(); >} >template< class Path > >path initial_path(system::error_code& ec) >{ > return detail::initial_path(&ec); >} > >inline path current_path() >{ > return detail::current_path(); >} > >inline path current_path(system::error_code& ec) >{ > return detail::current_path(&ec); >} > >inline void current_path(path const& p) >{ > detail::current_path(p); >} > >inline void current_path(path const& p, system::error_code& ec) noexcept >{ > detail::current_path(p, &ec); >} > >inline path absolute(path const& p, path const& base = current_path()) >{ > return detail::absolute(p, base); >} > >inline path absolute(path const& p, system::error_code& ec) >{ > path base = current_path(ec); > if (ec) > return path(); > return detail::absolute(p, base, &ec); >} > >inline path absolute(path const& p, path const& base, system::error_code& ec) >{ > return detail::absolute(p, base, &ec); >} > >inline path canonical(path const& p, path const& base = current_path()) >{ > return detail::canonical(p, base); >} > >inline path canonical(path const& p, system::error_code& ec) >{ > path base = current_path(ec); > if (ec) > return path(); > return detail::canonical(p, base, &ec); >} > >inline path canonical(path const& p, path const& base, system::error_code& ec) >{ > return detail::canonical(p, base, &ec); >} > > >inline path complete(path const& p) >{ > return absolute(p, initial_path()); >} > >inline path complete(path const& p, path const& base) >{ > return absolute(p, base); >} > > >inline void copy(path const& from, path const& to) >{ > detail::copy(from, to, static_cast< unsigned int >(copy_options::none)); >} > >inline void copy(path const& from, path const& to, system::error_code& ec) noexcept >{ > detail::copy(from, to, static_cast< unsigned int >(copy_options::none), &ec); >} > >inline void copy(path const& from, path const& to, copy_options options) >{ > detail::copy(from, to, static_cast< unsigned int >(options)); >} > >inline void copy(path const& from, path const& to, copy_options options, system::error_code& ec) noexcept >{ > detail::copy(from, to, static_cast< unsigned int >(options), &ec); >} > > >inline void copy_directory(path const& from, path const& to) >{ > detail::copy_directory(from, to); >} > >inline void copy_directory(path const& from, path const& to, system::error_code& ec) noexcept >{ > detail::copy_directory(from, to, &ec); >} > > >inline bool copy_file(path const& from, path const& to) >{ > return detail::copy_file(from, to, static_cast< unsigned int >(copy_options::none)); >} > >inline bool copy_file(path const& from, path const& to, system::error_code& ec) noexcept >{ > return detail::copy_file(from, to, static_cast< unsigned int >(copy_options::none), &ec); >} > >inline bool copy_file(path const& from, path const& to, > copy_options options) >{ > return detail::copy_file(from, to, static_cast< unsigned int >(options)); >} > >inline bool copy_file(path const& from, path const& to, > copy_options options, system::error_code& ec) noexcept >{ > return detail::copy_file(from, to, static_cast< unsigned int >(options), &ec); >} > > >inline bool copy_file(path const& from, path const& to, > copy_option options) >{ > return detail::copy_file(from, to, static_cast< unsigned int >(options)); >} > >inline bool copy_file(path const& from, path const& to, > copy_option options, system::error_code& ec) noexcept >{ > return detail::copy_file(from, to, static_cast< unsigned int >(options), &ec); >} > > >inline void copy_symlink(path const& existing_symlink, path const& new_symlink) >{ > detail::copy_symlink(existing_symlink, new_symlink); >} > >inline void copy_symlink(path const& existing_symlink, path const& new_symlink, system::error_code& ec) noexcept >{ > detail::copy_symlink(existing_symlink, new_symlink, &ec); >} > >inline bool create_directories(path const& p) >{ > return detail::create_directories(p); >} > >inline bool create_directories(path const& p, system::error_code& ec) noexcept >{ > return detail::create_directories(p, &ec); >} > >inline bool create_directory(path const& p) >{ > return detail::create_directory(p, 0); >} > >inline bool create_directory(path const& p, system::error_code& ec) noexcept >{ > return detail::create_directory(p, 0, &ec); >} > >inline bool create_directory(path const& p, path const& existing) >{ > return detail::create_directory(p, &existing); >} > >inline bool create_directory(path const& p, path const& existing, system::error_code& ec) noexcept >{ > return detail::create_directory(p, &existing, &ec); >} > >inline void create_directory_symlink(path const& to, path const& from) >{ > detail::create_directory_symlink(to, from); >} > >inline void create_directory_symlink(path const& to, path const& from, system::error_code& ec) noexcept >{ > detail::create_directory_symlink(to, from, &ec); >} > >inline void create_hard_link(path const& to, path const& new_hard_link) >{ > detail::create_hard_link(to, new_hard_link); >} > >inline void create_hard_link(path const& to, path const& new_hard_link, system::error_code& ec) noexcept >{ > detail::create_hard_link(to, new_hard_link, &ec); >} > >inline void create_symlink(path const& to, path const& new_symlink) >{ > detail::create_symlink(to, new_symlink); >} > >inline void create_symlink(path const& to, path const& new_symlink, system::error_code& ec) noexcept >{ > detail::create_symlink(to, new_symlink, &ec); >} > >inline bool equivalent(path const& p1, path const& p2) >{ > return detail::equivalent(p1, p2); >} > >inline bool equivalent(path const& p1, path const& p2, system::error_code& ec) noexcept >{ > return detail::equivalent(p1, p2, &ec); >} > >inline boost::uintmax_t file_size(path const& p) >{ > return detail::file_size(p); >} > >inline boost::uintmax_t file_size(path const& p, system::error_code& ec) noexcept >{ > return detail::file_size(p, &ec); >} > >inline boost::uintmax_t hard_link_count(path const& p) >{ > return detail::hard_link_count(p); >} > >inline boost::uintmax_t hard_link_count(path const& p, system::error_code& ec) noexcept >{ > return detail::hard_link_count(p, &ec); >} > >inline std::time_t creation_time(path const& p) >{ > return detail::creation_time(p); >} > >inline std::time_t creation_time(path const& p, system::error_code& ec) noexcept >{ > return detail::creation_time(p, &ec); >} > >inline std::time_t last_write_time(path const& p) >{ > return detail::last_write_time(p); >} > >inline std::time_t last_write_time(path const& p, system::error_code& ec) noexcept >{ > return detail::last_write_time(p, &ec); >} > >inline void last_write_time(path const& p, const std::time_t new_time) >{ > detail::last_write_time(p, new_time); >} > >inline void last_write_time(path const& p, const std::time_t new_time, system::error_code& ec) noexcept >{ > detail::last_write_time(p, new_time, &ec); >} > >inline void permissions(path const& p, perms prms) >{ > detail::permissions(p, prms); >} > >inline void permissions(path const& p, perms prms, system::error_code& ec) noexcept >{ > detail::permissions(p, prms, &ec); >} > >inline path read_symlink(path const& p) >{ > return detail::read_symlink(p); >} > >inline path read_symlink(path const& p, system::error_code& ec) >{ > return detail::read_symlink(p, &ec); >} > >inline bool remove(path const& p) >{ > return detail::remove(p); >} > >inline bool remove(path const& p, system::error_code& ec) noexcept >{ > return detail::remove(p, &ec); >} > >inline boost::uintmax_t remove_all(path const& p) >{ > return detail::remove_all(p); >} > >inline boost::uintmax_t remove_all(path const& p, system::error_code& ec) noexcept >{ > return detail::remove_all(p, &ec); >} > >inline void rename(path const& old_p, path const& new_p) >{ > detail::rename(old_p, new_p); >} > >inline void rename(path const& old_p, path const& new_p, system::error_code& ec) noexcept >{ > detail::rename(old_p, new_p, &ec); >} > > >inline void resize_file(path const& p, uintmax_t size) >{ > detail::resize_file(p, size); >} > >inline void resize_file(path const& p, uintmax_t size, system::error_code& ec) noexcept >{ > detail::resize_file(p, size, &ec); >} > >inline path relative(path const& p, path const& base = current_path()) >{ > return detail::relative(p, base); >} > >inline path relative(path const& p, system::error_code& ec) >{ > path base = current_path(ec); > if (ec) > return path(); > return detail::relative(p, base, &ec); >} > >inline path relative(path const& p, path const& base, system::error_code& ec) >{ > return detail::relative(p, base, &ec); >} > >inline space_info space(path const& p) >{ > return detail::space(p); >} > >inline space_info space(path const& p, system::error_code& ec) noexcept >{ > return detail::space(p, &ec); >} > > >inline bool symbolic_link_exists(path const& p) >{ > return is_symlink(filesystem::symlink_status(p)); >} > > >inline path system_complete(path const& p) >{ > return detail::system_complete(p); >} > >inline path system_complete(path const& p, system::error_code& ec) >{ > return detail::system_complete(p, &ec); >} > >inline path temp_directory_path() >{ > return detail::temp_directory_path(); >} > >inline path temp_directory_path(system::error_code& ec) >{ > return detail::temp_directory_path(&ec); >} > >inline path unique_path(path const& p = "%%%%-%%%%-%%%%-%%%%") >{ > return detail::unique_path(p); >} > >inline path unique_path(path const& p, system::error_code& ec) >{ > return detail::unique_path(p, &ec); >} > >inline path weakly_canonical(path const& p, path const& base = current_path()) >{ > return detail::weakly_canonical(p, base); >} > >inline path weakly_canonical(path const& p, system::error_code& ec) >{ > path base = current_path(ec); > if (ec) > return path(); > return detail::weakly_canonical(p, base, &ec); >} > >inline path weakly_canonical(path const& p, path const& base, system::error_code& ec) >{ > return detail::weakly_canonical(p, base, &ec); >} > > > > > > > >namespace detail { > > bool possible_large_file_size_support(); > >} > >} >} > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 718 "/usr/include/boost/filesystem/operations.hpp" 2 3 4 ># 20 "/usr/include/boost/filesystem.hpp" 2 3 4 > ># 1 "/usr/include/boost/filesystem/convenience.hpp" 1 3 4 ># 21 "/usr/include/boost/filesystem/convenience.hpp" 3 4 ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 22 "/usr/include/boost/filesystem/convenience.hpp" 2 3 4 > >namespace boost { >namespace filesystem { > > > >inline std::string extension(const path& p) >{ > return p.extension().string(); >} > >inline std::string basename(const path& p) >{ > return p.stem().string(); >} > >inline path change_extension(const path& p, const path& new_extension) >{ > path new_p(p); > new_p.replace_extension(new_extension); > return new_p; >} > > > >} >} > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 51 "/usr/include/boost/filesystem/convenience.hpp" 2 3 4 ># 22 "/usr/include/boost/filesystem.hpp" 2 3 4 ># 1 "/usr/include/boost/filesystem/string_file.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/string_file.hpp" 3 4 ># 1 "/usr/include/boost/filesystem/fstream.hpp" 1 3 4 ># 21 "/usr/include/boost/filesystem/fstream.hpp" 3 4 ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 22 "/usr/include/boost/filesystem/fstream.hpp" 2 3 4 ># 55 "/usr/include/boost/filesystem/fstream.hpp" 3 4 >namespace boost { >namespace filesystem { > > > > > >template< class charT, class traits = std::char_traits< charT > > >class basic_filebuf : > public std::basic_filebuf< charT, traits > >{ >public: > basic_filebuf() = default; > basic_filebuf(basic_filebuf const&) = delete; > basic_filebuf const& operator=(basic_filebuf const&) = delete; > >public: > basic_filebuf< charT, traits >* open(path const& p, std::ios_base::openmode mode) > { > return std::basic_filebuf< charT, traits >::open(p.c_str(), mode) ? this : 0; > } >}; > > > > > >template< class charT, class traits = std::char_traits< charT > > >class basic_ifstream : > public std::basic_ifstream< charT, traits > >{ >public: > basic_ifstream() = default; > > > > > explicit basic_ifstream(path const& p) : > std::basic_ifstream< charT, traits >(p.c_str(), std::ios_base::in) {} > > basic_ifstream(path const& p, std::ios_base::openmode mode) : > std::basic_ifstream< charT, traits >(p.c_str(), mode) {} > > basic_ifstream(basic_ifstream const&) = delete; > basic_ifstream const& operator=(basic_ifstream const&) = delete; > >public: > void open(path const& p) > { > std::basic_ifstream< charT, traits >::open(p.c_str(), std::ios_base::in); > } > > void open(path const& p, std::ios_base::openmode mode) > { > std::basic_ifstream< charT, traits >::open(p.c_str(), mode); > } >}; > > > > > >template< class charT, class traits = std::char_traits< charT > > >class basic_ofstream : > public std::basic_ofstream< charT, traits > >{ >public: > basic_ofstream() = default; > > > > > explicit basic_ofstream(path const& p) : > std::basic_ofstream< charT, traits >(p.c_str(), std::ios_base::out) {} > > basic_ofstream(path const& p, std::ios_base::openmode mode) : > std::basic_ofstream< charT, traits >(p.c_str(), mode) {} > > basic_ofstream(basic_ofstream const&) = delete; > basic_ofstream const& operator=(basic_ofstream const&) = delete; > >public: > void open(path const& p) > { > std::basic_ofstream< charT, traits >::open(p.c_str(), std::ios_base::out); > } > > void open(path const& p, std::ios_base::openmode mode) > { > std::basic_ofstream< charT, traits >::open(p.c_str(), mode); > } >}; > > > > > >template< class charT, class traits = std::char_traits< charT > > >class basic_fstream : > public std::basic_fstream< charT, traits > >{ >public: > basic_fstream() = default; > > > > > explicit basic_fstream(path const& p) : > std::basic_fstream< charT, traits >(p.c_str(), std::ios_base::in | std::ios_base::out) {} > > basic_fstream(path const& p, std::ios_base::openmode mode) : > std::basic_fstream< charT, traits >(p.c_str(), mode) {} > > basic_fstream(basic_fstream const&) = delete; > basic_fstream const& operator=(basic_fstream const&) = delete; > >public: > void open(path const& p) > { > std::basic_fstream< charT, traits >::open(p.c_str(), std::ios_base::in | std::ios_base::out); > } > > void open(path const& p, std::ios_base::openmode mode) > { > std::basic_fstream< charT, traits >::open(p.c_str(), mode); > } >}; > > > > > >typedef basic_filebuf< char > filebuf; >typedef basic_ifstream< char > ifstream; >typedef basic_ofstream< char > ofstream; >typedef basic_fstream< char > fstream; > >typedef basic_filebuf< wchar_t > wfilebuf; >typedef basic_ifstream< wchar_t > wifstream; >typedef basic_ofstream< wchar_t > wofstream; >typedef basic_fstream< wchar_t > wfstream; > >} >} > > > > > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 205 "/usr/include/boost/filesystem/fstream.hpp" 2 3 4 ># 18 "/usr/include/boost/filesystem/string_file.hpp" 2 3 4 > > ># 1 "/usr/include/boost/filesystem/detail/header.hpp" 1 3 4 > > > > > > > ># 1 "/usr/include/boost/config/abi_prefix.hpp" 1 3 4 ># 9 "/usr/include/boost/filesystem/detail/header.hpp" 2 3 4 ># 37 "/usr/include/boost/filesystem/detail/header.hpp" 3 4 >#pragma GCC diagnostic push > >#pragma GCC diagnostic ignored "-Wunused-parameter" ># 21 "/usr/include/boost/filesystem/string_file.hpp" 2 3 4 > >namespace boost { >namespace filesystem { > >inline void save_string_file(path const& p, std::string const& str) >{ > filesystem::ofstream file; > file.exceptions(std::ios_base::failbit | std::ios_base::badbit); > file.open(p, std::ios_base::binary); > file.write(str.c_str(), str.size()); >} > >inline void load_string_file(path const& p, std::string& str) >{ > filesystem::ifstream file; > file.exceptions(std::ios_base::failbit | std::ios_base::badbit); > file.open(p, std::ios_base::binary); > std::size_t sz = static_cast< std::size_t >(filesystem::file_size(p)); > str.resize(sz, '\0'); > file.read(&str[0], sz); >} > >} >} > ># 1 "/usr/include/boost/filesystem/detail/footer.hpp" 1 3 4 ># 17 "/usr/include/boost/filesystem/detail/footer.hpp" 3 4 >#pragma GCC diagnostic pop > > > > > ># 1 "/usr/include/boost/config/abi_suffix.hpp" 1 3 4 ># 24 "/usr/include/boost/filesystem/detail/footer.hpp" 2 3 4 ># 47 "/usr/include/boost/filesystem/string_file.hpp" 2 3 4 ># 23 "/usr/include/boost/filesystem.hpp" 2 3 4 ># 7 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 2 > ># 1 "../../subprojects/edfst/subprojects/point-util/src/bit/BitwiseEnum.hpp" 1 > > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/Comma.hpp" 1 > > > ># 3 "../../subprojects/edfst/subprojects/facile/src/io/Comma.hpp" >namespace facile >{ >struct Comma { > Comma() : > Comma(", ") > {} > > Comma(const std::string& delimiter) : > _delimiter(delimiter), > _skip(true) > {} > > void > reset() { _skip = true; } > > friend std::ostream& > operator <<(std::ostream& o, Comma& comma) > { > if (comma._skip) > comma._skip = false; > else > o << comma._delimiter; > > return o; > } > > private: > std::string _delimiter; > bool _skip; >}; >} ># 6 "../../subprojects/edfst/subprojects/point-util/src/bit/BitwiseEnum.hpp" 2 > >template<typename T> >class is_bitwise_enum { >template<typename enumClassInQuestion> >static std::true_type check(decltype(enumClassInQuestion::BitwiseEnumTag) *); > >template<typename CatchAll> >static std::false_type >check(...); > >typedef decltype (check<T>(0)) is_bitwise; > >public: > static const bool value = std::is_enum<T>::value && is_bitwise::value; >}; > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T> >operator &(const T& first, const T& second) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(static_cast<StorageClass>(first) & static_cast<StorageClass>(second)); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T&> >operator &=(T& first, const T& second) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return first = static_cast<T>(static_cast<StorageClass>(first) & static_cast<StorageClass>(second)); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T> >operator |(const T& first, const T& second) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(static_cast<StorageClass>(first) | static_cast<StorageClass>(second)); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T&> >operator |=(T& first, const T& second) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return first = static_cast<T>(static_cast<StorageClass>(first) | static_cast<StorageClass>(second)); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T> >operator ~(const T& t) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(~static_cast<StorageClass>(t)); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, bool> >operator ==(const T& first, const T& second) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(static_cast<StorageClass>(first) == static_cast<StorageClass>(second)); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, bool> >operator !=(const T& first, const T& second) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(static_cast<StorageClass>(first) != static_cast<StorageClass>(second)); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, bool> >operator !=(const T& first, std::underlying_type_t<T> second) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(static_cast<StorageClass>(first) != second); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, bool> >operator !=(std::underlying_type_t<T> first, const T& second) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(first != static_cast<StorageClass>(second)); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T> >operator >>(const T& flag, uint8_t positions) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(static_cast<StorageClass>(flag) >> positions); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T> >operator <<(const T& flag, uint8_t positions) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > return static_cast<T>(static_cast<StorageClass>(flag) << positions); >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T> >operator >>=(T& flag, uint8_t positions) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > T shifted = static_cast<T>(static_cast<StorageClass>(flag) >> positions); > flag = shifted; > return flag; >} > >template<typename T> >constexpr std::enable_if_t<is_bitwise_enum<T>::value, T> >operator <<=(T& flag, uint8_t positions) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > T shifted = static_cast<T>(static_cast<StorageClass>(flag) << positions); > flag = shifted; > return flag; >} > >template<typename FieldType, typename BitMask> >inline std::enable_if_t<is_bitwise_enum<BitMask>::value, bool> >testAny(FieldType field, BitMask flags) >{ > return (field & flags) != BitMask::none; >} > >template<typename FieldType, typename BitMask> >inline std::enable_if_t<!is_bitwise_enum<BitMask>::value, bool> >testAny(FieldType field, BitMask flags) >{ > return (field & flags) != 0; >} > >template<typename FieldType> >inline bool >testBit(FieldType field, uint32_t bytePosition, uint32_t bitPosition) >{ > uint32_t mask = (1 << ((bytePosition * 8) + bitPosition)); > > return (field & mask) > 0; >} > >template<typename FieldType> >inline bool >testBit(FieldType field, uint32_t bitPosition) >{ > uint32_t mask = (1 << bitPosition); > > return (field & mask) > 0; >} > >template<typename FieldType, typename BitMask> >inline bool >testAll(FieldType field, BitMask flags) >{ > return (field & flags) == flags; >} > >template<typename FieldType, typename BitMask> >inline bool >testAll(FieldType field, BitMask amongTheseFlags, BitMask matchTheseFlags) >{ > return (field & amongTheseFlags) == matchTheseFlags; >} > >template<typename T> >inline std::enable_if_t<is_bitwise_enum<T>::value, T> >allUpTo(const T& threshold) >{ > using StorageClass = typename std::enable_if_t<is_bitwise_enum<T>::value, std::underlying_type_t<T>>; > > StorageClass range = ((static_cast<StorageClass>(threshold) << 1) - 1); > return static_cast<T>(range); >} > >template<typename T> >struct DirectPrinter { > T t; > > friend std::ostream& > operator <<(std::ostream& o, const DirectPrinter<T>& p) { return o << p.t; } >}; > >template<typename T, int length, typename ElementPrinter = DirectPrinter<T>> >inline std::enable_if_t<is_bitwise_enum<T>::value, std::ostream&> >printSubset(std::ostream& o, T subset) >{ > using IntegralType = typename std::underlying_type<T>::type; > > o << "{"; > facile::Comma separator(" | "); > > for (IntegralType i = 0, mask = 1; i < length; i++, mask <<= 1) { > T t = static_cast<T>(mask); > > if (testAll(subset, t)) > o << separator << ElementPrinter{ t }; > } > return o << "}"; >} > >template<typename T, int length, typename ElementPrinter = DirectPrinter<T>> >struct SubsetPrinter { > T subset; > > friend std::ostream& > operator <<(std::ostream& o, const SubsetPrinter<T, length, ElementPrinter>& p) > { > return printSubset<T, length, ElementPrinter>(o, p.subset); > } >}; ># 9 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/scope/DestructorCallback.hpp" 1 > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" 1 > > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/PointDefinitions.hpp" 1 > > > ># 1 "/usr/include/c++/13/iomanip" 1 3 ># 36 "/usr/include/c++/13/iomanip" 3 > ># 37 "/usr/include/c++/13/iomanip" 3 ># 47 "/usr/include/c++/13/iomanip" 3 ># 1 "/usr/include/c++/13/bits/quoted_string.h" 1 3 ># 33 "/usr/include/c++/13/bits/quoted_string.h" 3 > ># 34 "/usr/include/c++/13/bits/quoted_string.h" 3 > > > > > > > ># 40 "/usr/include/c++/13/bits/quoted_string.h" 3 >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) > : _M_string(__str), _M_delim{__del}, _M_escape{__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) > : _M_string(__str), _M_delim{__del}, _M_escape{__esc} > { } > > _Quoted_string& > operator=(_Quoted_string&) = delete; > > basic_string_view<_CharT, _Traits> _M_string; > _CharT _M_delim; > _CharT _M_escape; > }; ># 91 "/usr/include/c++/13/bits/quoted_string.h" 3 > template<typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const _Quoted_string<const _CharT*, _CharT>& __str) > { > std::basic_ostringstream<_CharT, _Traits> __ostr; > __ostr << __str._M_delim; > for (const _CharT* __c = __str._M_string; *__c; ++__c) > { > if (*__c == __str._M_delim || *__c == __str._M_escape) > __ostr << __str._M_escape; > __ostr << *__c; > } > __ostr << __str._M_delim; > > return __os << __ostr.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) > { > std::basic_ostringstream<_CharT, _Traits> __ostr; > __ostr << __str._M_delim; > for (auto __c : __str._M_string) > { > if (__c == __str._M_delim || __c == __str._M_escape) > __ostr << __str._M_escape; > __ostr << __c; > } > __ostr << __str._M_delim; > > return __os << __ostr.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) > { > _CharT __c; > __is >> __c; > if (!__is.good()) > return __is; > if (__c != __str._M_delim) > { > __is.unget(); > __is >> __str._M_string; > return __is; > } > __str._M_string.clear(); > std::ios_base::fmtflags __flags > = __is.flags(__is.flags() & ~std::ios_base::skipws); > do > { > __is >> __c; > if (!__is.good()) > break; > if (__c == __str._M_escape) > { > __is >> __c; > if (!__is.good()) > break; > } > else if (__c == __str._M_delim) > break; > __str._M_string += __c; > } > while (true); > __is.setf(__flags); > > return __is; > } > } > > >} ># 48 "/usr/include/c++/13/iomanip" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > struct _Resetiosflags { ios_base::fmtflags _M_mask; }; ># 67 "/usr/include/c++/13/iomanip" 3 > inline _Resetiosflags > resetiosflags(ios_base::fmtflags __mask) > { return { __mask }; } > > template<typename _CharT, typename _Traits> > inline basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) > { > __is.setf(ios_base::fmtflags(0), __f._M_mask); > return __is; > } > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f) > { > __os.setf(ios_base::fmtflags(0), __f._M_mask); > return __os; > } > > > struct _Setiosflags { ios_base::fmtflags _M_mask; }; ># 97 "/usr/include/c++/13/iomanip" 3 > inline _Setiosflags > setiosflags(ios_base::fmtflags __mask) > { return { __mask }; } > > template<typename _CharT, typename _Traits> > inline basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) > { > __is.setf(__f._M_mask); > return __is; > } > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f) > { > __os.setf(__f._M_mask); > return __os; > } > > > struct _Setbase { int _M_base; }; ># 128 "/usr/include/c++/13/iomanip" 3 > inline _Setbase > setbase(int __base) > { return { __base }; } > > template<typename _CharT, typename _Traits> > inline basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) > { > __is.setf(__f._M_base == 8 ? ios_base::oct : > __f._M_base == 10 ? ios_base::dec : > __f._M_base == 16 ? ios_base::hex : > ios_base::fmtflags(0), ios_base::basefield); > return __is; > } > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f) > { > __os.setf(__f._M_base == 8 ? ios_base::oct : > __f._M_base == 10 ? ios_base::dec : > __f._M_base == 16 ? ios_base::hex : > ios_base::fmtflags(0), ios_base::basefield); > return __os; > } > > > template<typename _CharT> > struct _Setfill { _CharT _M_c; }; ># 165 "/usr/include/c++/13/iomanip" 3 > template<typename _CharT> > inline _Setfill<_CharT> > setfill(_CharT __c) > { return { __c }; } > > template<typename _CharT, typename _Traits> > inline basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) > { > __is.fill(__f._M_c); > return __is; > } > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f) > { > __os.fill(__f._M_c); > return __os; > } > > > struct _Setprecision { int _M_n; }; ># 196 "/usr/include/c++/13/iomanip" 3 > inline _Setprecision > setprecision(int __n) > { return { __n }; } > > template<typename _CharT, typename _Traits> > inline basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) > { > __is.precision(__f._M_n); > return __is; > } > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f) > { > __os.precision(__f._M_n); > return __os; > } > > > struct _Setw { int _M_n; }; ># 226 "/usr/include/c++/13/iomanip" 3 > inline _Setw > setw(int __n) > { return { __n }; } > > template<typename _CharT, typename _Traits> > inline basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) > { > __is.width(__f._M_n); > return __is; > } > > template<typename _CharT, typename _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f) > { > __os.width(__f._M_n); > return __os; > } > > > > template<typename _MoneyT> > struct _Get_money { _MoneyT& _M_mon; bool _M_intl; }; ># 259 "/usr/include/c++/13/iomanip" 3 > template<typename _MoneyT> > inline _Get_money<_MoneyT> > get_money(_MoneyT& __mon, bool __intl = false) > { return { __mon, __intl }; } > > template<typename _CharT, typename _Traits, typename _MoneyT> > basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f) > { > typename basic_istream<_CharT, _Traits>::sentry __cerb(__is, false); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > typedef istreambuf_iterator<_CharT, _Traits> _Iter; > typedef money_get<_CharT, _Iter> _MoneyGet; > > const _MoneyGet& __mg = use_facet<_MoneyGet>(__is.getloc()); > __mg.get(_Iter(__is.rdbuf()), _Iter(), __f._M_intl, > __is, __err, __f._M_mon); > } > catch(__cxxabiv1::__forced_unwind&) > { > __is._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { __is._M_setstate(ios_base::badbit); } > if (__err) > __is.setstate(__err); > } > return __is; > } > > > template<typename _MoneyT> > struct _Put_money { const _MoneyT& _M_mon; bool _M_intl; }; ># 306 "/usr/include/c++/13/iomanip" 3 > template<typename _MoneyT> > inline _Put_money<_MoneyT> > put_money(const _MoneyT& __mon, bool __intl = false) > { return { __mon, __intl }; } > > template<typename _CharT, typename _Traits, typename _MoneyT> > basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f) > { > typename basic_ostream<_CharT, _Traits>::sentry __cerb(__os); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > typedef ostreambuf_iterator<_CharT, _Traits> _Iter; > typedef money_put<_CharT, _Iter> _MoneyPut; > > const _MoneyPut& __mp = use_facet<_MoneyPut>(__os.getloc()); > if (__mp.put(_Iter(__os.rdbuf()), __f._M_intl, __os, > __os.fill(), __f._M_mon).failed()) > __err |= ios_base::badbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > __os._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { __os._M_setstate(ios_base::badbit); } > if (__err) > __os.setstate(__err); > } > return __os; > } > > template<typename _CharT> > struct _Put_time > { > const std::tm* _M_tmb; > const _CharT* _M_fmt; > }; ># 358 "/usr/include/c++/13/iomanip" 3 > template<typename _CharT> > inline _Put_time<_CharT> > put_time(const std::tm* __tmb, const _CharT* __fmt) > { return { __tmb, __fmt }; } > > template<typename _CharT, typename _Traits> > basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_time<_CharT> __f) > { > typename basic_ostream<_CharT, _Traits>::sentry __cerb(__os); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > typedef ostreambuf_iterator<_CharT, _Traits> _Iter; > typedef time_put<_CharT, _Iter> _TimePut; > > const _CharT* const __fmt_end = __f._M_fmt + > _Traits::length(__f._M_fmt); > > const _TimePut& __mp = use_facet<_TimePut>(__os.getloc()); > if (__mp.put(_Iter(__os.rdbuf()), __os, __os.fill(), > __f._M_tmb, __f._M_fmt, __fmt_end).failed()) > __err |= ios_base::badbit; > } > catch(__cxxabiv1::__forced_unwind&) > { > __os._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { __os._M_setstate(ios_base::badbit); } > if (__err) > __os.setstate(__err); > } > return __os; > } > > template<typename _CharT> > struct _Get_time > { > std::tm* _M_tmb; > const _CharT* _M_fmt; > }; ># 413 "/usr/include/c++/13/iomanip" 3 > template<typename _CharT> > inline _Get_time<_CharT> > get_time(std::tm* __tmb, const _CharT* __fmt) > { return { __tmb, __fmt }; } > > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>& __is, _Get_time<_CharT> __f) > { > typename basic_istream<_CharT, _Traits>::sentry __cerb(__is, false); > if (__cerb) > { > ios_base::iostate __err = ios_base::goodbit; > try > { > typedef istreambuf_iterator<_CharT, _Traits> _Iter; > typedef time_get<_CharT, _Iter> _TimeGet; > > const _CharT* const __fmt_end = __f._M_fmt + > _Traits::length(__f._M_fmt); > > const _TimeGet& __mg = use_facet<_TimeGet>(__is.getloc()); > __mg.get(_Iter(__is.rdbuf()), _Iter(), __is, > __err, __f._M_tmb, __f._M_fmt, __fmt_end); > } > catch(__cxxabiv1::__forced_unwind&) > { > __is._M_setstate(ios_base::badbit); > throw; > } > catch(...) > { __is._M_setstate(ios_base::badbit); } > if (__err) > __is.setstate(__err); > } > return __is; > } ># 461 "/usr/include/c++/13/iomanip" 3 > template<typename _CharT> > inline auto > quoted(const _CharT* __string, > _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) > { > return __detail::_Quoted_string<const _CharT*, _CharT>(__string, __delim, > __escape); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > inline auto > quoted(const basic_string<_CharT, _Traits, _Alloc>& __string, > _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) > { > return __detail::_Quoted_string< > const basic_string<_CharT, _Traits, _Alloc>&, _CharT>( > __string, __delim, __escape); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > inline auto > quoted(basic_string<_CharT, _Traits, _Alloc>& __string, > _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) > { > return __detail::_Quoted_string< > basic_string<_CharT, _Traits, _Alloc>&, _CharT>( > __string, __delim, __escape); > } > > > > > template<typename _CharT, typename _Traits> > inline auto > quoted(basic_string_view<_CharT, _Traits> __sv, > _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) > { > return __detail::_Quoted_string< > basic_string_view<_CharT, _Traits>, _CharT>(__sv, __delim, __escape); > } ># 510 "/usr/include/c++/13/iomanip" 3 > 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); > > > > >} ># 5 "../../subprojects/edfst/subprojects/point-util/src/PointDefinitions.hpp" 2 ># 1 "/usr/include/c++/13/memory" 1 3 ># 47 "/usr/include/c++/13/memory" 3 > ># 48 "/usr/include/c++/13/memory" 3 ># 70 "/usr/include/c++/13/memory" 3 ># 1 "/usr/include/c++/13/bits/stl_raw_storage_iter.h" 1 3 ># 59 "/usr/include/c++/13/bits/stl_raw_storage_iter.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > ># 64 "/usr/include/c++/13/bits/stl_raw_storage_iter.h" 3 >#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: > explicit > raw_storage_iterator(_OutputIterator __x) > : _M_iter(__x) {} > > raw_storage_iterator& > operator*() { return *this; } > > raw_storage_iterator& > operator=(const _Tp& __element) > { > std::_Construct(std::__addressof(*_M_iter), __element); > return *this; > } > > > > > raw_storage_iterator& > operator=(_Tp&& __element) > { > std::_Construct(std::__addressof(*_M_iter), std::move(__element)); > return *this; > } > > > raw_storage_iterator& > operator++() > { > ++_M_iter; > return *this; > } > > raw_storage_iterator > operator++(int) > { > raw_storage_iterator __tmp = *this; > ++_M_iter; > return __tmp; > } > > > > _OutputIterator base() const { return _M_iter; } > }; >#pragma GCC diagnostic pop > > >} ># 71 "/usr/include/c++/13/memory" 2 3 > > > ># 1 "/usr/include/c++/13/bits/align.h" 1 3 ># 39 "/usr/include/c++/13/bits/align.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 61 "/usr/include/c++/13/bits/align.h" 3 >inline void* >align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept >{ > if (__space < __size) > return nullptr; > const auto __intptr = reinterpret_cast<uintptr_t>(__ptr); > const auto __aligned = (__intptr - 1u + __align) & -__align; > const auto __diff = __aligned - __intptr; > if (__diff > (__space - __size)) > return nullptr; > else > { > __space -= __diff; > return __ptr = reinterpret_cast<void*>(__aligned); > } >} ># 108 "/usr/include/c++/13/bits/align.h" 3 > >} ># 75 "/usr/include/c++/13/memory" 2 3 > > > > > > ># 1 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 1 3 ># 61 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 73 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 3 > struct _Sp_locker > { > _Sp_locker(const _Sp_locker&) = delete; > _Sp_locker& operator=(const _Sp_locker&) = delete; > > > explicit > _Sp_locker(const void*) noexcept; > _Sp_locker(const void*, const void*) noexcept; > ~_Sp_locker(); > > private: > unsigned char _M_key1; > unsigned char _M_key2; > > > > }; ># 100 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 3 > template<typename _Tp, _Lock_policy _Lp> > inline bool > atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>* __p) > { > > return __gthread_active_p() == 0; > > > > } > > template<typename _Tp> > inline bool > atomic_is_lock_free(const shared_ptr<_Tp>* __p) > { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); } ># 127 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 3 > template<typename _Tp> > inline shared_ptr<_Tp> > atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order) > { > _Sp_locker __lock{__p}; > return *__p; > } > > template<typename _Tp> > inline shared_ptr<_Tp> > atomic_load(const shared_ptr<_Tp>* __p) > { return std::atomic_load_explicit(__p, memory_order_seq_cst); } > > template<typename _Tp, _Lock_policy _Lp> > inline __shared_ptr<_Tp, _Lp> > atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, memory_order) > { > _Sp_locker __lock{__p}; > return *__p; > } > > template<typename _Tp, _Lock_policy _Lp> > inline __shared_ptr<_Tp, _Lp> > atomic_load(const __shared_ptr<_Tp, _Lp>* __p) > { return std::atomic_load_explicit(__p, memory_order_seq_cst); } ># 163 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 3 > template<typename _Tp> > inline void > atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, > memory_order) > { > _Sp_locker __lock{__p}; > __p->swap(__r); > } > > template<typename _Tp> > inline void > atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) > { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } > > template<typename _Tp, _Lock_policy _Lp> > inline void > atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p, > __shared_ptr<_Tp, _Lp> __r, > memory_order) > { > _Sp_locker __lock{__p}; > __p->swap(__r); > } > > template<typename _Tp, _Lock_policy _Lp> > inline void > atomic_store(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) > { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } ># 200 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 3 > template<typename _Tp> > inline shared_ptr<_Tp> > atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, > memory_order) > { > _Sp_locker __lock{__p}; > __p->swap(__r); > return __r; > } > > template<typename _Tp> > inline shared_ptr<_Tp> > atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) > { > return std::atomic_exchange_explicit(__p, std::move(__r), > memory_order_seq_cst); > } > > template<typename _Tp, _Lock_policy _Lp> > inline __shared_ptr<_Tp, _Lp> > atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p, > __shared_ptr<_Tp, _Lp> __r, > memory_order) > { > _Sp_locker __lock{__p}; > __p->swap(__r); > return __r; > } > > template<typename _Tp, _Lock_policy _Lp> > inline __shared_ptr<_Tp, _Lp> > atomic_exchange(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) > { > return std::atomic_exchange_explicit(__p, std::move(__r), > memory_order_seq_cst); > } ># 249 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 3 > template<typename _Tp> > bool > atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, > shared_ptr<_Tp>* __v, > shared_ptr<_Tp> __w, > memory_order, > memory_order) > { > shared_ptr<_Tp> __x; > _Sp_locker __lock{__p, __v}; > owner_less<shared_ptr<_Tp>> __less; > if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) > { > __x = std::move(*__p); > *__p = std::move(__w); > return true; > } > __x = std::move(*__v); > *__v = *__p; > return false; > } > > template<typename _Tp> > inline bool > atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, > shared_ptr<_Tp> __w) > { > return std::atomic_compare_exchange_strong_explicit(__p, __v, > std::move(__w), memory_order_seq_cst, memory_order_seq_cst); > } > > template<typename _Tp> > inline bool > atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, > shared_ptr<_Tp>* __v, > shared_ptr<_Tp> __w, > memory_order __success, > memory_order __failure) > { > return std::atomic_compare_exchange_strong_explicit(__p, __v, > std::move(__w), __success, __failure); > } > > template<typename _Tp> > inline bool > atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, > shared_ptr<_Tp> __w) > { > return std::atomic_compare_exchange_weak_explicit(__p, __v, > std::move(__w), memory_order_seq_cst, memory_order_seq_cst); > } > > template<typename _Tp, _Lock_policy _Lp> > bool > atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p, > __shared_ptr<_Tp, _Lp>* __v, > __shared_ptr<_Tp, _Lp> __w, > memory_order, > memory_order) > { > __shared_ptr<_Tp, _Lp> __x; > _Sp_locker __lock{__p, __v}; > owner_less<__shared_ptr<_Tp, _Lp>> __less; > if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) > { > __x = std::move(*__p); > *__p = std::move(__w); > return true; > } > __x = std::move(*__v); > *__v = *__p; > return false; > } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p, > __shared_ptr<_Tp, _Lp>* __v, > __shared_ptr<_Tp, _Lp> __w) > { > return std::atomic_compare_exchange_strong_explicit(__p, __v, > std::move(__w), memory_order_seq_cst, memory_order_seq_cst); > } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p, > __shared_ptr<_Tp, _Lp>* __v, > __shared_ptr<_Tp, _Lp> __w, > memory_order __success, > memory_order __failure) > { > return std::atomic_compare_exchange_strong_explicit(__p, __v, > std::move(__w), __success, __failure); > } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p, > __shared_ptr<_Tp, _Lp>* __v, > __shared_ptr<_Tp, _Lp> __w) > { > return std::atomic_compare_exchange_weak_explicit(__p, __v, > std::move(__w), memory_order_seq_cst, memory_order_seq_cst); > } ># 850 "/usr/include/c++/13/bits/shared_ptr_atomic.h" 3 > >} ># 82 "/usr/include/c++/13/memory" 2 3 > > > > ># 1 "/usr/include/c++/13/backward/auto_ptr.h" 1 3 ># 36 "/usr/include/c++/13/backward/auto_ptr.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 47 "/usr/include/c++/13/backward/auto_ptr.h" 3 > template<typename _Tp1> > struct auto_ptr_ref > { > _Tp1* _M_ptr; > > explicit > auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } > } __attribute__ ((__deprecated__)); > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ># 92 "/usr/include/c++/13/backward/auto_ptr.h" 3 > template<typename _Tp> > class auto_ptr > { > private: > _Tp* _M_ptr; > > public: > > typedef _Tp element_type; > > > > > > > > explicit > auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } ># 118 "/usr/include/c++/13/backward/auto_ptr.h" 3 > auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } ># 130 "/usr/include/c++/13/backward/auto_ptr.h" 3 > template<typename _Tp1> > auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } ># 141 "/usr/include/c++/13/backward/auto_ptr.h" 3 > auto_ptr& > operator=(auto_ptr& __a) throw() > { > reset(__a.release()); > return *this; > } ># 158 "/usr/include/c++/13/backward/auto_ptr.h" 3 > template<typename _Tp1> > auto_ptr& > operator=(auto_ptr<_Tp1>& __a) throw() > { > reset(__a.release()); > return *this; > } ># 176 "/usr/include/c++/13/backward/auto_ptr.h" 3 > ~auto_ptr() { delete _M_ptr; } ># 186 "/usr/include/c++/13/backward/auto_ptr.h" 3 > element_type& > operator*() const throw() > { > do { if (std::__is_constant_evaluated() && !bool(_M_ptr != 0)) __builtin_unreachable(); } while (false); > return *_M_ptr; > } > > > > > > > > element_type* > operator->() const throw() > { > do { if (std::__is_constant_evaluated() && !bool(_M_ptr != 0)) __builtin_unreachable(); } while (false); > return _M_ptr; > } ># 216 "/usr/include/c++/13/backward/auto_ptr.h" 3 > element_type* > get() const throw() { return _M_ptr; } ># 230 "/usr/include/c++/13/backward/auto_ptr.h" 3 > element_type* > release() throw() > { > element_type* __tmp = _M_ptr; > _M_ptr = 0; > return __tmp; > } ># 245 "/usr/include/c++/13/backward/auto_ptr.h" 3 > void > reset(element_type* __p = 0) throw() > { > if (__p != _M_ptr) > { > delete _M_ptr; > _M_ptr = __p; > } > } ># 270 "/usr/include/c++/13/backward/auto_ptr.h" 3 > auto_ptr(auto_ptr_ref<element_type> __ref) throw() > : _M_ptr(__ref._M_ptr) { } > > auto_ptr& > operator=(auto_ptr_ref<element_type> __ref) throw() > { > if (__ref._M_ptr != this->get()) > { > delete _M_ptr; > _M_ptr = __ref._M_ptr; > } > return *this; > } > > template<typename _Tp1> > operator auto_ptr_ref<_Tp1>() throw() > { return auto_ptr_ref<_Tp1>(this->release()); } > > template<typename _Tp1> > operator auto_ptr<_Tp1>() throw() > { return auto_ptr<_Tp1>(this->release()); } > } __attribute__ ((__deprecated__ ("use '" "std::unique_ptr" "' instead"))); > > > > template<> > class auto_ptr<void> > { > public: > typedef void element_type; > } __attribute__ ((__deprecated__)); > > > > template<_Lock_policy _Lp> > template<typename _Tp> > inline > __shared_count<_Lp>::__shared_count(std::auto_ptr<_Tp>&& __r) > : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get())) > { __r.release(); } > > template<typename _Tp, _Lock_policy _Lp> > template<typename _Tp1, typename> > inline > __shared_ptr<_Tp, _Lp>::__shared_ptr(std::auto_ptr<_Tp1>&& __r) > : _M_ptr(__r.get()), _M_refcount() > { > > static_assert( sizeof(_Tp1) > 0, "incomplete type" ); > _Tp1* __tmp = __r.get(); > _M_refcount = __shared_count<_Lp>(std::move(__r)); > _M_enable_shared_from_this_with(__tmp); > } > > template<typename _Tp> > template<typename _Tp1, typename> > inline > shared_ptr<_Tp>::shared_ptr(std::auto_ptr<_Tp1>&& __r) > : __shared_ptr<_Tp>(std::move(__r)) { } > > > template<typename _Tp, typename _Dp> > template<typename _Up, typename> > inline > unique_ptr<_Tp, _Dp>::unique_ptr(auto_ptr<_Up>&& __u) noexcept > : _M_t(__u.release(), deleter_type()) { } > > >#pragma GCC diagnostic pop > > >} ># 87 "/usr/include/c++/13/memory" 2 3 ># 95 "/usr/include/c++/13/memory" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 113 "/usr/include/c++/13/memory" 3 >enum class pointer_safety { relaxed, preferred, strict }; > > >inline void >declare_reachable(void*) { } > > >template <typename _Tp> > inline _Tp* > undeclare_reachable(_Tp* __p) { return __p; } > > >inline void >declare_no_pointers(char*, size_t) { } > > >inline void >undeclare_no_pointers(char*, size_t) { } > > >inline pointer_safety >get_pointer_safety() noexcept { return pointer_safety::relaxed; } > > > >} ># 148 "/usr/include/c++/13/memory" 3 ># 1 "/usr/include/c++/13/pstl/glue_memory_defs.h" 1 3 ># 13 "/usr/include/c++/13/pstl/glue_memory_defs.h" 3 ># 1 "/usr/include/c++/13/pstl/execution_defs.h" 1 3 ># 15 "/usr/include/c++/13/pstl/execution_defs.h" 3 >namespace __pstl >{ >namespace execution >{ >inline namespace v1 >{ > > >class sequenced_policy >{ > public: > > static constexpr std::false_type > __allow_unsequenced() > { > return std::false_type{}; > } > static constexpr std::false_type > __allow_vector() > { > return std::false_type{}; > } > static constexpr std::false_type > __allow_parallel() > { > return std::false_type{}; > } >}; > > >class parallel_policy >{ > public: > > static constexpr std::false_type > __allow_unsequenced() > { > return std::false_type{}; > } > static constexpr std::false_type > __allow_vector() > { > return std::false_type{}; > } > static constexpr std::true_type > __allow_parallel() > { > return std::true_type{}; > } >}; > > >class parallel_unsequenced_policy >{ > public: > > static constexpr std::true_type > __allow_unsequenced() > { > return std::true_type{}; > } > static constexpr std::true_type > __allow_vector() > { > return std::true_type{}; > } > static constexpr std::true_type > __allow_parallel() > { > return std::true_type{}; > } >}; > >class unsequenced_policy >{ > public: > > static constexpr std::true_type > __allow_unsequenced() > { > return std::true_type{}; > } > static constexpr std::true_type > __allow_vector() > { > return std::true_type{}; > } > static constexpr std::false_type > __allow_parallel() > { > return std::false_type{}; > } >}; > > >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; > > > > > >} > >} ># 14 "/usr/include/c++/13/pstl/glue_memory_defs.h" 2 3 > >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); > >} ># 149 "/usr/include/c++/13/memory" 2 3 ># 6 "../../subprojects/edfst/subprojects/point-util/src/PointDefinitions.hpp" 2 ># 1 "/usr/include/c++/13/unordered_set" 1 3 ># 32 "/usr/include/c++/13/unordered_set" 3 > ># 33 "/usr/include/c++/13/unordered_set" 3 ># 41 "/usr/include/c++/13/unordered_set" 3 ># 1 "/usr/include/c++/13/bits/unordered_set.h" 1 3 ># 38 "/usr/include/c++/13/bits/unordered_set.h" 3 >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; ># 98 "/usr/include/c++/13/bits/unordered_set.h" 3 > 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; > > > > > > unordered_set() = default; ># 149 "/usr/include/c++/13/bits/unordered_set.h" 3 > explicit > unordered_set(size_type __n, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__n, __hf, __eql, __a) > { } ># 170 "/usr/include/c++/13/bits/unordered_set.h" 3 > template<typename _InputIterator> > unordered_set(_InputIterator __first, _InputIterator __last, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__first, __last, __n, __hf, __eql, __a) > { } > > > unordered_set(const unordered_set&) = default; > > > unordered_set(unordered_set&&) = default; > > > > > > explicit > unordered_set(const allocator_type& __a) > : _M_h(__a) > { } > > > > > > > unordered_set(const unordered_set& __uset, > const allocator_type& __a) > : _M_h(__uset._M_h, __a) > { } > > > > > > > unordered_set(unordered_set&& __uset, > const allocator_type& __a) > noexcept( noexcept(_Hashtable(std::move(__uset._M_h), __a)) ) > : _M_h(std::move(__uset._M_h), __a) > { } ># 226 "/usr/include/c++/13/bits/unordered_set.h" 3 > unordered_set(initializer_list<value_type> __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__l, __n, __hf, __eql, __a) > { } > > unordered_set(size_type __n, const allocator_type& __a) > : unordered_set(__n, hasher(), key_equal(), __a) > { } > > unordered_set(size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_set(__n, __hf, key_equal(), __a) > { } > > template<typename _InputIterator> > unordered_set(_InputIterator __first, _InputIterator __last, > size_type __n, > const allocator_type& __a) > : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) > { } > > template<typename _InputIterator> > unordered_set(_InputIterator __first, _InputIterator __last, > size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_set(__first, __last, __n, __hf, key_equal(), __a) > { } > > unordered_set(initializer_list<value_type> __l, > size_type __n, > const allocator_type& __a) > : unordered_set(__l, __n, hasher(), key_equal(), __a) > { } > > unordered_set(initializer_list<value_type> __l, > size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_set(__l, __n, __hf, key_equal(), __a) > { } > > > unordered_set& > operator=(const unordered_set&) = default; > > > unordered_set& > operator=(unordered_set&&) = default; ># 288 "/usr/include/c++/13/bits/unordered_set.h" 3 > unordered_set& > operator=(initializer_list<value_type> __l) > { > _M_h = __l; > return *this; > } > > > allocator_type > get_allocator() const noexcept > { return _M_h.get_allocator(); } > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_h.empty(); } > > > size_type > size() const noexcept > { return _M_h.size(); } > > > size_type > max_size() const noexcept > { return _M_h.max_size(); } ># 324 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > begin() noexcept > { return _M_h.begin(); } > > const_iterator > begin() const noexcept > { return _M_h.begin(); } > > > > > > > > iterator > end() noexcept > { return _M_h.end(); } > > const_iterator > end() const noexcept > { return _M_h.end(); } > > > > > > > const_iterator > cbegin() const noexcept > { return _M_h.begin(); } > > > > > > const_iterator > cend() const noexcept > { return _M_h.end(); } ># 380 "/usr/include/c++/13/bits/unordered_set.h" 3 > template<typename... _Args> > std::pair<iterator, bool> > emplace(_Args&&... __args) > { return _M_h.emplace(std::forward<_Args>(__args)...); } ># 406 "/usr/include/c++/13/bits/unordered_set.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ># 425 "/usr/include/c++/13/bits/unordered_set.h" 3 > std::pair<iterator, bool> > insert(const value_type& __x) > { return _M_h.insert(__x); } > > std::pair<iterator, bool> > insert(value_type&& __x) > { return _M_h.insert(std::move(__x)); } ># 454 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > insert(const_iterator __hint, const value_type& __x) > { return _M_h.insert(__hint, __x); } > > iterator > insert(const_iterator __hint, value_type&& __x) > { return _M_h.insert(__hint, std::move(__x)); } ># 472 "/usr/include/c++/13/bits/unordered_set.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_h.insert(__first, __last); } ># 484 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > insert(initializer_list<value_type> __l) > { _M_h.insert(__l); } > > > > node_type > extract(const_iterator __pos) > { > do { if (std::__is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); > return _M_h.extract(__pos); > } > > > node_type > extract(const key_type& __key) > { return _M_h.extract(__key); } > > > insert_return_type > insert(node_type&& __nh) > { return _M_h._M_reinsert_node(std::move(__nh)); } > > > iterator > insert(const_iterator, node_type&& __nh) > { return _M_h._M_reinsert_node(std::move(__nh)).position; } ># 527 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > erase(const_iterator __position) > { return _M_h.erase(__position); } > > > iterator > erase(iterator __position) > { return _M_h.erase(__position); } ># 549 "/usr/include/c++/13/bits/unordered_set.h" 3 > size_type > erase(const key_type& __x) > { return _M_h.erase(__x); } ># 567 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_h.erase(__first, __last); } > > > > > > > > void > clear() noexcept > { _M_h.clear(); } ># 590 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > swap(unordered_set& __x) > noexcept( noexcept(_M_h.swap(__x._M_h)) ) > { _M_h.swap(__x._M_h); } > > > template<typename, typename, typename> > friend class std::_Hash_merge_helper; > > template<typename _H2, typename _P2> > void > merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) > { > using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>; > _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); > } > > template<typename _H2, typename _P2> > void > merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) > { merge(__source); } > > template<typename _H2, typename _P2> > void > merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) > { > using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>; > _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); > } > > template<typename _H2, typename _P2> > void > merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) > { merge(__source); } > > > > > > > hasher > hash_function() const > { return _M_h.hash_function(); } > > > > key_equal > key_eq() const > { return _M_h.key_eq(); } ># 654 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > find(const key_type& __x) > { return _M_h.find(__x); } ># 666 "/usr/include/c++/13/bits/unordered_set.h" 3 > const_iterator > find(const key_type& __x) const > { return _M_h.find(__x); } ># 689 "/usr/include/c++/13/bits/unordered_set.h" 3 > size_type > count(const key_type& __x) const > { return _M_h.count(__x); } ># 730 "/usr/include/c++/13/bits/unordered_set.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_h.equal_range(__x); } ># 742 "/usr/include/c++/13/bits/unordered_set.h" 3 > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_h.equal_range(__x); } ># 758 "/usr/include/c++/13/bits/unordered_set.h" 3 > size_type > bucket_count() const noexcept > { return _M_h.bucket_count(); } > > > size_type > max_bucket_count() const noexcept > { return _M_h.max_bucket_count(); } > > > > > > > size_type > bucket_size(size_type __n) const > { return _M_h.bucket_size(__n); } > > > > > > > size_type > bucket(const key_type& __key) const > { return _M_h.bucket(__key); } ># 792 "/usr/include/c++/13/bits/unordered_set.h" 3 > local_iterator > begin(size_type __n) > { return _M_h.begin(__n); } > > const_local_iterator > begin(size_type __n) const > { return _M_h.begin(__n); } > > const_local_iterator > cbegin(size_type __n) const > { return _M_h.cbegin(__n); } ># 812 "/usr/include/c++/13/bits/unordered_set.h" 3 > local_iterator > end(size_type __n) > { return _M_h.end(__n); } > > const_local_iterator > end(size_type __n) const > { return _M_h.end(__n); } > > const_local_iterator > cend(size_type __n) const > { return _M_h.cend(__n); } > > > > > > float > load_factor() const noexcept > { return _M_h.load_factor(); } > > > > float > max_load_factor() const noexcept > { return _M_h.max_load_factor(); } > > > > > > void > max_load_factor(float __z) > { _M_h.max_load_factor(__z); } ># 853 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > rehash(size_type __n) > { _M_h.rehash(__n); } ># 864 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > reserve(size_type __n) > { _M_h.reserve(__n); } > > template<typename _Value1, typename _Hash1, typename _Pred1, > typename _Alloc1> > friend bool > operator==(const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&, > const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&); > }; > > > > template<typename _InputIterator, > typename _Hash = > hash<typename iterator_traits<_InputIterator>::value_type>, > typename _Pred = > equal_to<typename iterator_traits<_InputIterator>::value_type>, > typename _Allocator = > allocator<typename iterator_traits<_InputIterator>::value_type>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireNotAllocator<_Pred>, > typename = _RequireAllocator<_Allocator>> > unordered_set(_InputIterator, _InputIterator, > unordered_set<int>::size_type = {}, > _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) > -> unordered_set<typename iterator_traits<_InputIterator>::value_type, > _Hash, _Pred, _Allocator>; > > template<typename _Tp, typename _Hash = hash<_Tp>, > typename _Pred = equal_to<_Tp>, > typename _Allocator = allocator<_Tp>, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireNotAllocator<_Pred>, > typename = _RequireAllocator<_Allocator>> > unordered_set(initializer_list<_Tp>, > unordered_set<int>::size_type = {}, > _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) > -> unordered_set<_Tp, _Hash, _Pred, _Allocator>; > > template<typename _InputIterator, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > unordered_set(_InputIterator, _InputIterator, > unordered_set<int>::size_type, _Allocator) > -> unordered_set<typename iterator_traits<_InputIterator>::value_type, > hash< > typename iterator_traits<_InputIterator>::value_type>, > equal_to< > typename iterator_traits<_InputIterator>::value_type>, > _Allocator>; > > template<typename _InputIterator, typename _Hash, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireAllocator<_Allocator>> > unordered_set(_InputIterator, _InputIterator, > unordered_set<int>::size_type, > _Hash, _Allocator) > -> unordered_set<typename iterator_traits<_InputIterator>::value_type, > _Hash, > equal_to< > typename iterator_traits<_InputIterator>::value_type>, > _Allocator>; > > template<typename _Tp, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > unordered_set(initializer_list<_Tp>, > unordered_set<int>::size_type, _Allocator) > -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; > > template<typename _Tp, typename _Hash, typename _Allocator, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireAllocator<_Allocator>> > unordered_set(initializer_list<_Tp>, > unordered_set<int>::size_type, _Hash, _Allocator) > -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>; ># 964 "/usr/include/c++/13/bits/unordered_set.h" 3 > 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; > > > > > > unordered_multiset() = default; ># 1014 "/usr/include/c++/13/bits/unordered_set.h" 3 > explicit > unordered_multiset(size_type __n, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__n, __hf, __eql, __a) > { } ># 1035 "/usr/include/c++/13/bits/unordered_set.h" 3 > template<typename _InputIterator> > unordered_multiset(_InputIterator __first, _InputIterator __last, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__first, __last, __n, __hf, __eql, __a) > { } > > > unordered_multiset(const unordered_multiset&) = default; > > > unordered_multiset(unordered_multiset&&) = default; ># 1061 "/usr/include/c++/13/bits/unordered_set.h" 3 > unordered_multiset(initializer_list<value_type> __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__l, __n, __hf, __eql, __a) > { } > > > unordered_multiset& > operator=(const unordered_multiset&) = default; > > > unordered_multiset& > operator=(unordered_multiset&&) = default; > > > > > > explicit > unordered_multiset(const allocator_type& __a) > : _M_h(__a) > { } > > > > > > > unordered_multiset(const unordered_multiset& __umset, > const allocator_type& __a) > : _M_h(__umset._M_h, __a) > { } > > > > > > > unordered_multiset(unordered_multiset&& __umset, > const allocator_type& __a) > noexcept( noexcept(_Hashtable(std::move(__umset._M_h), __a)) ) > : _M_h(std::move(__umset._M_h), __a) > { } > > unordered_multiset(size_type __n, const allocator_type& __a) > : unordered_multiset(__n, hasher(), key_equal(), __a) > { } > > unordered_multiset(size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_multiset(__n, __hf, key_equal(), __a) > { } > > template<typename _InputIterator> > unordered_multiset(_InputIterator __first, _InputIterator __last, > size_type __n, > const allocator_type& __a) > : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) > { } > > template<typename _InputIterator> > unordered_multiset(_InputIterator __first, _InputIterator __last, > size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) > { } > > unordered_multiset(initializer_list<value_type> __l, > size_type __n, > const allocator_type& __a) > : unordered_multiset(__l, __n, hasher(), key_equal(), __a) > { } > > unordered_multiset(initializer_list<value_type> __l, > size_type __n, const hasher& __hf, > const allocator_type& __a) > : unordered_multiset(__l, __n, __hf, key_equal(), __a) > { } ># 1153 "/usr/include/c++/13/bits/unordered_set.h" 3 > unordered_multiset& > operator=(initializer_list<value_type> __l) > { > _M_h = __l; > return *this; > } > > > allocator_type > get_allocator() const noexcept > { return _M_h.get_allocator(); } > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_h.empty(); } > > > size_type > size() const noexcept > { return _M_h.size(); } > > > size_type > max_size() const noexcept > { return _M_h.max_size(); } ># 1189 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > begin() noexcept > { return _M_h.begin(); } > > const_iterator > begin() const noexcept > { return _M_h.begin(); } > > > > > > > > iterator > end() noexcept > { return _M_h.end(); } > > const_iterator > end() const noexcept > { return _M_h.end(); } > > > > > > > const_iterator > cbegin() const noexcept > { return _M_h.begin(); } > > > > > > const_iterator > cend() const noexcept > { return _M_h.end(); } ># 1237 "/usr/include/c++/13/bits/unordered_set.h" 3 > template<typename... _Args> > iterator > emplace(_Args&&... __args) > { return _M_h.emplace(std::forward<_Args>(__args)...); } ># 1259 "/usr/include/c++/13/bits/unordered_set.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ># 1272 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > insert(const value_type& __x) > { return _M_h.insert(__x); } > > iterator > insert(value_type&& __x) > { return _M_h.insert(std::move(__x)); } ># 1298 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > insert(const_iterator __hint, const value_type& __x) > { return _M_h.insert(__hint, __x); } > > iterator > insert(const_iterator __hint, value_type&& __x) > { return _M_h.insert(__hint, std::move(__x)); } ># 1315 "/usr/include/c++/13/bits/unordered_set.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_h.insert(__first, __last); } ># 1327 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > insert(initializer_list<value_type> __l) > { _M_h.insert(__l); } > > > > node_type > extract(const_iterator __pos) > { > do { if (std::__is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); > return _M_h.extract(__pos); > } > > > node_type > extract(const key_type& __key) > { return _M_h.extract(__key); } > > > iterator > insert(node_type&& __nh) > { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); } > > > iterator > insert(const_iterator __hint, node_type&& __nh) > { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); } ># 1371 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > erase(const_iterator __position) > { return _M_h.erase(__position); } > > > iterator > erase(iterator __position) > { return _M_h.erase(__position); } ># 1394 "/usr/include/c++/13/bits/unordered_set.h" 3 > size_type > erase(const key_type& __x) > { return _M_h.erase(__x); } ># 1414 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_h.erase(__first, __last); } ># 1425 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > clear() noexcept > { _M_h.clear(); } ># 1438 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > swap(unordered_multiset& __x) > noexcept( noexcept(_M_h.swap(__x._M_h)) ) > { _M_h.swap(__x._M_h); } > > > template<typename, typename, typename> > friend class std::_Hash_merge_helper; > > template<typename _H2, typename _P2> > void > merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) > { > using _Merge_helper > = _Hash_merge_helper<unordered_multiset, _H2, _P2>; > _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); > } > > template<typename _H2, typename _P2> > void > merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) > { merge(__source); } > > template<typename _H2, typename _P2> > void > merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) > { > using _Merge_helper > = _Hash_merge_helper<unordered_multiset, _H2, _P2>; > _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); > } > > template<typename _H2, typename _P2> > void > merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) > { merge(__source); } > > > > > > > hasher > hash_function() const > { return _M_h.hash_function(); } > > > > key_equal > key_eq() const > { return _M_h.key_eq(); } ># 1504 "/usr/include/c++/13/bits/unordered_set.h" 3 > iterator > find(const key_type& __x) > { return _M_h.find(__x); } ># 1516 "/usr/include/c++/13/bits/unordered_set.h" 3 > const_iterator > find(const key_type& __x) const > { return _M_h.find(__x); } ># 1535 "/usr/include/c++/13/bits/unordered_set.h" 3 > size_type > count(const key_type& __x) const > { return _M_h.count(__x); } ># 1573 "/usr/include/c++/13/bits/unordered_set.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_h.equal_range(__x); } ># 1585 "/usr/include/c++/13/bits/unordered_set.h" 3 > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_h.equal_range(__x); } ># 1601 "/usr/include/c++/13/bits/unordered_set.h" 3 > size_type > bucket_count() const noexcept > { return _M_h.bucket_count(); } > > > size_type > max_bucket_count() const noexcept > { return _M_h.max_bucket_count(); } > > > > > > > size_type > bucket_size(size_type __n) const > { return _M_h.bucket_size(__n); } > > > > > > > size_type > bucket(const key_type& __key) const > { return _M_h.bucket(__key); } ># 1635 "/usr/include/c++/13/bits/unordered_set.h" 3 > local_iterator > begin(size_type __n) > { return _M_h.begin(__n); } > > const_local_iterator > begin(size_type __n) const > { return _M_h.begin(__n); } > > const_local_iterator > cbegin(size_type __n) const > { return _M_h.cbegin(__n); } ># 1655 "/usr/include/c++/13/bits/unordered_set.h" 3 > local_iterator > end(size_type __n) > { return _M_h.end(__n); } > > const_local_iterator > end(size_type __n) const > { return _M_h.end(__n); } > > const_local_iterator > cend(size_type __n) const > { return _M_h.cend(__n); } > > > > > > float > load_factor() const noexcept > { return _M_h.load_factor(); } > > > > float > max_load_factor() const noexcept > { return _M_h.max_load_factor(); } > > > > > > void > max_load_factor(float __z) > { _M_h.max_load_factor(__z); } ># 1696 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > rehash(size_type __n) > { _M_h.rehash(__n); } ># 1707 "/usr/include/c++/13/bits/unordered_set.h" 3 > void > reserve(size_type __n) > { _M_h.reserve(__n); } > > template<typename _Value1, typename _Hash1, typename _Pred1, > typename _Alloc1> > friend bool > operator==(const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&, > const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&); > }; > > > > > template<typename _InputIterator, > typename _Hash = > hash<typename iterator_traits<_InputIterator>::value_type>, > typename _Pred = > equal_to<typename iterator_traits<_InputIterator>::value_type>, > typename _Allocator = > allocator<typename iterator_traits<_InputIterator>::value_type>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireNotAllocator<_Pred>, > typename = _RequireAllocator<_Allocator>> > unordered_multiset(_InputIterator, _InputIterator, > unordered_multiset<int>::size_type = {}, > _Hash = _Hash(), _Pred = _Pred(), > _Allocator = _Allocator()) > -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type, > _Hash, _Pred, _Allocator>; > > template<typename _Tp, typename _Hash = hash<_Tp>, > typename _Pred = equal_to<_Tp>, > typename _Allocator = allocator<_Tp>, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireNotAllocator<_Pred>, > typename = _RequireAllocator<_Allocator>> > unordered_multiset(initializer_list<_Tp>, > unordered_multiset<int>::size_type = {}, > _Hash = _Hash(), _Pred = _Pred(), > _Allocator = _Allocator()) > -> unordered_multiset<_Tp, _Hash, _Pred, _Allocator>; > > template<typename _InputIterator, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > unordered_multiset(_InputIterator, _InputIterator, > unordered_multiset<int>::size_type, _Allocator) > -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type, > hash<typename > iterator_traits<_InputIterator>::value_type>, > equal_to<typename > iterator_traits<_InputIterator>::value_type>, > _Allocator>; > > template<typename _InputIterator, typename _Hash, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireAllocator<_Allocator>> > unordered_multiset(_InputIterator, _InputIterator, > unordered_multiset<int>::size_type, > _Hash, _Allocator) > -> unordered_multiset<typename > iterator_traits<_InputIterator>::value_type, > _Hash, > equal_to< > typename > iterator_traits<_InputIterator>::value_type>, > _Allocator>; > > template<typename _Tp, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > unordered_multiset(initializer_list<_Tp>, > unordered_multiset<int>::size_type, _Allocator) > -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; > > template<typename _Tp, typename _Hash, typename _Allocator, > typename = _RequireNotAllocatorOrIntegral<_Hash>, > typename = _RequireAllocator<_Allocator>> > unordered_multiset(initializer_list<_Tp>, > unordered_multiset<int>::size_type, _Hash, _Allocator) > -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>; > > > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline void > swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, > unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline void > swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, > unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline bool > operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, > const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) > { return __x._M_h._M_equal(__y._M_h); } > > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline bool > operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, > const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) > { return !(__x == __y); } > > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline bool > operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, > const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) > { return __x._M_h._M_equal(__y._M_h); } > > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline bool > operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, > const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) > { return !(__x == __y); } > > > > > > > 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>; > > static auto& > _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) > { return __set._M_h; } > > static auto& > _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) > { return __set._M_h; } > }; > > > 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>; > > static auto& > _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) > { return __set._M_h; } > > static auto& > _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) > { return __set._M_h; } > }; > > > >} ># 42 "/usr/include/c++/13/unordered_set" 2 3 ># 51 "/usr/include/c++/13/unordered_set" 3 >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>>; > } > >} ># 7 "../../subprojects/edfst/subprojects/point-util/src/PointDefinitions.hpp" 2 ># 19 "../../subprojects/edfst/subprojects/point-util/src/PointDefinitions.hpp" > ># 19 "../../subprojects/edfst/subprojects/point-util/src/PointDefinitions.hpp" >typedef unsigned char byte; > >typedef std::ostream& (*StreamManipulator)(std::ostream&); > >using setw = std::_Setw; > >template<typename T> >using disable_setw = typename std::enable_if_t<!std::is_same<T, std::_Setw>::value, void>; ># 47 "../../subprojects/edfst/subprojects/point-util/src/PointDefinitions.hpp" >namespace point_util >{ >template<typename T> >using static_not = std::integral_constant<bool, !T::value>; > >template<typename T> >std::true_type >is_smart_pointer_definition(const std::unique_ptr<T> *); > >std::false_type >is_smart_pointer_definition(...); > >template<typename T> >using is_smart_pointer = decltype(is_smart_pointer_definition(std::declval<T *>())); > >template<typename T> >using element_type_t = std::remove_reference_t<decltype(*std::begin(std::declval<T&>()))>; > >template<typename T> >using is_lambda = typename std::conditional<!std::is_assignable<T, T>::value && std::is_class<T>::value, std::true_type, std::false_type>::type; > >template<template<typename> class C, typename T> >using is_element_type = std::is_same<element_type_t<C<T>>, T>; > >template<typename P, typename NonPointer = typename std::enable_if<!std::is_pointer<P>::value, P>::type> >using pointed_type_t = std::remove_reference_t<decltype(*(std::declval<P>().operator ->()))>; > >template<typename P, typename Pointer = typename std::enable_if<std::is_pointer<P>::value, P>::type> >using raw_pointed_type_t = std::remove_pointer_t<P>; > >template<typename P, typename T> >using is_pointed_type = std::is_same<pointed_type_t<P>, T>; > >template<typename P, typename T> >using is_raw_pointed_type = std::is_same<raw_pointed_type_t<P>, T>; > >template<typename T> >struct is_complete : > public std::integral_constant<bool, !std::is_abstract<T>::value> {}; > >template<typename Tag, typename T> >struct is_interface : > public std::integral_constant<bool, std::is_base_of<Tag, T>::value && !std::is_same<Tag, T>::value> {}; > >template<typename T> >using iterator_t = decltype(std::declval<T>().begin()); > >template<typename T> >using is_iterable = is_complete<iterator_t<T>>; > >template<typename I, typename T> >struct compliance { > static std::enable_if_t<std::is_base_of<I, T>::value && !std::is_same<I, T>::value, void> > check() {} >}; > >template<typename I, typename T> >struct availability { > static std::enable_if_t<std::is_same<typename std::result_of<I>::type, T>::value, void> > check() {} >}; > >template<typename In, typename Out> >struct compatibility { > static std::enable_if_t<std::is_assignable<Out, In>::value, void> > check() {} >}; > >struct footprint { > template<typename T, int size> > struct match { > static std::enable_if_t<sizeof(T) == size, void> > check() {} > }; > > template<typename T, int size> > struct limit { > static std::enable_if_t<sizeof(T) <= size, void> > check() {} > }; >}; > >namespace ExtractParameter >{ >template<typename T> >struct First; > >template<template<typename, typename ...> class IgnoredClass, typename Identify, typename ... IgnoredTypes> >struct First<IgnoredClass<Identify, IgnoredTypes ...>> { > using type = Identify; >}; > >template<typename T> >struct Second; > >template<template<typename, typename, typename ...> class IgnoredClass, typename IgnoredFirstType, typename Identify, typename ... IgnoredTypes> >struct Second<IgnoredClass<IgnoredFirstType, Identify, IgnoredTypes ...>> { > using type = Identify; >}; >} > >template<int N, typename T> >using extract_parameter = > typename std::conditional< > N == 1, ExtractParameter::First<T>, > typename std::conditional< > N == 2, ExtractParameter::Second<T>, void>::type>::type; > >template<int N, typename ... Types> >using type_at_index = typename std::tuple_element<N, std::tuple<Types ...>>::type; > >template<typename T, typename ... Types> >struct index_of_type; > >template<typename T, typename ... Types> >struct index_of_type<T, T, Types...> : > std::integral_constant<std::size_t, 0> {}; > >template<typename T, typename U, typename ... Types> >struct index_of_type<T, U, Types...> : > std::integral_constant<std::size_t, 1 + index_of_type<T, Types...>::value> {}; > >template<template<typename> class T, template<typename> class ... Types> >struct index_of_template; > >template<template<typename> class T, template<typename> class ... Types> >struct index_of_template<T, T, Types...> : > std::integral_constant<std::size_t, 0> {}; > >template<template<typename> class T, template<typename> class U, template<typename> class ... Types> >struct index_of_template<T, U, Types...> : > std::integral_constant<std::size_t, 1 + index_of_template<T, Types...>::value> {}; > >template<typename T, typename S> >struct is_string { > static const bool value = false; >}; > >template<class T, class Traits, class Alloc> >struct is_string<T, std::basic_string<T, Traits, Alloc>> { > static const bool value = true; >}; > >template<typename T> >using is_datum = typename std::disjunction<std::is_fundamental<T>, is_string<char, T>>; > >template<typename T> >struct IComparator { > using IComparatorTag = IComparator<T>; > > virtual ~IComparator() {} > > virtual bool > operator ()(T, T) = 0; >}; ># 258 "../../subprojects/edfst/subprojects/point-util/src/PointDefinitions.hpp" >template<typename Narrow, typename Wide> >static inline Narrow >narrow(Wide wide) >{ > return static_cast<Narrow>(wide); >} > >template<typename Wide, typename Narrow> >static inline Wide >widen(Narrow narrow) >{ > return static_cast<Wide>(narrow); >} > > >template<typename Tag> >static inline constexpr Tag * >hidden_tag() >{ > return static_cast<Tag *>(nullptr); >} > >template<typename T> >using size_type = typename T::size_type; > >template<typename T> >inline typename std::enable_if<std::is_integral<T>::value, T>::type >quantifyByIndex(T index) >{ > return (index + 1); >} > >template<typename T> >inline typename std::enable_if<std::is_integral<T>::value, T>::type >lastOfQuantity(T quantity) >{ > return (quantity - 1); >} > >template<typename T> >struct Default { > T value; > > Default() : > value() > {} >}; > >inline bool >isLittleEndian() >{ > static union { > uint32_t integerStorageView; > char arrayStorageView[4]; > } > storageView = { 0x01020304 }; > > return storageView.arrayStorageView[0] == static_cast<char>(0xff & storageView.integerStorageView); >} > >template<typename Key> >struct UnionHasher { > size_t > operator ()(const Key& key) const { return key.unionHash(); } >}; > >template<typename Key> >struct HashIdentity { > bool > operator ()(const Key& a, const Key& b) const { return a.unionHash() == b.unionHash(); } >}; > >template<typename Key> >struct UnionComparator { > bool > operator ()(const Key& a, const Key& b) const { return a.unionCompare(b); } >}; > >template<typename Key> >using UnionHashIdentitySet = std::unordered_set<Key, UnionHasher<Key>, HashIdentity<Key>>; > >template<typename Key, typename Value> >using UnionHashIdentityMap = std::unordered_map<Key, Value, UnionHasher<Key>, HashIdentity<Key>>; > >template<typename Key, typename Value> >using UnionHashIdentityMultimap = std::unordered_multimap<Key, Value, UnionHasher<Key>, HashIdentity<Key>>; > >template<typename Key> >using UnionHashSet = std::unordered_set<Key, UnionHasher<Key>, UnionComparator<Key>>; > >template<typename Key, typename Value> >using UnionHashMap = std::unordered_map<Key, Value, UnionHasher<Key>, UnionComparator<Key>>; > >template<typename Key, typename Value> >using UnionHashMultimap = std::unordered_multimap<Key, Value, UnionHasher<Key>, UnionComparator<Key>>; >} ># 6 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/handle.hpp" 1 > > > > > > >namespace point_util >{ > >template<typename T> >class handle >{ >public: > using pointed_type = T; > using base_type = typename std::remove_const<T>::type; > using const_type = typename std::add_const<T>::type; > > friend handle<const_type>; > > handle(T& t) : > _value(&t) > {} > > handle(const handle<base_type>& t) : > _value(t._value) > {} > > handle(const handle<const_type>& t) : > _value(t._value) > {} > > explicit handle(void *p) : > _value(narrow<T *>(p)) > {} > > handle(nullptr_t null = nullptr) : > _value(null) > {} ># 47 "../../subprojects/edfst/subprojects/point-util/src/point/handle.hpp" > T * > operator ->() const { return _value; } > > T& > operator *() { return *_value; } > > T * > read() const { return _value; } > > T& > reference() { return *_value; } > > T&& > move() { return std::move(*_value); } > > void > reset() { _value = nullptr; } ># 104 "../../subprojects/edfst/subprojects/point-util/src/point/handle.hpp" > std::size_t > pointerHash() const > { > static std::hash<T *> hasher; > > return hasher(_value); > } > > bool > operator ==(const handle<T> other) const { return _value == other._value; } > > bool > operator ==(nullptr_t null) { return _value == null; } > > bool > operator !=(const handle<T> other) const { return _value != other._value; } > > bool > operator !=(nullptr_t null) { return _value != null; } > > handle<T>& > operator =(T& t) > { > _value = &t; > return *this; > } > > handle<T>& > operator =(const handle<T>& t) > { > _value = t._value; > return *this; > } > > handle<T> > operator |=(handle<T> other) > { > *_value |= *other._value; > return *this; > } > > friend std::ostream& > operator <<(std::ostream& o, handle<T> h) { return o << *h._value; } > >private: > T *_value; >}; > >template<typename T> >struct handle_hash { > std::size_t > operator ()(const handle<T>& t) const noexcept > { > return t.pointerHash(); > } >}; >} ># 7 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" 2 > > >namespace point_util >{ >template<typename T> >class ThirdPartyEntity; > >class owner_state_exception : > public std::exception { >public: > owner_state_exception(std::string message) : > _message(message) {} > > const std::string& > getMessage() const { return _message; } > >private: > std::string _message; >}; > > > >enum DSA { > STATE_EMPTY, > STATE_ASSIGNED, > STATE_FINAL, >}; > >enum DMA { > STATE_UNRESTRICTED, > EMPTY_1, > EMPTY_2, >}; > >template<typename T, typename S = DMA, typename D = std::default_delete<T>> >class owner : > public std::unique_ptr<T, D> >{ >struct use_make_sa {}; > >typedef typename std::unique_ptr<T, D>::pointer pointer; ># 77 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" >inline void >approveAssignment(__attribute__((unused)) bool toNull) {} > > >public: > owner() : > std::unique_ptr<T, D>(), > _state(static_cast<S>(0)) {} > > owner(__attribute__((unused)) std::nullptr_t null) : > std::unique_ptr<T, D>(), > _state(static_cast<S>(0)) {} ># 99 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" > owner(owner&& p) : > std::unique_ptr<T, D>() > { ># 113 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" > std::unique_ptr<T, D>::reset(p.release()); > std::unique_ptr<T, D>::get_deleter() = std::forward<D>(p.get_deleter()); > } > > > owner(std::unique_ptr<T, D>&& p) : > std::unique_ptr<T, D>() > { ># 132 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" > std::unique_ptr<T, D>::reset(p.release()); > std::unique_ptr<T, D>::get_deleter() = std::forward<D>(p.get_deleter()); > } > > template<typename Proposed, typename StateType, typename Deleter = std::default_delete<Proposed>> > owner<T, S, D>& > operator =(owner<Proposed, StateType, Deleter>&& p) > { > approveAssignment(p == nullptr); > > std::unique_ptr<T, D>::reset(p.release()); > std::unique_ptr<T, D>::get_deleter() = std::forward<D>(p.get_deleter()); > return *this; > } > > template<typename Proposed, typename StateType, typename Deleter = std::default_delete<Proposed>> > owner(owner<Proposed, StateType, Deleter>&& proposed) noexcept : > std::unique_ptr<T, D>() > { > std::unique_ptr<T, D>::reset(proposed.release()); > std::unique_ptr<T, D>::get_deleter() = std::forward<D>(proposed.get_deleter()); > } > > owner(owner const&) = delete; > > ~owner() {} > > void > reset(pointer p = pointer()) > { > approveAssignment(p == pointer()); > > std::unique_ptr<T, D>::reset(p); > } > > > > template<typename P, typename = typename std::_Require<std::is_base_of<std::unique_ptr<T, D>, P>>> > P& > operator =(P&& p) > { > approveAssignment(p == nullptr); > > std::unique_ptr<T, D>::reset(p.release()); > std::unique_ptr<T, D>::get_deleter() = std::forward<D>(p.get_deleter()); > return *this; > } > > > template<typename E> > operator E *() const { return static_cast<ThirdPartyEntity<E> *>(std::unique_ptr<T, D>::get())->_entity; } > > explicit operator T&() { return *std::unique_ptr<T, D>::get(); } > > T& > reference() const { return *std::unique_ptr<T, D>::get(); } > > operator handle<T>() const { return handle<T>(*std::unique_ptr<T, D>::get()); } > > handle<T> > handoff() const { return handle<T>(*std::unique_ptr<T, D>::get()); } > > > template<typename K, typename KTest = typename std::enable_if<std::is_integral<K>::value, K>::type> > auto& > > operator [](const K& k) { return (*std::unique_ptr<T, D>::get())[k]; } > > template<typename K, typename KTest = typename std::enable_if<std::is_integral<K>::value, K>::type> > auto& > > operator [](const owner<K> k) { return (*std::unique_ptr<T, D>::get())[k]; } > > template<typename BaseOperand> > using operator_plus = decltype(std::declval<BaseOperand>().operator +()); > > template<typename OperandType> > auto > > > operator +(const owner<OperandType>& operand) const { return *std::unique_ptr<T, D>::get() + *operand.get(); } > > template<typename ... A> > void > call(A&& ... args) > { > (*std::unique_ptr<T, D>::get())(std::forward<A>(args)...); > } > > auto > > begin() { return std::unique_ptr<T, D>::get()->begin(); } > > auto > > end() { return std::unique_ptr<T, D>::get()->end(); } > > template<typename ... A> > inline static owner<T, S, D> > make(A&& ... args) > { > return owner<T, S, D>(new T(std::forward<A>(args) ...)); > } ># 263 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" > inline static owner<T, S, D> > make(const char *s) > { > return owner<T, S, D>(new T(std::string(s))); > } > > template<typename A, size_t N> > inline static owner<T, S, D> > make(const A (&array)[N]) > { > const A * start = array, *end = start + (sizeof(array) / sizeof(array[0])); > > return owner<T, S, D>(new T(start, end)); > } > > inline static owner<T> > acquire(T *p) > { > return owner<T>(p); > } > > explicit operator std::unique_ptr<T, D>() = delete; > explicit operator std::unique_ptr<T, D>& () = delete; > explicit operator std::unique_ptr<T, D>&& () = delete; > > class const_builder > { > public: > const_builder() : > _builder(new T()), > _sealed(owner<const T>::acquire(_builder)) > {} > > const_builder(const_builder&& src) : > _builder(src._builder), > _sealed(std::move(src._sealed)) > {} > > const_builder& > operator =(const_builder&& src) > { > _builder = src._builder; > _sealed = std::move(src._sealed); > return *this; > } > > T * > operator ->() const { return _builder; } > > operator T *() const { return _builder; } > > template<typename ImmutableView> > operator ImmutableView() const { return static_cast<ImmutableView>(_sealed); } > > template<typename ... A> > inline static const_builder > make(A&& ... args) > { > return const_builder(new T(std::forward<A>(args) ...)); > } > > owner<const T> > seal() > { > owner<const T> sealed = std::move(_sealed); > > _builder = ># 329 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" 3 4 > __null ># 329 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" > ; > return sealed; > } > > private: > template<typename A> > explicit > const_builder(A a) : > _builder(a), > _sealed(owner<const T>::acquire(a)) > {} > > T *_builder; > owner<const T> _sealed; > }; > >private: > > > > > template<typename A> > explicit > owner(A a) : > std::unique_ptr<T, D>(std::forward<A>(a)), > _state(static_cast<S>(0)) {} > > > > S _state; > >}; > > >template<typename T> >struct is_owner : > std::false_type >{}; > >template<typename T> >struct is_owner<owner<T>> : > std::true_type >{}; > >template<typename Stream, typename Lifecycle, typename T> >inline owner<Stream, Lifecycle>& >operator <<(owner<Stream, Lifecycle>& o, const T& token) >{ > (*o.get()) << token; > return o; >} ># 391 "../../subprojects/edfst/subprojects/point-util/src/point/owner.hpp" >template<typename T> >std::ostream& >operator <<(std::ostream& o, const owner<T>& f) >{ > return o << *f; >} > >template<typename S> >inline owner<S>& >operator <<(owner<S>& o, StreamManipulator m) >{ > (*o.get()) << m; > return o; >} > >template<typename T> >struct owner_hash { > size_t > operator ()(const owner<T>& p) const noexcept > { > static std::hash<T *> hash; > > return hash(p.get()); > } >}; >} ># 4 "../../subprojects/edfst/subprojects/facile/src/scope/DestructorCallback.hpp" 2 > >namespace facile >{ >class DestructorCallback >{ >public: > using Callback = std::function<void(void)> ; > > ~DestructorCallback() > { > if (_callback != nullptr) > _callback(); > } > > void > registerDestructorCallback(Callback callback) > { > _callback = callback; > } > >private: > std::function<void(void)> _callback; >}; >} ># 10 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/LineAtomicStream.hpp" 1 > > > > ># 1 "/usr/include/c++/13/mutex" 1 3 ># 32 "/usr/include/c++/13/mutex" 3 > ># 33 "/usr/include/c++/13/mutex" 3 ># 43 "/usr/include/c++/13/mutex" 3 ># 1 "/usr/include/c++/13/bits/chrono.h" 1 3 ># 33 "/usr/include/c++/13/bits/chrono.h" 3 > ># 34 "/usr/include/c++/13/bits/chrono.h" 3 > > > ># 1 "/usr/include/c++/13/ratio" 1 3 ># 33 "/usr/include/c++/13/ratio" 3 > ># 34 "/usr/include/c++/13/ratio" 3 > > > > > > ># 1 "/usr/include/c++/13/cstdint" 1 3 ># 32 "/usr/include/c++/13/cstdint" 3 > ># 33 "/usr/include/c++/13/cstdint" 3 ># 48 "/usr/include/c++/13/cstdint" 3 > ># 48 "/usr/include/c++/13/cstdint" 3 >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; ># 142 "/usr/include/c++/13/cstdint" 3 >} ># 41 "/usr/include/c++/13/ratio" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 56 "/usr/include/c++/13/ratio" 3 > 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 <= 0x7fffffffffffffffL, > "overflow in multiplication"); > static_assert((__a0 * __b1 + __b0 * __a1) * __c > <= 0x7fffffffffffffffL - __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"); > }; ># 265 "/usr/include/c++/13/ratio" 3 > template<intmax_t _Num, intmax_t _Den = 1> > struct ratio > { > static_assert(_Den != 0, "denominator cannot be zero"); > static_assert(_Num >= -0x7fffffffffffffffL && _Den >= -0x7fffffffffffffffL, > "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; > }; ># 292 "/usr/include/c++/13/ratio" 3 > template<typename _R1, typename _R2> > struct __ratio_multiply > { > 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; > }; ># 323 "/usr/include/c++/13/ratio" 3 > 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; > }; ># 352 "/usr/include/c++/13/ratio" 3 > 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> > { }; > > > 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 > { }; > > > 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 <= 0x7fffffffffffffffL, "overflow in addition"); > typedef __big_mul<_R1::den / __g2, __d2> __d_final; > static_assert(__d_final::__hi == 0 && > __d_final::__lo <= 0x7fffffffffffffffL, "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 <= 0x7fffffffffffffffL, "overflow in addition"); > typedef __big_mul<_R1::den / __g2, __d2> __d_final; > static_assert(__d_final::__hi == 0 && > __d_final::__lo <= 0x7fffffffffffffffL, "overflow in addition"); > public: > typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; > }; > > template<typename _R1, typename _R2> > struct __ratio_add > { > typedef typename __ratio_add_impl<_R1, _R2>::type type; > static constexpr intmax_t num = type::num; > static constexpr intmax_t den = type::den; > }; ># 532 "/usr/include/c++/13/ratio" 3 > 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; > }; ># 559 "/usr/include/c++/13/ratio" 3 > 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; > > > >} ># 38 "/usr/include/c++/13/bits/chrono.h" 2 3 > ># 1 "/usr/include/c++/13/limits" 1 3 ># 40 "/usr/include/c++/13/limits" 3 > ># 41 "/usr/include/c++/13/limits" 3 ># 158 "/usr/include/c++/13/limits" 3 >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 > }; ># 202 "/usr/include/c++/13/limits" 3 > 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; ># 288 "/usr/include/c++/13/limits" 3 > 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; > }; ># 311 "/usr/include/c++/13/limits" 3 > template<typename _Tp> > struct numeric_limits : public __numeric_limits_base > { > > > static constexpr _Tp > min() noexcept { return _Tp(); } > > > static constexpr _Tp > max() noexcept { return _Tp(); } > > > > > static constexpr _Tp > lowest() noexcept { return _Tp(); } > > > > > static constexpr _Tp > epsilon() noexcept { return _Tp(); } > > > static constexpr _Tp > round_error() noexcept { return _Tp(); } > > > static constexpr _Tp > infinity() noexcept { return _Tp(); } > > > > static constexpr _Tp > quiet_NaN() noexcept { return _Tp(); } > > > > static constexpr _Tp > signaling_NaN() noexcept { return _Tp(); } > > > > > static constexpr _Tp > denorm_min() noexcept { return _Tp(); } > }; > > > > > 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> { }; ># 383 "/usr/include/c++/13/limits" 3 > template<> > struct numeric_limits<bool> > { > static constexpr bool is_specialized = true; > > static constexpr bool > min() noexcept { return false; } > > static constexpr bool > max() noexcept { return true; } > > > static constexpr bool > lowest() noexcept { return min(); } > > 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 bool > epsilon() noexcept { return false; } > > static constexpr bool > round_error() noexcept { return false; } > > 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 > infinity() noexcept { return false; } > > static constexpr bool > quiet_NaN() noexcept { return false; } > > static constexpr bool > signaling_NaN() noexcept { return false; } > > static constexpr bool > denorm_min() noexcept { return 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 { return (((char)(-1) < 0) ? -(((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0) - 1 : (char)0); } > > static constexpr char > max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } > > > static constexpr char > lowest() noexcept { return min(); } > > > 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 char > epsilon() noexcept { return 0; } > > static constexpr char > 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 > char infinity() noexcept { return char(); } > > static constexpr char > quiet_NaN() noexcept { return char(); } > > static constexpr char > signaling_NaN() noexcept { return char(); } > > static constexpr char > denorm_min() noexcept { return static_cast<char>(0); } > > 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 { return -0x7f - 1; } > > static constexpr signed char > max() noexcept { return 0x7f; } > > > static constexpr signed char > lowest() noexcept { return min(); } > > > 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 signed char > epsilon() noexcept { return 0; } > > static constexpr signed char > 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 signed char > infinity() noexcept { return static_cast<signed char>(0); } > > static constexpr signed char > quiet_NaN() noexcept { return static_cast<signed char>(0); } > > static constexpr signed char > signaling_NaN() noexcept > { return static_cast<signed char>(0); } > > static constexpr signed char > denorm_min() noexcept > { return static_cast<signed char>(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 char> > { > static constexpr bool is_specialized = true; > > static constexpr unsigned char > min() noexcept { return 0; } > > static constexpr unsigned char > max() noexcept { return 0x7f * 2U + 1; } > > > static constexpr unsigned char > lowest() noexcept { return min(); } > > > 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 unsigned char > epsilon() noexcept { return 0; } > > static constexpr unsigned char > 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 char > infinity() noexcept > { return static_cast<unsigned char>(0); } > > static constexpr unsigned char > quiet_NaN() noexcept > { return static_cast<unsigned char>(0); } > > static constexpr unsigned char > signaling_NaN() noexcept > { return static_cast<unsigned char>(0); } > > static constexpr unsigned char > denorm_min() noexcept > { return static_cast<unsigned char>(0); } > > static constexpr bool is_iec559 = false; > static constexpr bool is_bounded = true; > static constexpr bool is_modulo = true; > > static constexpr bool traps = true; > static constexpr bool tinyness_before = false; > static constexpr float_round_style round_style > = round_toward_zero; > }; > > > 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 wchar_t > max() noexcept { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } > > > static constexpr wchar_t > lowest() noexcept { return min(); } > > > 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 wchar_t > epsilon() noexcept { return 0; } > > static constexpr wchar_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 wchar_t > infinity() noexcept { return wchar_t(); } > > static constexpr wchar_t > quiet_NaN() noexcept { return wchar_t(); } > > static constexpr wchar_t > signaling_NaN() noexcept { return wchar_t(); } > > static constexpr wchar_t > denorm_min() noexcept { return wchar_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; > }; ># 796 "/usr/include/c++/13/limits" 3 > 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 char16_t > max() noexcept { return (((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0); } > > static constexpr char16_t > lowest() noexcept { return min(); } > > 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 char16_t > epsilon() noexcept { return 0; } > > static constexpr char16_t > round_error() noexcept { return 0; } > > static constexpr int min_exponent = 0; > static constexpr int min_exponent10 = 0; > static constexpr int max_exponent = 0; > static constexpr int max_exponent10 = 0; > > static constexpr bool has_infinity = false; > static constexpr bool has_quiet_NaN = false; > static constexpr bool has_signaling_NaN = false; > static constexpr float_denorm_style has_denorm = denorm_absent; > static constexpr bool has_denorm_loss = false; > > static constexpr char16_t > infinity() noexcept { return char16_t(); } > > static constexpr char16_t > quiet_NaN() noexcept { return char16_t(); } > > static constexpr char16_t > signaling_NaN() noexcept { return char16_t(); } > > static constexpr char16_t > denorm_min() noexcept { return char16_t(); } > > static constexpr bool is_iec559 = false; > static constexpr bool is_bounded = true; > static constexpr bool is_modulo = !is_signed; > > static constexpr bool traps = 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 char32_t > max() noexcept { return (((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0); } > > static constexpr char32_t > lowest() noexcept { return min(); } > > 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 char32_t > epsilon() noexcept { return 0; } > > static constexpr char32_t > round_error() noexcept { return 0; } > > static constexpr int min_exponent = 0; > static constexpr int min_exponent10 = 0; > static constexpr int max_exponent = 0; > static constexpr int max_exponent10 = 0; > > static constexpr bool has_infinity = false; > static constexpr bool has_quiet_NaN = false; > static constexpr bool has_signaling_NaN = false; > static constexpr float_denorm_style has_denorm = denorm_absent; > static constexpr bool has_denorm_loss = false; > > static constexpr char32_t > infinity() noexcept { return char32_t(); } > > static constexpr char32_t > quiet_NaN() noexcept { return char32_t(); } > > static constexpr char32_t > signaling_NaN() noexcept { return char32_t(); } > > static constexpr char32_t > denorm_min() noexcept { return char32_t(); } > > static constexpr bool is_iec559 = false; > static constexpr bool is_bounded = true; > static constexpr bool is_modulo = !is_signed; > > static constexpr bool traps = 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 -0x7fff - 1; } > > static constexpr short > max() noexcept { return 0x7fff; } > > > static constexpr short > lowest() noexcept { return min(); } > > > 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 short > epsilon() noexcept { return 0; } > > static constexpr short > 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 short > infinity() noexcept { return short(); } > > static constexpr short > quiet_NaN() noexcept { return short(); } > > static constexpr short > signaling_NaN() noexcept { return short(); } > > static constexpr short > denorm_min() noexcept { return short(); } > > 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 unsigned short > max() noexcept { return 0x7fff * 2U + 1; } > > > static constexpr unsigned short > lowest() noexcept { return min(); } > > > 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 unsigned short > epsilon() noexcept { return 0; } > > static constexpr unsigned short > 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 short > infinity() noexcept > { return static_cast<unsigned short>(0); } > > static constexpr unsigned short > quiet_NaN() noexcept > { return static_cast<unsigned short>(0); } > > static constexpr unsigned short > signaling_NaN() noexcept > { return static_cast<unsigned short>(0); } > > static constexpr unsigned short > denorm_min() noexcept > { return static_cast<unsigned short>(0); } > > static constexpr bool is_iec559 = false; > static constexpr bool is_bounded = true; > static constexpr bool is_modulo = true; > > static constexpr bool traps = true; > static constexpr bool tinyness_before = false; > static constexpr float_round_style round_style > = round_toward_zero; > }; > > > template<> > struct numeric_limits<int> > { > static constexpr bool is_specialized = true; > > static constexpr int > min() noexcept { return -0x7fffffff - 1; } > > static constexpr int > max() noexcept { return 0x7fffffff; } > > > static constexpr int > lowest() noexcept { return min(); } > > > 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 > epsilon() noexcept { return 0; } > > static constexpr 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 int > infinity() noexcept { return static_cast<int>(0); } > > static constexpr int > quiet_NaN() noexcept { return static_cast<int>(0); } > > static constexpr int > signaling_NaN() noexcept { return static_cast<int>(0); } > > static constexpr int > denorm_min() noexcept { return static_cast<int>(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 int> > { > static constexpr bool is_specialized = true; > > static constexpr unsigned int > min() noexcept { return 0; } > > static constexpr unsigned int > max() noexcept { return 0x7fffffff * 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 { return static_cast<unsigned int>(0); } > > static constexpr unsigned int > quiet_NaN() noexcept > { return static_cast<unsigned int>(0); } > > static constexpr unsigned int > signaling_NaN() noexcept > { return static_cast<unsigned int>(0); } > > static constexpr unsigned int > denorm_min() noexcept > { return static_cast<unsigned int>(0); } > > static constexpr bool is_iec559 = false; > static constexpr bool is_bounded = true; > static constexpr bool is_modulo = true; > > static constexpr bool traps = true; > static constexpr bool tinyness_before = false; > static constexpr float_round_style round_style > = round_toward_zero; > }; > > > template<> > struct numeric_limits<long> > { > static constexpr bool is_specialized = true; > > static constexpr long > min() noexcept { return -0x7fffffffffffffffL - 1; } > > static constexpr long > max() noexcept { return 0x7fffffffffffffffL; } > > > 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 { 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 long > infinity() noexcept { return static_cast<long>(0); } > > static constexpr long > quiet_NaN() noexcept { return static_cast<long>(0); } > > static constexpr long > signaling_NaN() noexcept { return static_cast<long>(0); } > > 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 0x7fffffffffffffffL * 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 > { return static_cast<unsigned long>(0); } > > static constexpr unsigned long > denorm_min() noexcept > { return static_cast<unsigned long>(0); } > > static constexpr bool is_iec559 = false; > static constexpr bool is_bounded = true; > static constexpr bool is_modulo = true; > > static constexpr bool traps = true; > static constexpr bool tinyness_before = false; > static constexpr float_round_style round_style > = round_toward_zero; > }; > > > template<> > struct numeric_limits<long long> > { > static constexpr bool is_specialized = true; > > static constexpr long long > min() noexcept { return -0x7fffffffffffffffLL - 1; } > > static constexpr long long > max() noexcept { return 0x7fffffffffffffffLL; } > > > 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 { return 0; } > > static constexpr long 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 long long > infinity() noexcept { return static_cast<long long>(0); } > > static constexpr long long > quiet_NaN() noexcept { return static_cast<long long>(0); } > > static constexpr long long > signaling_NaN() noexcept > { return static_cast<long long>(0); } > > static constexpr long long > denorm_min() noexcept { return static_cast<long 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 long> > { > static constexpr bool is_specialized = true; > > static constexpr unsigned long long > min() noexcept { return 0; } > > static constexpr unsigned long long > max() noexcept { return 0x7fffffffffffffffLL * 2ULL + 1; } > > > static constexpr unsigned long long > lowest() noexcept { return min(); } > > > 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 { return 0; } > > static constexpr unsigned long 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 long > infinity() noexcept > { return static_cast<unsigned long long>(0); } > > static constexpr unsigned long long > quiet_NaN() noexcept > { return static_cast<unsigned long long>(0); } > > static constexpr unsigned long long > signaling_NaN() noexcept > { return static_cast<unsigned long long>(0); } > > static constexpr unsigned long long > denorm_min() noexcept > { return static_cast<unsigned long long>(0); } > > static constexpr bool is_iec559 = false; > static constexpr bool is_bounded = true; > static constexpr bool is_modulo = true; > > static constexpr bool traps = true; > static constexpr bool tinyness_before = false; > static constexpr float_round_style round_style > = round_toward_zero; > }; ># 1658 "/usr/include/c++/13/limits" 3 > __extension__ template<> struct numeric_limits<__int128> { static constexpr bool is_specialized = true; static constexpr __int128 min() noexcept { return (((__int128)(-1) < 0) ? -(((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0) - 1 : (__int128)0); } static constexpr __int128 max() noexcept { return (((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0); } static constexpr int digits = 128 - 1; static constexpr int digits10 = (128 - 1) * 643L / 2136; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr __int128 epsilon() noexcept { return 0; } static constexpr __int128 round_error() noexcept { return 0; } static constexpr __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr __int128 infinity() noexcept { return static_cast<__int128>(0); } static constexpr __int128 quiet_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 signaling_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 denorm_min() noexcept { return static_cast<__int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; __extension__ template<> struct numeric_limits<unsigned __int128> { static constexpr bool is_specialized = true; static constexpr unsigned __int128 min() noexcept { return 0; } static constexpr unsigned __int128 max() noexcept { return (((unsigned __int128)(-1) < 0) ? (((((unsigned __int128)1 << ((128 - ((unsigned __int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(unsigned __int128)0); } static constexpr unsigned __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int digits = 128; static constexpr int digits10 = 128 * 643L / 2136; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned __int128 epsilon() noexcept { return 0; } static constexpr unsigned __int128 round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned __int128 infinity() noexcept { return static_cast<unsigned __int128>(0); } static constexpr unsigned __int128 quiet_NaN() noexcept { return static_cast<unsigned __int128>(0); } static constexpr unsigned __int128 signaling_NaN() noexcept { return static_cast<unsigned __int128>(0); } static constexpr unsigned __int128 denorm_min() noexcept { return static_cast<unsigned __int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; ># 1669 "/usr/include/c++/13/limits" 3 > template<> > struct numeric_limits<float> > { > static constexpr bool is_specialized = true; > > static constexpr float > min() noexcept { return 1.17549435082228750796873653722224568e-38F; } > > static constexpr float > max() noexcept { return 3.40282346638528859811704183484516925e+38F; } > > > static constexpr float > lowest() noexcept { return -3.40282346638528859811704183484516925e+38F; } > > > 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 { return 1.19209289550781250000000000000000000e-7F; } > > static constexpr float > round_error() noexcept { return 0.5F; } > > 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 { return __builtin_huge_valf(); } > > static constexpr float > quiet_NaN() noexcept { return __builtin_nanf(""); } > > static constexpr float > signaling_NaN() noexcept { return __builtin_nansf(""); } > > static constexpr float > denorm_min() noexcept { return 1.40129846432481707092372958328991613e-45F; } > > 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 { return double(2.22507385850720138309023271733240406e-308L); } > > static constexpr double > max() noexcept { return double(1.79769313486231570814527423731704357e+308L); } > > > static constexpr double > lowest() noexcept { return -double(1.79769313486231570814527423731704357e+308L); } > > > 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 { return double(2.22044604925031308084726333618164062e-16L); } > > static constexpr double > round_error() noexcept { return 0.5; } > > 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 { return __builtin_huge_val(); } > > static constexpr double > quiet_NaN() noexcept { return __builtin_nan(""); } > > static constexpr double > signaling_NaN() noexcept { return __builtin_nans(""); } > > static constexpr double > denorm_min() noexcept { return double(4.94065645841246544176568792868221372e-324L); } > > 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 { return 3.36210314311209350626267781732175260e-4932L; } > > static constexpr long double > max() noexcept { return 1.18973149535723176502126385303097021e+4932L; } > > > static constexpr long double > lowest() noexcept { return -1.18973149535723176502126385303097021e+4932L; } > > > 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 { return 1.08420217248550443400745280086994171e-19L; } > > static constexpr long double > round_error() noexcept { return 0.5L; } > > 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 { return __builtin_huge_vall(); } > > static constexpr long double > quiet_NaN() noexcept { return __builtin_nanl(""); } > > static constexpr long double > signaling_NaN() noexcept { return __builtin_nansl(""); } > > static constexpr long double > denorm_min() noexcept { return 3.64519953188247460252840593361941982e-4951L; } > > 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; > }; ># 2076 "/usr/include/c++/13/limits" 3 > >} ># 40 "/usr/include/c++/13/bits/chrono.h" 2 3 ># 1 "/usr/include/c++/13/ctime" 1 3 ># 39 "/usr/include/c++/13/ctime" 3 > ># 40 "/usr/include/c++/13/ctime" 3 ># 41 "/usr/include/c++/13/bits/chrono.h" 2 3 ># 1 "/usr/include/c++/13/bits/parse_numbers.h" 1 3 ># 33 "/usr/include/c++/13/bits/parse_numbers.h" 3 > ># 34 "/usr/include/c++/13/bits/parse_numbers.h" 3 ># 42 "/usr/include/c++/13/bits/parse_numbers.h" 3 >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; > >} > > >} ># 42 "/usr/include/c++/13/bits/chrono.h" 2 3 > > > > > >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; > > } ># 77 "/usr/include/c++/13/bits/chrono.h" 3 > 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) > { > typedef typename _ToDur::rep __to_rep; > return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count()) > * static_cast<_CR>(_CF::num) > / static_cast<_CR>(_CF::den))); > } > }; > > 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) > { > typedef typename _ToDur::rep __to_rep; > return _ToDur(static_cast<__to_rep>(__d.count())); > } > }; > > 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) > { > typedef typename _ToDur::rep __to_rep; > return _ToDur(static_cast<__to_rep>( > static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den))); > } > }; > > 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; ># 270 "/usr/include/c++/13/bits/chrono.h" 3 > 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); > } > } ># 302 "/usr/include/c++/13/bits/chrono.h" 3 > 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; ># 384 "/usr/include/c++/13/bits/chrono.h" 3 > 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; > } ># 404 "/usr/include/c++/13/bits/chrono.h" 3 > 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; > } ># 425 "/usr/include/c++/13/bits/chrono.h" 3 > 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; } ># 492 "/usr/include/c++/13/bits/chrono.h" 3 > 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 _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 _Rep, typename _Period> > class duration > { > static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration"); > static_assert(__is_ratio<_Period>::value, > "period must be a specialization of 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 > { return duration<typename common_type<rep>::type, period>(-__r); } > > constexpr duration& > operator++() > { > ++__r; > return *this; > } > > constexpr duration > operator++(int) > { return duration(__r++); } > > constexpr duration& > operator--() > { > --__r; > return *this; > } > > constexpr duration > operator--(int) > { return duration(__r--); } > > constexpr duration& > operator+=(const duration& __d) > { > __r += __d.count(); > return *this; > } > > constexpr duration& > operator-=(const duration& __d) > { > __r -= __d.count(); > return *this; > } > > constexpr duration& > operator*=(const rep& __rhs) > { > __r *= __rhs; > return *this; > } > > constexpr 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 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) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __cd; > return __cd(__cd(__lhs).count() + __cd(__rhs).count()); > } > > > 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) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __cd; > return __cd(__cd(__lhs).count() - __cd(__rhs).count()); > } ># 738 "/usr/include/c++/13/bits/chrono.h" 3 > 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; ># 750 "/usr/include/c++/13/bits/chrono.h" 3 > template<typename _Rep1, typename _Period, typename _Rep2> > constexpr duration<__common_rep_t<_Rep1, _Rep2>, _Period> > operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) > { > typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period> > __cd; > return __cd(__cd(__d).count() * __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) > { return __d * __s; } > > 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) > { > typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period> > __cd; > return __cd(__cd(__d).count() / __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) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __cd; > return __cd(__lhs).count() / __cd(__rhs).count(); > } > > > 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) > { > typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period> > __cd; > return __cd(__cd(__d).count() % __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) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __cd; > return __cd(__cd(__lhs).count() % __cd(__rhs).count()); > } ># 818 "/usr/include/c++/13/bits/chrono.h" 3 > 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(); > } ># 855 "/usr/include/c++/13/bits/chrono.h" 3 > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr bool > operator!=(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { return !(__lhs == __rhs); } > > > 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) > { 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) > { return !(__lhs < __rhs); } ># 899 "/usr/include/c++/13/bits/chrono.h" 3 > 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>>; ># 932 "/usr/include/c++/13/bits/chrono.h" 3 > 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() : __d(duration::zero()) > { } > > constexpr explicit time_point(const duration& __dur) > : __d(__dur) > { } > > > template<typename _Dur2, > typename = _Require<is_convertible<_Dur2, _Dur>>> > constexpr time_point(const time_point<clock, _Dur2>& __t) > : __d(__t.time_since_epoch()) > { } > > > constexpr duration > time_since_epoch() const > { return __d; } ># 988 "/usr/include/c++/13/bits/chrono.h" 3 > constexpr time_point& > operator+=(const duration& __dur) > { > __d += __dur; > return *this; > } > > constexpr time_point& > operator-=(const duration& __dur) > { > __d -= __dur; > return *this; > } > > > static constexpr time_point > min() noexcept > { return time_point(duration::min()); } > > static constexpr time_point > max() noexcept > { return time_point(duration::max()); } > > private: > duration __d; > }; ># 1027 "/usr/include/c++/13/bits/chrono.h" 3 > 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) > { > typedef time_point<_Clock, _ToDur> __time_point; > return __time_point(duration_cast<_ToDur>(__t.time_since_epoch())); > } ># 1049 "/usr/include/c++/13/bits/chrono.h" 3 > 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) > { > return time_point<_Clock, _ToDur>{ > chrono::floor<_ToDur>(__tp.time_since_epoch())}; > } ># 1070 "/usr/include/c++/13/bits/chrono.h" 3 > 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) > { > return time_point<_Clock, _ToDur>{ > chrono::ceil<_ToDur>(__tp.time_since_epoch())}; > } ># 1092 "/usr/include/c++/13/bits/chrono.h" 3 > 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) > { > return time_point<_Clock, _ToDur>{ > chrono::round<_ToDur>(__tp.time_since_epoch())}; > } > > > > > > > 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) > { > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<_Dur1,__dur2>::type __ct; > typedef time_point<_Clock, __ct> __time_point; > return __time_point(__lhs.time_since_epoch() + __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) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef typename common_type<__dur1,_Dur2>::type __ct; > typedef time_point<_Clock, __ct> __time_point; > return __time_point(__rhs.time_since_epoch() + __lhs); > } > > > 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) > { > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<_Dur1,__dur2>::type __ct; > typedef time_point<_Clock, __ct> __time_point; > return __time_point(__lhs.time_since_epoch() -__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) > { 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(); } ># 1176 "/usr/include/c++/13/bits/chrono.h" 3 > template<typename _Clock, typename _Dur1, typename _Dur2> > constexpr bool > operator!=(const time_point<_Clock, _Dur1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { return !(__lhs == __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, 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) > { 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) > { return !(__lhs < __rhs); } ># 1228 "/usr/include/c++/13/bits/chrono.h" 3 >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 > { > return std::time_t(duration_cast<chrono::seconds> > (__t.time_since_epoch()).count()); > } > > static time_point > from_time_t(std::time_t __t) noexcept > { > typedef chrono::time_point<system_clock, seconds> __from; > return time_point_cast<system_clock::duration> > (__from(chrono::seconds(__t))); > } > }; ># 1276 "/usr/include/c++/13/bits/chrono.h" 3 > 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; > }; ># 1298 "/usr/include/c++/13/bits/chrono.h" 3 > using high_resolution_clock = system_clock; > >} ># 1324 "/usr/include/c++/13/bits/chrono.h" 3 > } > > > > > inline namespace literals > { ># 1355 "/usr/include/c++/13/bits/chrono.h" 3 > inline namespace chrono_literals > { > > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wliteral-suffix" > > template<typename _Dur, char... _Digits> > constexpr _Dur __check_overflow() > { > using _Val = __parse_int::_Parse_int<_Digits...>; > constexpr typename _Dur::rep __repval = _Val::value; > static_assert(__repval >= 0 && __repval == _Val::value, > "literal value cannot be represented by duration type"); > return _Dur(__repval); > } > > > > constexpr chrono::duration<long double, ratio<3600,1>> > operator""h(long double __hours) > { return chrono::duration<long double, ratio<3600,1>>{__hours}; } > > > template <char... _Digits> > constexpr chrono::hours > operator""h() > { return __check_overflow<chrono::hours, _Digits...>(); } > > > constexpr chrono::duration<long double, ratio<60,1>> > operator""min(long double __mins) > { return chrono::duration<long double, ratio<60,1>>{__mins}; } > > > template <char... _Digits> > constexpr chrono::minutes > operator""min() > { return __check_overflow<chrono::minutes, _Digits...>(); } > > > constexpr chrono::duration<long double> > operator""s(long double __secs) > { return chrono::duration<long double>{__secs}; } > > > template <char... _Digits> > constexpr chrono::seconds > operator""s() > { return __check_overflow<chrono::seconds, _Digits...>(); } > > > constexpr chrono::duration<long double, milli> > operator""ms(long double __msecs) > { return chrono::duration<long double, milli>{__msecs}; } > > > template <char... _Digits> > constexpr chrono::milliseconds > operator""ms() > { return __check_overflow<chrono::milliseconds, _Digits...>(); } > > > constexpr chrono::duration<long double, micro> > operator""us(long double __usecs) > { return chrono::duration<long double, micro>{__usecs}; } > > > template <char... _Digits> > constexpr chrono::microseconds > operator""us() > { return __check_overflow<chrono::microseconds, _Digits...>(); } > > > constexpr chrono::duration<long double, nano> > operator""ns(long double __nsecs) > { return chrono::duration<long double, nano>{__nsecs}; } > > > template <char... _Digits> > constexpr chrono::nanoseconds > operator""ns() > { return __check_overflow<chrono::nanoseconds, _Digits...>(); } > >#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 > { return _S_from_sys(chrono::system_clock::now()); } ># 1481 "/usr/include/c++/13/bits/chrono.h" 3 > 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, _Dur> > _S_from_sys(const chrono::time_point<__sys_clock, _Dur>& __t) noexcept > { > using __file_time = chrono::time_point<__file_clock, _Dur>; > return __file_time{__t.time_since_epoch()} - _S_epoch_diff; > } > > > template<typename _Dur> > static > chrono::time_point<__sys_clock, _Dur> > _S_to_sys(const chrono::time_point<__file_clock, _Dur>& __t) noexcept > { > using __sys_time = chrono::time_point<__sys_clock, _Dur>; > return __sys_time{__t.time_since_epoch()} + _S_epoch_diff; > } > }; > } > > > >} ># 44 "/usr/include/c++/13/mutex" 2 3 > ># 1 "/usr/include/c++/13/bits/std_mutex.h" 1 3 ># 33 "/usr/include/c++/13/bits/std_mutex.h" 3 > ># 34 "/usr/include/c++/13/bits/std_mutex.h" 3 ># 43 "/usr/include/c++/13/bits/std_mutex.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 59 "/usr/include/c++/13/bits/std_mutex.h" 3 > 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; ># 80 "/usr/include/c++/13/bits/std_mutex.h" 3 > __mutex_base(const __mutex_base&) = delete; > __mutex_base& operator=(const __mutex_base&) = delete; > }; ># 96 "/usr/include/c++/13/bits/std_mutex.h" 3 > class mutex : private __mutex_base > { > public: > typedef __native_type* native_handle_type; > > > constexpr > > mutex() noexcept = default; > ~mutex() = default; > > mutex(const mutex&) = delete; > mutex& operator=(const mutex&) = delete; > > void > lock() > { > int __e = __gthread_mutex_lock(&_M_mutex); > > > if (__e) > __throw_system_error(__e); > } > > [[__nodiscard__]] > bool > try_lock() noexcept > { > > return !__gthread_mutex_trylock(&_M_mutex); > } > > void > unlock() > { > > __gthread_mutex_unlock(&_M_mutex); > } > > native_handle_type > native_handle() noexcept > { return &_M_mutex; } > }; > > > > > class __condvar > { > using timespec = __gthread_time_t; > > public: > __condvar() noexcept > { > > > > } > > ~__condvar() > { > int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond); > do { if (std::__is_constant_evaluated() && !bool(__e != 16)) __builtin_unreachable(); } while (false); > } > > __condvar(const __condvar&) = delete; > __condvar& operator=(const __condvar&) = delete; > > __gthread_cond_t* native_handle() noexcept { return &_M_cond; } > > > void > wait(mutex& __m) > { > int __e __attribute__((__unused__)) > = __gthread_cond_wait(&_M_cond, __m.native_handle()); > do { if (std::__is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); > } > > void > wait_until(mutex& __m, timespec& __abs_time) > { > __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time); > } > > > void > wait_until(mutex& __m, clockid_t __clock, timespec& __abs_time) > { > pthread_cond_clockwait(&_M_cond, __m.native_handle(), __clock, > &__abs_time); > } > > > void > notify_one() noexcept > { > int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond); > do { if (std::__is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); > } > > void > notify_all() noexcept > { > int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond); > do { if (std::__is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); > } > > 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 { }; ># 242 "/usr/include/c++/13/bits/std_mutex.h" 3 > template<typename _Mutex> > class lock_guard > { > public: > typedef _Mutex mutex_type; > > explicit lock_guard(mutex_type& __m) : _M_device(__m) > { _M_device.lock(); } > > lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m) > { } > > ~lock_guard() > { _M_device.unlock(); } > > lock_guard(const lock_guard&) = delete; > lock_guard& operator=(const lock_guard&) = delete; > > private: > mutex_type& _M_device; > }; > > > >} ># 46 "/usr/include/c++/13/mutex" 2 3 ># 1 "/usr/include/c++/13/bits/unique_lock.h" 1 3 ># 33 "/usr/include/c++/13/bits/unique_lock.h" 3 > ># 34 "/usr/include/c++/13/bits/unique_lock.h" 3 ># 43 "/usr/include/c++/13/bits/unique_lock.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 58 "/usr/include/c++/13/bits/unique_lock.h" 3 > template<typename _Mutex> > class unique_lock > { > public: > typedef _Mutex mutex_type; > > unique_lock() noexcept > : _M_device(0), _M_owns(false) > { } > > explicit unique_lock(mutex_type& __m) > : _M_device(std::__addressof(__m)), _M_owns(false) > { > lock(); > _M_owns = true; > } > > unique_lock(mutex_type& __m, defer_lock_t) noexcept > : _M_device(std::__addressof(__m)), _M_owns(false) > { } > > unique_lock(mutex_type& __m, try_to_lock_t) > : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock()) > { } > > unique_lock(mutex_type& __m, adopt_lock_t) noexcept > : _M_device(std::__addressof(__m)), _M_owns(true) > { > > } > > template<typename _Clock, typename _Duration> > unique_lock(mutex_type& __m, > const chrono::time_point<_Clock, _Duration>& __atime) > : _M_device(std::__addressof(__m)), > _M_owns(_M_device->try_lock_until(__atime)) > { } > > template<typename _Rep, typename _Period> > unique_lock(mutex_type& __m, > const chrono::duration<_Rep, _Period>& __rtime) > : _M_device(std::__addressof(__m)), > _M_owns(_M_device->try_lock_for(__rtime)) > { } > > ~unique_lock() > { > if (_M_owns) > unlock(); > } > > unique_lock(const unique_lock&) = delete; > unique_lock& operator=(const unique_lock&) = delete; > > unique_lock(unique_lock&& __u) noexcept > : _M_device(__u._M_device), _M_owns(__u._M_owns) > { > __u._M_device = 0; > __u._M_owns = false; > } > > unique_lock& operator=(unique_lock&& __u) noexcept > { > if(_M_owns) > unlock(); > > unique_lock(std::move(__u)).swap(*this); > > __u._M_device = 0; > __u._M_owns = false; > > return *this; > } > > void > lock() > { > if (!_M_device) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_owns) > __throw_system_error(int(errc::resource_deadlock_would_occur)); > else > { > _M_device->lock(); > _M_owns = true; > } > } > > [[__nodiscard__]] > bool > try_lock() > { > if (!_M_device) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_owns) > __throw_system_error(int(errc::resource_deadlock_would_occur)); > else > { > _M_owns = _M_device->try_lock(); > return _M_owns; > } > } > > template<typename _Clock, typename _Duration> > [[__nodiscard__]] > bool > try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { > if (!_M_device) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_owns) > __throw_system_error(int(errc::resource_deadlock_would_occur)); > else > { > _M_owns = _M_device->try_lock_until(__atime); > return _M_owns; > } > } > > template<typename _Rep, typename _Period> > [[__nodiscard__]] > bool > try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { > if (!_M_device) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_owns) > __throw_system_error(int(errc::resource_deadlock_would_occur)); > else > { > _M_owns = _M_device->try_lock_for(__rtime); > return _M_owns; > } > } > > void > unlock() > { > if (!_M_owns) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_device) > { > _M_device->unlock(); > _M_owns = false; > } > } > > void > swap(unique_lock& __u) noexcept > { > std::swap(_M_device, __u._M_device); > std::swap(_M_owns, __u._M_owns); > } > > mutex_type* > release() noexcept > { > mutex_type* __ret = _M_device; > _M_device = 0; > _M_owns = false; > return __ret; > } > > [[__nodiscard__]] > bool > owns_lock() const noexcept > { return _M_owns; } > > explicit operator bool() const noexcept > { return owns_lock(); } > > [[__nodiscard__]] > mutex_type* > mutex() const noexcept > { return _M_device; } > > private: > mutex_type* _M_device; > bool _M_owns; > }; > > > > template<typename _Mutex> > inline void > swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept > { __x.swap(__y); } > > >} ># 47 "/usr/include/c++/13/mutex" 2 3 ># 57 "/usr/include/c++/13/mutex" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 70 "/usr/include/c++/13/mutex" 3 > 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; ># 94 "/usr/include/c++/13/mutex" 3 > }; ># 106 "/usr/include/c++/13/mutex" 3 > 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() > { > int __e = __gthread_recursive_mutex_lock(&_M_mutex); > > > if (__e) > __throw_system_error(__e); > } > > [[__nodiscard__]] > bool > try_lock() noexcept > { > > return !__gthread_recursive_mutex_trylock(&_M_mutex); > } > > void > unlock() > { > > __gthread_recursive_mutex_unlock(&_M_mutex); > } > > native_handle_type > native_handle() noexcept > { return &_M_mutex; } > }; > > > > > template<typename _Derived> > class __timed_mutex_impl > { > protected: > template<typename _Rep, typename _Period> > bool > _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { > > using __clock = chrono::steady_clock; > > > > > auto __rt = chrono::duration_cast<__clock::duration>(__rtime); > if (ratio_greater<__clock::period, _Period>()) > ++__rt; > return _M_try_lock_until(__clock::now() + __rt); > } > > template<typename _Duration> > bool > _M_try_lock_until(const chrono::time_point<chrono::system_clock, > _Duration>& __atime) > { > auto __s = chrono::time_point_cast<chrono::seconds>(__atime); > auto __ns = chrono::duration_cast<chrono::nanoseconds>(__atime - __s); > > __gthread_time_t __ts = { > static_cast<std::time_t>(__s.time_since_epoch().count()), > static_cast<long>(__ns.count()) > }; > > return static_cast<_Derived*>(this)->_M_timedlock(__ts); > } > > > template<typename _Duration> > bool > _M_try_lock_until(const chrono::time_point<chrono::steady_clock, > _Duration>& __atime) > { > auto __s = chrono::time_point_cast<chrono::seconds>(__atime); > auto __ns = chrono::duration_cast<chrono::nanoseconds>(__atime - __s); > > __gthread_time_t __ts = { > static_cast<std::time_t>(__s.time_since_epoch().count()), > static_cast<long>(__ns.count()) > }; > > return static_cast<_Derived*>(this)->_M_clocklock(1, > __ts); > } > > > template<typename _Clock, typename _Duration> > bool > _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { > > > > > > > auto __now = _Clock::now(); > do { > auto __rtime = __atime - __now; > if (_M_try_lock_for(__rtime)) > return true; > __now = _Clock::now(); > } while (__atime > __now); > return false; > } > }; ># 235 "/usr/include/c++/13/mutex" 3 > 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() > { > int __e = __gthread_mutex_lock(&_M_mutex); > > > if (__e) > __throw_system_error(__e); > } > > [[__nodiscard__]] > bool > try_lock() noexcept > { > > return !__gthread_mutex_trylock(&_M_mutex); > } > > template <class _Rep, class _Period> > [[__nodiscard__]] > bool > try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { return _M_try_lock_for(__rtime); } > > template <class _Clock, class _Duration> > [[__nodiscard__]] > bool > try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { return _M_try_lock_until(__atime); } > > void > unlock() > { > > __gthread_mutex_unlock(&_M_mutex); > } > > native_handle_type > native_handle() noexcept > { return &_M_mutex; } > > private: > friend class __timed_mutex_impl<timed_mutex>; > > bool > _M_timedlock(const __gthread_time_t& __ts) > { return !__gthread_mutex_timedlock(&_M_mutex, &__ts); } > > > bool > _M_clocklock(clockid_t __clockid, const __gthread_time_t& __ts) > { return !pthread_mutex_clocklock(&_M_mutex, __clockid, &__ts); } > > }; ># 312 "/usr/include/c++/13/mutex" 3 > 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() > { > int __e = __gthread_recursive_mutex_lock(&_M_mutex); > > > if (__e) > __throw_system_error(__e); > } > > [[__nodiscard__]] > bool > try_lock() noexcept > { > > return !__gthread_recursive_mutex_trylock(&_M_mutex); > } > > template <class _Rep, class _Period> > [[__nodiscard__]] > bool > try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { return _M_try_lock_for(__rtime); } > > template <class _Clock, class _Duration> > [[__nodiscard__]] > bool > try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { return _M_try_lock_until(__atime); } > > void > unlock() > { > > __gthread_recursive_mutex_unlock(&_M_mutex); > } > > native_handle_type > native_handle() noexcept > { return &_M_mutex; } > > private: > friend class __timed_mutex_impl<recursive_timed_mutex>; > > bool > _M_timedlock(const __gthread_time_t& __ts) > { return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts); } > > > bool > _M_clocklock(clockid_t __clockid, const __gthread_time_t& __ts) > { return !pthread_mutex_clocklock(&_M_mutex, __clockid, &__ts); } > > }; ># 559 "/usr/include/c++/13/mutex" 3 > namespace __detail > { > > template<typename _Lockable> > inline int > __try_lock_impl(_Lockable& __l) > { > if (unique_lock<_Lockable> __lock{__l, try_to_lock}) > { > __lock.release(); > return -1; > } > else > return 0; > } > > > > template<typename _L0, typename... _Lockables> > inline int > __try_lock_impl(_L0& __l0, _Lockables&... __lockables) > { > > if constexpr ((is_same_v<_L0, _Lockables> && ...)) > { > constexpr int _Np = 1 + sizeof...(_Lockables); > unique_lock<_L0> __locks[_Np] = { > {__l0, defer_lock}, {__lockables, defer_lock}... > }; > for (int __i = 0; __i < _Np; ++__i) > { > if (!__locks[__i].try_lock()) > { > const int __failed = __i; > while (__i--) > __locks[__i].unlock(); > return __failed; > } > } > for (auto& __l : __locks) > __l.release(); > return -1; > } > else > > if (unique_lock<_L0> __lock{__l0, try_to_lock}) > { > int __idx = __detail::__try_lock_impl(__lockables...); > if (__idx == -1) > { > __lock.release(); > return -1; > } > return __idx + 1; > } > else > return 0; > } > > } ># 631 "/usr/include/c++/13/mutex" 3 > template<typename _L1, typename _L2, typename... _L3> > [[__nodiscard__]] > inline int > try_lock(_L1& __l1, _L2& __l2, _L3&... __l3) > { > return __detail::__try_lock_impl(__l1, __l2, __l3...); > } > > > namespace __detail > { > > > > > > template<typename _L0, typename... _L1> > void > __lock_impl(int& __i, int __depth, _L0& __l0, _L1&... __l1) > { > while (__i >= __depth) > { > if (__i == __depth) > { > int __failed = 1; > { > unique_lock<_L0> __first(__l0); > __failed += __detail::__try_lock_impl(__l1...); > if (!__failed) > { > __i = -1; > __first.release(); > return; > } > } > > __gthread_yield(); > > constexpr auto __n = 1 + sizeof...(_L1); > __i = (__depth + __failed) % __n; > } > else > __detail::__lock_impl(__i, __depth + 1, __l1..., __l0); > } > } > > } ># 691 "/usr/include/c++/13/mutex" 3 > template<typename _L1, typename _L2, typename... _L3> > void > lock(_L1& __l1, _L2& __l2, _L3&... __l3) > { > > if constexpr (is_same_v<_L1, _L2> && (is_same_v<_L1, _L3> && ...)) > { > constexpr int _Np = 2 + sizeof...(_L3); > unique_lock<_L1> __locks[] = { > {__l1, defer_lock}, {__l2, defer_lock}, {__l3, defer_lock}... > }; > int __first = 0; > do { > __locks[__first].lock(); > for (int __j = 1; __j < _Np; ++__j) > { > const int __idx = (__first + __j) % _Np; > if (!__locks[__idx].try_lock()) > { > for (int __k = __j; __k != 0; --__k) > __locks[(__first + __k - 1) % _Np].unlock(); > __first = __idx; > break; > } > } > } while (!__locks[__first].owns_lock()); > > for (auto& __l : __locks) > __l.release(); > } > else > > { > int __i = 0; > __detail::__lock_impl(__i, 0, __l1, __l2, __l3...); > } > } ># 739 "/usr/include/c++/13/mutex" 3 > template<typename... _MutexTypes> > class scoped_lock > { > public: > explicit scoped_lock(_MutexTypes&... __m) : _M_devices(std::tie(__m...)) > { std::lock(__m...); } > > explicit scoped_lock(adopt_lock_t, _MutexTypes&... __m) noexcept > : _M_devices(std::tie(__m...)) > { } > > ~scoped_lock() > { std::apply([](auto&... __m) { (__m.unlock(), ...); }, _M_devices); } > > 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) : _M_device(__m) > { _M_device.lock(); } > > explicit scoped_lock(adopt_lock_t, mutex_type& __m) noexcept > : _M_device(__m) > { } > > ~scoped_lock() > { _M_device.unlock(); } > > 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) > { > > __once_callable = std::__addressof(__c); > > __once_call = [] { (*static_cast<_Callable*>(__once_callable))(); }; > } > > ~_Prepare_execution() > { > > __once_callable = nullptr; > __once_call = nullptr; > } > > _Prepare_execution(const _Prepare_execution&) = delete; > _Prepare_execution& operator=(const _Prepare_execution&) = delete; > }; ># 891 "/usr/include/c++/13/mutex" 3 > extern "C" void __once_proxy(void); > > > template<typename _Callable, typename... _Args> > void > call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) > { > > auto __callable = [&] { > std::__invoke(std::forward<_Callable>(__f), > std::forward<_Args>(__args)...); > }; > > once_flag::_Prepare_execution __exec(__callable); > > > if (int __e = __gthread_once(&__once._M_once, &__once_proxy)) > __throw_system_error(__e); > } ># 1012 "/usr/include/c++/13/mutex" 3 > >} ># 6 "../../subprojects/edfst/subprojects/facile/src/io/LineAtomicStream.hpp" 2 > ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/loan.hpp" 1 > > > > > > > > > ># 9 "../../subprojects/edfst/subprojects/point-util/src/point/loan.hpp" >namespace point_util >{ >template<typename T> >class ThirdPartyEntity; > >template<typename T> >class loan >{ >using element_type = T; >using base_type = typename std::remove_const<T>::type; >using const_type = typename std::add_const<T>::type; > >struct acquiring_converter {}; > >template<typename F> >friend class loan; > >public: > class loan_of_this { > protected: > loan<T> > loanThis() > { > static acquiring_converter *disambiguator; > > return loan<T>(disambiguator, static_cast<T *>(this)); > } > > loan<const T> > constLoanThis() const > { > static typename loan<const T>::acquiring_converter *disambiguator; > > return loan<const T>(disambiguator, static_cast<const T *>(this)); > } > > operator loan<T>() const > { > static acquiring_converter *disambiguator; > > return loan<T>(disambiguator, static_cast<T *>(this)); > } > }; > > > loan() : > _value( ># 55 "../../subprojects/edfst/subprojects/point-util/src/point/loan.hpp" 3 4 > __null ># 55 "../../subprojects/edfst/subprojects/point-util/src/point/loan.hpp" > ) {} > > > loan(__attribute__((unused)) std::nullptr_t null) : > loan() {} > > > loan(const std::unique_ptr<T>& value) : > _value(value.get()) {} > > > template<typename Tsrc, typename Tdel> > loan(const std::unique_ptr<Tsrc, Tdel>& value) : > _value(value.get()) {} > > > template<typename Tsrc, typename Tdel> > loan(std::unique_ptr<Tsrc, Tdel>&& value) = delete; > > > template<typename Tsrc, typename Tcomp = typename std::enable_if<std::is_base_of<T, Tsrc>::value, Tsrc>::type> > loan(const loan<Tcomp>& other) : > _value(other.get()) {} > > loan(ThirdPartyEntity<T>& value) : > _value(value._entity) {} > > operator > loan<const_type>() { return loan<const_type>::acquire(_value); } > > > T * > get() const { return _value; } > > T& > operator *() const { return *_value; } > > T * > operator ->() const { return _value; } > > T * > operator ->() { return _value; } > > operator T *() const { return _value; } > > operator T&() const { return *_value; } > > operator handle<T>() const { return handle<T>(*_value); } > > > > template<typename C = typename std::conditional<std::is_const<T>::value, void, const_type>::type> > operator handle<C>() const { return handle<C>(*_value); } > > handle<T> > handoff() const { return handle<T>(*_value); } ># 128 "../../subprojects/edfst/subprojects/point-util/src/point/loan.hpp" > bool > operator <(const loan<T>& other) const > { > return *_value < *other._value; > } > > bool > operator >(const loan<T>& other) const > { > return *_value > *other._value; > } > > T& > reference() { return *_value; } > > template<typename Any> > bool > equals(Any *pointer) { return _value == pointer; } > > template<typename ... A> > std::function<void(A && ...)> > bind(A&& ... args) > { > return std::bind(*_value, std::forward<A>(args)...); > } > > template<typename ... A> > void > call(A&& ... args) > { > (*_value)(std::forward<A>(args)...); > } > > template<typename ... A> > auto > > > query(A&& ... args) > { > return (*_value)(std::forward<A>(args)...); > } > > template<typename S> > inline loan<S> > downcast() > { > return loan<S>::acquire(dynamic_cast<S *>(_value)); > } > > template<typename K, typename KTest = typename std::enable_if<std::is_integral<K>::value, K>::type> > auto& > > > operator [](const K& k) { return (*_value)[k]; } ># 193 "../../subprojects/edfst/subprojects/point-util/src/point/loan.hpp" > inline static loan<T> > acquire(T *p) > { > static acquiring_converter *disambiguator; > > return loan<T>(disambiguator, p); > } > > inline static loan<T> > acquire_const(typename std::remove_const<T>::type *p) > { > static acquiring_converter *disambiguator; > > return loan<T>(disambiguator, static_cast<const T *>(p)); > } > >protected: > loan(__attribute__((unused)) acquiring_converter *disambiguator, T *raw) : > _value(raw) > {} > > T *_value; >}; > >template<typename SuperT, typename T> >static inline typename std::enable_if<std::is_base_of<SuperT, T>::value, loan<SuperT>>::type >loan_downwrap(T *t) >{ > return loan<SuperT>::acquire(dynamic_cast<SuperT *>(t)); >} > >template<typename T> >static inline loan<T> >loan_wrap(T *t) >{ > return loan<T>::acquire(t); >} > >template<typename T> >static inline loan<const T> >loan_wrap_const(T *t) >{ > return loan<const T>::acquire_const(t); >} > >template<typename S, typename T> >inline loan<S>& >operator <<(loan<S>& o, const T& t) >{ > (*o.get()) << t; > return o; >} > >template<typename S, typename T> >inline loan<S>& >operator <<(loan<S>& o, const loan<T>& t) >{ > (*o.get()) << *t; > return o; >} > >template<typename S> >inline loan<S>& >operator <<(loan<S>& o, StreamManipulator m) >{ > (*o.get()) << m; > return o; >} > >template<typename T> >std::ostream& >operator <<(std::ostream& o, loan<T> t) >{ > return o << *t; >} > >template<typename T> >struct loan_hash { > size_t > operator ()(const loan<T>& p) const noexcept > { > static std::hash<T *> hasher; > > return hasher(p.get()); > } >}; > >template<template<typename> class Functor, typename Return> >class query : > public loan<Functor<Return>> >{ >using super = loan<Functor<Return>>; > >public: > > template<typename Rsrc, typename Tdel> > query(const std::unique_ptr<Functor<Rsrc>, Tdel>& value) : > super(value) {} > > template<typename Rsrc> > query(const loan<Functor<Rsrc>>& value) : > super(value) {} > > template<typename ... A> > Return > invoke(A&& ... args) > { > return (*loan<Functor<Return>>::_value)(std::forward<A>(args)...); > } >}; >} ># 8 "../../subprojects/edfst/subprojects/facile/src/io/LineAtomicStream.hpp" 2 > >using namespace point_util; > >namespace facile >{ > >class LineAtomicStream : > public std::ostream >{ >public: > class Sink { > public: > Sink(std::ostream& o) : > _o(&o) > {} > > inline std::ostream& > getStream() { return *_o; } > > void > setStream(std::ostream& o) { _o = &o; } > > void > atomicAppend(const std::string& s) > { > std::lock_guard<std::mutex> guardAppend(_lockAcquire); > > (*_o) << s; > _o->flush(); > } > > private: > std::ostream *_o; > std::mutex _lockAcquire; > }; > > LineAtomicStream(loan<Sink> sink) : > std::ostream(&_buffer), > _buffer(sink) > {} > > void > activateTee(std::ostream& tee) { _buffer.activateTee(tee); } > >private: > class Buffer : > public std::stringbuf > { > public: > Buffer(loan<Sink> sink) : > _sink(sink), > _tee(nullptr) > {} > > ~Buffer() > { > if (pbase() != pptr()) > syncLine(); > } > > virtual int > sync() { return syncLine(); } > > void > activateTee(std::ostream& tee) { _tee = owner<Sink>::make(tee); } > > private: > int > syncLine() > { > _sink->atomicAppend(str()); > if (_tee != nullptr) { > _tee->atomicAppend(str()); > _tee.reset(); > } > str(""); > > return 0; > } > > loan<Sink> _sink; > owner<Sink> _tee; > }; > > Buffer _buffer; >}; >} ># 11 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/StreamDefinitions.hpp" 1 > ># 12 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" 2 > >using namespace point_util; > > >namespace facile >{ >class LogFileStream : > public DestructorCallback >{ >public: > LogFileStream(owner<const boost::filesystem::path, DSA> path, owner<std::fstream, DSA> stream) : > _isOpen(true), > _path(std::move(path)), > _stream(std::move(stream)) > {} > > ~LogFileStream() { close(); } > > loan<const boost::filesystem::path> > getPath() { return _path; } > > loan<std::fstream> > getStream() { return _stream; } > > std::fstream& > fstream() { return *_stream; } > > template<typename T> > std::ostream& > operator <<(T v) { return (*_stream) << v; } > > template<typename T> > std::ostream& > operator <<(owner<T> v) { return (*_stream) << *v; } > > std::ostream& > operator <<(std::ostream& (*streamManipulator)(std::ostream&)) { return (*_stream) << streamManipulator; } > > void > reset(); > > void > close(); > >private: > bool _isOpen; > > owner<const boost::filesystem::path, DSA> _path; > owner<std::fstream, DSA> _stream; >}; > >template<typename T> >inline std::ostream& >operator <<(owner<LogFileStream>& log, const T& token) >{ > return log->fstream() << token; >} > >template<typename T> >inline std::ostream& >operator <<(owner<LogFileStream>& log, const owner<T>& token) >{ > return log->fstream() << *token; >} > >inline std::ostream& >operator <<(owner<LogFileStream>& log, std::ostream& (*streamManipulator)(std::ostream&)) >{ > return log->fstream() << streamManipulator; >} > >class StreamLogDirectory >{ >public: > struct FileSubset { > std::vector<boost::filesystem::path> paths; > }; > > StreamLogDirectory(const std::string& path) : > _directory(owner<boost::filesystem::path, DSA>::make(path)) > {} > > StreamLogDirectory(owner< boost::filesystem::path> path) : > _directory(std::move(path)) > {} > > loan<const boost::filesystem::path> > getPath() { return _directory; } > > bool > exists() { return boost::filesystem::is_directory(_directory.reference()); } > > bool > mkdirs(); > > owner<StreamLogDirectory> > getSubDirectory(const std::string& dirname); > > owner<StreamLogDirectory> > clone() { return owner<StreamLogDirectory>::make(owner<boost::filesystem::path>::make(_directory.reference())); } > > owner<LogFileStream> > openFile(const std::string& filename); > > bool > fileExists(const std::string& filename); > > owner<FileSubset> > list(const std::regex pattern); > > static owner<LogFileStream> > establishFile(const std::string& path); > > static owner<LogFileStream> > openFileAt(const std::string& path); > >private: > owner<boost::filesystem::path, DSA> _directory; >}; > >enum class StreamLogLevel : uint32_t { > BitwiseEnumTag, > none = 0x0, > Sanity = 0x1, > Require = 0x2, > Results = 0x4, > Evaluation = 0x8, > Analysis = 0x10, > Control = 0x20, > Codegen = 0x40, > Status = 0x80, > Spot = 0x100, > Detail = 0x200, > Nit = 0x400 >}; ># 162 "../../subprojects/edfst/subprojects/facile/src/io/StreamLog.hpp" >class StreamLog >{ >public: > static std::ostream& > getLogStream(StreamLogLevel level); > > static std::ostream& > log(const char *function, uint32_t line, StreamLogLevel level); > > static void > activateTee(std::ostream& tee); > > static void > flush() { _logStream.flush(); } > > static void > setLogStream(std::ostream& log); > > static void > setLogStream(loan<LogFileStream> f); > > static void > enableLogLevels(StreamLogLevel level); > > static StreamLogLevel > parseLogLevel(const std::string& level); > > static StreamLogLevel > parseLogLevels(const std::string& levelSelection); > > static const char * > getLogLevelName(StreamLogLevel level); > > static inline bool > isEnabled(StreamLogLevel level) { return testAny(level, _logLevel); } > > static inline std::ostream& > nullog() { return _filteredOutLog; } > >private: > static owner<LineAtomicStream::Sink, DSA> _logSink; > static thread_local LineAtomicStream _logStream; > static std::ostream _filteredOutLog; > > static StreamLogLevel _logLevel; > > static void > resetGlobalLog(); >}; > >struct StreamLogTee { > StreamLogTee(std::ostream& tee) : > _tee(&tee) > {} > > void > activate() const { StreamLog::activateTee(*_tee); } > > private: > std::ostream *_tee; >}; > >std::ostream& >operator <<(std::ostream& o, StreamLogTee tee); >} ># 4 "../../subprojects/edfst/test/ElasticTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 1 > > ># 1 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 1 > > ># 3 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 3 > > > > > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/star.hpp" 1 3 > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" 1 3 > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/PointInternal.hpp" 1 3 > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/fail/PointUtilException.hpp" 1 3 > ># 10 "../../subprojects/edfst/subprojects/point-util/src/fail/PointUtilException.hpp" 3 > ># 10 "../../subprojects/edfst/subprojects/point-util/src/fail/PointUtilException.hpp" 3 >namespace point_util >{ >class PointUtilException : > public std::exception { >public: > PointUtilException(const char *file, int line) : > PointUtilException(file, line, 0) > {} > > PointUtilException(const char *file, int line, int posix_errno) : > _messageBuffer(owner<std::stringstream, DSA>::make()), > _posixError(posix_errno) > { > _messageBuffer << "[at " << file << ":" << line << "] "; > } > > PointUtilException(const PointUtilException& e) : > _messageBuffer(owner<std::stringstream, DSA>::make(e._messageBuffer->str())), > _posixError(e._posixError) > {} > > template<typename T> > PointUtilException& > operator <<(T const& messageFragment) > { > *_messageBuffer << messageFragment; > return *this; > } > > PointUtilException& > operator<<(std::ostream& (*manipulator)(std::ostream&)) > { > *_messageBuffer << manipulator; > return *this; > } > > std::string > getMessage() const > { > return _messageBuffer->str(); > } > > bool > isPosixError() { return _posixError != 0; } > > int > getPosixError() { return _posixError; } > > const char * > getPosixErrorMessage() const > { > if (_posixError == 0) > return ""; > else > return strerror(_posixError); > } > > std::ostream& > appendMessageTo(std::ostream& o) const > { > o << getMessage(); > if (_posixError != 0) > o << " [" << strerror(_posixError) << "]"; > return o; > } > >protected: > owner<std::stringstream, DSA> _messageBuffer; > >private: > int _posixError; >}; > >inline std::ostream& >operator<<(std::ostream& o, const PointUtilException& e) >{ > return e.appendMessageTo(o); >} >} ># 4 "../../subprojects/edfst/subprojects/point-util/src/PointInternal.hpp" 2 3 > > > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" 1 3 > > > ># 1 "/usr/include/c++/13/cstring" 1 3 ># 39 "/usr/include/c++/13/cstring" 3 > ># 40 "/usr/include/c++/13/cstring" 3 ># 5 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" 2 3 > > > >namespace point_util >{ >template<typename T> >class cell >{ >template<typename src, typename dst> >using cell_conversion = std::__and_<std::is_base_of<dst, src>, std::__not_<std::is_array<dst>>>; > >public: > class iterator > { > public: > typedef iterator self_type; > typedef cell<T> value_type; > typedef cell<T> reference; > typedef T * pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > iterator(nullptr_t i = nullptr) : > _i(i) > {} > > iterator(cell<T> position) : > _i(position) > {} > > template<typename Iterator> > iterator(Iterator position) : > _i(wrap(position)) > {} > > template<template<typename> class C, typename E, typename Index> > static typename std::enable_if<is_element_type<C, E>::value, iterator>::type > make(C<E>& c, Index position = 0) > { > return iterator(wrap(c, position)); > } > > template<template<typename> class P, template<typename> class C, typename E, typename Index> > static typename std::enable_if<is_element_type<C, E>::value && is_pointed_type<P<C<E>>, C<E>>::value, iterator>::type > make(P<C<E>>& c, Index position = 0) > { > return iterator(wrap(c, position)); > } > > template<template<typename> class P, template<typename> class C, typename E, typename Index> > static typename std::enable_if<is_element_type<C, E>::value && is_pointed_type<P<C<E>>, C<E>>::value, iterator>::type > cmake(const P<C<E>>& c, Index position = 0) > { > return iterator(wrap(c, position)); > } > > template<template<typename> class C, typename E, typename Index> > static typename std::enable_if<is_element_type<C, cell<E>>::value, iterator>::type > make(C<cell<E>>& c, Index position = 0) > { > return iterator(c[position]); > } > > template<template<typename> class P, template<typename> class C, typename E, typename Index> > static typename std::enable_if<is_element_type<C, cell<E>>::value && is_pointed_type<P<C<cell<E>>>, C<cell<E>>>::value, iterator>::type > make(P<C<cell<E>>>& c, Index position = 0) > { > return iterator(*(c->begin() + position)); > } > > self_type > operator ++() > { > _i++; > > return *this; > } > > self_type > operator ++( ># 84 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" > __attribute__((unused)) ># 84 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" 3 > int postfixDisambiguator) > { > self_type pre = *this; > _i++; > return pre; > } > > template<typename Integer> > self_type > operator +(Integer amount) const { return iterator(_i + amount); } > > template<typename Integer> > self_type > operator +=(Integer amount) { return iterator(_i += amount); } > > difference_type > operator -(const self_type& other) const { return _i - other._i; } > > template<typename Integer> > self_type > operator -(Integer amount) const { return iterator(_i - amount); } > > template<typename Integer> > self_type > operator -=(Integer amount) { return iterator(_i -= amount); } > > reference > operator *() { return *_i; } > > pointer > operator ->() const { return cell<T>::operator ->(_i); } > > bool > operator ==(const self_type& other) const { return _i == other._i; } > > bool > operator !=(const self_type& other) const { return _i != other._i; } > > private: > cell<T> _i; > }; > > constexpr cell() : > _position(nullptr) > {} > > cell(T& position) : > _position(&position) > {} > > cell(T *position) : > _position(position) > {} > > template<typename src, typename = std::_Require<cell_conversion<src, T>>> > cell(const cell<src>& other) : > _position(other.get()) > {} > > constexpr cell(nullptr_t null) : > _position(null) > {} > > T * > get() const { return _position; } > > T& > operator *() const { return *_position; } > > T * > operator ->() const { return _position; } > > operator T *() const { return _position; } ># 184 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" 3 > bool > operator <=(const cell<T>& other) const > { > return _position <= other._position; > } > > bool > operator <(const cell<T>& other) const > { > return _position < other._position; > } > > bool > operator >(const cell<T>& other) const > { > return _position > other._position; > } > > bool > operator >=(const cell<T>& other) const > { > return _position >= other._position; > } > > template<typename Addend> > typename std::enable_if<std::is_integral<Addend>::value, cell<T>>::type > operator +(const Addend& addend) const > { > return cell<T>(_position + addend); > } > > template<typename Addend> > typename std::enable_if<std::is_integral<Addend>::value, cell<T>>::type > operator +=(const Addend& addend) > { > return cell<T>(_position += addend); > } > > cell<T>& > operator ++() > { > _position++; > return *this; > } > > cell<T> > operator ++( ># 230 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" > __attribute__((unused)) ># 230 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" 3 > int postfixDifferentiator) > { > cell<T> original(_position); > > _position++; > return original; > } > > template<typename Subtrahend> > typename std::enable_if<std::is_integral<Subtrahend>::value, cell<T>>::type > operator -(const Subtrahend& subtrahend) const > { > return cell<T>(_position - subtrahend); > } > > template<typename Subtrahend> > typename std::enable_if<std::is_integral<Subtrahend>::value, cell<T>>::type > operator -=(const Subtrahend& subtrahend) > { > return cell<T>(_position -= subtrahend); > } > > cell<T>& > operator --() > { > _position--; > return *this; > } > > cell<T> > operator --( ># 260 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" > __attribute__((unused)) ># 260 "../../subprojects/edfst/subprojects/point-util/src/point/cell.hpp" 3 > int postfixDifferentiator) > { > cell<T> original(_position); > > _position--; > return original; > } > > int32_t > distance(const cell<T>& other) const > { > if (_position > other._position) > return -static_cast<int32_t>(_position - other._position); > else > return static_cast<int32_t>(other._position - _position); > } > > int32_t > distance(const T *otherPosition) const > { > if (_position > otherPosition) > return -static_cast<int32_t>(_position - otherPosition); > else > return static_cast<int32_t>(otherPosition - _position); > } > > int32_t > displacement(const cell<T>& other) const > { > if (_position > other._position) > return static_cast<int32_t>(_position - other._position); > else > return -static_cast<int32_t>(other._position - _position); > } > > int32_t > displacement(const T *otherPosition) const > { > if (_position > otherPosition) > return static_cast<int32_t>(_position - otherPosition); > else > return -static_cast<int32_t>(otherPosition - _position); > } > > int32_t > indexIn(const cell<T>& basePosition) const > { > return static_cast<int32_t>(_position - basePosition._position); > } > > uint32_t > indexIn(const T *basePosition) const > { > return static_cast<uint32_t>(_position - basePosition); > } > > template<template<typename> class C> > uint32_t > indexIn(const C<T>& c) const > { > return static_cast<uint32_t>(_position - c.data()); > } > > template<template<typename> class P, template<typename> class C> > uint32_t > indexIn(const P<C<T>>& p) const > { > return static_cast<uint32_t>(_position - p->data()); > } > > template<template<typename> class C> > uint32_t > isIn(const C<T>& c) const > { > return ((_position >= c.data()) && (static_cast<uint32_t>(_position - c.data()) < c.size())); > } > > template<template<typename> class C> > bool > isBeyond(const C<T>& c) const { return _position >= (c.data() + c.size()); } > > bool > isReferenceTo(T *t) const { return _position == t; } > > T > read() const { return *_position; } > > T > readStep() { return *_position++; } > > T& > reference() const { return *_position; } > > void > write(const T& position) const > { > *_position = position; > > } > > void > write(const cell<T>& c) const > { > *_position = *c._position; > > } > > cell<T>& > writeStep(const T& position) > { > write(position); > _position++; > return *this; > } > > void > writeBlock(const byte *src, uint32_t length) const > { > byte *dst = reinterpret_cast<byte *>(_position); > memcpy(dst, src, length); > } > > template<template<typename> class C, typename Index> > static inline > typename std::enable_if<std::is_integral<Index>::value && is_element_type<C, T>::value, cell<T>>::type > wrap(C<T>& c, Index index = 0) > { > return cell<T>(*(c.begin() + index)); > } > > template<template<typename> class C> > static inline cell<T> > start(C<T>& c) > { > return cell<T>(*(c.begin())); > } > > template<template<typename> class C> > static inline cell<T> > sentinel(C<T>& c) > { > return cell<T>(*(c.begin() + c.size())); > } > > template<template<typename> class P, template<typename> class C, typename Index> > static inline > typename std::enable_if<std::is_integral<Index>::value && is_element_type<C, T>::value && is_pointed_type<P<C<T>>, C<T>>::value, cell<T>>::type > wrap(P<C<T>>& p, Index index = 0) > { > return cell<T>(*(p->begin() + index)); > } > > template<template<typename> class C, typename Index> > static inline > typename std::enable_if<std::is_enum<Index>::value && is_element_type<C, T>::value, cell<T>>::type > wrap(C<T>& c, Index index = 0) > { > return cell<T>(*(c.begin() + index)); > } > > template<typename Array, typename Index> > static inline > > typename std::enable_if<std::is_integral<Index>::value && std::is_array<Array>::value, cell<T>>::type > wrap(Array& a, Index index = 0) > { > return cell<T>(a[index]); > } > > template<typename Iterator, typename C = typename std::iterator_traits<Iterator>::iterator_category> > static inline > typename std::enable_if<std::is_same_v<C, std::random_access_iterator_tag>, cell<T>>::type > wrap(Iterator iterator) > { > return cell<T>(*iterator); > } > >private: > T *_position; >}; > >template<typename T, typename Index> >static inline >typename std::enable_if<std::is_integral<Index>::value, cell<T>>::type >cell_wrap(T *array, Index index = 0) >{ > return cell<T>(array[index]); >} > >template<typename Array, typename Index, typename T = element_type_t<Array>> >static inline >typename std::enable_if<std::is_array<Array>::value && std::is_integral<Index>::value, cell<T>>::type >cell_wrap(Array& array, Index index = 0) >{ > return cell<T>(array[index]); >} > >template<template<typename> class C, typename T, typename Index = uint32_t> >static inline >typename std::enable_if<std::is_integral<Index>::value && is_element_type<C, T>::value, cell<T>>::type >cell_wrap(C<T>& c, Index index = 0) >{ > return cell<T>(*(c.begin() + index)); >} > >template<template<typename> class C, typename T, typename Index = uint32_t> >static inline >typename std::enable_if<std::is_integral<Index>::value && is_element_type<C, T>::value, cell<const T>>::type >cell_wrap(const C<T>& c, Index index = 0) >{ > return cell<const T>(*(c.cbegin() + index)); >} > >template<template<typename> class C, typename T, typename Enum> >static inline >typename std::enable_if<std::is_enum<Enum>::value && is_element_type<C, T>::value, cell<T>>::type >cell_wrap(C<T>& c, Enum index) >{ > return cell_wrap(c, static_cast<std::underlying_type_t<Enum>>(index)); >} > >template<template<typename> class P, template<typename> class C, typename T, typename Index> >static inline >typename std::enable_if<std::is_integral<Index>::value && is_element_type<C, T>::value && is_pointed_type<P<C<T>>, C<T>>::value, cell<T>>::type >cell_wrap(P<C<T>>& p, Index index = 0) >{ > return cell<T>(*(p->begin() + index)); >} > >template<typename Iterator, > typename C = typename std::iterator_traits<Iterator>::iterator_category, > typename T = typename std::iterator_traits<Iterator>::value_type> >static inline >typename std::enable_if<std::is_same_v<C, std::random_access_iterator_tag>, cell<T>>::type >cell_wrap(Iterator iterator) >{ > return cell<T>(*iterator); >} >} ># 10 "../../subprojects/edfst/subprojects/point-util/src/PointInternal.hpp" 2 3 ># 5 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" 2 3 > >namespace point_util >{ >class loc_t >{ >using Address = uint64_t; > >template<typename T> >static Address >locate(T *t) { return reinterpret_cast<Address>(t); } > >public: > > loc_t() : > _address(0) {} > > loc_t( ># 21 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" > __attribute__((unused)) ># 21 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" 3 > std::nullptr_t null) : > _address(0ULL) > {} > > > template<typename T> > loc_t(T *object) : > _address(locate(object)) {} > > explicit > loc_t(long unsigned int i) : > _address(reinterpret_cast<Address>(i)) {} > > > template<typename T, > typename = typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value && sizeof(T) == 8, bool>::type> > loc_t(T address) : > _address(static_cast<Address>(address)) {} > > size_t > hash() const > { > const thread_local std::hash<Address> locationHash; > > return locationHash(_address); > } > > > > > template<typename T, typename = typename std::enable_if<std::is_integral<T>::value, T>::type> > operator T() const { return static_cast<T>(_address); } > > operator void *() const { return reinterpret_cast<void *>(_address); } > > operator byte *() const { return reinterpret_cast<byte *>(_address); } > > template<typename T> > > operator T *() const { return reinterpret_cast<T *>(reinterpret_cast<void *>(_address)); } > > > > template<typename T> > typename std::enable_if<std::is_integral<T>::value, loc_t>::type > operator +(T i) const { return _address + i; } > > > loc_t > operator +(loc_t other) const = delete; > > loc_t > operator +(ssize_t size) const { return _address + size; } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value, loc_t&>::type > operator +=(T i) > { > _address = _address + i; > return *this; > } > > > loc_t& > operator +=(loc_t other) = delete; > > loc_t& > operator ++() > { > _address++; > return *this; > } > > loc_t > operator ++( ># 95 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" > __attribute__((unused)) ># 95 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" 3 > int postfixDifferentiator) > { > loc_t original(_address); > > _address++; > return original; > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value, loc_t>::type > operator -(T i) const { return _address - i; } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value, loc_t&>::type > operator -=(T i) > { > _address = _address - i; > return *this; > } > > loc_t& > operator --() > { > _address--; > return *this; > } > > loc_t > operator --( ># 123 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" > __attribute__((unused)) ># 123 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" 3 > int postfixDifferentiator) > { > loc_t original(_address); > > _address--; > return original; > } > > > size_t > operator -(loc_t loc) const { return _address - loc._address; } > > > loc_t& > operator -=(loc_t loc) = delete; > > template<typename Size = size_t> > Size > distanceTo(loc_t other) const > { > if (other._address < _address) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp", 144) << "Cannot resolve a negative distance"; > > return static_cast<Size>(other._address - _address); > } > > template<typename T, typename Size = size_t> > Size > distanceTo(T *t) const > { > Address a = locate(t); > > if (a < _address) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp", 156) << "Cannot resolve a negative distance"; > > return static_cast<Size>(a - _address); > } > > template<typename Size = size_t> > Size > distanceFrom(loc_t other) const > { > if (other._address > _address) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp", 166) << "Cannot resolve a negative distance"; > > return static_cast<Size>(_address - other._address); > } > > template<typename T, typename Size = size_t> > Size > distanceFrom(T *t) const > { > Address a = locate(t); > > if (a > _address) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp", 178) << "Cannot resolve a negative distance"; > > return static_cast<Size>(_address - a); > } > > bool > operator ==(const loc_t other) const > { > return _address == other._address; > } > > bool > operator !=(const loc_t other) const > { > return _address != other._address; > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value, bool>::type > operator ==(T other) const { return _address == reinterpret_cast<Address>(other); } > > bool > operator ==(void *other) const { return _address == reinterpret_cast<Address>(other); } > > bool > operator ==( ># 203 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" > __attribute__((unused)) ># 203 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" 3 > std::nullptr_t null) const { return _address == 0; } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value, bool>::type > operator !=(Address other) const { return _address != reinterpret_cast<Address>(other); } > > bool > operator !=( ># 210 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" > __attribute__((unused)) ># 210 "../../subprojects/edfst/subprojects/point-util/src/point/loc_t.hpp" 3 > std::nullptr_t null) const { return _address != 0; } > > > > bool > operator <(loc_t other) const > { > return _address < other._address; > } > > > template<typename T> > typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, bool>::type > operator <(T other) const > { > return _address < static_cast<Address>(other); > } > > bool > operator >(loc_t other) const > { > return _address > other._address; > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, bool>::type > operator >(T other) const > { > return _address > static_cast<Address>(other); > } > > bool > operator <=(loc_t other) const > { > return _address <= other._address; > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, bool>::type > operator <=(T other) const > { > return _address <= static_cast<Address>(other); > } > > bool > operator >=(loc_t other) const > { > return _address >= other._address; > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, bool>::type > operator >=(T other) const > { > return _address >= static_cast<Address>(other); > } > > > byte > operator *() const { return *reinterpret_cast<byte *>(_address); } > > > byte& > operator [](int index) const > { > byte *asArray = reinterpret_cast<byte *>(_address); > > return asArray[index]; > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, loc_t>::type > operator &(T mask) > { > Address masked = (_address & static_cast<Address>(mask)); > return loc_t(masked); > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, loc_t>::type > operator &=(T mask) > { > _address &= static_cast<Address>(mask); > return *this; > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, loc_t>::type > operator |(T mask) > { > Address masked = (_address | static_cast<Address>(mask)); > return loc_t(masked); > } > > template<typename T> > typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, loc_t>::type > operator |=(T mask) > { > _address |= static_cast<Address>(mask); > return *this; > } > >private: > Address _address; >}; > >struct hash_loc_t { > size_t > operator ()(const loc_t& location) const { return location.hash(); } >}; > >inline std::ostream& >operator <<(std::ostream& o, const loc_t& loc) >{ > using Address = uint64_t; > > return o << static_cast<Address>(loc); >} >} ># 5 "../../subprojects/edfst/subprojects/point-util/src/point/star.hpp" 2 3 > >namespace point_util >{ > >template<typename T> >class star >{ >public: > using pointed_type = T; > using base_type = typename std::remove_const<T>::type; > using const_type = typename std::add_const<T>::type; > > friend star<const_type>; > > star() : > _value(nullptr) > {} > > star(T *t) : > _value(t) > {} > > star(const star<base_type>& t) : > _value(t._value) > {} > > star(loc_t location) : > _value(location) > {} > > star(nullptr_t null) : > _value(null) > {} > > operator T *() = delete; > > T * > operator ->() const { return _value; } > > T& > operator *() { return *_value; } > > T * > raw() const { return _value; } > > T > read() const { return *_value; } > > T& > reference() const { return *_value; } > > void > write(const T& t) const > { > *_value = t; > } > > void > write(const star<T>& s) const > { > *_value = *s._value; > } > > std::size_t > pointerHash() const > { > static std::hash<T *> hasher; > > return hasher(_value); > } > > bool > operator ==(const star<T> other) const { return _value == other._value; } > > bool > operator ==(nullptr_t null) { return _value == null; } > > bool > operator !=(nullptr_t null) { return _value != null; } > > star<T>& > operator =(T *t) > { > _value = t; > return *this; > } > > star<T>& > operator =(star<T> t) > { > _value = t._value; > return *this; > } > >private: > T *_value; >}; > >template<typename T> >struct star_hash { > std::size_t > operator ()(const star<T>& t) const noexcept > { > return t.pointerHash(); > } >}; >} ># 11 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/Opaque.hpp" 1 3 > > > > >namespace point_util >{ >class Opaque >{ >using OpaquePointer = void *; > >public: > template<typename T> > class View > { > public: > View(Opaque& opaque) : > _t(reinterpret_cast<T *>(opaque._pointer)) > {} > > T * > operator ->() const { return _t; } > > T& > operator *() { return *_t; } > > T& > reference() { return *_t; } > > bool > operator ==(const typename Opaque::View<T>& other) const { return _t == other._t; } > > bool > operator ==(nullptr_t null) const { return _t == null; } > > private: > T *_t; > }; > > > > > template<typename Pointer> > Opaque(Pointer& p) : > _pointer(reinterpret_cast<OpaquePointer>(&p)) > {} > > Opaque() : > _pointer(nullptr) > {} > > template<typename T> > View<T> > open() const { return View<T>(*this); } > > bool > operator ==(const Opaque& other) const { return _pointer == other._pointer; } > > bool > operator ==(nullptr_t null) const { return _pointer == null; } > > template<typename Any> > static Opaque > enclose(Any *any) { return Opaque(*any); } > > template<typename Any> > static Opaque > enclose(Any& any) { return Opaque(any); } > >private: > OpaquePointer _pointer; >}; >} ># 12 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 > > ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/fermata.hpp" 1 3 > > > > > > > > >namespace facile >{ >template<typename T> >class PointerFermata { >public: > PointerFermata(T *p) : > _p(p) {} > > auto > begin() const { return _p->begin(); } > > auto > end() const { return _p->end(); } > >private: > T *_p; >}; > >template<typename T> >class HandleFermata { >public: > HandleFermata(point_util::handle<T> p) : > _p(p) {} > > auto > begin() const { return _p->begin(); } > > auto > end() const { return _p->end(); } > >private: > point_util::handle<T> _p; >}; > >template<typename T> >class MovableFermata { >public: > MovableFermata(T&& r) : > _r(std::forward<T>(r)) {} > > auto > begin() const { return std::begin(_r); } > > auto > end() const { return std::end(_r); } > >private: > T _r; >}; > >template<typename T> >class UniquePtrFermata { >public: > UniquePtrFermata(std::unique_ptr<T>&& p) : > _p(std::move(p)) {} > > auto > begin() const { return _p->begin(); } > > auto > end() const { return _p->end(); } > >private: > std::unique_ptr<T> _p; >}; > >template<typename T> >PointerFermata<std::decay_t<T>> >fermata(T *p) >{ > return PointerFermata<T>(p); >} > >template<typename T> >HandleFermata<std::decay_t<T>> >fermata(point_util::handle<T> p) >{ > return HandleFermata<T>(p); >} > >template<typename T, typename = typename std::enable_if_t<!std::is_pointer<T>::value && !point_util::is_smart_pointer<T>::value, void>> >MovableFermata<std::decay_t<T>> >fermata(T&& r) >{ > return MovableFermata<T>(std::move(r)); >} > >template<typename T> >PointerFermata<std::decay_t<T>> >fermata(const point_util::loan<T> p) >{ > return PointerFermata<T>(p); >} > >template<typename T> >PointerFermata<std::decay_t<T>> >fermata(const std::unique_ptr<T>& p) >{ > return fermata(point_util::loan<T>(p)); >} > >template<typename T, typename S, typename D> >UniquePtrFermata<std::decay_t<T>> >fermata(std::unique_ptr<T>&& p) >{ > return std::move(p); >} > > > > >template<typename T> >class ConstPointerFermata { >public: > ConstPointerFermata(T *p) : > _p(p) {} > > auto > begin() const { return _p->cbegin(); } > > auto > end() const { return _p->cend(); } > >private: > T *_p; >}; > >template<typename T> >class ConstUniquePtrFermata { >public: > ConstUniquePtrFermata(std::unique_ptr<T>&& p) : > _p(std::move(p)) {} > > auto > begin() const { return _p->cbegin(); } > > auto > end() const { return _p->cend(); } > >private: > std::unique_ptr<T> _p; >}; > >template<typename T> >ConstPointerFermata<T> >constFermata(T *p) >{ > return ConstPointerFermata<T>(p); >} > >template<typename T> >ConstPointerFermata<T> >constFermata(const point_util::loan<T> p) >{ > return ConstPointerFermata<T>(p); >} > >template<typename T, typename S, typename D> >ConstPointerFermata<T> >constFermata(const std::unique_ptr<T>& p) >{ > return constFermata(point_util::loan<T>(p)); >} > >template<typename T, typename S, typename D> >ConstUniquePtrFermata<T> >constFermata(std::unique_ptr<T>&& p) >{ > return std::move(p); >} >} ># 15 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" 1 3 > > > > > > > > >namespace facile >{ >template<typename E> >struct EnumerationIterator { > typedef EnumerationIterator self_type; > typedef E value_type; > typedef E reference; > typedef E pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > EnumerationIterator(E e) : > _e(e) > {} > > self_type > operator ++() > { > _e = convert(convert(_e) + 1); > return *this; > } > > self_type > operator ++( ># 32 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" > __attribute__((unused)) ># 32 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" 3 > int postfixDisambiguator) > { > self_type pre = *this; > operator ++(); > return pre; > } > > reference > operator *() { return _e; } > > pointer > operator ->() { return _e; } > > bool > operator ==(const self_type& other) const { return _e == other._e; } > > bool > operator !=(const self_type& other) const { return !operator ==(other); } > > private: > inline uint32_t > convert(E e) { return static_cast<uint32_t>(e); } > > inline E > convert(uint32_t i) { return static_cast<E>(i); } > > E _e; >}; > >template<typename Iterator> >struct iterable { > template<typename Container, typename = typename std::enable_if<!point_util::is_smart_pointer<Container>::value>::type> > iterable(const Container& c) : > _begin(c.cbegin()), > _end(c.cend()) > {} > > template<typename Container, typename = typename std::enable_if<!point_util::is_smart_pointer<Container>::value>::type> > iterable(Container& c) : > _begin(c.begin()), > _end(c.end()) > {} > > template<typename Container> > iterable(point_util::handle<Container> c) : > _begin(c->begin()), > _end(c->end()) > {} > > template<typename Container> > iterable(point_util::handle<const Container> c) : > _begin(c->cbegin()), > _end(c->cend()) > {} > > template<typename Pointer, typename = typename std::enable_if<point_util::is_smart_pointer<Pointer>::value>::type> > iterable(const Pointer& p, ># 88 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" > __attribute__((unused)) ># 88 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" 3 > int a = 0 ) : > _begin(p->begin()), > _end(p->end()) > {} > > iterable(std::pair<Iterator, Iterator> range) : > _begin(range.first), > _end(range.second) > {} > > iterable(Iterator begin, Iterator end) : > _begin(begin), > _end(end) > {} > > iterable(const iterable<Iterator>& src) : > _begin(src._begin), > _end(src._end) > {} > > Iterator > begin() const { return _begin; } > > Iterator > end() const { return _end; } > > Iterator > cbegin() const { return _begin; } > > Iterator > cend() const { return _end; } > > bool > isEmpty() { return _begin == _end; } > > uint32_t > count() const { return _end - _begin; } > > template<typename Sink> > void > into(Sink sink) { std::copy(_begin, _end, sink); } > > private: > Iterator _begin; > Iterator _end; >}; > >template<typename E> >struct enumerable { > using Index = typename std::underlying_type<E>::type; > > static iterable<EnumerationIterator<E>> > walk(E first, E last) > { > E end = static_cast<E>(static_cast<Index>(last) + 1); > return iterable<EnumerationIterator<E>>(EnumerationIterator<E>(first), EnumerationIterator<E>(end)); > } > > static iterable<EnumerationIterator<E>> > walk(Index count) { return walk(static_cast<E>(0), count); } > > static iterable<EnumerationIterator<E>> > walk(E first, Index count) > { > E end = static_cast<E>(static_cast<Index>(first) + count); > return iterable<EnumerationIterator<E>>(EnumerationIterator<E>(first), EnumerationIterator<E>(end)); > } >}; > >template<typename Iterator, typename View> >struct lens { > struct Transform { > using self_type = Transform; > using value_type = typename View::Types::value; > using reference = typename View::Types::reference; > using pointer = typename View::Types::pointer; > using iterator_category = std::forward_iterator_tag; > using difference_type = int; > > Transform(Iterator i) : > _i(i) > {} > > self_type > operator ++() { return ++_i, *this; } > > self_type > operator ++( ># 175 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" > __attribute__((unused)) ># 175 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" 3 > int postfixDisambiguator) > { > self_type pre = *this; > return ++_i, pre; > } > > reference > operator *() { return View::reference(_i); } > > pointer > operator ->() { return View::pointer(_i); } > > bool > operator ==(const self_type& other) const { return _i == other._i; } > > bool > operator !=(const self_type& other) const { return !operator ==(other); } > > Iterator _i; > }; > > template<typename Container, typename = typename std::enable_if<!point_util::is_smart_pointer<Container>::value>::type> > lens(const Container& c) : > _begin(c.cbegin()), > _end(c.cend()) > {} > > template<typename Container, typename = typename std::enable_if<!point_util::is_smart_pointer<Container>::value>::type> > lens(Container& c) : > _begin(c.begin()), > _end(c.end()) > {} > > template<typename Pointer, typename = typename std::enable_if<point_util::is_smart_pointer<Pointer>::value>::type> > lens(const Pointer& p, ># 209 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" > __attribute__((unused)) ># 209 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" 3 > int a = 0 ) : > _begin(p->begin()), > _end(p->end()) > {} > > lens(Iterator begin, Iterator end) : > _begin(begin), > _end(end) > {} > > Transform > begin() const { return Transform(_begin); } > > Transform > end() const { return Transform(_end); } > > bool > isEmpty() { return _begin == _end; } > > private: > Iterator _begin; > Iterator _end; >}; ># 279 "../../subprojects/edfst/subprojects/facile/src/iterator/iterable.hpp" 3 >} ># 16 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/scan.hpp" 1 3 > > > > > > > >namespace facile >{ >template<typename Iterator, typename T = typename std::iterator_traits<Iterator>::value_type> >struct scan { > scan(scan<Iterator>& src) : > _i(src._i), > _end(src._end) > {} > > scan(const scan<Iterator>& src) : > _i(src._i), > _end(src._end) > {} > > template<typename Container, typename = typename std::enable_if<!point_util::is_smart_pointer<Container>::value>::type> > scan(const Container& c) : > _i(c.cbegin()), > _end(c.cend()) > {} > > template<typename Container, typename = typename std::enable_if<!point_util::is_smart_pointer<Container>::value>::type> > scan(Container& c) : > _i(c.begin()), > _end(c.end()) > {} > > template<typename Pointer, typename = typename std::enable_if<point_util::is_smart_pointer<Pointer>::value>::type> > scan(const Pointer& p, ># 35 "../../subprojects/edfst/subprojects/facile/src/iterator/scan.hpp" > __attribute__((unused)) ># 35 "../../subprojects/edfst/subprojects/facile/src/iterator/scan.hpp" 3 > int a = 0 ) : > _i(p->begin()), > _end(p->end()) > {} > > scan(Iterator begin, Iterator end) : > _i(begin), > _end(end) > {} > > scan() : > _i(Iterator()), > _end(Iterator()) > {} > > T& > get() { return *_i; } > > T& > operator *() { return *_i; } > > T * > operator ->() { return &*_i; } > > T& > read(int32_t offset = 0) { return *(_i + offset); } > > T& > getLast() { return *(_end-1); } > > bool > next() > { > _i++; > return !isClosed(); > } > > scan<Iterator>& > operator ++() > { > ++_i; > return *this; > } > > scan<Iterator> > operator ++( ># 80 "../../subprojects/edfst/subprojects/facile/src/iterator/scan.hpp" > __attribute__((unused)) ># 80 "../../subprojects/edfst/subprojects/facile/src/iterator/scan.hpp" 3 > int postfixDisambiguator) > { > const scan<Iterator> freeze(*this); > ++_i; > return freeze; > } > > template<typename Integer> > scan<Iterator> > operator +(Integer summand) > { > scan<Iterator> copy(*this); > copy._i += summand; > return copy; > } > > scan<Iterator>& > operator --() > { > --_i; > return *this; > } > > scan<Iterator> > operator --( ># 104 "../../subprojects/edfst/subprojects/facile/src/iterator/scan.hpp" > __attribute__((unused)) ># 104 "../../subprojects/edfst/subprojects/facile/src/iterator/scan.hpp" 3 > int postfixDisambiguator) > { > scan<Iterator> freeze(*this); > --_i; > return freeze; > } > > template<typename Integer> > scan<Iterator> > operator -(Integer subtrahend) > { > scan<Iterator> copy(*this); > copy._i -= subtrahend; > return copy; > } > > Iterator > peek(int32_t offset = 0) { return (_i + offset); } > > Iterator > peekLast() { return (_end - 1); } > > Iterator > peekEnd() { return _end; } > > bool > hasNext() { return (_end - _i) > 1; } > > bool > isClosed() { return _i == _end; } > > > bool > skip(uint32_t count) > { > uint32_t span = (_end - _i); > if (count >= span) { > _i = _end; > return false; > } > > _i += count; > return true; > } > > > bool > contract(uint32_t count) > { > uint32_t span = (_end - _i); > if (count >= span) { > _end = _i; > return false; > } > > _end -= count; > return true; > } > > private: > Iterator _i; > Iterator _end; >}; >} ># 17 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/cellwalk.hpp" 1 3 > > > > > > > > >using namespace point_util; > >namespace facile >{ >template<typename T> >struct cellwalk { > using Iterator = typename cell<T>::iterator; > > template<template<typename> class C> > using has_value_type = typename std::enable_if<std::is_same<typename C<T>::value_type, T>::value, C<T>&>::type; > > cellwalk() : > _begin(Iterator()), > _end(Iterator()) > {} > > template<typename SourceIterator> > cellwalk(SourceIterator begin, SourceIterator end) : > _begin(begin), > _end(end) > {} > > cellwalk(cellwalk<T>& src) : > _begin(src._begin), > _end(src._end) > {} > > static cellwalk<T> > make(T& singleton) > { > cell<T> unique(singleton); > > return make(unique, unique + 1); > } > > static cellwalk<T> > make(cell<T> begin, cell<T> end) { return cellwalk<T>(Iterator(begin), Iterator(end)); } > > template<template<typename> class C> > static typename std::enable_if<is_element_type<C, T>::value, cellwalk<T>>::type > make(C<T>& c) > { > return make(c, 0UL); > } > > template<template<typename> class C> > static typename std::enable_if<is_element_type<C, T>::value, cellwalk<T>>::type > make(C<T>& c, size_type<C<T>> start) > { > return make(c, start, c.size()); > } > > template<template<typename> class C> > static typename std::enable_if<is_element_type<C, T>::value, cellwalk<T>>::type > make(C<T>& c, size_type<C<T>> start, size_type<C<T>> end) > { > return cellwalk(Iterator::make(c, start), Iterator::make(c, end)); > } > > template<template<typename> class P, template<typename> class C> > static typename std::enable_if<is_element_type<C, T>::value && is_pointed_type<P<C<T>>, C<T>>::value, cellwalk<T>>::type > make(P<C<T>>& c) > { > return cellwalk(Iterator::make(c, 0), Iterator::make(c, c->size())); > } > > template<template<typename> class P, template<typename> class C> > static typename std::enable_if<is_element_type<C, T>::value && is_pointed_type<P<C<T>>, C<T>>::value, cellwalk<T>>::type > cmake(const P<C<T>>& c) > { > return cellwalk(Iterator::cmake(c, 0), Iterator::cmake(c, c->size())); > } > > template<template<typename> class P, template<typename> class C> > static typename std::enable_if<is_element_type<C, T>::value && is_pointed_type<P<C<T>>, C<T>>::value, cellwalk<T>>::type > make(P<C<T>>& c, size_type<C<T>> start, size_type<C<T>> end) > { > return cellwalk(Iterator::make(c, start), Iterator::make(c, end)); > } > > template<template<typename> class C> > static typename std::enable_if<is_element_type<C, cell<T>>::value, cellwalk<T>>::type > make(C<cell<T>>& c) > { > return make(c, 0UL); > } > > template<template<typename> class C> > static typename std::enable_if<is_element_type<C, cell<T>>::value, cellwalk<T>>::type > make(C<cell<T>>& c, size_type<C<cell<T>>> start) > { > return make(c, start, c.size()); > } > > template<template<typename> class C> > static typename std::enable_if<is_element_type<C, cell<T>>::value, cellwalk<T>>::type > make(C<cell<T>>& c, size_type<C<cell<T>>> start, size_type<C<cell<T>>> end) > { > return cellwalk(Iterator::make(c, start), Iterator::make(c, end)); > } > > Iterator > begin() { return _begin; } > > Iterator > end() { return _end; } > > bool > isEmpty() { return _begin == _end; } > > Iterator > peekLast() { return (_end - 1); } > > Iterator > peekEnd() { return _end; } > > > bool > contract(uint32_t count) > { > uint32_t span = (_end - _begin); > if (count >= span) { > _end = _begin; > return false; > } > > _end -= count; > return true; > } > > private: > Iterator _begin; > Iterator _end; >}; >} ># 18 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp" 1 3 > > > ># 1 "/home/volet/lab/inria/trace/point-util/src/block/LocalityBlock.hpp" 1 3 > > > > >namespace point_util >{ >class loc_t; > >struct LocalityBlockDeleter { > void > operator ()(void *p) { free(p); } >}; > >template<typename T> >class LocalityBlock : > public std::unique_ptr<T, LocalityBlockDeleter> >{ >struct use_the_factory_methods {}; > >using super = std::unique_ptr<T, LocalityBlockDeleter>; > >public: > > LocalityBlock() : > super() {} > > > LocalityBlock(std::nullptr_t null) : > super(null) {} > > > LocalityBlock( ># 32 "/home/volet/lab/inria/trace/point-util/src/block/LocalityBlock.hpp" > __attribute__((unused)) ># 32 "/home/volet/lab/inria/trace/point-util/src/block/LocalityBlock.hpp" 3 > use_the_factory_methods *please, T *block, size_t numberOfUnits, ># 32 "/home/volet/lab/inria/trace/point-util/src/block/LocalityBlock.hpp" > __attribute__((unused)) ># 32 "/home/volet/lab/inria/trace/point-util/src/block/LocalityBlock.hpp" 3 > size_t sizeInBytes) : > super(block), > _numberOfUnits(numberOfUnits) > {} > > > LocalityBlock(LocalityBlock<T>& b) = delete; > > > LocalityBlock(LocalityBlock&& b) > { > _numberOfUnits = b._numberOfUnits; > > super::reset(b.release()); > } > > > static inline LocalityBlock<T> > allocate(size_t numberOfUnits, size_t alignment = 0) > { > static use_the_factory_methods *hidden_key; > > T *block; > size_t size = numberOfUnits * sizeof(T); > > if (alignment == 0) > block = reinterpret_cast<T *>(malloc(size)); > else > block = reinterpret_cast<T *>(aligned_alloc(alignment, size)); > > if (block == __null) > throw PointUtilException("/home/volet/lab/inria/trace/point-util/src/block/LocalityBlock.hpp", 63) << "Failed to allocate a LocalityBlock of " << size << " bytes."; > > return LocalityBlock<T>(hidden_key, block, numberOfUnits, size); > } > > > static inline LocalityBlock<T> > makeEmpty() > { > static use_the_factory_methods *hidden_key; > > return LocalityBlock<T>(hidden_key, __null, 0, 0); > } > > static inline LocalityBlock<T> > wrap(T *wrapMe) > { > static use_the_factory_methods *hidden_key; > > uint32_t numberOfUnits = std::extent<T, 0>::value; > > return LocalityBlock<T>(hidden_key, wrapMe, numberOfUnits, numberOfUnits * sizeof(T)); > } > > template<typename A> > static inline LocalityBlock<T> > copy(A& copyMe) > { > LocalityBlock<T> copy = LocalityBlock<T>::allocate(std::extent<A, 0>::value); > > std::memcpy(copy, ©Me, copy.getSizeInBytes()); > return copy; > } > > template<typename A> > static inline LocalityBlock<T> > copy(A& copyMe, size_t numberOfUnits) > { > LocalityBlock<T> copy = LocalityBlock<T>::allocate(sizeof(A) * numberOfUnits); > > std::memcpy(copy, ©Me, copy.getSizeInBytes()); > return copy; > } > > LocalityBlock<T> > copy() const > { > LocalityBlock<T> copy = LocalityBlock<T>::allocate(_numberOfUnits); > > memcpy(copy, this->get(), getSizeInBytes()); > return copy; > } > > loc_t > getLocation() const { return super::get(); } > > T * > getExtent() const { return super::get() + _numberOfUnits; } > > size_t > getNumberOfUnits() const { return _numberOfUnits; } > > inline size_t > getSizeInBytes() const { return _numberOfUnits * sizeof(T); } > > ssize_t > deltaTo(loc_t other) const { return other - reinterpret_cast<ssize_t>(super::get()); } > > template<typename C> > inline void > writeBinary(std::basic_ostream<C>& o, size_t length = 0 ) const > { > o.write(reinterpret_cast<C *>(super::get()), length == 0 ? getSizeInBytes() : length); > } > > template<typename C> > inline void > readBinary(std::basic_istream<C>& i, size_t length = 0 ) > { > i.read(reinterpret_cast<C *>(super::get()), length == 0 ? getSizeInBytes() : length); > } > > template<typename C = T> > inline C > readUnit(uint32_t unitOffset = 0) { return *static_cast<C *>(super::get() + unitOffset); } > > > LocalityBlock<T> > operator =(LocalityBlock<T> b) = delete; > > > LocalityBlock<T>& > operator =(LocalityBlock<T>&& b) > { > _numberOfUnits = b._numberOfUnits; > > super::reset(b.release()); > > return *this; > } > > bool > operator ==(std::nullptr_t null) { return super::get() == null; } > > loc_t > operator +(size_t count) const { return super::get() + count; } > > operator loc_t() const { return getLocation(); } > > operator T *() const { return reinterpret_cast<T *>(super::get()); } > > operator uint64_t() const { return reinterpret_cast<uint64_t>(super::get()); } > > template<typename Index> > inline typename std::enable_if<std::is_integral<Index>::value, T&>::type > reference(const Index i) > { > return super::get()[i]; > } > > template<typename Index> > inline typename std::enable_if<std::is_integral<Index>::value, T&>::type > at(const Index i) > { > > > > > > > return reference(i); > } > > template<typename Index> > typename std::enable_if<std::is_integral<Index>::value, T&>::type > operator [](const Index i) { return at(i); } > > class View { > public: > View(LocalityBlock *b) : > _b(b) > {} > > operator T *() const { return **_b; } > > LocalityBlock<T> * > operator ->() const { return _b; } > > bool > operator ==(nullptr_t null) const { return _b == nullptr; } > > bool > operator ==(const LocalityBlock<T>::View& other) const { return _b == other._b; } > > bool > operator !=(nullptr_t null) const { return _b != nullptr; } > > bool > operator !=(const LocalityBlock<T>::View& other) const { return _b != other._b; } > > LocalityBlock<T>::View& > operator =(nullptr_t null) > { > _b = nullptr; > return *this; > } > > typename LocalityBlock<T>::View& > operator =(const LocalityBlock<T>::View& src) > { > _b = src._b; > return *this; > } > > typename LocalityBlock<T>::View& > operator =(const LocalityBlock<std::remove_cv<T>>& src) > { > _b = src._b; > return *this; > } > > template<typename Index> > typename std::enable_if<std::is_integral<Index>::value, T&>::type > operator [](const Index i) > { > return (*_b)[i]; > } > > private: > LocalityBlock<T> *_b; > }; > > LocalityBlock<T>::View > view() { return LocalityBlock<T>::View(this); } > >private: > size_t _numberOfUnits; >}; > >template<typename T, typename C> >std::istream& >operator >>(std::basic_istream<C>& i, LocalityBlock<T>& block) >{ > return i >> reinterpret_cast<C *>(block.get()); >} > > >} ># 5 "../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp" 2 3 > >namespace point_util >{ >template<typename T> >class ObjectBlock; > >template<typename T> >class unit { >struct use_make_or_wrap {}; > >template<typename F> >friend class unit; > >using C = typename std::add_const<T>::type; > >public: > constexpr unit( ># 21 "../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp" > __attribute__((unused)) ># 21 "../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp" 3 > use_make_or_wrap *please, T *t) : > _t(t) > {} > > > constexpr unit(const unit<T>& t) : > _t(t._t) > {} > > constexpr unit(nullptr_t null) : > _t(null) > {} > > constexpr unit() : > _t(nullptr) > {} > > bool > isEqual(const unit<T> other) const > { > if (other == nullptr) > return false; > > return *_t == *other._t; > } > > > T * > get() const { return _t; } > > operator unit<const T>() const { return unit<const T>::wrap(static_cast<const T *>(_t)); } > > operator handle<T>() const { return handle<T>(*_t); } > > handle<T> > handoff() const { return handle<T>(*_t); } > > T& > operator *() const { return *_t; } > > T * > operator ->() const { return _t; } > > bool > operator ==(nullptr_t null) const { return _t == null; } > > bool > operator ==(unit<C> other) const { return _t == other._t; } > > bool > operator ==(const T *other) const { return _t == other; } > > bool > operator !=(nullptr_t null) const { return _t != null; } > > bool > operator !=(unit<C> other) const { return _t != other._t; } > > bool > operator !=(const T *other) const { return _t != other; } > > unit<T>& > operator =(nullptr_t null) > { > _t = null; > return *this; > } > > unit<T>& > operator =(const unit<T>& src) > { > _t = src._t; > return *this; > } > > unit<T>& > operator =(const unit<std::remove_cv<T>>& src) > { > _t = src._t; > return *this; > } > > unit<T>& > operator |=(unit<T> other) > { > *_t |= *other._t; > return *this; > } > > T& > reference() { return *_t; } > > void > write(T *t) { *_t = *t; } > > void > write(unit<T> t) { *_t = *t._t; } > > void * > getLocation() const { return reinterpret_cast<void *>(_t); } > > template<typename ... A> > inline unit<T> > make(A&& ... args) > { > _t = new(_t) T(std::forward<A>(args) ...); > return *this; > } > > template<typename ... A> > inline unit<T> > remake(A&& ... args) > { > _t->remake(std::forward<A>(args) ...); > return *this; > } > > template<typename Base> > inline unit<Base> > upcast() > { > return unit<Base>::wrap(static_cast<Base *>(_t)); > } > > template<typename Specialization> > inline unit<Specialization> > downcast() > { > return unit<Specialization>::wrap(dynamic_cast<Specialization *>(_t)); > } > > template<typename ... A> > inline static unit<T> > make(T *uninitialized, A&& ... args) > { > use_make_or_wrap *hidden_key = nullptr; > > return unit<T>(hidden_key, new(uninitialized) T(std::forward<A>(args) ...)); > } > > inline static unit<T> > null() > { > use_make_or_wrap *hidden_key = nullptr; > > return unit<T>(hidden_key, nullptr); > } > >protected: > friend T; > friend ObjectBlock<T>; > > template<typename AutoBox> > inline static unit<AutoBox> > wrap(AutoBox *o) > { > use_make_or_wrap *hidden_key = nullptr; > > return unit<AutoBox>(hidden_key, o); > } > >private: > T *_t; >}; > >template<typename T> >struct unit_hash { > size_t > operator ()(const unit<T>& p) const noexcept > { > static std::hash<T *> hasher; > > return hasher(p.get()); > } >}; > >template<typename T> >std::ostream& >operator <<(std::ostream& o, unit<T> element) >{ > return o << *element; >} > >template<typename T> >class ObjectBlock >{ >public: > ObjectBlock(uint32_t initialBlockSizeExponent = 4) : > _cursor(loan<ObjectBlock>::acquire(this)), > _baseMagnitude(initialBlockSizeExponent) > { > _cache.push_back(LocalityBlock<T>::allocate(1 << _baseMagnitude)); > _cursor.reset(); > } > > inline bool > empty() const { return getAllocationCount() == _free.size(); } > > inline uint32_t > getAllocationCount() const { return _cursor.getAllocationCount(); } > > uint32_t > getActiveInstanceCount() const { return getAllocationCount() - _free.size(); } > > unit<T> > acquireUnit() > { > if (_free.empty()) { > if (!_cursor.hasNextElement()) { > if (!_cursor.hasNextBlock()) { > uint32_t blockSize = (1 << (_baseMagnitude + _cache.size())); > _cache.push_back(LocalityBlock<T>::allocate(blockSize)); > } > _cursor.advanceHead(); > } > return unit<T>::wrap(_cursor.advanceElement()); > } else { > unit<T> element = _free.back(); > _free.pop_back(); > return element; > } > } > > template<typename ... A> > unit<T> > makeUnit(A&& ... args) > { > return acquireUnit().make(std::forward<A>(args) ...); > } > > inline void > release(unit<T> element) > { > > for (unit<T> free : _free) { > if (free == element) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp", 257) << "Double free in ObjectBlock"; > } > > > element->~T(); > > _free.push_back(element); > } > > void > releaseAll() > { > > if (!_free.empty()) { > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp", 271) > << "Cannot release all members of an ObjectBlock when " << _free.size() << " have already been released"; > } > > > _cursor.releaseAll(); > } > > inline void > put(unit<T> element) > { > _free.push_back(element); > } > > inline void > reset() > { > _free.clear(); > _cursor.reset(); > } > >private: > class Cursor { > public: > Cursor(loan<ObjectBlock> b) : > _b(b), > _headIndex(0), > _element(0), > _head(nullptr) > {} > > inline uint32_t > getAllocationCount() const > { > uint32_t fullBlockElementCount = 0; > if (_headIndex > 0) { > uint32_t fullBlockCount = _headIndex; > uint32_t fullTriangle = ((1 << (_b->_baseMagnitude + fullBlockCount)) - 1); > uint32_t initTriangle = ((1 << _b->_baseMagnitude) - 1); > fullBlockElementCount = fullTriangle - initTriangle; > } > > return fullBlockElementCount + _element; > } > > bool > hasNextElement() { return _element < _head->getNumberOfUnits(); } > > T * > advanceElement() { return &_head[_element++]; } > > bool > hasNextBlock() { return _headIndex < ># 323 "../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp" > point_util::lastOfQuantity( ># 323 "../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp" 3 > _b->_cache.size() ># 323 "../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp" > ) ># 323 "../../subprojects/edfst/subprojects/point-util/src/block/ObjectBlock.hpp" 3 > ; } > > void > advanceHead() > { > _headIndex++; > _head = _b->_cache.at(_headIndex).view(); > _element = 0; > } > > void > reset() > { > _headIndex = _element = 0; > _head = _b->_cache[_headIndex].view(); > } > > void > releaseAll() > { > for (uint32_t i = 0; i < _headIndex; i++) { > LocalityBlock<T>& block = _b->_cache.at(i); > for (uint32_t j = 0; j < block.getNumberOfUnits(); j++) > block[j].~T(); > } > > for (uint32_t i = 0; i < _element; i++) > _head[i].~T(); > } > > private: > loan<ObjectBlock> _b; > > uint32_t _headIndex; > uint32_t _element; > > typename LocalityBlock<T>::View _head; > } > _cursor; > > uint32_t _baseMagnitude; > > std::vector<unit<T>> _free; > std::vector<LocalityBlock<T>> _cache; >}; > >template<typename T> >class zunit >{ >public: > zunit(unit<T> u, ObjectBlock<T>& block) : > u(u), > _block(block) > {} > > ~zunit() { _block.release(u); } > > unit<T> u; > >private: > ObjectBlock<T>& _block; >}; > >template<typename T> >struct ObjectPool { > ObjectPool(uint32_t initialBlockSizeExponent = 4) : > block(initialBlockSizeExponent) > {} > > ObjectBlock<T> block; > > zunit<T> > z(unit<T> u) { return zunit<T>(u, block); } > > template<typename ... A> > zunit<T> > makeZ(A&& ... args) { return z(block.makeUnit(std::forward<A>(args) ...)); } >}; >} ># 19 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/EnumToken.hpp" 1 3 > > >namespace facile >{ >struct EnumToken { > const std::string label; > > EnumToken(const std::string& label) : > label(label) > {} >}; >} > >namespace std >{ >inline std::ostream& >operator <<(std::ostream& o, const facile::EnumToken& token) >{ > return o << token.label; >} >} ># 20 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/StreamToken.hpp" 1 3 > > > > > > >namespace std >{ >template<typename T> >class StreamToken { >template<typename classInQuestion> >static std::true_type check(decltype(classInQuestion::FacileStreamTokenTag) *); > >template<typename CatchAll> >static std::false_type >check(...); > >typedef decltype (check<T>(0)) is_printable; > >public: > static const bool value = is_printable::value; >}; > >template<typename T> >std::enable_if_t<!point_util::is_smart_pointer<T>::value && StreamToken<T>::value, std::ostream&> >operator <<(std::ostream& o, const T& t) >{ > return t.print(o); >} > >template<typename T> >std::enable_if_t<StreamToken<typename T::element_type>::value, std::ostream&> >operator <<(std::ostream& o, const T& t) >{ > return t->print(o); >} ># 46 "../../subprojects/edfst/subprojects/facile/src/io/StreamToken.hpp" 3 >} ># 21 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/src/scope/OnScopeExit.hpp" 1 3 > > >namespace facile >{ > >struct OnScopeExit { > template<typename Finally> > struct Capture { > Finally& finally; > > Capture(Finally& finally) : > finally(finally) > {} > > ~Capture() { finally(); } > }; > > template<typename Finally, typename = typename std::enable_if_t<is_lambda<Finally>::value, void>> > struct Copy { > Finally finally; > > Copy(Finally finally) : > finally(finally) > {} > > ~Copy() { finally(); } > }; >}; >} ># 23 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" 1 3 > > > > > > ># 1 "/usr/include/boost/format.hpp" 1 3 4 ># 27 "/usr/include/boost/format.hpp" 3 4 ># 1 "/usr/include/boost/format/detail/compat_workarounds.hpp" 1 3 4 ># 33 "/usr/include/boost/format/detail/compat_workarounds.hpp" 3 4 >namespace boost { > namespace io { > > > > template<class Tr> > class CompatTraits; > > > > > template<class Alloc> > class CompatAlloc; > } >} > > ># 1 "/usr/include/boost/format/detail/config_macros.hpp" 1 3 4 ># 33 "/usr/include/boost/format/detail/config_macros.hpp" 3 4 ># 1 "/usr/include/boost/format/detail/workarounds_gcc-2_95.hpp" 1 3 4 ># 34 "/usr/include/boost/format/detail/config_macros.hpp" 2 3 4 ># 1 "/usr/include/boost/format/detail/workarounds_stlport.hpp" 1 3 4 ># 35 "/usr/include/boost/format/detail/config_macros.hpp" 2 3 4 ># 84 "/usr/include/boost/format/detail/config_macros.hpp" 3 4 >namespace boost { namespace io { namespace detail { > > typedef ::std:: locale locale_t; > > > >} } } ># 51 "/usr/include/boost/format/detail/compat_workarounds.hpp" 2 3 4 ># 65 "/usr/include/boost/format/detail/compat_workarounds.hpp" 3 4 >namespace boost { > namespace io { > > > template<class Tr> > class CompatTraits > { > public: > typedef Tr compatible_type; > }; > > > template<class Alloc> > class CompatAlloc > { > public: > typedef Alloc compatible_type; > }; > > } >} ># 28 "/usr/include/boost/format.hpp" 2 3 4 > > > > > > ># 1 "/usr/include/boost/format/format_fwd.hpp" 1 3 4 ># 21 "/usr/include/boost/format/format_fwd.hpp" 3 4 >namespace boost { > > template <class Ch, > class Tr = ::std:: char_traits<Ch>, class Alloc = std::allocator<Ch> > > class basic_format; > > typedef basic_format<char > format; > > > typedef basic_format<wchar_t > wformat; > > > namespace io { > enum format_error_bits { bad_format_string_bit = 1, > too_few_args_bit = 2, too_many_args_bit = 4, > out_of_range_bit = 8, > all_error_bits = 255, no_error_bits=0 }; > > } > >} ># 35 "/usr/include/boost/format.hpp" 2 3 4 ># 1 "/usr/include/boost/format/internals_fwd.hpp" 1 3 4 ># 20 "/usr/include/boost/format/internals_fwd.hpp" 3 4 >namespace boost { >namespace io { > >namespace detail { > template<class Ch, class Tr> struct stream_format_state; > template<class Ch, class Tr, class Alloc> struct format_item; > > > > > > template<class Ch, class Tr, class Alloc, class T> > basic_format<Ch, Tr, Alloc>& > modify_item_body (basic_format<Ch, Tr, Alloc>& self, > int itemN, T manipulator); > > template<class Ch, class Tr, class Alloc, class T> > basic_format<Ch, Tr, Alloc>& > bind_arg_body (basic_format<Ch, Tr, Alloc>& self, > int argN, const T& val); > > > template<class Ch, class Tr, class T> > void apply_manip_body (stream_format_state<Ch, Tr>& self, > T manipulator); > > > template<class Ch, class Tr, class Alloc, class T> > void distribute (basic_format<Ch,Tr, Alloc>& self, T x); > > template<class Ch, class Tr, class Alloc, class T> > basic_format<Ch, Tr, Alloc>& > feed (basic_format<Ch,Tr, Alloc>& self, T x); > > template<class Ch, class Tr, class Alloc, class T> > basic_format<Ch, Tr, Alloc>& > feed_impl (basic_format<Ch,Tr, Alloc>& self, T x); > >} > >} >} ># 36 "/usr/include/boost/format.hpp" 2 3 4 > > ># 1 "/usr/include/boost/format/internals.hpp" 1 3 4 ># 19 "/usr/include/boost/format/internals.hpp" 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 20 "/usr/include/boost/format/internals.hpp" 2 3 4 ># 1 "/usr/include/boost/core/ignore_unused.hpp" 1 3 4 ># 12 "/usr/include/boost/core/ignore_unused.hpp" 3 4 >namespace boost { > > > > > >template <typename... Ts> >inline __attribute__ ((__always_inline__)) constexpr void ignore_unused(Ts&& ...) >{} ># 30 "/usr/include/boost/core/ignore_unused.hpp" 3 4 >template <typename... Ts> >inline __attribute__ ((__always_inline__)) constexpr void ignore_unused() >{} ># 98 "/usr/include/boost/core/ignore_unused.hpp" 3 4 >} ># 21 "/usr/include/boost/format/internals.hpp" 2 3 4 ># 1 "/usr/include/boost/optional.hpp" 1 3 4 ># 15 "/usr/include/boost/optional.hpp" 3 4 ># 1 "/usr/include/boost/optional/optional.hpp" 1 3 4 ># 27 "/usr/include/boost/optional/optional.hpp" 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 28 "/usr/include/boost/optional/optional.hpp" 2 3 4 > > ># 1 "/usr/include/boost/core/explicit_operator_bool.hpp" 1 3 4 ># 25 "/usr/include/boost/core/explicit_operator_bool.hpp" 3 4 > ># 31 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/core/swap.hpp" 1 3 4 ># 33 "/usr/include/boost/core/swap.hpp" 3 4 >namespace boost_swap_impl >{ > > > template<class T> struct is_const { enum _vt { value = 0 }; }; > template<class T> struct is_const<T const> { enum _vt { value = 1 }; }; > > template<class T> > > void swap_impl(T& left, T& right) > { > using namespace std; > swap(left,right); > } > > template<class T, std::size_t N> > > void swap_impl(T (& left)[N], T (& right)[N]) > { > for (std::size_t i = 0; i < N; ++i) > { > ::boost_swap_impl::swap_impl(left[i], right[i]); > } > } >} > >namespace boost >{ > template<class T1, class T2> > > typename enable_if_c< !boost_swap_impl::is_const<T1>::value && !boost_swap_impl::is_const<T2>::value >::type > swap(T1& left, T2& right) > { > ::boost_swap_impl::swap_impl(left, right); > } >} ># 32 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/optional/bad_optional_access.hpp" 1 3 4 ># 20 "/usr/include/boost/optional/bad_optional_access.hpp" 3 4 >namespace boost { > > > > > > >class bad_optional_access : public std::logic_error >{ >public: > bad_optional_access() > : std::logic_error("Attempted to access the value of an uninitialized optional object.") > {} >}; > > > > > >} ># 33 "/usr/include/boost/optional/optional.hpp" 2 3 4 > ># 1 "/usr/include/boost/throw_exception.hpp" 1 3 4 ># 23 "/usr/include/boost/throw_exception.hpp" 3 4 ># 1 "/usr/include/boost/exception/exception.hpp" 1 3 4 ># 16 "/usr/include/boost/exception/exception.hpp" 3 4 >namespace boost { template <class T> class shared_ptr; } >namespace boost { namespace exception_detail { using boost::shared_ptr; } } > > > > > ># 23 "/usr/include/boost/exception/exception.hpp" 3 ># 33 "/usr/include/boost/exception/exception.hpp" 3 >namespace >boost > { > namespace > exception_detail > { > template <class T> > class > refcount_ptr > { > public: > > refcount_ptr(): > px_(0) > { > } > > ~refcount_ptr() > { > release(); > } > > refcount_ptr( refcount_ptr const & x ): > px_(x.px_) > { > add_ref(); > } > > refcount_ptr & > operator=( refcount_ptr const & x ) > { > adopt(x.px_); > return *this; > } > > void > adopt( T * px ) > { > release(); > px_=px; > add_ref(); > } > > T * > get() const > { > return px_; > } > > private: > > T * px_; > > void > add_ref() > { > if( px_ ) > px_->add_ref(); > } > > void > release() > { > if( px_ && px_->release() ) > px_=0; > } > }; > } > > > > template <class Tag,class T> > class error_info; > > typedef error_info<struct throw_function_,char const *> throw_function; > typedef error_info<struct throw_file_,char const *> throw_file; > typedef error_info<struct throw_line_,int> throw_line; > > template <> > class > error_info<throw_function_,char const *> > { > public: > typedef char const * value_type; > value_type v_; > explicit > error_info( value_type v ): > v_(v) > { > } > }; > > template <> > class > error_info<throw_file_,char const *> > { > public: > typedef char const * value_type; > value_type v_; > explicit > error_info( value_type v ): > v_(v) > { > } > }; > > template <> > class > error_info<throw_line_,int> > { > public: > typedef int value_type; > value_type v_; > explicit > error_info( value_type v ): > v_(v) > { > } > }; > > class > __attribute__((__visibility__("default"))) > exception; > > namespace > exception_detail > { > class error_info_base; > struct type_info_; > > struct > error_info_container > { > virtual char const * diagnostic_information( char const * ) const = 0; > virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0; > virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0; > virtual void add_ref() const = 0; > virtual bool release() const = 0; > virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0; > > protected: > > ~error_info_container() noexcept > { > } > }; > > template <class> > struct get_info; > > template <> > struct get_info<throw_function>; > > template <> > struct get_info<throw_file>; > > template <> > struct get_info<throw_line>; > > template <class> > struct set_info_rv; > > template <> > struct set_info_rv<throw_function>; > > template <> > struct set_info_rv<throw_file>; > > template <> > struct set_info_rv<throw_line>; > > char const * get_diagnostic_information( exception const &, char const * ); > > void copy_boost_exception( exception *, exception const * ); > > template <class E,class Tag,class T> > E const & set_info( E const &, error_info<Tag,T> const & ); > > template <class E> > E const & set_info( E const &, throw_function const & ); > > template <class E> > E const & set_info( E const &, throw_file const & ); > > template <class E> > E const & set_info( E const &, throw_line const & ); > } > > class > __attribute__((__visibility__("default"))) > exception > { > > public: > template <class Tag> void set( typename Tag::type const & ); > template <class Tag> typename Tag::type const * get() const; > > > protected: > > exception(): > throw_function_(0), > throw_file_(0), > throw_line_(-1) > { > } ># 252 "/usr/include/boost/exception/exception.hpp" 3 > virtual ~exception() noexcept > > = 0 > > ; > > > > > private: > > template <class E> > friend E const & exception_detail::set_info( E const &, throw_function const & ); > > template <class E> > friend E const & exception_detail::set_info( E const &, throw_file const & ); > > template <class E> > friend E const & exception_detail::set_info( E const &, throw_line const & ); > > template <class E,class Tag,class T> > friend E const & exception_detail::set_info( E const &, error_info<Tag,T> const & ); > > friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); > > template <class> > friend struct exception_detail::get_info; > friend struct exception_detail::get_info<throw_function>; > friend struct exception_detail::get_info<throw_file>; > friend struct exception_detail::get_info<throw_line>; > template <class> > friend struct exception_detail::set_info_rv; > friend struct exception_detail::set_info_rv<throw_function>; > friend struct exception_detail::set_info_rv<throw_file>; > friend struct exception_detail::set_info_rv<throw_line>; > friend void exception_detail::copy_boost_exception( exception *, exception const * ); > > mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_; > mutable char const * throw_function_; > mutable char const * throw_file_; > mutable int throw_line_; > }; > > inline > exception:: > ~exception() noexcept > { > } > > namespace > exception_detail > { > template <class E> > E const & > set_info( E const & x, throw_function const & y ) > { > x.throw_function_=y.v_; > return x; > } > > template <class E> > E const & > set_info( E const & x, throw_file const & y ) > { > x.throw_file_=y.v_; > return x; > } > > template <class E> > E const & > set_info( E const & x, throw_line const & y ) > { > x.throw_line_=y.v_; > return x; > } > } > > > > namespace > exception_detail > { > template <class T> > struct > __attribute__((__visibility__("default"))) > error_info_injector: > public T, > public exception > { > explicit > error_info_injector( T const & x ): > T(x) > { > } > > ~error_info_injector() noexcept > { > } > }; > > struct large_size { char c[256]; }; > large_size dispatch_boost_exception( exception const * ); > > struct small_size { }; > small_size dispatch_boost_exception( void const * ); > > template <class,int> > struct enable_error_info_helper; > > template <class T> > struct > enable_error_info_helper<T,sizeof(large_size)> > { > typedef T type; > }; > > template <class T> > struct > enable_error_info_helper<T,sizeof(small_size)> > { > typedef error_info_injector<T> type; > }; > > template <class T> > struct > enable_error_info_return_type > { > typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception(static_cast<T *>(0)))>::type type; > }; > } > > template <class T> > inline > typename > exception_detail::enable_error_info_return_type<T>::type > enable_error_info( T const & x ) > { > typedef typename exception_detail::enable_error_info_return_type<T>::type rt; > return rt(x); > } > > > > > > > namespace > exception_detail > { > class > __attribute__((__visibility__("default"))) > clone_base > { > public: > > virtual clone_base const * clone() const = 0; > virtual void rethrow() const = 0; > > virtual > ~clone_base() noexcept > { > } > }; > > inline > void > copy_boost_exception( exception * a, exception const * b ) > { > refcount_ptr<error_info_container> data; > if( error_info_container * d=b->data_.get() ) > data = d->clone(); > a->throw_file_ = b->throw_file_; > a->throw_line_ = b->throw_line_; > a->throw_function_ = b->throw_function_; > a->data_ = data; > } > > inline > void > copy_boost_exception( void *, void const * ) > { > } > > template <class T> > class > __attribute__((__visibility__("default"))) > clone_impl: > public T, > public virtual clone_base > { > struct clone_tag { }; > clone_impl( clone_impl const & x, clone_tag ): > T(x) > { > copy_boost_exception(this,&x); > } > > public: > > explicit > clone_impl( T const & x ): > T(x) > { > copy_boost_exception(this,&x); > } > > ~clone_impl() noexcept > { > } > > private: > > clone_base const * > clone() const > { > return new clone_impl(*this,clone_tag()); > } > > void > rethrow() const > { > > > > throw*this; > > } > }; > } > > template <class T> > inline > exception_detail::clone_impl<T> > enable_current_exception( T const & x ) > { > return exception_detail::clone_impl<T>(x); > } > } ># 24 "/usr/include/boost/throw_exception.hpp" 2 3 4 ># 34 "/usr/include/boost/throw_exception.hpp" 3 4 >namespace boost >{ ># 46 "/usr/include/boost/throw_exception.hpp" 3 4 >namespace detail >{ > >typedef char (&wrapexcept_s1)[ 1 ]; >typedef char (&wrapexcept_s2)[ 2 ]; > >template<class T> wrapexcept_s1 wrapexcept_is_convertible( T* ); >template<class T> wrapexcept_s2 wrapexcept_is_convertible( void* ); > >template<class E, class B, std::size_t I = sizeof( wrapexcept_is_convertible<B>( static_cast< E* >( 0 ) ) ) > struct wrapexcept_add_base; > >template<class E, class B> struct wrapexcept_add_base<E, B, 1> >{ > struct type {}; >}; > >template<class E, class B> struct wrapexcept_add_base<E, B, 2> >{ > typedef B type; >}; > >} > >template<class E> struct __attribute__((__visibility__("default"))) wrapexcept: > public detail::wrapexcept_add_base<E, boost::exception_detail::clone_base>::type, > public E, > public detail::wrapexcept_add_base<E, boost::exception>::type >{ >private: > > struct deleter > { > wrapexcept * p_; > ~deleter() { delete p_; } > }; > >private: > > void copy_from( void const* ) > { > } > > void copy_from( boost::exception const* p ) > { > static_cast<boost::exception&>( *this ) = *p; > } > >public: > > explicit wrapexcept( E const & e ): E( e ) > { > copy_from( &e ); > } > > explicit wrapexcept( E const & e, boost::source_location const & loc ): E( e ) > { > copy_from( &e ); > > set_info( *this, throw_file( loc.file_name() ) ); > set_info( *this, throw_line( loc.line() ) ); > set_info( *this, throw_function( loc.function_name() ) ); > } > > virtual boost::exception_detail::clone_base const * clone() const override > { > wrapexcept * p = new wrapexcept( *this ); > deleter del = { p }; > > boost::exception_detail::copy_boost_exception( p, this ); > > del.p_ = 0; > return p; > } > > virtual void rethrow() const override > { > > > > > > > throw *this; > > > } >}; > > > > >inline void throw_exception_assert_compatibility( std::exception const & ) {} ># 159 "/usr/include/boost/throw_exception.hpp" 3 4 >template<class E> __attribute__ ((__noreturn__)) void throw_exception( E const & e ) >{ > throw_exception_assert_compatibility( e ); > throw wrapexcept<E>( e ); >} > >template<class E> __attribute__ ((__noreturn__)) void throw_exception( E const & e, boost::source_location const & loc ) >{ > throw_exception_assert_compatibility( e ); > throw wrapexcept<E>( e, loc ); >} > > > > > >} ># 35 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/type.hpp" 1 3 4 ># 9 "/usr/include/boost/type.hpp" 3 4 >namespace boost { > > > > template <class T> > struct type {}; > >} ># 36 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/alignment_of.hpp" 1 3 4 ># 26 "/usr/include/boost/type_traits/alignment_of.hpp" 3 4 >namespace boost { > >template <typename T> struct alignment_of; > > >namespace detail { > > > > > >template <typename T> >struct alignment_of_hack >{ > char c; > T t; > alignment_of_hack(); >}; > > > > >template <unsigned A, unsigned S> >struct alignment_logic >{ > static const std::size_t value = A < S ? A : S; >}; > > >template< typename T > >struct alignment_of_impl >{ ># 82 "/usr/include/boost/type_traits/alignment_of.hpp" 3 4 > static const std::size_t value = __alignof__(T); > >}; > >} > >template <class T> struct alignment_of : public integral_constant<std::size_t, ::boost::detail::alignment_of_impl<T>::value>{}; > > > >template <typename T> struct alignment_of<T&> : public alignment_of<T*>{}; ># 102 "/usr/include/boost/type_traits/alignment_of.hpp" 3 4 >template<> struct alignment_of<void> : integral_constant<std::size_t, 0>{}; > >template<> struct alignment_of<void const> : integral_constant<std::size_t, 0>{}; >template<> struct alignment_of<void const volatile> : integral_constant<std::size_t, 0>{}; >template<> struct alignment_of<void volatile> : integral_constant<std::size_t, 0>{}; > > >} ># 37 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/conditional.hpp" 1 3 4 ># 14 "/usr/include/boost/type_traits/conditional.hpp" 3 4 >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; > > > >} ># 38 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 1 3 4 ># 22 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_default_constructible.hpp" 1 3 4 ># 29 "/usr/include/boost/type_traits/is_default_constructible.hpp" 3 4 >namespace boost{ > > namespace detail{ > > struct is_default_constructible_imp > { > template<typename _Tp, typename = decltype(_Tp())> > static boost::type_traits::yes_type test(int); > > template<typename> > static boost::type_traits::no_type test(...); > }; ># 53 "/usr/include/boost/type_traits/is_default_constructible.hpp" 3 4 > } > > > > > > > > template <class T> struct is_default_constructible : public integral_constant<bool, sizeof(boost::detail::is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)> > { > static_assert(boost::is_complete<T>::value, "Arguments to is_default_constructible must be complete types"); > }; > > template <class T, std::size_t N> struct is_default_constructible<T[N]> : public is_default_constructible<T>{}; > template <class T> struct is_default_constructible<T[]> : public is_default_constructible<T>{}; > template <class T> struct is_default_constructible<T&> : public integral_constant<bool, false>{}; > > > > > template <class T> struct is_default_constructible<T&&> : public integral_constant<bool, false>{}; > > template <> struct is_default_constructible<void> : public integral_constant<bool, false>{}; > template <> struct is_default_constructible<void const> : public integral_constant<bool, false>{}; > template <> struct is_default_constructible<void volatile> : public integral_constant<bool, false>{}; > template <> struct is_default_constructible<void const volatile> : public integral_constant<bool, false>{}; ># 96 "/usr/include/boost/type_traits/is_default_constructible.hpp" 3 4 >} ># 23 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 2 3 4 > > >namespace boost { > >template <class T> struct has_nothrow_constructor : public integral_constant<bool, (__has_nothrow_constructor(T) && is_default_constructible<T>::value )>{}; ># 62 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 3 4 >template<> struct has_nothrow_constructor<void> : public false_type {}; > >template<> struct has_nothrow_constructor<void const> : public false_type{}; >template<> struct has_nothrow_constructor<void const volatile> : public false_type{}; >template<> struct has_nothrow_constructor<void volatile> : public false_type{}; > > >template <class T> struct has_nothrow_default_constructor : public has_nothrow_constructor<T>{}; > >} ># 39 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/type_with_alignment.hpp" 1 3 4 ># 27 "/usr/include/boost/type_traits/type_with_alignment.hpp" 3 4 >namespace boost { > > namespace detail{ > > union max_align > { > char c; > short s; > int i; > long l; > > boost::long_long_type ll; > > > boost::int128_type i128; > > float f; > double d; > long double ld; > > > > }; > >template <std::size_t Target, bool check> struct long_double_alignment{ typedef long double type; }; >template <std::size_t Target> struct long_double_alignment<Target, false>{ typedef boost::detail::max_align type; }; > >template <std::size_t Target, bool check> struct double_alignment{ typedef double type; }; >template <std::size_t Target> struct double_alignment<Target, false>{ typedef typename long_double_alignment<Target, boost::alignment_of<long double>::value >= Target>::type type; }; > > >template <std::size_t Target, bool check> struct long_long_alignment{ typedef boost::long_long_type type; }; >template <std::size_t Target> struct long_long_alignment<Target, false>{ typedef typename double_alignment<Target, boost::alignment_of<double>::value >= Target>::type type; }; > > >template <std::size_t Target, bool check> struct long_alignment{ typedef long type; }; > >template <std::size_t Target> struct long_alignment<Target, false>{ typedef typename long_long_alignment<Target, boost::alignment_of<boost::long_long_type>::value >= Target>::type type; }; > > > > >template <std::size_t Target, bool check> struct int_alignment{ typedef int type; }; >template <std::size_t Target> struct int_alignment<Target, false>{ typedef typename long_alignment<Target, boost::alignment_of<long>::value >= Target>::type type; }; > >template <std::size_t Target, bool check> struct short_alignment{ typedef short type; }; >template <std::size_t Target> struct short_alignment<Target, false>{ typedef typename int_alignment<Target, boost::alignment_of<int>::value >= Target>::type type; }; > >template <std::size_t Target, bool check> struct char_alignment{ typedef char type; }; >template <std::size_t Target> struct char_alignment<Target, false>{ typedef typename short_alignment<Target, boost::alignment_of<short>::value >= Target>::type type; }; > >} > >template <std::size_t Align> >struct type_with_alignment >{ > typedef typename boost::detail::char_alignment<Align, boost::alignment_of<char>::value >= Align>::type type; >}; > > >namespace tt_align_ns { >struct __attribute__((__aligned__(2))) a2 {}; >struct __attribute__((__aligned__(4))) a4 {}; >struct __attribute__((__aligned__(8))) a8 {}; >struct __attribute__((__aligned__(16))) a16 {}; >struct __attribute__((__aligned__(32))) a32 {}; >struct __attribute__((__aligned__(64))) a64 {}; >struct __attribute__((__aligned__(128))) a128 {}; >} > >template<> struct type_with_alignment<1> { public: typedef char type; }; >template<> struct type_with_alignment<2> { public: typedef tt_align_ns::a2 type; }; >template<> struct type_with_alignment<4> { public: typedef tt_align_ns::a4 type; }; >template<> struct type_with_alignment<8> { public: typedef tt_align_ns::a8 type; }; >template<> struct type_with_alignment<16> { public: typedef tt_align_ns::a16 type; }; >template<> struct type_with_alignment<32> { public: typedef tt_align_ns::a32 type; }; >template<> struct type_with_alignment<64> { public: typedef tt_align_ns::a64 type; }; >template<> struct type_with_alignment<128> { public: typedef tt_align_ns::a128 type; }; > >template<> struct is_pod< ::boost::tt_align_ns::a2> : public true_type{}; >template<> struct is_pod< ::boost::tt_align_ns::a4> : public true_type{}; >template<> struct is_pod< ::boost::tt_align_ns::a8> : public true_type{}; >template<> struct is_pod< ::boost::tt_align_ns::a16> : public true_type{}; >template<> struct is_pod< ::boost::tt_align_ns::a32> : public true_type{}; >template<> struct is_pod< ::boost::tt_align_ns::a64> : public true_type{}; >template<> struct is_pod< ::boost::tt_align_ns::a128> : public true_type{}; ># 252 "/usr/include/boost/type_traits/type_with_alignment.hpp" 3 4 >} ># 40 "/usr/include/boost/optional/optional.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/type_traits/is_base_of.hpp" 1 3 4 ># 12 "/usr/include/boost/type_traits/is_base_of.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 1 3 4 ># 24 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 3 4 >namespace boost { > >namespace detail { ># 220 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 3 4 >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{}; > > > > > >} ># 13 "/usr/include/boost/type_traits/is_base_of.hpp" 2 3 4 > > > >namespace boost { > > namespace detail{ > template <class B, class D> > struct is_base_of_imp > { > typedef typename remove_cv<B>::type ncvB; > typedef typename remove_cv<D>::type ncvD; > static const bool value = ( (::boost::detail::is_base_and_derived_impl<ncvB,ncvD>::value) || (::boost::is_same<ncvB,ncvD>::value && ::boost::is_class<ncvB>::value)) > > ; > }; > } > > template <class Base, class Derived> struct is_base_of > : public integral_constant<bool, (::boost::detail::is_base_of_imp<Base, Derived>::value)> {}; > > template <class Base, class Derived> struct is_base_of<Base, Derived&> : false_type{}; > template <class Base, class Derived> struct is_base_of<Base&, Derived&> : false_type{}; > template <class Base, class Derived> struct is_base_of<Base&, Derived> : false_type{}; > >} ># 44 "/usr/include/boost/optional/optional.hpp" 2 3 4 > ># 1 "/usr/include/boost/type_traits/is_constructible.hpp" 1 3 4 ># 17 "/usr/include/boost/type_traits/is_constructible.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_destructible.hpp" 1 3 4 ># 23 "/usr/include/boost/type_traits/is_destructible.hpp" 3 4 >namespace boost{ > > namespace detail{ > > struct is_destructible_imp > { > template<typename T, typename = decltype(boost::declval<T&>().~T())> > static boost::type_traits::yes_type test(int); > template<typename> > static boost::type_traits::no_type test(...); > }; > > } > > template <class T> struct is_destructible : public integral_constant<bool, sizeof(boost::detail::is_destructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)> > { > static_assert(boost::is_complete<T>::value, "Arguments to is_destructible must be complete types"); > }; ># 56 "/usr/include/boost/type_traits/is_destructible.hpp" 3 4 > template <> struct is_destructible<void> : public false_type{}; > template <> struct is_destructible<void const> : public false_type{}; > template <> struct is_destructible<void volatile> : public false_type{}; > template <> struct is_destructible<void const volatile> : public false_type{}; > template <class T> struct is_destructible<T&> : public is_destructible<T>{}; > > template <class T> struct is_destructible<T&&> : public is_destructible<T>{}; > > template <class T, std::size_t N> struct is_destructible<T[N]> : public is_destructible<T>{}; > template <class T> struct is_destructible<T[]> : public is_destructible<T>{}; > >} ># 18 "/usr/include/boost/type_traits/is_constructible.hpp" 2 3 4 ># 26 "/usr/include/boost/type_traits/is_constructible.hpp" 3 4 >namespace boost{ > > namespace detail{ > > struct is_constructible_imp > { > template<typename T, typename ...TheArgs, typename = decltype(T(boost::declval<TheArgs>()...))> > static boost::type_traits::yes_type test(int); > template<typename, typename...> > static boost::type_traits::no_type test(...); > > template<typename T, typename Arg, typename = decltype(::new T(boost::declval<Arg>()))> > static boost::type_traits::yes_type test1(int); > template<typename, typename> > static boost::type_traits::no_type test1(...); > > template <typename T> > static boost::type_traits::yes_type ref_test(T); > template <typename T> > static boost::type_traits::no_type ref_test(...); > }; > > } > > template <class T, class ...Args> struct is_constructible : public integral_constant<bool, sizeof(detail::is_constructible_imp::test<T, Args...>(0)) == sizeof(boost::type_traits::yes_type)> > { > static_assert(::boost::is_complete<T>::value, "The target type must be complete in order to test for constructibility"); > }; > template <class T, class Arg> struct is_constructible<T, Arg> : public integral_constant<bool, is_destructible<T>::value && sizeof(boost::detail::is_constructible_imp::test1<T, Arg>(0)) == sizeof(boost::type_traits::yes_type)> > { > static_assert(::boost::is_complete<T>::value, "The target type must be complete in order to test for constructibility"); > }; > template <class Ref, class Arg> struct is_constructible<Ref&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{}; > template <class Ref, class Arg> struct is_constructible<Ref&&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{}; > > template <> struct is_constructible<void> : public false_type{}; > template <> struct is_constructible<void const> : public false_type{}; > template <> struct is_constructible<void const volatile> : public false_type{}; > template <> struct is_constructible<void volatile> : public false_type{}; > > template <class T> struct is_constructible<T> : public is_default_constructible<T>{}; ># 88 "/usr/include/boost/type_traits/is_constructible.hpp" 3 4 >} ># 46 "/usr/include/boost/optional/optional.hpp" 2 3 4 > ># 1 "/usr/include/boost/type_traits/is_nothrow_move_assignable.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/is_nothrow_move_assignable.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/has_trivial_move_assign.hpp" 1 3 4 ># 28 "/usr/include/boost/type_traits/has_trivial_move_assign.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_assignable.hpp" 1 3 4 ># 18 "/usr/include/boost/type_traits/is_assignable.hpp" 3 4 >namespace boost{ > > template <class T, class U = T> struct is_assignable; > >} > > > > > > >namespace boost{ > > namespace detail{ > > struct is_assignable_imp > { > template<typename T, typename U, typename = decltype(boost::declval<T>() = boost::declval<U>())> > static boost::type_traits::yes_type test(int); > > template<typename, typename> > static boost::type_traits::no_type test(...); > }; > > } > > template <class T, class U> struct is_assignable : public integral_constant<bool, sizeof(detail::is_assignable_imp::test<T, U>(0)) == sizeof(boost::type_traits::yes_type)> > { > static_assert(boost::is_complete<T>::value, "Arguments to is_assignable must be complete types"); > }; > template <class T, std::size_t N, class U> struct is_assignable<T[N], U> : public is_assignable<T, U>{}; > template <class T, std::size_t N, class U> struct is_assignable<T(&)[N], U> : public is_assignable<T&, U>{}; > template <class T, class U> struct is_assignable<T[], U> : public is_assignable<T, U>{}; > template <class T, class U> struct is_assignable<T(&)[], U> : public is_assignable<T&, U>{}; > template <class U> struct is_assignable<void, U> : public integral_constant<bool, false>{}; > template <class U> struct is_assignable<void const, U> : public integral_constant<bool, false>{}; > template <class U> struct is_assignable<void volatile, U> : public integral_constant<bool, false>{}; > template <class U> struct is_assignable<void const volatile, U> : public integral_constant<bool, false>{}; ># 83 "/usr/include/boost/type_traits/is_assignable.hpp" 3 4 >} ># 29 "/usr/include/boost/type_traits/has_trivial_move_assign.hpp" 2 3 4 ># 44 "/usr/include/boost/type_traits/has_trivial_move_assign.hpp" 3 4 >namespace boost{ > >template <typename T> >struct has_trivial_move_assign : public integral_constant<bool, > > (__is_trivially_assignable(T&, T&&) && is_assignable<T&, T&&>::value && !::boost::is_volatile<T>::value) > > > > > {}; > >template <> struct has_trivial_move_assign<void> : public false_type{}; > >template <> struct has_trivial_move_assign<void const> : public false_type{}; >template <> struct has_trivial_move_assign<void const volatile> : public false_type{}; >template <> struct has_trivial_move_assign<void volatile> : public false_type{}; > >template <class T> struct has_trivial_move_assign<T&> : public false_type{}; > >template <class T> struct has_trivial_move_assign<T&&> : public false_type{}; > > >template <class T, std::size_t N> struct has_trivial_move_assign<T[N]> : public false_type{}; >template <class T> struct has_trivial_move_assign<T[]> : public false_type{}; > >} ># 16 "/usr/include/boost/type_traits/is_nothrow_move_assignable.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 1 3 4 ># 38 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 3 4 >namespace boost { ># 52 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 3 4 > template <class T> > struct has_nothrow_assign : public integral_constant < bool, ># 65 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 3 4 > ((__has_nothrow_assign(T) ) && !is_volatile<T>::value && !is_const<T>::value && is_assignable<T&, const T&>::value) > > > {}; > >template <class T, std::size_t N> struct has_nothrow_assign <T[N]> : public has_nothrow_assign<T> {}; >template <> struct has_nothrow_assign<void> : public false_type{}; >template <class T> struct has_nothrow_assign<T volatile> : public false_type{}; >template <class T> struct has_nothrow_assign<T&> : public false_type{}; > >template <class T> struct has_nothrow_assign<T&&> : public false_type{}; > > >template <> struct has_nothrow_assign<void const> : public false_type{}; >template <> struct has_nothrow_assign<void const volatile> : public false_type{}; >template <> struct has_nothrow_assign<void volatile> : public false_type{}; > > >} ># 17 "/usr/include/boost/type_traits/is_nothrow_move_assignable.hpp" 2 3 4 > > ># 1 "/usr/include/boost/type_traits/enable_if.hpp" 1 3 4 ># 20 "/usr/include/boost/type_traits/enable_if.hpp" 3 4 >namespace boost { > >template<bool B, class T = void> >struct enable_if_ { > typedef T type; >}; > >template<class T> >struct enable_if_<false, T> { }; > > >template<bool B, class T = void> >using enable_if_t = typename enable_if_<B, T>::type; > > >} ># 20 "/usr/include/boost/type_traits/is_nothrow_move_assignable.hpp" 2 3 4 > > > > >namespace boost { ># 43 "/usr/include/boost/type_traits/is_nothrow_move_assignable.hpp" 3 4 >namespace detail{ > >template <class T, class Enable = void> >struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {}; > >template <class T> >struct false_or_cpp11_noexcept_move_assignable < > T, > typename ::boost::enable_if_<sizeof(T) && noexcept((::boost::declval<T&>() = ::boost::declval<T>()))>::type > > : public ::boost::integral_constant<bool, noexcept((::boost::declval<T&>() = ::boost::declval<T>()))> >{}; > >} > >template <class T> >struct is_nothrow_move_assignable : public integral_constant<bool, ::boost::detail::false_or_cpp11_noexcept_move_assignable<T>::value> >{ > static_assert(boost::is_complete<T>::value, "Arguments to is_nothrow_move_assignable must be complete types"); >}; > >template <class T> struct is_nothrow_move_assignable<T const> : public ::boost::false_type {}; >template <class T> struct is_nothrow_move_assignable<T const volatile> : public ::boost::false_type{}; >template <class T> struct is_nothrow_move_assignable<T volatile> : public ::boost::false_type{}; >template <class T> struct is_nothrow_move_assignable<T&> : public ::boost::false_type{}; > >template <class T> struct is_nothrow_move_assignable<T&&> : public ::boost::false_type{}; ># 83 "/usr/include/boost/type_traits/is_nothrow_move_assignable.hpp" 3 4 >template <> struct is_nothrow_move_assignable<void> : public false_type{}; > >template <> struct is_nothrow_move_assignable<void const> : public false_type{}; >template <> struct is_nothrow_move_assignable<void const volatile> : public false_type{}; >template <> struct is_nothrow_move_assignable<void volatile> : public false_type{}; > > >} ># 48 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_nothrow_move_constructible.hpp" 1 3 4 ># 40 "/usr/include/boost/type_traits/is_nothrow_move_constructible.hpp" 3 4 >namespace boost{ namespace detail{ > >template <class T, class Enable = void> >struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {}; > >template <class T> >struct false_or_cpp11_noexcept_move_constructible < > T, > typename ::boost::enable_if_<sizeof(T) && noexcept((T(::boost::declval<T>())))>::type > > : public ::boost::integral_constant<bool, noexcept((T(::boost::declval<T>())))> >{}; > >} > >template <class T> struct is_nothrow_move_constructible > : public integral_constant<bool, ::boost::detail::false_or_cpp11_noexcept_move_constructible<T>::value> >{ > static_assert(boost::is_complete<T>::value, "Arguments to is_nothrow_move_constructible must be complete types"); >}; > >template <class T> struct is_nothrow_move_constructible<volatile T> : public ::boost::false_type {}; >template <class T> struct is_nothrow_move_constructible<const volatile T> : public ::boost::false_type{}; >template <class T, std::size_t N> struct is_nothrow_move_constructible<T[N]> : public ::boost::false_type{}; >template <class T> struct is_nothrow_move_constructible<T[]> : public ::boost::false_type{}; ># 83 "/usr/include/boost/type_traits/is_nothrow_move_constructible.hpp" 3 4 >template <> struct is_nothrow_move_constructible<void> : false_type{}; > >template <> struct is_nothrow_move_constructible<void const> : false_type{}; >template <> struct is_nothrow_move_constructible<void volatile> : false_type{}; >template <> struct is_nothrow_move_constructible<void const volatile> : false_type{}; > > >template <class T> struct is_nothrow_move_constructible<T&> : public ::boost::true_type{}; > >template <class T> struct is_nothrow_move_constructible<T&&> : public ::boost::true_type{}; > > >} ># 49 "/usr/include/boost/optional/optional.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/move/utility.hpp" 1 3 4 ># 24 "/usr/include/boost/move/utility.hpp" 3 4 > > > ># 1 "/usr/include/boost/move/detail/config_begin.hpp" 1 3 4 ># 28 "/usr/include/boost/move/utility.hpp" 2 3 4 ># 1 "/usr/include/boost/move/detail/workaround.hpp" 1 3 4 ># 19 "/usr/include/boost/move/detail/workaround.hpp" 3 4 > ># 29 "/usr/include/boost/move/utility.hpp" 2 3 4 ># 1 "/usr/include/boost/move/utility_core.hpp" 1 3 4 ># 25 "/usr/include/boost/move/utility_core.hpp" 3 4 > > > ># 1 "/usr/include/boost/move/detail/config_begin.hpp" 1 3 4 ># 29 "/usr/include/boost/move/utility_core.hpp" 2 3 4 > ># 1 "/usr/include/boost/move/core.hpp" 1 3 4 ># 24 "/usr/include/boost/move/core.hpp" 3 4 > > > ># 1 "/usr/include/boost/move/detail/config_begin.hpp" 1 3 4 ># 28 "/usr/include/boost/move/core.hpp" 2 3 4 ># 310 "/usr/include/boost/move/core.hpp" 3 4 > namespace boost { > > > > > template<class T> > struct has_move_emulation_enabled > { > static const bool value = false; > }; > > template<class T> > struct has_move_emulation_disabled > { > static const bool value = true; > }; > > } ># 483 "/usr/include/boost/move/core.hpp" 3 4 > namespace boost { > namespace move_detail { > > template< class T> struct forward_type { typedef T type; }; > > }} > > > ># 1 "/usr/include/boost/move/detail/config_end.hpp" 1 3 4 ># 493 "/usr/include/boost/move/core.hpp" 2 3 4 ># 31 "/usr/include/boost/move/utility_core.hpp" 2 3 4 ># 1 "/usr/include/boost/move/detail/meta_utils.hpp" 1 3 4 ># 18 "/usr/include/boost/move/detail/meta_utils.hpp" 3 4 > > ># 1 "/usr/include/boost/move/detail/config_begin.hpp" 1 3 4 ># 21 "/usr/include/boost/move/detail/meta_utils.hpp" 2 3 4 > ># 1 "/usr/include/boost/move/detail/meta_utils_core.hpp" 1 3 4 ># 22 "/usr/include/boost/move/detail/meta_utils_core.hpp" 3 4 > > > > > >namespace boost { >namespace move_detail { > >template<typename T> >struct voider { typedef void type; }; > > > > >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, typename T2, typename T3> >struct if_ : if_c<0 != T1::value, T2, T3> >{}; > > > > >struct enable_if_nat{}; > >template <bool B, class T = enable_if_nat> >struct enable_if_c >{ > typedef T type; >}; > >template <class T> >struct enable_if_c<false, T> {}; > > > > >template <class Cond, class T = enable_if_nat> >struct enable_if : enable_if_c<Cond::value, T> {}; > > > > >template <bool B, class T = enable_if_nat> >struct disable_if_c > : enable_if_c<!B, T> >{}; > > > > >template <class Cond, class T = enable_if_nat> >struct disable_if : enable_if_c<!Cond::value, T> {}; > > > > >template<class T, T v> >struct integral_constant >{ > static const T value = v; > typedef T value_type; > typedef integral_constant<T, v> type; > > operator T() const { return value; } > T operator()() const { return value; } >}; > >typedef integral_constant<bool, true > true_type; >typedef integral_constant<bool, false > false_type; > > > > > >template<class T, class U> >struct is_same >{ > static const bool value = false; >}; > >template<class T> >struct is_same<T, T> >{ > static const bool value = true; >}; > > > > >template <class T, class U, class R = enable_if_nat> >struct enable_if_same : enable_if<is_same<T, U>, R> {}; > > > > >template <class T, class U, class R = enable_if_nat> >struct disable_if_same : disable_if<is_same<T, U>, R> {}; > >} >} ># 23 "/usr/include/boost/move/detail/meta_utils.hpp" 2 3 4 > > > > >namespace boost { > > >template <class T> class rv; > >namespace move_detail { > > > > >template<class T, class U> >struct is_different >{ > static const bool value = !is_same<T, U>::value; >}; > > > > >template<class F, class Param> >struct apply >{ > typedef typename F::template apply<Param>::type type; >}; > > > > > >template< bool C_ > >struct bool_ : integral_constant<bool, C_> >{ > operator bool() const { return C_; } > bool operator()() const { return C_; } >}; > >typedef bool_<true> true_; >typedef bool_<false> false_; > > > > >struct nat{}; >struct nat2{}; >struct nat3{}; > > > > >typedef char yes_type; > >struct no_type >{ > char _[2]; >}; > > > > >template <class T> struct natify{}; > > > > >template<class T> >struct remove_reference >{ > typedef T type; >}; > >template<class T> >struct remove_reference<T&> >{ > typedef T type; >}; > > > >template<class T> >struct remove_reference<T&&> >{ > typedef T type; >}; ># 137 "/usr/include/boost/move/detail/meta_utils.hpp" 3 4 >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 > >struct add_pointer >{ > typedef typename remove_reference<T>::type* type; >}; > > > > >template<class T> >struct add_const >{ > typedef const T type; >}; > >template<class T> >struct add_const<T&> >{ > typedef const T& type; >}; > > > >template<class T> >struct add_const<T&&> >{ > typedef T&& type; >}; > > > > > > >template<class T> >struct add_lvalue_reference >{ typedef T& type; }; > >template<class T> struct add_lvalue_reference<T&> { typedef T& type; }; >template<> struct add_lvalue_reference<void> { typedef void type; }; >template<> struct add_lvalue_reference<const void> { typedef const void type; }; >template<> struct add_lvalue_reference<volatile void> { typedef volatile void type; }; >template<> struct add_lvalue_reference<const volatile void>{ typedef const volatile void type; }; > >template<class T> >struct add_const_lvalue_reference >{ > typedef typename remove_reference<T>::type t_unreferenced; > typedef typename add_const<t_unreferenced>::type t_unreferenced_const; > typedef typename add_lvalue_reference > <t_unreferenced_const>::type type; >}; > > > > >template<class T> >struct is_lvalue_reference >{ > static const bool value = false; >}; > >template<class T> >struct is_lvalue_reference<T&> >{ > static const bool value = true; >}; > > > > > >template <class T> >struct identity >{ > typedef T type; > typedef typename add_const_lvalue_reference<T>::type reference; > reference operator()(reference t) > { return t; } >}; > > > > >template<class T> >struct is_class_or_union >{ > struct twochar { char dummy[2]; }; > template <class U> > static char is_class_or_union_tester(void(U::*)(void)); > template <class U> > static twochar is_class_or_union_tester(...); > static const bool value = sizeof(is_class_or_union_tester<T>(0)) == sizeof(char); >}; > > > > >template<class T> >struct addr_impl_ref >{ > T & v_; > inline __attribute__ ((__always_inline__)) addr_impl_ref( T & v ): v_( v ) {} > inline __attribute__ ((__always_inline__)) operator T& () const { return v_; } > > private: > addr_impl_ref & operator=(const addr_impl_ref &); >}; > >template<class T> >struct addressof_impl >{ > inline __attribute__ ((__always_inline__)) static T * f( T & v, long ) > { > return reinterpret_cast<T*>( > &const_cast<char&>(reinterpret_cast<const volatile char &>(v))); > } > > inline __attribute__ ((__always_inline__)) static T * f( T * v, int ) > { return v; } >}; > >template<class T> >inline __attribute__ ((__always_inline__)) T * addressof( T & v ) >{ > return ::boost::move_detail::addressof_impl<T>::f > ( ::boost::move_detail::addr_impl_ref<T>( v ), 0 ); >} > > > > >template <class T> >struct has_pointer_type >{ > struct two { char c[2]; }; > template <class U> static two test(...); > template <class U> static char test(typename U::pointer* = 0); > static const bool value = sizeof(test<T>(0)) == 1; >}; ># 302 "/usr/include/boost/move/detail/meta_utils.hpp" 3 4 >template <class T, class U> >class is_convertible >{ > typedef typename add_lvalue_reference<T>::type t_reference; > typedef char true_t; > class false_t { char dummy[2]; }; > static false_t dispatch(...); > static true_t dispatch(U); > static t_reference trigger(); > public: > static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t); >}; > > > >template <class T, class U, bool IsSame = is_same<T, U>::value> >struct is_same_or_convertible > : is_convertible<T, U> >{}; > >template <class T, class U> >struct is_same_or_convertible<T, U, true> >{ > static const bool value = true; >}; > >template< > bool C > , typename F1 > , typename F2 > > >struct eval_if_c > : if_c<C,F1,F2>::type >{}; > >template< > typename C > , typename T1 > , typename T2 > > >struct eval_if > : if_<C,T1,T2>::type >{}; > > > > > > >template<class T, class U, class R = void> >struct enable_if_convertible > : enable_if< is_convertible<T, U>, R> >{}; > >template<class T, class U, class R = void> >struct disable_if_convertible > : disable_if< is_convertible<T, U>, R> >{}; > >template<class T, class U, class R = void> >struct enable_if_same_or_convertible > : enable_if< is_same_or_convertible<T, U>, R> >{}; > >template<class T, class U, class R = void> >struct disable_if_same_or_convertible > : disable_if< is_same_or_convertible<T, U>, R> >{}; > > > > > > >template<bool, class B = true_, class C = true_, class D = true_> >struct and_impl > : and_impl<B::value, C, D> >{}; > >template<> >struct and_impl<true, true_, true_, true_> >{ > static const bool value = true; >}; > >template<class B, class C, class D> >struct and_impl<false, B, C, D> >{ > static const bool value = false; >}; > >template<class A, class B, class C = true_, class D = true_> >struct and_ > : and_impl<A::value, B, C, D> >{}; > > > > > > >template<bool, class B = false_, class C = false_, class D = false_> >struct or_impl > : or_impl<B::value, C, D> >{}; > >template<> >struct or_impl<false, false_, false_, false_> >{ > static const bool value = false; >}; > >template<class B, class C, class D> >struct or_impl<true, B, C, D> >{ > static const bool value = true; >}; > >template<class A, class B, class C = false_, class D = false_> >struct or_ > : or_impl<A::value, B, C, D> >{}; > > > > > > >template<class T> >struct not_ >{ > static const bool value = !T::value; >}; > > > > > > > >template<class R, class A, class B, class C = true_, class D = true_> >struct enable_if_and > : enable_if_c< and_<A, B, C, D>::value, R> >{}; > >template<class R, class A, class B, class C = true_, class D = true_> >struct disable_if_and > : disable_if_c< and_<A, B, C, D>::value, R> >{}; > >template<class R, class A, class B, class C = false_, class D = false_> >struct enable_if_or > : enable_if_c< or_<A, B, C, D>::value, R> >{}; > >template<class R, class A, class B, class C = false_, class D = false_> >struct disable_if_or > : disable_if_c< or_<A, B, C, D>::value, R> >{}; > > > > > > >template<class T> >struct has_move_emulation_enabled_impl > : is_convertible< T, ::boost::rv<T>& > >{}; > >template<class T> >struct has_move_emulation_enabled_impl<T&> >{ static const bool value = false; }; > >template<class T> >struct has_move_emulation_enabled_impl< ::boost::rv<T> > >{ static const bool value = false; }; > > > > > > > >template <class T> >struct is_rv_impl >{ static const bool value = false; }; > >template <class T> >struct is_rv_impl< rv<T> > >{ static const bool value = true; }; > >template <class T> >struct is_rv_impl< const rv<T> > >{ static const bool value = true; }; > > > >template< class T > >struct is_rvalue_reference >{ static const bool value = false; }; > > > >template< class T > >struct is_rvalue_reference< T&& > >{ static const bool value = true; }; ># 524 "/usr/include/boost/move/detail/meta_utils.hpp" 3 4 >template< class T > >struct add_rvalue_reference >{ typedef T&& type; }; ># 555 "/usr/include/boost/move/detail/meta_utils.hpp" 3 4 >template< class T > struct remove_rvalue_reference { typedef T type; }; > > > template< class T > struct remove_rvalue_reference< T&& > { typedef T type; }; ># 582 "/usr/include/boost/move/detail/meta_utils.hpp" 3 4 >} >} > ># 1 "/usr/include/boost/move/detail/config_end.hpp" 1 3 4 ># 586 "/usr/include/boost/move/detail/meta_utils.hpp" 2 3 4 ># 32 "/usr/include/boost/move/utility_core.hpp" 2 3 4 ># 174 "/usr/include/boost/move/utility_core.hpp" 3 4 > namespace boost { > > > > > > > > template<class T> > struct enable_move_utility_emulation > { > static const bool value = false; > }; ># 211 "/usr/include/boost/move/utility_core.hpp" 3 4 > template <class T> > inline __attribute__ ((__always_inline__)) typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) noexcept > { return static_cast<typename ::boost::move_detail::remove_reference<T>::type &&>(t); } ># 247 "/usr/include/boost/move/utility_core.hpp" 3 4 > template <class T> > inline __attribute__ ((__always_inline__)) T&& forward(typename ::boost::move_detail::remove_reference<T>::type& t) noexcept > { return static_cast<T&&>(t); } > > template <class T> > inline __attribute__ ((__always_inline__)) T&& forward(typename ::boost::move_detail::remove_reference<T>::type&& t) noexcept > { > > static_assert(!boost::move_detail::is_lvalue_reference<T>::value, "!boost::move_detail::is_lvalue_reference<T>::value"); > return static_cast<T&&>(t); > } > > > > } ># 271 "/usr/include/boost/move/utility_core.hpp" 3 4 > namespace boost { ># 287 "/usr/include/boost/move/utility_core.hpp" 3 4 > template <class T> > inline __attribute__ ((__always_inline__)) T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type& t) noexcept > { return static_cast<T&&>(t); } > > template <class T> > inline __attribute__ ((__always_inline__)) T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type&& t) noexcept > { > > static_assert(!boost::move_detail::is_lvalue_reference<T>::value, "!boost::move_detail::is_lvalue_reference<T>::value"); > return static_cast<T&&>(t); > } > > > > } > > > > > >namespace boost{ >namespace move_detail{ > >template <typename T> >typename boost::move_detail::add_rvalue_reference<T>::type declval(); > >} >} > > > > ># 1 "/usr/include/boost/move/detail/config_end.hpp" 1 3 4 ># 320 "/usr/include/boost/move/utility_core.hpp" 2 3 4 ># 30 "/usr/include/boost/move/utility.hpp" 2 3 4 ># 1 "/usr/include/boost/move/traits.hpp" 1 3 4 ># 22 "/usr/include/boost/move/traits.hpp" 3 4 > > > ># 1 "/usr/include/boost/move/detail/config_begin.hpp" 1 3 4 ># 26 "/usr/include/boost/move/traits.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/move/detail/type_traits.hpp" 1 3 4 ># 24 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 > > > ># 1 "/usr/include/boost/move/detail/config_begin.hpp" 1 3 4 ># 28 "/usr/include/boost/move/detail/type_traits.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 34 "/usr/include/boost/move/detail/type_traits.hpp" 2 3 4 ># 253 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 > template <typename T> > T && boost_move_tt_declval() noexcept; ># 297 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 > template <typename T, typename U, bool = __is_assignable(T, U)> > struct boost_move_tt_is_nothrow_assignable > { > static const bool value = false; > }; > > template <typename T, typename U> > struct boost_move_tt_is_nothrow_assignable<T, U, true> > { > > static const bool value = noexcept(boost_move_tt_declval<T>() = boost_move_tt_declval<U>()); > > > > }; > > template <typename T, typename U, bool = __is_constructible(T, U)> > struct boost_move_tt_is_nothrow_constructible > { > static const bool value = false; > }; > > template <typename T, typename U> > struct boost_move_tt_is_nothrow_constructible<T, U, true> > { > > static const bool value = noexcept(T(boost_move_tt_declval<U>())); > > > > }; ># 479 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >namespace boost { >namespace move_detail { > > > > >template<class T> >struct is_reference >{ static const bool value = false; }; > >template<class T> >struct is_reference<T&> >{ static const bool value = true; }; > > >template<class T> >struct is_reference<T&&> >{ static const bool value = true; }; > > > > > >template<class T> >struct is_pointer >{ static const bool value = false; }; > >template<class T> >struct is_pointer<T*> >{ static const bool value = true; }; > > > > >template<class T> >struct is_const >{ static const bool value = false; }; > >template<class T> >struct is_const<const T> >{ static const bool value = true; }; > > > > >template <typename T> struct unvoid_ref : add_lvalue_reference<T>{}; >template <> struct unvoid_ref<void> { typedef unvoid_ref & type; }; >template <> struct unvoid_ref<const void> { typedef unvoid_ref & type; }; >template <> struct unvoid_ref<volatile void> { typedef unvoid_ref & type; }; >template <> struct unvoid_ref<const volatile void> { typedef unvoid_ref & type; }; > >template <typename T> >struct add_reference : add_lvalue_reference<T> >{}; > > > > >template <class T> >struct add_const_reference >{ typedef const T &type; }; > >template <class T> >struct add_const_reference<T&> >{ typedef T& type; }; > > > > >template<class T, bool Add> >struct add_const_if_c > : if_c<Add, typename add_const<T>::type, T> >{}; > > > > >template<class T> >struct remove_const >{ typedef T type; }; > >template<class T> >struct remove_const< const T> >{ typedef T type; }; > > > > >template<typename T> struct remove_cv { typedef T type; }; >template<typename T> struct remove_cv<const T> { typedef T type; }; >template<typename T> struct remove_cv<const volatile T> { typedef T type; }; >template<typename T> struct remove_cv<volatile T> { typedef T type; }; > > > > >template<class T> >struct remove_cvref > : remove_cv<typename remove_reference<T>::type> >{ >}; > > > > >template <class T> >struct make_unsigned_impl { typedef T type; }; >template <> struct make_unsigned_impl<signed char> { typedef unsigned char type; }; >template <> struct make_unsigned_impl<signed short> { typedef unsigned short type; }; >template <> struct make_unsigned_impl<signed int> { typedef unsigned int type; }; >template <> struct make_unsigned_impl<signed long> { typedef unsigned long type; }; > >template <> struct make_unsigned_impl< ::boost::long_long_type > { typedef ::boost::ulong_long_type type; }; > > >template <class T> >struct make_unsigned > : make_unsigned_impl<typename remove_cv<T>::type> >{}; > > > > >template<class T> struct is_floating_point_cv { static const bool value = false; }; >template<> struct is_floating_point_cv<float> { static const bool value = true; }; >template<> struct is_floating_point_cv<double> { static const bool value = true; }; >template<> struct is_floating_point_cv<long double> { static const bool value = true; }; > >template<class T> >struct is_floating_point > : is_floating_point_cv<typename remove_cv<T>::type> >{}; > > > > >template<class T> struct is_integral_cv { static const bool value = false; }; >template<> struct is_integral_cv< bool>{ static const bool value = true; }; >template<> struct is_integral_cv< char>{ static const bool value = true; }; >template<> struct is_integral_cv< unsigned char>{ static const bool value = true; }; >template<> struct is_integral_cv< signed char>{ static const bool value = true; }; > >template<> struct is_integral_cv< char16_t>{ static const bool value = true; }; > > >template<> struct is_integral_cv< char32_t>{ static const bool value = true; }; > > >template<> struct is_integral_cv< wchar_t>{ static const bool value = true; }; > >template<> struct is_integral_cv< short>{ static const bool value = true; }; >template<> struct is_integral_cv< unsigned short>{ static const bool value = true; }; >template<> struct is_integral_cv< int>{ static const bool value = true; }; >template<> struct is_integral_cv< unsigned int>{ static const bool value = true; }; >template<> struct is_integral_cv< long>{ static const bool value = true; }; >template<> struct is_integral_cv< unsigned long>{ static const bool value = true; }; > >template<> struct is_integral_cv< ::boost:: long_long_type>{ static const bool value = true; }; >template<> struct is_integral_cv< ::boost::ulong_long_type>{ static const bool value = true; }; > > >template<class T> >struct is_integral > : public is_integral_cv<typename remove_cv<T>::type> >{}; > > > > >template <class T> >struct remove_all_extents >{ typedef T type;}; > >template <class T> >struct remove_all_extents<T[]> >{ typedef typename remove_all_extents<T>::type type; }; > >template <class T, std::size_t N> >struct remove_all_extents<T[N]> >{ typedef typename remove_all_extents<T>::type type;}; > > > > >template<class T> >struct is_scalar >{ static const bool value = is_integral<T>::value || is_floating_point<T>::value; }; > > > > >template<class T> >struct is_void_cv >{ static const bool value = false; }; > >template<> >struct is_void_cv<void> >{ static const bool value = true; }; > >template<class T> >struct is_void > : is_void_cv<typename remove_cv<T>::type> >{}; > > > > >template<class T> >struct is_array >{ static const bool value = false; }; > >template<class T> >struct is_array<T[]> >{ static const bool value = true; }; > >template<class T, std::size_t N> >struct is_array<T[N]> >{ static const bool value = true; }; > > > > >template <class T> struct is_member_pointer_cv { static const bool value = false; }; >template <class T, class U>struct is_member_pointer_cv<T U::*> { static const bool value = true; }; > >template <class T> >struct is_member_pointer > : is_member_pointer_cv<typename remove_cv<T>::type> >{}; > > > > >template <class T> >struct is_nullptr_t_cv >{ static const bool value = false; }; > > >template <> >struct is_nullptr_t_cv > > <decltype(nullptr)> > > > >{ static const bool value = true; }; > > >template <class T> >struct is_nullptr_t > : is_nullptr_t_cv<typename remove_cv<T>::type> >{}; ># 739 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >template <class T> >struct is_reference_convertible_to_pointer >{ > struct twochar { char dummy[2]; }; > template <class U> static char test(U*); > template <class U> static twochar test(...); > static T& source(); > static const bool value = sizeof(char) == sizeof(test<T>(source())); >}; > > > > > >template < class T > , bool Filter = is_class_or_union<T>::value || > is_void<T>::value || > is_reference<T>::value || > is_nullptr_t<T>::value > >struct is_function_impl >{ static const bool value = is_reference_convertible_to_pointer<T>::value; }; > >template <class T> >struct is_function_impl<T, true> >{ static const bool value = false; }; > >template <class T> >struct is_function > : is_function_impl<T> >{}; > > > > >template<class T> >struct is_union_noextents_cv >{ static const bool value = __is_union(T); }; > >template<class T> >struct is_union > : is_union_noextents_cv<typename remove_cv<typename remove_all_extents<T>::type>::type> >{}; > > > > >template <class T> >struct is_class >{ > static const bool value = is_class_or_union<T>::value && ! is_union<T>::value; >}; > > > > > >template <class T> >struct is_arithmetic >{ > static const bool value = is_floating_point<T>::value || > is_integral<T>::value; >}; > > > > >template <class T> >struct is_member_function_pointer_cv >{ > static const bool value = false; >}; > >template <class T, class C> >struct is_member_function_pointer_cv<T C::*> > : is_function<T> >{}; > >template <class T> >struct is_member_function_pointer > : is_member_function_pointer_cv<typename remove_cv<T>::type> >{}; ># 841 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >template <class T> >struct is_enum >{ static const bool value = __is_enum(T); }; > > > > >template<class T> >struct is_pod_noextents_cv >{ static const bool value = (::boost::move_detail::is_scalar<T>::value || ::boost::move_detail::is_void<T>::value || __is_pod(T)); }; > >template<class T> >struct is_pod > : is_pod_noextents_cv<typename remove_cv<typename remove_all_extents<T>::type>::type> >{}; ># 888 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >template <class T> >struct is_empty >{ static const bool value = __is_empty(T); }; > > >template<class T> >struct has_boost_move_no_copy_constructor_or_assign_type >{ > template <class U> > static yes_type test(typename U::boost_move_no_copy_constructor_or_assign*); > > template <class U> > static no_type test(...); > > static const bool value = sizeof(test<T>(0)) == sizeof(yes_type); >}; ># 914 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >template<class T> >struct is_copy_constructible >{ ># 925 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 > template<class U> static typename add_reference<U>::type source(); > static no_type test(...); > > > > > template <class U> > static yes_type test(U&, decltype(U(source<U>()))* = 0); > > static const bool value = sizeof(test(source<T>())) == sizeof(yes_type); > > > >}; ># 950 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >template <class T> >struct is_copy_assignable >{ ># 962 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 > typedef char yes_type; > struct no_type { char dummy[2]; }; > > template <class U> static typename add_reference<U>::type source(); > template <class U> static decltype(source<U&>() = source<const U&>(), yes_type() ) test(int); > template <class> static no_type test(...); > > static const bool value = sizeof(test<T>(0)) == sizeof(yes_type); > > > >}; > > > > >template<class T> >struct is_trivially_destructible >{ static const bool value = (__has_trivial_destructor(T) ) || ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_trivially_default_constructible >{ static const bool value = ((__has_trivial_constructor(T) )) || ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_trivially_copy_constructible >{ > static const bool value = ::boost::move_detail::is_pod<T>::value || (::boost::move_detail::is_copy_constructible<T>::value && (__is_trivially_constructible(T, const T &))); >}; > > > > >template<class T> >struct is_trivially_move_constructible >{ static const bool value = ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_trivially_copy_assignable >{ > static const bool value = ::boost::move_detail::is_pod<T>::value || ( ::boost::move_detail::is_copy_assignable<T>::value && (__is_trivially_assignable(T, const T &))); >}; > > > > >template<class T> >struct is_trivially_move_assignable >{ static const bool value = ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_nothrow_default_constructible >{ static const bool value = (__has_nothrow_constructor(T) ) || ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_nothrow_copy_constructible >{ static const bool value = ((__has_nothrow_copy(T) )) || ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_nothrow_move_constructible >{ static const bool value = boost_move_tt_is_nothrow_constructible<T, T&&>::value || ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_nothrow_copy_assignable >{ static const bool value = ((__has_nothrow_assign(T) )) || ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_nothrow_move_assignable >{ static const bool value = boost_move_tt_is_nothrow_assignable<T, T&&>::value || ::boost::move_detail::is_pod<T>::value; }; > > > > >template<class T> >struct is_nothrow_swappable >{ > static const bool value = is_empty<T>::value || is_pod<T>::value; >}; > > > > >template <typename T> >struct alignment_of_hack >{ > T t1; > char c; > T t2; > alignment_of_hack(); > ~alignment_of_hack(); >}; > >template <unsigned A, unsigned S> >struct alignment_logic >{ static const std::size_t value = A < S ? A : S; }; > >template< typename T > >struct alignment_of_impl ># 1094 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >{ static const std::size_t value = __alignof__(T); }; > > >template< typename T > >struct alignment_of > : alignment_of_impl<T> >{}; > >class alignment_dummy; >typedef void (*function_ptr)(); >typedef int (alignment_dummy::*member_ptr); >typedef int (alignment_dummy::*member_function_ptr)(); >struct alignment_struct >{ long double dummy[4]; }; > > > > > >union max_align >{ > char char_; > short short_; > int int_; > long long_; > > ::boost::long_long_type long_long_; > > float float_; > double double_; > void * void_ptr_; > long double long_double_[4]; > alignment_dummy *unknown_class_ptr_; > function_ptr function_ptr_; > member_function_ptr member_function_ptr_; > alignment_struct alignment_struct_; >}; > >typedef union max_align max_align_t; ># 1179 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >template<std::size_t Len, std::size_t Align> >struct aligned_struct; ># 1191 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >template<std::size_t Len>struct alignas(0x1) aligned_struct<Len, 0x1>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x2) aligned_struct<Len, 0x2>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x4) aligned_struct<Len, 0x4>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x8) aligned_struct<Len, 0x8>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x10) aligned_struct<Len, 0x10>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x20) aligned_struct<Len, 0x20>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x40) aligned_struct<Len, 0x40>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x80) aligned_struct<Len, 0x80>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x100) aligned_struct<Len, 0x100>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x200) aligned_struct<Len, 0x200>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x400) aligned_struct<Len, 0x400>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x800) aligned_struct<Len, 0x800>{ unsigned char data[Len];}; >template<std::size_t Len>struct alignas(0x1000) aligned_struct<Len, 0x1000>{ unsigned char data[Len];}; > > > > > >template<std::size_t Len, std::size_t Align> >union aligned_struct_wrapper >{ > typedef aligned_struct<Len, Align> aligner_t; > aligned_struct<Len, Align> aligner; > unsigned char data[Len > sizeof(aligner_t) ? Len : sizeof(aligner_t)]; >}; > >template<std::size_t Len, std::size_t Align> >struct aligned_storage_impl >{ > typedef aligned_struct_wrapper<Len, Align> type; >}; ># 1274 "/usr/include/boost/move/detail/type_traits.hpp" 3 4 >template<std::size_t Len, std::size_t Align = alignment_of<max_align_t>::value> >struct aligned_storage >{ > > static_assert(Align > 0, "Align > 0"); > > > typedef typename aligned_storage_impl<Len ? Len : 1, Align>::type type; > static const std::size_t value = alignment_of<type>::value; > static_assert(value >= Align, "value >= Align"); > static_assert((value % Align) == 0, "(value % Align) == 0"); > > > > private: > aligned_storage(); >}; > >} >} > ># 1 "/usr/include/boost/move/detail/config_end.hpp" 1 3 4 ># 1296 "/usr/include/boost/move/detail/type_traits.hpp" 2 3 4 ># 32 "/usr/include/boost/move/traits.hpp" 2 3 4 > >namespace boost { ># 44 "/usr/include/boost/move/traits.hpp" 3 4 >template <class T> >struct has_trivial_destructor_after_move > : ::boost::move_detail::is_trivially_destructible<T> >{}; > > > > > >template <class T> >struct has_nothrow_move >{ > static const bool value = boost::move_detail::is_nothrow_move_constructible<T>::value && > boost::move_detail::is_nothrow_move_assignable<T>::value; >}; > >namespace move_detail { > >template <class T> >struct is_nothrow_move_constructible_or_uncopyable >{ > > > static const bool value = is_nothrow_move_constructible<T>::value || > has_nothrow_move<T>::value || > !is_copy_constructible<T>::value; >}; > >} >} > ># 1 "/usr/include/boost/move/detail/config_end.hpp" 1 3 4 ># 76 "/usr/include/boost/move/traits.hpp" 2 3 4 ># 31 "/usr/include/boost/move/utility.hpp" 2 3 4 ># 109 "/usr/include/boost/move/utility.hpp" 3 4 > namespace boost { ># 128 "/usr/include/boost/move/utility.hpp" 3 4 > template <class T> > inline __attribute__ ((__always_inline__)) typename ::boost::move_detail::enable_if_c > < ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, T&&>::type > move_if_noexcept(T& x) noexcept > { return ::boost::move(x); } > > template <class T> > inline __attribute__ ((__always_inline__)) typename ::boost::move_detail::enable_if_c > < !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, const T&>::type > move_if_noexcept(T& x) noexcept > { return x; } > > > > } > > > > > ># 1 "/usr/include/boost/move/detail/config_end.hpp" 1 3 4 ># 149 "/usr/include/boost/move/utility.hpp" 2 3 4 ># 54 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/none.hpp" 1 3 4 ># 17 "/usr/include/boost/none.hpp" 3 4 ># 1 "/usr/include/boost/none_t.hpp" 1 3 4 ># 18 "/usr/include/boost/none_t.hpp" 3 4 >namespace boost { ># 31 "/usr/include/boost/none_t.hpp" 3 4 >struct none_t >{ > struct init_tag{}; > explicit constexpr none_t(init_tag){} >}; > > > >} ># 18 "/usr/include/boost/none.hpp" 2 3 4 > > > > > >namespace boost { ># 53 "/usr/include/boost/none.hpp" 3 4 >inline constexpr none_t none ((none_t::init_tag())); > > > >} ># 55 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/utility/compare_pointees.hpp" 1 3 4 ># 17 "/usr/include/boost/utility/compare_pointees.hpp" 3 4 >namespace boost { ># 28 "/usr/include/boost/utility/compare_pointees.hpp" 3 4 >template<class OptionalPointee> >inline >bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y ) >{ > return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ; >} > >template<class OptionalPointee> >struct equal_pointees_t >{ > typedef bool result_type; > typedef OptionalPointee first_argument_type; > typedef OptionalPointee second_argument_type; > > bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const > { return equal_pointees(x,y) ; } >} ; ># 55 "/usr/include/boost/utility/compare_pointees.hpp" 3 4 >template<class OptionalPointee> >inline >bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) >{ > return !y ? false : ( !x ? true : (*x) < (*y) ) ; >} > >template<class OptionalPointee> >struct less_pointees_t >{ > typedef bool result_type; > typedef OptionalPointee first_argument_type; > typedef OptionalPointee second_argument_type; > > bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const > { return less_pointees(x,y) ; } >} ; > >} ># 56 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/utility/result_of.hpp" 1 3 4 ># 21 "/usr/include/boost/utility/result_of.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/type_identity.hpp" 1 3 4 ># 14 "/usr/include/boost/type_traits/type_identity.hpp" 3 4 >namespace boost >{ > >template<class T> struct type_identity >{ > typedef T type; >}; > > > >template <class T> using type_identity_t = typename type_identity<T>::type; > > > > >} ># 22 "/usr/include/boost/utility/result_of.hpp" 2 3 4 ># 70 "/usr/include/boost/utility/result_of.hpp" 3 4 >namespace boost { > >template<typename F> struct result_of; >template<typename F> struct tr1_result_of; > > >namespace detail { > >typedef char result_of_yes_type; >typedef char (&result_of_no_type)[2]; > >template<class T> struct result_of_has_type {}; > >template<class T> struct result_of_has_result_type_impl >{ > template<class U> static result_of_yes_type f( result_of_has_type<typename U::result_type>* ); > template<class U> static result_of_no_type f( ... ); > > typedef boost::integral_constant<bool, sizeof(f<T>(0)) == sizeof(result_of_yes_type)> type; >}; > >template<class T> struct result_of_has_result_type: result_of_has_result_type_impl<T>::type >{ >}; ># 114 "/usr/include/boost/utility/result_of.hpp" 3 4 >template<typename F, typename FArgs, bool HasResultType> struct tr1_result_of_impl; > >template<typename F> struct cpp0x_result_of; ># 173 "/usr/include/boost/utility/result_of.hpp" 3 4 >template<typename T> >struct result_of_always_void >{ > typedef void type; >}; > >template<typename F, typename Enable = void> struct cpp0x_result_of_impl {}; > > > >template<typename F> >struct result_of_void_impl >{ > typedef void type; >}; > >template<typename R> >struct result_of_void_impl<R (*)(void)> >{ > typedef R type; >}; > >template<typename R> >struct result_of_void_impl<R (&)(void)> >{ > typedef R type; >}; > > >template<typename F, typename FArgs> >struct result_of_pointer > : tr1_result_of_impl<typename remove_cv<F>::type, FArgs, false> { }; > >template<typename F, typename FArgs> >struct tr1_result_of_impl<F, FArgs, true> >{ > typedef typename F::result_type type; >}; > >template<typename FArgs> >struct is_function_with_no_args : false_type {}; > >template<typename F> >struct is_function_with_no_args<F(void)> : true_type {}; > >template<typename F, typename FArgs> >struct result_of_nested_result : F::template result<FArgs> >{}; > >template<typename F, typename FArgs> >struct tr1_result_of_impl<F, FArgs, false> > : conditional<is_function_with_no_args<FArgs>::value, > result_of_void_impl<F>, > result_of_nested_result<F, FArgs> >::type >{}; > >} > > ># 1 "/usr/include/boost/utility/detail/result_of_variadic.hpp" 1 3 4 ># 19 "/usr/include/boost/utility/detail/result_of_variadic.hpp" 3 4 >template<typename F, typename... Args> >struct tr1_result_of<F(Args...)> > : conditional< > is_pointer<F>::value || is_member_function_pointer<F>::value > , boost::detail::tr1_result_of_impl< > typename remove_cv<F>::type, > typename remove_cv<F>::type(Args...), > (boost::detail::result_of_has_result_type<F>::value)> > , boost::detail::tr1_result_of_impl< > F, > F(Args...), > (boost::detail::result_of_has_result_type<F>::value)> >::type { }; > > >template<typename F, typename... Args> >struct result_of<F(Args...)> > : detail::cpp0x_result_of<F(Args...)> { }; ># 48 "/usr/include/boost/utility/detail/result_of_variadic.hpp" 3 4 >namespace detail { > >template<typename F, typename... Args> >struct cpp0x_result_of<F(Args...)> > : conditional< > is_member_function_pointer<F>::value > , detail::tr1_result_of_impl< > typename remove_cv<F>::type, > typename remove_cv<F>::type(Args...), false > > > , detail::cpp0x_result_of_impl< > F(Args...) > > > >::type >{}; ># 126 "/usr/include/boost/utility/detail/result_of_variadic.hpp" 3 4 >template<typename F, typename... Args> >struct cpp0x_result_of_impl<F(Args...), > typename result_of_always_void<decltype( > boost::declval<F>()( > boost::declval<Args>()... > ) > )>::type> { > typedef decltype( > boost::declval<F>()( > boost::declval<Args>()... > ) > ) type; >}; > > > >} ># 152 "/usr/include/boost/utility/detail/result_of_variadic.hpp" 3 4 >namespace detail { > >template<typename R, typename FArgs, typename... Args> >struct tr1_result_of_impl<R (*)(Args...), FArgs, false> >{ > typedef R type; >}; > >template<typename R, typename FArgs, typename... Args> >struct tr1_result_of_impl<R (&)(Args...), FArgs, false> >{ > typedef R type; >}; > >template<typename R, typename FArgs, typename C, typename... Args> >struct tr1_result_of_impl<R (C::*)(Args...), FArgs, false> >{ > typedef R type; >}; > >template<typename R, typename FArgs, typename C, typename... Args> >struct tr1_result_of_impl<R (C::*)(Args...) const, FArgs, false> >{ > typedef R type; >}; > >template<typename R, typename FArgs, typename C, typename... Args> >struct tr1_result_of_impl<R (C::*)(Args...) volatile, FArgs, false> >{ > typedef R type; >}; > >template<typename R, typename FArgs, typename C, typename... Args> >struct tr1_result_of_impl<R (C::*)(Args...) const volatile, FArgs, false> >{ > typedef R type; >}; > >} ># 233 "/usr/include/boost/utility/result_of.hpp" 2 3 4 ># 247 "/usr/include/boost/utility/result_of.hpp" 3 4 >} ># 57 "/usr/include/boost/optional/optional.hpp" 2 3 4 > ># 1 "/usr/include/boost/optional/optional_fwd.hpp" 1 3 4 ># 21 "/usr/include/boost/optional/optional_fwd.hpp" 3 4 >namespace boost { > >template<class T> class optional ; > > >template<class T> void swap ( optional<T>& , optional<T>& ) ; > >template<class T> struct optional_swap_should_use_default_constructor ; > > > >template<class T> class optional<T&> ; > >template<class T> void swap ( optional<T&>& , optional<T&>& ) noexcept; > > > >} ># 59 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/optional/detail/optional_config.hpp" 1 3 4 ># 60 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/optional/detail/optional_factory_support.hpp" 1 3 4 ># 21 "/usr/include/boost/optional/detail/optional_factory_support.hpp" 3 4 >namespace boost_optional_detail >{ > template <class T, class Factory> > inline void construct(Factory const& factory, void* address) > { > factory.template apply<T>(address); > } >} > >namespace boost >{ > class in_place_factory_base ; > class typed_in_place_factory_base ; >} ># 61 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/optional/detail/optional_aligned_storage.hpp" 1 3 4 ># 17 "/usr/include/boost/optional/detail/optional_aligned_storage.hpp" 3 4 >namespace boost { > >namespace optional_detail { > > > > >template <class T> >class aligned_storage >{ > > > union __attribute__((__may_alias__)) dummy_u > { > char data[ sizeof(T) ]; > typename type_with_alignment< > ::boost::alignment_of<T>::value >::type aligner_; > } dummy_ ; > > public: > > > void const* address() const { return &dummy_; } > void * address() { return &dummy_; } > > > > > > > > T const* ptr_ref() const > { > union { void const* ap_pvoid; T const* as_ptype; } caster = { address() }; > return caster.as_ptype; > } > T * ptr_ref() > { > union { void* ap_pvoid; T* as_ptype; } caster = { address() }; > return caster.as_ptype; > } > > > > > > T const& ref() const { return *ptr_ref(); } > T & ref() { return *ptr_ref(); } > >} ; > >} >} ># 62 "/usr/include/boost/optional/optional.hpp" 2 3 4 > >namespace boost { namespace optional_detail { > >template <typename T> >struct optional_value_type >{ >}; > >template <typename T> >struct optional_value_type< ::boost::optional<T> > >{ > typedef T type; >}; > >}} > > > > >namespace boost { > >namespace optional_ns { > > >struct in_place_init_t >{ > struct init_tag{}; > explicit in_place_init_t(init_tag){} >}; >const in_place_init_t in_place_init ((in_place_init_t::init_tag())); > > >struct in_place_init_if_t >{ > struct init_tag{}; > explicit in_place_init_if_t(init_tag){} >}; >const in_place_init_if_t in_place_init_if ((in_place_init_if_t::init_tag())); > >} > >using optional_ns::in_place_init_t; >using optional_ns::in_place_init; >using optional_ns::in_place_init_if_t; >using optional_ns::in_place_init_if; > >namespace optional_detail { > >struct init_value_tag {}; > >struct optional_tag {}; > > >template<class T> >class optional_base : public optional_tag >{ > private : > > typedef aligned_storage<T> storage_type ; > typedef optional_base<T> this_type ; > > protected : > > typedef T value_type ; > > protected: > typedef T & reference_type ; > typedef T const& reference_const_type ; > > typedef T && rval_reference_type ; > typedef T && reference_type_of_temporary_wrapper ; > > typedef T * pointer_type ; > typedef T const* pointer_const_type ; > typedef T const& argument_type ; > > > > optional_base() > : > m_initialized(false) {} > > > > optional_base ( none_t ) > : > m_initialized(false) {} > > > > optional_base ( init_value_tag, argument_type val ) > : > m_initialized(false) > { > construct(val); > } > > > > > optional_base ( init_value_tag, rval_reference_type val ) > : > m_initialized(false) > { > construct( boost::move(val) ); > } > > > > > optional_base ( bool cond, argument_type val ) > : > m_initialized(false) > { > if ( cond ) > construct(val); > } > > > > > optional_base ( bool cond, rval_reference_type val ) > : > m_initialized(false) > { > if ( cond ) > construct(boost::move(val)); > } > > > > > optional_base ( optional_base const& rhs ) > : > m_initialized(false) > { > if ( rhs.is_initialized() ) > construct(rhs.get_impl()); > } > > > > > optional_base ( optional_base&& rhs ) > noexcept((::boost::is_nothrow_move_constructible<T>::value)) > : > m_initialized(false) > { > if ( rhs.is_initialized() ) > construct( boost::move(rhs.get_impl()) ); > } > > > > > template<class Expr, class PtrExpr> > explicit optional_base ( Expr&& expr, PtrExpr const* tag ) > : > m_initialized(false) > { > construct(boost::forward<Expr>(expr),tag); > } ># 239 "/usr/include/boost/optional/optional.hpp" 3 4 > optional_base& operator= ( optional_base const& rhs ) > { > this->assign(rhs); > return *this; > } > > > optional_base& operator= ( optional_base && rhs ) > noexcept((::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)) > { > this->assign(static_cast<optional_base&&>(rhs)); > return *this; > } > > > > ~optional_base() { destroy() ; } > > > void assign ( optional_base const& rhs ) > { > if (is_initialized()) > { > if ( rhs.is_initialized() ) > assign_value(rhs.get_impl()); > else destroy(); > } > else > { > if ( rhs.is_initialized() ) > construct(rhs.get_impl()); > } > } > > > > void assign ( optional_base&& rhs ) > { > if (is_initialized()) > { > if ( rhs.is_initialized() ) > assign_value( boost::move(rhs.get_impl()) ); > else destroy(); > } > else > { > if ( rhs.is_initialized() ) > construct(boost::move(rhs.get_impl())); > } > } > > > > template<class U> > void assign ( optional<U> const& rhs ) > { > if (is_initialized()) > { > if ( rhs.is_initialized() ) > > assign_value( rhs.get() ); > > > > > else destroy(); > } > else > { > if ( rhs.is_initialized() ) > > construct(rhs.get()); > > > > } > } > > > > template<class U> > void assign ( optional<U>&& rhs ) > { > typedef typename optional<U>::rval_reference_type ref_type; > if (is_initialized()) > { > if ( rhs.is_initialized() ) > assign_value( static_cast<ref_type>(rhs.get()) ); > else destroy(); > } > else > { > if ( rhs.is_initialized() ) > construct(static_cast<ref_type>(rhs.get())); > } > } > > > > void assign ( argument_type val ) > { > if (is_initialized()) > assign_value(val); > else construct(val); > } > > > > void assign ( rval_reference_type val ) > { > if (is_initialized()) > assign_value( boost::move(val) ); > else construct( boost::move(val) ); > } > > > > > void assign ( none_t ) noexcept { destroy(); } > > > > > template<class Expr, class ExprPtr> > void assign_expr ( Expr&& expr, ExprPtr const* tag ) > { > if (is_initialized()) > assign_expr_to_initialized(boost::forward<Expr>(expr),tag); > else construct(boost::forward<Expr>(expr),tag); > } ># 381 "/usr/include/boost/optional/optional.hpp" 3 4 > public : > > > > void reset() noexcept { destroy(); } > > > void reset ( argument_type val ) { assign(val); } > > > > > pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; } > pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; } > > bool is_initialized() const noexcept { return m_initialized ; } > > protected : > > void construct ( argument_type val ) > { > ::new (m_storage.address()) value_type(val) ; > m_initialized = true ; > } > > > void construct ( rval_reference_type val ) > { > ::new (m_storage.address()) value_type( boost::move(val) ) ; > m_initialized = true ; > } > > > > > > > template<class... Args> > void construct ( in_place_init_t, Args&&... args ) > { > ::new (m_storage.address()) value_type( boost::forward<Args>(args)... ) ; > m_initialized = true ; > } > > template<class... Args> > void emplace_assign ( Args&&... args ) > { > destroy(); > construct(in_place_init, boost::forward<Args>(args)...); > } > > template<class... Args> > explicit optional_base ( in_place_init_t, Args&&... args ) > : > m_initialized(false) > { > construct(in_place_init, boost::forward<Args>(args)...); > } > > template<class... Args> > explicit optional_base ( in_place_init_if_t, bool cond, Args&&... args ) > : > m_initialized(false) > { > if ( cond ) > construct(in_place_init, boost::forward<Args>(args)...); > } ># 597 "/usr/include/boost/optional/optional.hpp" 3 4 > template<class Expr> > void construct ( Expr&& factory, in_place_factory_base const* ) > { > boost_optional_detail::construct<value_type>(factory, m_storage.address()); > m_initialized = true ; > } > > > template<class Expr> > void construct ( Expr&& factory, typed_in_place_factory_base const* ) > { > factory.apply(m_storage.address()) ; > m_initialized = true ; > } > > template<class Expr> > void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag ) > { > destroy(); > construct(factory,tag); > } > > > template<class Expr> > void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag ) > { > destroy(); > construct(factory,tag); > } ># 667 "/usr/include/boost/optional/optional.hpp" 3 4 > template<class Expr> > void construct ( Expr&& expr, void const* ) > { > new (m_storage.address()) value_type(boost::forward<Expr>(expr)) ; > m_initialized = true ; > } > > > > > > template<class Expr> > void assign_expr_to_initialized ( Expr&& expr, void const* ) > { > assign_value( boost::forward<Expr>(expr) ); > } ># 749 "/usr/include/boost/optional/optional.hpp" 3 4 > void assign_value ( argument_type val ) { get_impl() = val; } > > void assign_value ( rval_reference_type val ) { get_impl() = static_cast<rval_reference_type>(val); } > > > void destroy() > { > if ( m_initialized ) > destroy_impl() ; > } > > reference_const_type get_impl() const { return m_storage.ref() ; } > reference_type get_impl() { return m_storage.ref() ; } > > pointer_const_type get_ptr_impl() const { return m_storage.ptr_ref(); } > pointer_type get_ptr_impl() { return m_storage.ptr_ref(); } > > private : > > > > > void destroy_impl ( ) { m_storage.ref().T::~T() ; m_initialized = false ; } > > > bool m_initialized ; > storage_type m_storage ; >} ; > ># 1 "/usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp" 1 3 4 > > >template<class T> >class tc_optional_base : public optional_tag >{ > private : > > typedef tc_optional_base<T> this_type ; > > protected : > > typedef T value_type ; > > protected: > typedef T & reference_type ; > typedef T const& reference_const_type ; > > typedef T && rval_reference_type ; > typedef T && reference_type_of_temporary_wrapper ; > > typedef T * pointer_type ; > typedef T const* pointer_const_type ; > typedef T const& argument_type ; > > tc_optional_base() > : > m_initialized(false) {} > > tc_optional_base ( none_t ) > : > m_initialized(false) {} > > tc_optional_base ( init_value_tag, argument_type val ) > : > m_initialized(true), m_storage(val) {} > > tc_optional_base ( bool cond, argument_type val ) > : > m_initialized(cond), m_storage(val) {} > > > > > > > template<class Expr, class PtrExpr> > explicit tc_optional_base ( Expr&& expr, PtrExpr const* tag ) > : > m_initialized(false) > { > construct(boost::forward<Expr>(expr),tag); > } ># 72 "/usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp" 3 4 > void assign ( tc_optional_base const& rhs ) > { > *this = rhs; > } > > > template<class U> > void assign ( optional<U> const& rhs ) > { > if ( rhs.is_initialized() ) > > m_storage = rhs.get(); > > > > > m_initialized = rhs.is_initialized(); > } > > > > template<class U> > void assign ( optional<U>&& rhs ) > { > typedef typename optional<U>::rval_reference_type ref_type; > if ( rhs.is_initialized() ) > m_storage = static_cast<ref_type>(rhs.get()); > m_initialized = rhs.is_initialized(); > } > > > void assign ( argument_type val ) > { > construct(val); > } > > void assign ( none_t ) { destroy(); } > > > > > template<class Expr, class ExprPtr> > void assign_expr ( Expr&& expr, ExprPtr const* tag ) > { > construct(boost::forward<Expr>(expr),tag); > } ># 128 "/usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp" 3 4 > public : > > > > void reset() noexcept { destroy(); } > > > void reset ( argument_type val ) noexcept { assign(val); } > > > > > pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; } > pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; } > > bool is_initialized() const { return m_initialized ; } > > protected : > > void construct ( argument_type val ) > { > m_storage = val ; > m_initialized = true ; > } > > > > > > template<class... Args> > void construct ( in_place_init_t, Args&&... args ) > { > m_storage = value_type( boost::forward<Args>(args)... ) ; > m_initialized = true ; > } > > template<class... Args> > void emplace_assign ( Args&&... args ) > { > construct(in_place_init, boost::forward<Args>(args)...); > } > > template<class... Args> > explicit tc_optional_base ( in_place_init_t, Args&&... args ) > : > m_initialized(false) > { > construct(in_place_init, boost::forward<Args>(args)...); > } > > template<class... Args> > explicit tc_optional_base ( in_place_init_if_t, bool cond, Args&&... args ) > : > m_initialized(false) > { > if ( cond ) > construct(in_place_init, boost::forward<Args>(args)...); > } ># 327 "/usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp" 3 4 > template<class Expr> > void construct ( Expr&& factory, in_place_factory_base const* ) > { > boost_optional_detail::construct<value_type>(factory, boost::addressof(m_storage)); > m_initialized = true ; > } > > > template<class Expr> > void construct ( Expr&& factory, typed_in_place_factory_base const* ) > { > factory.apply(boost::addressof(m_storage)) ; > m_initialized = true ; > } > > template<class Expr> > void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag ) > { > destroy(); > construct(factory,tag); > } > > > template<class Expr> > void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag ) > { > destroy(); > construct(factory,tag); > } ># 397 "/usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp" 3 4 > template<class Expr> > void construct ( Expr&& expr, void const* ) > { > m_storage = value_type(boost::forward<Expr>(expr)) ; > m_initialized = true ; > } > > > > > > template<class Expr> > void assign_expr_to_initialized ( Expr&& expr, void const* ) > { > assign_value( boost::forward<Expr>(expr) ); > } ># 479 "/usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp" 3 4 > void assign_value ( argument_type val ) { m_storage = val; } > > void assign_value ( rval_reference_type val ) { m_storage = static_cast<rval_reference_type>(val); } > > > void destroy() > { > m_initialized = false; > } > > reference_const_type get_impl() const { return m_storage ; } > reference_type get_impl() { return m_storage ; } > > pointer_const_type get_ptr_impl() const { return boost::addressof(m_storage); } > pointer_type get_ptr_impl() { return boost::addressof(m_storage); } > > private : > > bool m_initialized ; > T m_storage ; >} ; ># 779 "/usr/include/boost/optional/optional.hpp" 2 3 4 > > >template <typename U> >struct is_optional_related > : boost::conditional< boost::is_base_of<optional_detail::optional_tag, typename boost::decay<U>::type>::value > || boost::is_same<typename boost::decay<U>::type, none_t>::value > || boost::is_same<typename boost::decay<U>::type, in_place_init_t>::value > || boost::is_same<typename boost::decay<U>::type, in_place_init_if_t>::value, > boost::true_type, boost::false_type>::type >{}; > > > >template <typename T, typename U> >struct is_convertible_to_T_or_factory > : boost::conditional< boost::is_base_of<boost::in_place_factory_base, typename boost::decay<U>::type>::value > || boost::is_base_of<boost::typed_in_place_factory_base, typename boost::decay<U>::type>::value > || (boost::is_constructible<T, U&&>::value && !boost::is_same<T, typename boost::decay<U>::type>::value) > , boost::true_type, boost::false_type>::type >{}; > >template <typename T, typename U> >struct is_optional_constructible : boost::is_constructible<T, U> >{}; ># 816 "/usr/include/boost/optional/optional.hpp" 3 4 >template <typename T, typename U, bool = is_optional_related<U>::value> >struct is_optional_val_init_candidate > : boost::false_type >{}; > >template <typename T, typename U> >struct is_optional_val_init_candidate<T, U, false> > : boost::conditional< is_convertible_to_T_or_factory<T, U>::value > , boost::true_type, boost::false_type>::type >{}; > >} > >namespace optional_config { > >template <typename T> >struct optional_uses_direct_storage_for > : boost::conditional<(boost::is_scalar<T>::value && !boost::is_const<T>::value && !boost::is_volatile<T>::value) > , boost::true_type, boost::false_type>::type >{}; > >} ># 849 "/usr/include/boost/optional/optional.hpp" 3 4 >template<class T> >class optional > : public boost::conditional< optional_config::optional_uses_direct_storage_for<T>::value, optional_detail::tc_optional_base<T>, optional_detail::optional_base<T> >::type >{ > typedef typename boost::conditional< optional_config::optional_uses_direct_storage_for<T>::value, optional_detail::tc_optional_base<T>, optional_detail::optional_base<T> >::type base ; > > public : > > typedef optional<T> this_type ; > > typedef typename base::value_type value_type ; > typedef typename base::reference_type reference_type ; > typedef typename base::reference_const_type reference_const_type ; > > typedef typename base::rval_reference_type rval_reference_type ; > typedef typename base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ; > > typedef typename base::pointer_type pointer_type ; > typedef typename base::pointer_const_type pointer_const_type ; > typedef typename base::argument_type argument_type ; > > > > optional() noexcept : base() {} > > > > optional( none_t none_ ) noexcept : base(none_) {} > > > > optional ( argument_type val ) : base(optional_detail::init_value_tag(), val) {} > > > > > optional ( rval_reference_type val ) : base(optional_detail::init_value_tag(), boost::forward<T>(val)) > {} > > > > > optional ( bool cond, argument_type val ) : base(cond,val) {} > > > > > optional ( bool cond, rval_reference_type val ) : base( cond, boost::forward<T>(val) ) > {} > > > > > > > > template<class U> > explicit optional ( optional<U> const& rhs > > ,typename boost::enable_if< optional_detail::is_optional_constructible<T, U const&>, bool>::type = true > > ) > : > base() > { > if ( rhs.is_initialized() ) > this->construct(rhs.get()); > } > > > > > > template<class U> > explicit optional ( optional<U> && rhs > > ,typename boost::enable_if< optional_detail::is_optional_constructible<T, U>, bool>::type = true > > ) > : > base() > { > if ( rhs.is_initialized() ) > this->construct( boost::move(rhs.get()) ); > } ># 949 "/usr/include/boost/optional/optional.hpp" 3 4 > template<class Expr> > explicit optional ( Expr&& expr, > typename boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr>, bool>::type = true > ) > : base(boost::forward<Expr>(expr),boost::addressof(expr)) > {} ># 965 "/usr/include/boost/optional/optional.hpp" 3 4 > optional ( optional const& ) = default; ># 975 "/usr/include/boost/optional/optional.hpp" 3 4 > optional ( optional && ) = default; ># 996 "/usr/include/boost/optional/optional.hpp" 3 4 > template<class Expr> > typename boost::enable_if<optional_detail::is_optional_val_init_candidate<T, Expr>, optional&>::type > operator= ( Expr&& expr ) > { > this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr)); > return *this ; > } ># 1017 "/usr/include/boost/optional/optional.hpp" 3 4 > template<class U> > optional& operator= ( optional<U> const& rhs ) > { > this->assign(rhs); > return *this ; > } > > > > > > template<class U> > optional& operator= ( optional<U> && rhs ) > { > this->assign(boost::move(rhs)); > return *this ; > } > > > > > > > optional& operator= ( optional const& rhs ) = default; ># 1052 "/usr/include/boost/optional/optional.hpp" 3 4 > optional& operator= ( optional && ) = default; ># 1067 "/usr/include/boost/optional/optional.hpp" 3 4 > template <typename T_> > typename boost::enable_if<boost::is_same<T, typename boost::decay<T_>::type>, optional&>::type > operator= ( T_&& val ) > { > this->assign( boost::forward<T_>(val) ) ; > return *this ; > } ># 1099 "/usr/include/boost/optional/optional.hpp" 3 4 > optional& operator= ( none_t none_ ) noexcept > { > this->assign( none_ ) ; > return *this ; > } > > > > > template<class... Args> > void emplace ( Args&&... args ) > { > this->emplace_assign( boost::forward<Args>(args)... ); > } > > template<class... Args> > explicit optional ( in_place_init_t, Args&&... args ) > : base( in_place_init, boost::forward<Args>(args)... ) > {} > > template<class... Args> > explicit optional ( in_place_init_if_t, bool cond, Args&&... args ) > : base( in_place_init_if, cond, boost::forward<Args>(args)... ) > {} ># 1200 "/usr/include/boost/optional/optional.hpp" 3 4 > void swap( optional & arg ) > noexcept((::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)) > { > > boost::swap(*this, arg); > } > > > > > > reference_const_type get() const { (static_cast <bool> (this->is_initialized()) ? void (0) : __assert_fail ("this->is_initialized()", "/usr/include/boost/optional/optional.hpp", 1211, __extension__ __PRETTY_FUNCTION__)) ; return this->get_impl(); } > reference_type get() { (static_cast <bool> (this->is_initialized()) ? void (0) : __assert_fail ("this->is_initialized()", "/usr/include/boost/optional/optional.hpp", 1212, __extension__ __PRETTY_FUNCTION__)) ; return this->get_impl(); } > > > reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; } > reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; } > > > > > pointer_const_type operator->() const { (static_cast <bool> (this->is_initialized()) ? void (0) : __assert_fail ("this->is_initialized()", "/usr/include/boost/optional/optional.hpp", 1221, __extension__ __PRETTY_FUNCTION__)) ; return this->get_ptr_impl() ; } > pointer_type operator->() { (static_cast <bool> (this->is_initialized()) ? void (0) : __assert_fail ("this->is_initialized()", "/usr/include/boost/optional/optional.hpp", 1222, __extension__ __PRETTY_FUNCTION__)) ; return this->get_ptr_impl() ; } > > > > > > reference_const_type operator *() const& { return this->get() ; } > reference_type operator *() & { return this->get() ; } > reference_type_of_temporary_wrapper operator *() && { return boost::move(this->get()) ; } > > > > > > > reference_const_type value() const& > { > if (this->is_initialized()) > return this->get() ; > else > throw_exception(bad_optional_access()); > } > > reference_type value() & > { > if (this->is_initialized()) > return this->get() ; > else > throw_exception(bad_optional_access()); > } > > reference_type_of_temporary_wrapper value() && > { > if (this->is_initialized()) > return boost::move(this->get()) ; > else > throw_exception(bad_optional_access()); > } ># 1281 "/usr/include/boost/optional/optional.hpp" 3 4 > template <class U> > value_type value_or ( U&& v ) const& > { > if (this->is_initialized()) > return get(); > else > return boost::forward<U>(v); > } > > template <class U> > value_type value_or ( U&& v ) && > { > if (this->is_initialized()) > return boost::move(get()); > else > return boost::forward<U>(v); > } ># 1329 "/usr/include/boost/optional/optional.hpp" 3 4 > template <typename F> > value_type value_or_eval ( F f ) const& > { > if (this->is_initialized()) > return get(); > else > return f(); > } > > template <typename F> > value_type value_or_eval ( F f ) && > { > if (this->is_initialized()) > return boost::move(get()); > else > return f(); > } > > template <typename F> > optional<typename boost::result_of<F(reference_type)>::type> map(F f) & > { > if (this->has_value()) > return f(get()); > else > return none; > } > > template <typename F> > optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const& > { > if (this->has_value()) > return f(get()); > else > return none; > } > > template <typename F> > optional<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type> map(F f) && > { > if (this->has_value()) > return f(boost::move(this->get())); > else > return none; > } > > template <typename F> > optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f) & > { > if (this->has_value()) > return f(get()); > else > return none; > } > > template <typename F> > optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const& > { > if (this->has_value()) > return f(get()); > else > return none; > } > > template <typename F> > optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type>::type> flat_map(F f) && > { > if (this->has_value()) > return f(boost::move(get())); > else > return none; > } ># 1449 "/usr/include/boost/optional/optional.hpp" 3 4 > bool has_value() const noexcept { return this->is_initialized() ; } > > bool operator!() const noexcept { return !this->is_initialized() ; } > > inline __attribute__ ((__always_inline__)) explicit operator bool () const noexcept { return !this->operator! (); } >} ; > >} > > > >namespace boost { > > >template<class T> >class optional<T&&> >{ > static_assert(sizeof(T) == 0, "Optional rvalue references are illegal."); >} ; > > >} > > ># 1 "/usr/include/boost/optional/detail/optional_reference_spec.hpp" 1 3 4 ># 22 "/usr/include/boost/optional/detail/optional_reference_spec.hpp" 3 4 >namespace boost { > >namespace detail { > > > >template <class From> >void prevent_binding_rvalue() >{ > > static_assert(boost::is_lvalue_reference<From>::value, "binding rvalue references to optional lvalue references is disallowed") > ; > >} > >template <class T> >typename boost::remove_reference<T>::type& forward_reference(T&& r) >{ > static_assert(boost::is_lvalue_reference<T>::value, "binding rvalue references to optional lvalue references is disallowed") > ; > return boost::forward<T>(r); >} > > > > >template <class T> >struct is_const_integral >{ > static const bool value = boost::is_const<T>::value && boost::is_integral<T>::value; >}; > >template <class T> >struct is_const_integral_bad_for_conversion >{ > > > > static const bool value = false; > >}; > >template <class From> >void prevent_assignment_from_false_const_integral() >{ ># 75 "/usr/include/boost/optional/detail/optional_reference_spec.hpp" 3 4 >} > > >template <class T> >struct is_optional_ >{ > static const bool value = false; >}; > >template <class U> >struct is_optional_< ::boost::optional<U> > >{ > static const bool value = true; >}; > >template <class T> >struct is_no_optional >{ > static const bool value = !is_optional_<typename boost::decay<T>::type>::value; >}; > > >template <class T, class U> > struct is_same_decayed > { > static const bool value = ::boost::is_same<T, typename ::boost::remove_reference<U>::type>::value > || ::boost::is_same<T, const typename ::boost::remove_reference<U>::type>::value; > }; > >template <class T, class U> >struct no_unboxing_cond >{ > static const bool value = is_no_optional<U>::value && !is_same_decayed<T, U>::value; >}; > > >} > >template <class T> >class optional<T&> : public optional_detail::optional_tag >{ > T* ptr_; > >public: > typedef T& value_type; > typedef T& reference_type; > typedef T& reference_const_type; > typedef T& rval_reference_type; > typedef T* pointer_type; > typedef T* pointer_const_type; > > optional() noexcept : ptr_() {} > optional(none_t) noexcept : ptr_() {} > > template <class U> > explicit optional(const optional<U&>& rhs) noexcept : ptr_(rhs.get_ptr()) {} > optional(const optional& rhs) noexcept : ptr_(rhs.get_ptr()) {} > > > template <class U> > explicit optional(U& rhs, typename boost::enable_if_c<detail::is_same_decayed<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value, bool>::type = true) noexcept > : ptr_(boost::addressof(rhs)) {} > > template <class U> > optional(U& rhs, typename boost::enable_if_c<detail::is_same_decayed<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value, bool>::type = true) noexcept > : ptr_(boost::addressof(rhs)) {} > > optional& operator=(const optional& rhs) noexcept { ptr_ = rhs.get_ptr(); return *this; } > template <class U> > optional& operator=(const optional<U&>& rhs) noexcept { ptr_ = rhs.get_ptr(); return *this; } > optional& operator=(none_t) noexcept { ptr_ = 0; return *this; } > > > void swap(optional& rhs) noexcept { std::swap(ptr_, rhs.ptr_); } > T& get() const { (static_cast <bool> (ptr_) ? void (0) : __assert_fail ("ptr_", "/usr/include/boost/optional/detail/optional_reference_spec.hpp", 149, __extension__ __PRETTY_FUNCTION__)); return *ptr_; } > > T* get_ptr() const noexcept { return ptr_; } > T* operator->() const { (static_cast <bool> (ptr_) ? void (0) : __assert_fail ("ptr_", "/usr/include/boost/optional/detail/optional_reference_spec.hpp", 152, __extension__ __PRETTY_FUNCTION__)); return ptr_; } > T& operator*() const { (static_cast <bool> (ptr_) ? void (0) : __assert_fail ("ptr_", "/usr/include/boost/optional/detail/optional_reference_spec.hpp", 153, __extension__ __PRETTY_FUNCTION__)); return *ptr_; } > > T& value() const > { > if (this->is_initialized()) > return this->get(); > else > throw_exception(bad_optional_access()); > } > > bool operator!() const noexcept { return ptr_ == 0; } > inline __attribute__ ((__always_inline__)) explicit operator bool () const noexcept { return !this->operator! (); } > > void reset() noexcept { ptr_ = 0; } > > bool is_initialized() const noexcept { return ptr_ != 0; } > bool has_value() const noexcept { return ptr_ != 0; } > > template <typename F> > optional<typename boost::result_of<F(T&)>::type> map(F f) const > { > if (this->has_value()) > return f(this->get()); > else > return none; > } > > template <typename F> > optional<typename optional_detail::optional_value_type<typename boost::result_of<F(T&)>::type>::type> flat_map(F f) const > { > if (this->has_value()) > return f(get()); > else > return none; > } > > > > optional(T&& ) noexcept { detail::prevent_binding_rvalue<T&&>(); } > > template <class R> > optional(R&& r, typename boost::enable_if<detail::no_unboxing_cond<T, R>, bool>::type = true) noexcept > : ptr_(boost::addressof(r)) { detail::prevent_binding_rvalue<R>(); } > > template <class R> > optional(bool cond, R&& r, typename boost::enable_if<detail::is_no_optional<R>, bool>::type = true) noexcept > : ptr_(cond ? boost::addressof(r) : 0) { detail::prevent_binding_rvalue<R>(); } > > template <class R> > typename boost::enable_if<detail::is_no_optional<R>, optional<T&>&>::type > operator=(R&& r) noexcept { detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); return *this; } > > template <class R> > void emplace(R&& r, typename boost::enable_if<detail::is_no_optional<R>, bool>::type = true) noexcept > { detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); } > > template <class R> > T& get_value_or(R&& r, typename boost::enable_if<detail::is_no_optional<R>, bool>::type = true) const noexcept > { detail::prevent_binding_rvalue<R>(); return ptr_ ? *ptr_ : r; } > > template <class R> > T& value_or(R&& r, typename boost::enable_if<detail::is_no_optional<R>, bool>::type = true) const noexcept > { detail::prevent_binding_rvalue<R>(); return ptr_ ? *ptr_ : r; } > > template <class R> > void reset(R&& r, typename boost::enable_if<detail::is_no_optional<R>, bool>::type = true) noexcept > { detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); } > > template <class F> > T& value_or_eval(F f) const { return ptr_ ? *ptr_ : detail::forward_reference(f()); } ># 267 "/usr/include/boost/optional/detail/optional_reference_spec.hpp" 3 4 >}; > >template <class T> > void swap ( optional<T&>& x, optional<T&>& y) noexcept >{ > x.swap(y); >} > >} ># 1474 "/usr/include/boost/optional/optional.hpp" 2 3 4 > > >namespace boost { > > > >template<class T> >inline >optional<typename boost::decay<T>::type> make_optional ( T && v ) >{ > return optional<typename boost::decay<T>::type>(boost::forward<T>(v)); >} > > >template<class T> >inline >optional<typename boost::decay<T>::type> make_optional ( bool cond, T && v ) >{ > return optional<typename boost::decay<T>::type>(cond,boost::forward<T>(v)); >} ># 1517 "/usr/include/boost/optional/optional.hpp" 3 4 >template<class T> >inline >typename optional<T>::reference_const_type >get ( optional<T> const& opt ) >{ > return opt.get() ; >} > >template<class T> >inline >typename optional<T>::reference_type >get ( optional<T>& opt ) >{ > return opt.get() ; >} > > > >template<class T> >inline >typename optional<T>::pointer_const_type >get ( optional<T> const* opt ) >{ > return opt->get_ptr() ; >} > >template<class T> >inline >typename optional<T>::pointer_type >get ( optional<T>* opt ) >{ > return opt->get_ptr() ; >} > > > >template<class T> >inline >typename optional<T>::reference_const_type >get_optional_value_or ( optional<T> const& opt, typename optional<T>::reference_const_type v ) >{ > return opt.get_value_or(v) ; >} > >template<class T> >inline >typename optional<T>::reference_type >get_optional_value_or ( optional<T>& opt, typename optional<T>::reference_type v ) >{ > return opt.get_value_or(v) ; >} > > > >template<class T> >inline >typename optional<T>::pointer_const_type >get_pointer ( optional<T> const& opt ) >{ > return opt.get_ptr() ; >} > >template<class T> >inline >typename optional<T>::pointer_type >get_pointer ( optional<T>& opt ) >{ > return opt.get_ptr() ; >} > >} > >namespace boost { > > >template<class CharType, class CharTrait> >std::basic_ostream<CharType, CharTrait>& >operator<<(std::basic_ostream<CharType, CharTrait>& os, optional_detail::optional_tag const&) >{ > static_assert(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>"); > return os; >} > >} > ># 1 "/usr/include/boost/optional/detail/optional_relops.hpp" 1 3 4 ># 16 "/usr/include/boost/optional/detail/optional_relops.hpp" 3 4 >namespace boost { ># 26 "/usr/include/boost/optional/detail/optional_relops.hpp" 3 4 >template<class T> >inline >bool operator == ( optional<T> const& x, optional<T> const& y ) >{ return bool(x) && bool(y) ? *x == *y : bool(x) == bool(y); } > >template<class T> >inline >bool operator < ( optional<T> const& x, optional<T> const& y ) >{ return less_pointees(x,y); } > >template<class T> >inline >bool operator != ( optional<T> const& x, optional<T> const& y ) >{ return !( x == y ) ; } > >template<class T> >inline >bool operator > ( optional<T> const& x, optional<T> const& y ) >{ return y < x ; } > >template<class T> >inline >bool operator <= ( optional<T> const& x, optional<T> const& y ) >{ return !( y < x ) ; } > >template<class T> >inline >bool operator >= ( optional<T> const& x, optional<T> const& y ) >{ return !( x < y ) ; } > > > > > >template<class T> >inline >bool operator == ( optional<T> const& x, T const& y ) >{ return equal_pointees(x, optional<T>(y)); } > >template<class T> >inline >bool operator < ( optional<T> const& x, T const& y ) >{ return less_pointees(x, optional<T>(y)); } > >template<class T> >inline >bool operator != ( optional<T> const& x, T const& y ) >{ return !( x == y ) ; } > >template<class T> >inline >bool operator > ( optional<T> const& x, T const& y ) >{ return y < x ; } > >template<class T> >inline >bool operator <= ( optional<T> const& x, T const& y ) >{ return !( y < x ) ; } > >template<class T> >inline >bool operator >= ( optional<T> const& x, T const& y ) >{ return !( x < y ) ; } > > > > > >template<class T> >inline >bool operator == ( T const& x, optional<T> const& y ) >{ return equal_pointees( optional<T>(x), y ); } > >template<class T> >inline >bool operator < ( T const& x, optional<T> const& y ) >{ return less_pointees( optional<T>(x), y ); } > >template<class T> >inline >bool operator != ( T const& x, optional<T> const& y ) >{ return !( x == y ) ; } > >template<class T> >inline >bool operator > ( T const& x, optional<T> const& y ) >{ return y < x ; } > >template<class T> >inline >bool operator <= ( T const& x, optional<T> const& y ) >{ return !( y < x ) ; } > >template<class T> >inline >bool operator >= ( T const& x, optional<T> const& y ) >{ return !( x < y ) ; } > > > > > > >template<class T> >inline >bool operator == ( optional<T> const& x, none_t ) noexcept >{ return !x; } > >template<class T> >inline >bool operator < ( optional<T> const& x, none_t ) >{ return less_pointees(x,optional<T>() ); } > >template<class T> >inline >bool operator != ( optional<T> const& x, none_t ) noexcept >{ return bool(x); } > >template<class T> >inline >bool operator > ( optional<T> const& x, none_t y ) >{ return y < x ; } > >template<class T> >inline >bool operator <= ( optional<T> const& x, none_t y ) >{ return !( y < x ) ; } > >template<class T> >inline >bool operator >= ( optional<T> const& x, none_t y ) >{ return !( x < y ) ; } > > > > > >template<class T> >inline >bool operator == ( none_t , optional<T> const& y ) noexcept >{ return !y; } > >template<class T> >inline >bool operator < ( none_t , optional<T> const& y ) >{ return less_pointees(optional<T>() ,y); } > >template<class T> >inline >bool operator != ( none_t, optional<T> const& y ) noexcept >{ return bool(y); } > >template<class T> >inline >bool operator > ( none_t x, optional<T> const& y ) >{ return y < x ; } > >template<class T> >inline >bool operator <= ( none_t x, optional<T> const& y ) >{ return !( y < x ) ; } > >template<class T> >inline >bool operator >= ( none_t x, optional<T> const& y ) >{ return !( x < y ) ; } > >} ># 1603 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 1 "/usr/include/boost/optional/detail/optional_swap.hpp" 1 3 4 ># 19 "/usr/include/boost/optional/detail/optional_swap.hpp" 3 4 >namespace boost { > >namespace optional_detail { > >template <bool use_default_constructor> struct swap_selector; > >template <> >struct swap_selector<true> >{ > template <class T> > static void optional_swap ( optional<T>& x, optional<T>& y ) > { > const bool hasX = !!x; > const bool hasY = !!y; > > if ( !hasX && !hasY ) > return; > > if( !hasX ) > x.emplace(); > else if ( !hasY ) > y.emplace(); > > > boost::swap(x.get(), y.get()); > > if( !hasX ) > y = boost::none ; > else if( !hasY ) > x = boost::none ; > } >}; ># 62 "/usr/include/boost/optional/detail/optional_swap.hpp" 3 4 >template <> >struct swap_selector<false> >{ > template <class T> > static void optional_swap ( optional<T>& x, optional<T>& y ) > > { > if (x) > { > if (y) > { > boost::swap(*x, *y); > } > else > { > y = boost::move(*x); > x = boost::none; > } > } > else > { > if (y) > { > x = boost::move(*y); > y = boost::none; > } > } > } >}; > >} > > > >template<class T> >struct optional_swap_should_use_default_constructor : boost::false_type {} ; ># 106 "/usr/include/boost/optional/detail/optional_swap.hpp" 3 4 >template <class T> >inline void swap ( optional<T>& x, optional<T>& y ) > >{ > optional_detail::swap_selector<optional_swap_should_use_default_constructor<T>::value>::optional_swap(x, y); >} > >} ># 1604 "/usr/include/boost/optional/optional.hpp" 2 3 4 ># 16 "/usr/include/boost/optional.hpp" 2 3 4 ># 22 "/usr/include/boost/format/internals.hpp" 2 3 4 ># 1 "/usr/include/boost/limits.hpp" 1 3 4 ># 23 "/usr/include/boost/format/internals.hpp" 2 3 4 > ># 1 "/usr/include/boost/format/alt_sstream.hpp" 1 3 4 ># 19 "/usr/include/boost/format/alt_sstream.hpp" 3 4 ># 1 "/usr/include/boost/core/allocator_access.hpp" 1 3 4 ># 13 "/usr/include/boost/core/allocator_access.hpp" 3 4 ># 1 "/usr/include/boost/core/pointer_traits.hpp" 1 3 4 ># 19 "/usr/include/boost/core/pointer_traits.hpp" 3 4 >namespace boost { > > >template<class T> >struct pointer_traits > : std::pointer_traits<T> { > template<class U> > struct rebind_to { > typedef typename std::pointer_traits<T>::template rebind<U> type; > }; >}; > >template<class T> >struct pointer_traits<T*> > : std::pointer_traits<T*> { > template<class U> > struct rebind_to { > typedef U* type; > }; >}; ># 183 "/usr/include/boost/core/pointer_traits.hpp" 3 4 >template<class T> >constexpr inline T* >to_address(T* v) noexcept >{ > return v; >} > > >namespace detail { > >template<class T> >inline T* >ptr_address(T* v, int) noexcept >{ > return v; >} > >template<class T> >inline auto >ptr_address(const T& v, int) noexcept >-> decltype(boost::pointer_traits<T>::to_address(v)) >{ > return boost::pointer_traits<T>::to_address(v); >} > >template<class T> >inline auto >ptr_address(const T& v, long) noexcept >{ > return boost::detail::ptr_address(v.operator->(), 0); >} > >} > >template<class T> >inline auto >to_address(const T& v) noexcept >{ > return boost::detail::ptr_address(v, 0); >} ># 232 "/usr/include/boost/core/pointer_traits.hpp" 3 4 >} ># 14 "/usr/include/boost/core/allocator_access.hpp" 2 3 4 ># 33 "/usr/include/boost/core/allocator_access.hpp" 3 4 >namespace boost { > >template<class A> >struct allocator_value_type { > typedef typename A::value_type type; >}; > > > > > > > >template<class A, class = void> >struct allocator_pointer { > typedef typename A::value_type* type; >}; > >namespace detail { > >template<class> >struct alloc_void { > typedef void type; >}; > >} > >template<class A> >struct allocator_pointer<A, > typename detail::alloc_void<typename A::pointer>::type> { > typedef typename A::pointer type; >}; ># 73 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_const_pointer { > typedef typename pointer_traits<typename > allocator_pointer<A>::type>::template > rebind_to<const typename A::value_type>::type type; >}; > >template<class A> >struct allocator_const_pointer<A, > typename detail::alloc_void<typename A::const_pointer>::type> { > typedef typename A::const_pointer type; >}; ># 93 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_void_pointer { > typedef typename pointer_traits<typename > allocator_pointer<A>::type>::template > rebind_to<void>::type type; >}; > >template<class A> >struct allocator_void_pointer<A, > typename detail::alloc_void<typename A::void_pointer>::type> { > typedef typename A::void_pointer type; >}; ># 113 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_const_void_pointer { > typedef typename pointer_traits<typename > allocator_pointer<A>::type>::template > rebind_to<const void>::type type; >}; > >template<class A> >struct allocator_const_void_pointer<A, > typename detail::alloc_void<typename A::const_void_pointer>::type> { > typedef typename A::const_void_pointer type; >}; ># 133 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_difference_type { > typedef typename pointer_traits<typename > allocator_pointer<A>::type>::difference_type type; >}; > >template<class A> >struct allocator_difference_type<A, > typename detail::alloc_void<typename A::difference_type>::type> { > typedef typename A::difference_type type; >}; ># 152 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_size_type { > typedef typename std::make_unsigned<typename > allocator_difference_type<A>::type>::type type; >}; > >template<class A> >struct allocator_size_type<A, > typename detail::alloc_void<typename A::size_type>::type> { > typedef typename A::size_type type; >}; ># 179 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_propagate_on_container_copy_assignment { > typedef std::false_type type; >}; > >template<class A> >struct allocator_propagate_on_container_copy_assignment<A, > typename detail::alloc_void<typename > A::propagate_on_container_copy_assignment>::type> { > typedef typename A::propagate_on_container_copy_assignment type; >}; ># 198 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_propagate_on_container_move_assignment { > typedef std::false_type type; >}; > >template<class A> >struct allocator_propagate_on_container_move_assignment<A, > typename detail::alloc_void<typename > A::propagate_on_container_move_assignment>::type> { > typedef typename A::propagate_on_container_move_assignment type; >}; ># 217 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_propagate_on_container_swap { > typedef std::false_type type; >}; > >template<class A> >struct allocator_propagate_on_container_swap<A, > typename detail::alloc_void<typename > A::propagate_on_container_swap>::type> { > typedef typename A::propagate_on_container_swap type; >}; ># 236 "/usr/include/boost/core/allocator_access.hpp" 3 4 >template<class A, class = void> >struct allocator_is_always_equal { > typedef typename std::is_empty<A>::type type; >}; > >template<class A> >struct allocator_is_always_equal<A, > typename detail::alloc_void<typename A::is_always_equal>::type> { > typedef typename A::is_always_equal type; >}; ># 254 "/usr/include/boost/core/allocator_access.hpp" 3 4 >namespace detail { > >template<class, class> >struct alloc_to { }; > >template<template<class, class...> class A, class T, class U, class... V> >struct alloc_to<A<U, V...>, T> { > typedef A<T, V...> type; >}; > >} > >template<class A, class T, class = void> >struct allocator_rebind { > typedef typename detail::alloc_to<A, T>::type type; >}; > >template<class A, class T> >struct allocator_rebind<A, T, > typename detail::alloc_void<typename A::template rebind<T>::other>::type> { > typedef typename A::template rebind<T>::other type; >}; > > >template<class A> >inline typename allocator_pointer<A>::type >allocator_allocate(A& a, typename allocator_size_type<A>::type n) >{ > return a.allocate(n); >} > >template<class A> >inline void >allocator_deallocate(A& a, typename allocator_pointer<A>::type p, > typename allocator_size_type<A>::type n) >{ > a.deallocate(p, n); >} ># 302 "/usr/include/boost/core/allocator_access.hpp" 3 4 >namespace detail { > >struct alloc_none { }; > >template<class A> >class alloc_has_allocate { > template<class O> > static auto check(int) -> decltype(std::declval<O&>().allocate( > std::declval<typename allocator_size_type<A>::type>(), > std::declval<typename allocator_const_void_pointer<A>::type>())); > > template<class> > static alloc_none check(long); > >public: > static constexpr bool value = > !std::is_same<decltype(check<A>(0)), alloc_none>::value; >}; > >} > >template<class A> >inline typename std::enable_if<detail::alloc_has_allocate<A>::value, > typename allocator_pointer<A>::type>::type >allocator_allocate(A& a, typename allocator_size_type<A>::type n, > typename allocator_const_void_pointer<A>::type h) >{ > return a.allocate(n, h); >} > >template<class A> >inline typename std::enable_if<!detail::alloc_has_allocate<A>::value, > typename allocator_pointer<A>::type>::type >allocator_allocate(A& a, typename allocator_size_type<A>::type n, > typename allocator_const_void_pointer<A>::type) >{ > return a.allocate(n); >} ># 382 "/usr/include/boost/core/allocator_access.hpp" 3 4 >namespace detail { > >template<class A, class T, class... Args> >class alloc_has_construct { > template<class O> > static auto check(int) > -> decltype(std::declval<O&>().construct(std::declval<T*>(), > std::declval<Args&&>()...)); > > template<class> > static alloc_none check(long); > >public: > static constexpr bool value = > !std::is_same<decltype(check<A>(0)), alloc_none>::value; >}; > >} > >template<class A, class T, class... Args> >inline typename std::enable_if<detail::alloc_has_construct<A, T, > Args...>::value>::type >allocator_construct(A& a, T* p, Args&&... args) >{ > a.construct(p, std::forward<Args>(args)...); >} > >template<class A, class T, class... Args> >inline typename std::enable_if<!detail::alloc_has_construct<A, T, > Args...>::value>::type >allocator_construct(A&, T* p, Args&&... args) >{ > ::new((void*)p) T(std::forward<Args>(args)...); >} ># 427 "/usr/include/boost/core/allocator_access.hpp" 3 4 >namespace detail { > >template<class A, class T> >class alloc_has_destroy { > template<class O> > static auto check(int) > -> decltype(std::declval<O&>().destroy(std::declval<T*>())); > > template<class> > static alloc_none check(long); > >public: > static constexpr bool value = > !std::is_same<decltype(check<A>(0)), alloc_none>::value; >}; > >} > >template<class A, class T> >inline typename std::enable_if<detail::alloc_has_destroy<A, T>::value>::type >allocator_destroy(A& a, T* p) >{ > a.destroy(p); >} > >template<class A, class T> >inline typename std::enable_if<!detail::alloc_has_destroy<A, T>::value>::type >allocator_destroy(A&, T* p) >{ > p->~T(); > (void)p; >} ># 469 "/usr/include/boost/core/allocator_access.hpp" 3 4 >namespace detail { > >template<class A> >class alloc_has_max_size { > template<class O> > static auto check(int) -> decltype(std::declval<O&>().max_size()); > > template<class> > static alloc_none check(long); > >public: > static constexpr bool value = > !std::is_same<decltype(check<A>(0)), alloc_none>::value; >}; > >} > >template<class A> >inline typename std::enable_if<detail::alloc_has_max_size<A>::value, > typename allocator_size_type<A>::type>::type >allocator_max_size(const A& a) >{ > return a.max_size(); >} > >template<class A> >inline typename std::enable_if<!detail::alloc_has_max_size<A>::value, > typename allocator_size_type<A>::type>::type >allocator_max_size(const A&) >{ > return (std::numeric_limits<typename > allocator_size_type<A>::type>::max)() / sizeof(typename A::value_type); >} ># 512 "/usr/include/boost/core/allocator_access.hpp" 3 4 >namespace detail { > >template<class A> >class alloc_has_soccc { > template<class O> > static auto check(int) > -> decltype(std::declval<O&>().select_on_container_copy_construction()); > > template<class> > static alloc_none check(long); > >public: > static constexpr bool value = > !std::is_same<decltype(check<A>(0)), alloc_none>::value; >}; > >} > >template<class A> >inline typename std::enable_if<detail::alloc_has_soccc<A>::value, A>::type >allocator_select_on_container_copy_construction(const A& a) >{ > return a.select_on_container_copy_construction(); >} > >template<class A> >inline typename std::enable_if<!detail::alloc_has_soccc<A>::value, A>::type >allocator_select_on_container_copy_construction(const A& a) >{ > return a; >} > > > >template<class A> >using allocator_value_type_t = typename allocator_value_type<A>::type; > >template<class A> >using allocator_pointer_t = typename allocator_pointer<A>::type; > >template<class A> >using allocator_const_pointer_t = typename allocator_const_pointer<A>::type; > >template<class A> >using allocator_void_pointer_t = typename allocator_void_pointer<A>::type; > >template<class A> >using allocator_const_void_pointer_t = > typename allocator_const_void_pointer<A>::type; > >template<class A> >using allocator_difference_type_t = > typename allocator_difference_type<A>::type; > >template<class A> >using allocator_size_type_t = typename allocator_size_type<A>::type; > >template<class A> >using allocator_propagate_on_container_copy_assignment_t = > typename allocator_propagate_on_container_copy_assignment<A>::type; > >template<class A> >using allocator_propagate_on_container_move_assignment_t = > typename allocator_propagate_on_container_move_assignment<A>::type; > >template<class A> >using allocator_propagate_on_container_swap_t = > typename allocator_propagate_on_container_swap<A>::type; > >template<class A> >using allocator_is_always_equal_t = > typename allocator_is_always_equal<A>::type; > >template<class A, class T> >using allocator_rebind_t = typename allocator_rebind<A, T>::type; > > >} ># 20 "/usr/include/boost/format/alt_sstream.hpp" 2 3 4 > ># 1 "/usr/include/boost/utility/base_from_member.hpp" 1 3 4 ># 15 "/usr/include/boost/utility/base_from_member.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/repetition/enum_binary_params.hpp" 1 3 4 ># 16 "/usr/include/boost/utility/base_from_member.hpp" 2 3 4 > ># 1 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 1 3 4 ># 24 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 ># 25 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 2 3 4 ># 18 "/usr/include/boost/utility/base_from_member.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/utility/enable_if.hpp" 1 3 4 ># 22 "/usr/include/boost/utility/base_from_member.hpp" 2 3 4 ># 59 "/usr/include/boost/utility/base_from_member.hpp" 3 4 >namespace boost >{ > >namespace detail >{ ># 73 "/usr/include/boost/utility/base_from_member.hpp" 3 4 >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 > >{}; ># 101 "/usr/include/boost/utility/base_from_member.hpp" 3 4 >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> > >{}; > > >} ># 124 "/usr/include/boost/utility/base_from_member.hpp" 3 4 >template < typename MemberType, int UniqueID = 0 > >class base_from_member >{ >protected: > MemberType member; > > > > > > template <typename ...T, typename EnableIf = typename > ::boost::detail::enable_if_unrelated<base_from_member, T...>::type> > explicit constexpr base_from_member( T&& ...x ) > noexcept((noexcept((::new ((void*) 0) MemberType( static_cast<T&&>(x)... ))))) > > : member( static_cast<T&&>(x)... ) > {} ># 151 "/usr/include/boost/utility/base_from_member.hpp" 3 4 >}; > >template < typename MemberType, int UniqueID > >class base_from_member<MemberType&, UniqueID> >{ >protected: > MemberType& member; > > explicit constexpr base_from_member( MemberType& x ) > noexcept > : member( x ) > {} > >}; > >} ># 22 "/usr/include/boost/format/alt_sstream.hpp" 2 3 4 ># 1 "/usr/include/boost/shared_ptr.hpp" 1 3 4 ># 17 "/usr/include/boost/shared_ptr.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 1 3 4 ># 17 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 1 3 4 ># 25 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 1 3 4 ># 27 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 >namespace boost >{ ># 46 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 >class bad_weak_ptr: public std::exception >{ >public: > > char const * what() const noexcept override > { > return "tr1::bad_weak_ptr"; > } >}; ># 64 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 >} ># 26 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 1 3 4 ># 40 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp" 1 3 4 ># 16 "/usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp" 1 3 4 ># 42 "/usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > >typedef std::type_info sp_typeinfo_; > >} > >} ># 17 "/usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp" 2 3 4 > ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 19 "/usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp" 2 3 4 ># 27 "/usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > >inline void atomic_increment( boost::uint_least32_t * pw ) >{ > __atomic_fetch_add( pw, 1, 0 ); >} > >inline boost::uint_least32_t atomic_decrement( boost::uint_least32_t * pw ) >{ > return __atomic_fetch_sub( pw, 1, 4 ); >} > >inline boost::uint_least32_t atomic_conditional_increment( boost::uint_least32_t * pw ) >{ > > > > > boost::uint_least32_t r = __atomic_load_n( pw, 0 ); > > for( ;; ) > { > if( r == 0 ) > { > return r; > } > > if( __atomic_compare_exchange_n( pw, &r, r + 1, true, 0, 0 ) ) > { > return r; > } > } >} > >inline boost::uint_least32_t atomic_load( boost::uint_least32_t const * pw ) >{ > return __atomic_load_n( pw, 2 ); >} > >class __attribute__((__visibility__("default"))) sp_counted_base >{ >private: > > sp_counted_base( sp_counted_base const & ); > sp_counted_base & operator= ( sp_counted_base const & ); > > boost::uint_least32_t use_count_; > boost::uint_least32_t weak_count_; > >public: > > sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) > { > } > > virtual ~sp_counted_base() > { > } > > > > > virtual void dispose() = 0; > > > > virtual void destroy() > { > delete this; > } > > virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0; > virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0; > virtual void * get_untyped_deleter() = 0; > > void add_ref_copy() > { > atomic_increment( &use_count_ ); > } > > bool add_ref_lock() > { > return atomic_conditional_increment( &use_count_ ) != 0; > } > > void release() > { > if( atomic_decrement( &use_count_ ) == 1 ) > { > dispose(); > weak_release(); > } > } > > void weak_add_ref() > { > atomic_increment( &weak_count_ ); > } > > void weak_release() > { > if( atomic_decrement( &weak_count_ ) == 1 ) > { > destroy(); > } > } > > long use_count() const > { > return atomic_load( &use_count_ ); > } >}; > >} > >} ># 41 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 2 3 4 ># 27 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 1 3 4 ># 27 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 ># 1 "/usr/include/boost/checked_delete.hpp" 1 3 4 ># 15 "/usr/include/boost/checked_delete.hpp" 3 4 ># 1 "/usr/include/boost/core/checked_delete.hpp" 1 3 4 ># 26 "/usr/include/boost/core/checked_delete.hpp" 3 4 >namespace boost >{ > > > >template<class T> inline void checked_delete(T * x) noexcept >{ > > typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; > (void) sizeof(type_must_be_complete); > delete x; >} > >template<class T> inline void checked_array_delete(T * x) noexcept >{ > typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; > (void) sizeof(type_must_be_complete); > delete [] x; >} > >template<class T> struct checked_deleter >{ > typedef void result_type; > typedef T * argument_type; > > void operator()(T * x) const noexcept > { > > boost::checked_delete(x); > } >}; > >template<class T> struct checked_array_deleter >{ > typedef void result_type; > typedef T * argument_type; > > void operator()(T * x) const noexcept > { > boost::checked_array_delete(x); > } >}; > >} ># 16 "/usr/include/boost/checked_delete.hpp" 2 3 4 ># 28 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 2 3 4 ># 38 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 >namespace boost >{ ># 48 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 >namespace detail >{ > > > >template<class D> class local_sp_deleter; > >template<class D> D * get_local_deleter( D * ) noexcept >{ > return 0; >} > >template<class D> D * get_local_deleter( local_sp_deleter<D> * p ) noexcept; > > > >template<class X> class __attribute__((__visibility__("default"))) sp_counted_impl_p: public sp_counted_base >{ >private: > > X * px_; > > sp_counted_impl_p( sp_counted_impl_p const & ); > sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); > > typedef sp_counted_impl_p<X> this_type; > >public: > > explicit sp_counted_impl_p( X * px ): px_( px ) > { > > > > } > > void dispose() noexcept override > { > > > > boost::checked_delete( px_ ); > } > > void * get_deleter( sp_typeinfo_ const & ) noexcept override > { > return 0; > } > > void * get_local_deleter( sp_typeinfo_ const & ) noexcept override > { > return 0; > } > > void * get_untyped_deleter() noexcept override > { > return 0; > } ># 134 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 >}; ># 143 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 >template<class P, class D> class __attribute__((__visibility__("default"))) sp_counted_impl_pd: public sp_counted_base >{ >private: > > P ptr; > D del; > > sp_counted_impl_pd( sp_counted_impl_pd const & ); > sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); > > typedef sp_counted_impl_pd<P, D> this_type; > >public: > > > > > > sp_counted_impl_pd( P p, D & d ): ptr( p ), del( static_cast< D&& >( d ) ) > { > } ># 173 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 > sp_counted_impl_pd( P p ): ptr( p ), del() > { > } > > void dispose() noexcept override > { > del( ptr ); > } > > void * get_deleter( sp_typeinfo_ const & ti ) noexcept override > { > return ti == typeid(D)? &reinterpret_cast<char&>( del ): 0; > } > > void * get_local_deleter( sp_typeinfo_ const & ti ) noexcept override > { > return ti == typeid(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0; > } > > void * get_untyped_deleter() noexcept override > { > return &reinterpret_cast<char&>( del ); > } ># 224 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 >}; > >template<class P, class D, class A> class __attribute__((__visibility__("default"))) sp_counted_impl_pda: public sp_counted_base >{ >private: > > P p_; > D d_; > A a_; > > sp_counted_impl_pda( sp_counted_impl_pda const & ); > sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); > > typedef sp_counted_impl_pda<P, D, A> this_type; > >public: > > > > > > sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( static_cast< D&& >( d ) ), a_( a ) > { > } ># 257 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 > sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a ) > { > } > > void dispose() noexcept override > { > d_( p_ ); > } > > void destroy() noexcept override > { > > > typedef typename std::allocator_traits<A>::template rebind_alloc< this_type > A2; > > > > > > > > A2 a2( a_ ); > > this->~this_type(); > > a2.deallocate( this, 1 ); > } > > void * get_deleter( sp_typeinfo_ const & ti ) noexcept override > { > return ti == typeid(D)? &reinterpret_cast<char&>( d_ ): 0; > } > > void * get_local_deleter( sp_typeinfo_ const & ti ) noexcept override > { > return ti == typeid(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0; > } > > void * get_untyped_deleter() noexcept override > { > return &reinterpret_cast<char&>( d_ ); > } >}; > > > > > >} > >} ># 28 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp" 1 3 4 ># 29 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 > > > > > > ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 36 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 ># 45 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > > >namespace boost >{ > >namespace movelib >{ > >template< class T, class D > class unique_ptr; > >} > >namespace detail >{ ># 69 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 >struct sp_nothrow_tag {}; > >template< class D > struct sp_inplace_tag >{ >}; > >template< class T > class sp_reference_wrapper >{ >public: > > explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) ) > { > } > > template< class Y > void operator()( Y * p ) const > { > (*t_)( p ); > } > >private: > > T * t_; >}; > >template< class D > struct sp_convert_reference >{ > typedef D type; >}; > >template< class D > struct sp_convert_reference< D& > >{ > typedef sp_reference_wrapper< D > type; >}; > >template<class T> std::size_t sp_hash_pointer( T* p ) noexcept >{ > boost::uintptr_t v = reinterpret_cast<boost::uintptr_t>( p ); > > > return static_cast<std::size_t>( v + ( v >> 3 ) ); >} > >class weak_count; > >class shared_count >{ >private: > > sp_counted_base * pi_; > > > > > > friend class weak_count; > >public: > > constexpr shared_count() noexcept: pi_(0) > > > > { > } > > constexpr explicit shared_count( sp_counted_base * pi ) noexcept: pi_( pi ) > > > > { > } > > template<class Y> explicit shared_count( Y * p ): pi_( 0 ) > > > > { > > > try > { > pi_ = new sp_counted_impl_p<Y>( p ); > } > catch(...) > { > boost::checked_delete( p ); > throw; > } ># 169 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 > } > > > > > template<class P, class D> shared_count( P p, D d ): pi_(0) > > > > > { > > > > > > try > { > pi_ = new sp_counted_impl_pd<P, D>(p, d); > } > catch(...) > { > d(p); > throw; > } ># 206 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 > } > > > > template< class P, class D > shared_count( P p, sp_inplace_tag<D> ): pi_( 0 ) > > > > { > > > try > { > pi_ = new sp_counted_impl_pd< P, D >( p ); > } > catch( ... ) > { > D::operator_fn( p ); > throw; > } ># 238 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 > } > > > > template<class P, class D, class A> shared_count( P p, D d, A a ): pi_( 0 ) > > > > { > typedef sp_counted_impl_pda<P, D, A> impl_type; > > > > typedef typename std::allocator_traits<A>::template rebind_alloc< impl_type > A2; > > > > > > > > A2 a2( a ); > > > > try > { > pi_ = a2.allocate( 1 ); > ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); > } > catch(...) > { > d( p ); > > if( pi_ != 0 ) > { > a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); > } > > throw; > } ># 295 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 > } > > > > template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 ) > > > > { > typedef sp_counted_impl_pda< P, D, A > impl_type; > > > > typedef typename std::allocator_traits<A>::template rebind_alloc< impl_type > A2; > > > > > > > > A2 a2( a ); > > > > try > { > pi_ = a2.allocate( 1 ); > ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); > } > catch(...) > { > D::operator_fn( p ); > > if( pi_ != 0 ) > { > a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); > } > > throw; > } ># 352 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 > } > > > > > > > > template<class Y> > explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) ) > > > > { ># 375 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 > r.release(); > } > > > > > > template<class Y, class D> > explicit shared_count( std::unique_ptr<Y, D> & r ): pi_( 0 ) > > > > { > typedef typename sp_convert_reference<D>::type D2; > > D2 d2( static_cast<D&&>( r.get_deleter() ) ); > pi_ = new sp_counted_impl_pd< typename std::unique_ptr<Y, D>::pointer, D2 >( r.get(), d2 ); ># 402 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 > r.release(); > } > > > > template<class Y, class D> > explicit shared_count( boost::movelib::unique_ptr<Y, D> & r ): pi_( 0 ) > > > > { > typedef typename sp_convert_reference<D>::type D2; > > D2 d2( r.get_deleter() ); > pi_ = new sp_counted_impl_pd< typename boost::movelib::unique_ptr<Y, D>::pointer, D2 >( r.get(), d2 ); ># 427 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 > r.release(); > } > > ~shared_count() > { > if( pi_ != 0 ) pi_->release(); > > > > } > > shared_count(shared_count const & r) noexcept: pi_(r.pi_) > > > > { > if( pi_ != 0 ) pi_->add_ref_copy(); > } > > > > shared_count(shared_count && r) noexcept: pi_(r.pi_) > > > > { > r.pi_ = 0; > } > > > > explicit shared_count(weak_count const & r); > shared_count( weak_count const & r, sp_nothrow_tag ) noexcept; > > shared_count & operator= (shared_count const & r) noexcept > { > sp_counted_base * tmp = r.pi_; > > if( tmp != pi_ ) > { > if( tmp != 0 ) tmp->add_ref_copy(); > if( pi_ != 0 ) pi_->release(); > pi_ = tmp; > } > > return *this; > } > > void swap(shared_count & r) noexcept > { > sp_counted_base * tmp = r.pi_; > r.pi_ = pi_; > pi_ = tmp; > } > > long use_count() const noexcept > { > return pi_ != 0? pi_->use_count(): 0; > } > > bool unique() const noexcept > { > return use_count() == 1; > } > > bool empty() const noexcept > { > return pi_ == 0; > } > > bool operator==( shared_count const & r ) const noexcept > { > return pi_ == r.pi_; > } > > bool operator==( weak_count const & r ) const noexcept; > > bool operator<( shared_count const & r ) const noexcept > { > return std::less<sp_counted_base *>()( pi_, r.pi_ ); > } > > bool operator<( weak_count const & r ) const noexcept; > > void * get_deleter( sp_typeinfo_ const & ti ) const noexcept > { > return pi_? pi_->get_deleter( ti ): 0; > } > > void * get_local_deleter( sp_typeinfo_ const & ti ) const noexcept > { > return pi_? pi_->get_local_deleter( ti ): 0; > } > > void * get_untyped_deleter() const noexcept > { > return pi_? pi_->get_untyped_deleter(): 0; > } > > std::size_t hash_value() const noexcept > { > return sp_hash_pointer( pi_ ); > } >}; > > >class weak_count >{ >private: > > sp_counted_base * pi_; > > > > > > friend class shared_count; > >public: > > constexpr weak_count() noexcept: pi_(0) > > > > { > } > > weak_count(shared_count const & r) noexcept: pi_(r.pi_) > > > > { > if(pi_ != 0) pi_->weak_add_ref(); > } > > weak_count(weak_count const & r) noexcept: pi_(r.pi_) > > > > { > if(pi_ != 0) pi_->weak_add_ref(); > } > > > > > > weak_count(weak_count && r) noexcept: pi_(r.pi_) > > > > { > r.pi_ = 0; > } > > > > ~weak_count() > { > if(pi_ != 0) pi_->weak_release(); > > > > } > > weak_count & operator= (shared_count const & r) noexcept > { > sp_counted_base * tmp = r.pi_; > > if( tmp != pi_ ) > { > if(tmp != 0) tmp->weak_add_ref(); > if(pi_ != 0) pi_->weak_release(); > pi_ = tmp; > } > > return *this; > } > > weak_count & operator= (weak_count const & r) noexcept > { > sp_counted_base * tmp = r.pi_; > > if( tmp != pi_ ) > { > if(tmp != 0) tmp->weak_add_ref(); > if(pi_ != 0) pi_->weak_release(); > pi_ = tmp; > } > > return *this; > } > > void swap(weak_count & r) noexcept > { > sp_counted_base * tmp = r.pi_; > r.pi_ = pi_; > pi_ = tmp; > } > > long use_count() const noexcept > { > return pi_ != 0? pi_->use_count(): 0; > } > > bool empty() const noexcept > { > return pi_ == 0; > } > > bool operator==( weak_count const & r ) const noexcept > { > return pi_ == r.pi_; > } > > bool operator==( shared_count const & r ) const noexcept > { > return pi_ == r.pi_; > } > > bool operator<( weak_count const & r ) const noexcept > { > return std::less<sp_counted_base *>()( pi_, r.pi_ ); > } > > bool operator<( shared_count const & r ) const noexcept > { > return std::less<sp_counted_base *>()( pi_, r.pi_ ); > } > > std::size_t hash_value() const noexcept > { > return sp_hash_pointer( pi_ ); > } >}; > >inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) > > > >{ > if( pi_ == 0 || !pi_->add_ref_lock() ) > { > boost::throw_exception( boost::bad_weak_ptr() ); > } >} > >inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ) noexcept: pi_( r.pi_ ) > > > >{ > if( pi_ != 0 && !pi_->add_ref_lock() ) > { > pi_ = 0; > } >} > >inline bool shared_count::operator==( weak_count const & r ) const noexcept >{ > return pi_ == r.pi_; >} > >inline bool shared_count::operator<( weak_count const & r ) const noexcept >{ > return std::less<sp_counted_base *>()( pi_, r.pi_ ); >} > >} > >} > > >#pragma GCC diagnostic pop ># 18 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 > > > > > > ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 25 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 1 3 4 ># 25 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 1 3 4 ># 42 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp" 1 3 4 ># 14 "/usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 1 3 4 ># 22 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp" 1 3 4 ># 36 "/usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp" 3 4 >namespace boost >{ >namespace detail >{ > >inline void sp_thread_pause() >{ > __asm__ __volatile__( "rep; nop" : : : "memory" ); >} > >} >} ># 23 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 2 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp" 1 3 4 ># 22 "/usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp" 3 4 ># 1 "/usr/include/boost/config/pragma_message.hpp" 1 3 4 ># 23 "/usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp" 2 3 4 ># 55 "/usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > >inline void sp_thread_sleep() >{ > > struct timespec rqtp = { 0, 0 }; > > > > > rqtp.tv_sec = 0; > rqtp.tv_nsec = 1000; > > nanosleep( &rqtp, 0 ); >} > >} > >} ># 24 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 2 3 4 > > >namespace boost >{ > >namespace detail >{ > >inline void yield( unsigned k ) >{ > > > > if( k == 0 ) > { > sp_thread_pause(); > } > else > { > sp_thread_sleep(); > } >} > >} > >} ># 15 "/usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp" 2 3 4 ># 23 "/usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > >class spinlock >{ >public: > > unsigned char v_; > >public: > > bool try_lock() > { > return __atomic_test_and_set( &v_, 2 ) == 0; > } > > void lock() > { > for( unsigned k = 0; !try_lock(); ++k ) > { > boost::detail::yield( k ); > } > } > > void unlock() > { > __atomic_clear( &v_, 3 ); > } > >public: > > class scoped_lock > { > private: > > spinlock & sp_; > > scoped_lock( scoped_lock const & ); > scoped_lock & operator=( scoped_lock const & ); > > public: > > explicit scoped_lock( spinlock & sp ): sp_( sp ) > { > sp.lock(); > } > > ~scoped_lock() > { > sp_.unlock(); > } > }; >}; > >} >} ># 43 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 2 3 4 ># 26 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 2 3 4 > > >namespace boost >{ > >namespace detail >{ > >template< int M > class spinlock_pool >{ >private: > > static spinlock pool_[ 41 ]; > >public: > > static spinlock & spinlock_for( void const * pv ) > { > > > > std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; > > return pool_[ i ]; > } > > class scoped_lock > { > private: > > spinlock & sp_; > > scoped_lock( scoped_lock const & ); > scoped_lock & operator=( scoped_lock const & ); > > public: > > explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) > { > sp_.lock(); > } > > ~scoped_lock() > { > sp_.unlock(); > } > }; >}; > >template< int M > spinlock spinlock_pool< M >::pool_[ 41 ] = >{ > {0}, {0}, {0}, {0}, {0}, > {0}, {0}, {0}, {0}, {0}, > {0}, {0}, {0}, {0}, {0}, > {0}, {0}, {0}, {0}, {0}, > {0}, {0}, {0}, {0}, {0}, > {0}, {0}, {0}, {0}, {0}, > {0}, {0}, {0}, {0}, {0}, > {0}, {0}, {0}, {0}, {0}, > {0} >}; > >} >} ># 30 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 > > ># 1 "/usr/include/c++/13/algorithm" 1 3 4 ># 58 "/usr/include/c++/13/algorithm" 3 4 > ># 59 "/usr/include/c++/13/algorithm" 3 ># 73 "/usr/include/c++/13/algorithm" 3 ># 1 "/usr/include/c++/13/pstl/glue_algorithm_defs.h" 1 3 ># 17 "/usr/include/c++/13/pstl/glue_algorithm_defs.h" 3 >namespace std >{ > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >any_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >all_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >none_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Function> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >for_each(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Function __f); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Function> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >for_each_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n, _Function __f); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >find_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >find_if_not(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> >find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, > _ForwardIterator2 __s_last, _BinaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> >find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, > _ForwardIterator2 __s_last); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> >find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, > _ForwardIterator2 __s_first, _ForwardIterator2 __s_last, _BinaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> >find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, > _ForwardIterator2 __s_first, _ForwardIterator2 __s_last); > > > >template <class _ExecutionPolicy, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); > >template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, > typename iterator_traits<_ForwardIterator>::difference_type> >count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, > typename iterator_traits<_ForwardIterator>::difference_type> >count_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> >search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, > _ForwardIterator2 __s_last, _BinaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> >search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, > _ForwardIterator2 __s_last); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count, > const _Tp& __value, _BinaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count, > const _Tp& __value); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >copy_n(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _Size __n, _ForwardIterator2 __result); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 result, > _Predicate __pred); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >swap_ranges(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, > _UnaryOperation __op); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, > class _BinaryOperation> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator __result, _BinaryOperation __op); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >replace_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred, > const _Tp& __new_value); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >replace(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, > const _Tp& __new_value); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryPredicate, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >replace_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, > _ForwardIterator2 __result, _UnaryPredicate __pred, const _Tp& __new_value); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >replace_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, > const _Tp& __old_value, const _Tp& __new_value); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >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> >fill_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __count, const _Tp& __value); > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Generator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >generate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Generator __g); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Generator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >generate_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size count, _Generator __g); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >remove_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, > _ForwardIterator2 __result, _Predicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >remove_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, > const _Tp& __value); > >template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >remove_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >remove(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, > _BinaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); > > > >template <class _ExecutionPolicy, class _BidirectionalIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last); > >template <class _ExecutionPolicy, class _BidirectionalIterator, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >reverse_copy(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, > _ForwardIterator __d_first); > > > >template <class _ExecutionPolicy, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >rotate_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __middle, _ForwardIterator1 __last, > _ForwardIterator2 __result); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >is_partitioned(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >partition(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); > >template <class _ExecutionPolicy, class _BidirectionalIterator, class _UnaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _BidirectionalIterator> >stable_partition(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, > _UnaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator, class _ForwardIterator1, class _ForwardIterator2, > class _UnaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> >partition_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, > _ForwardIterator1 __out_true, _ForwardIterator2 __out_false, _UnaryPredicate __pred); > > > >template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _RandomAccessIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); > > > >template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _RandomAccessIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> >mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2, _BinaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> >mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _BinaryPredicate __pred); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> >mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> >mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _BinaryPredicate __p); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2, _BinaryPredicate __p); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2); > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> >move(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first); > > > >template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, > _RandomAccessIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _RandomAccessIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, > _RandomAccessIterator __last); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> >partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, > _RandomAccessIterator __d_first, _RandomAccessIterator __d_last, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> >partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, > _RandomAccessIterator __d_first, _RandomAccessIterator __d_last); > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); > > > >template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _RandomAccessIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last); > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, > class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2, _ForwardIterator __d_first, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2, _ForwardIterator __d_first); > >template <class _ExecutionPolicy, class _BidirectionalIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, > _BidirectionalIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _BidirectionalIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> >inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, > _BidirectionalIterator __last); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, > class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, > _ForwardIterator2 __last2, _ForwardIterator __result); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, > class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, > class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, > class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator result, > _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); > > >template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> >is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _RandomAccessIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> >is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); > >template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _RandomAccessIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); > > > >template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> >max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); > >template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>> >minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>> >minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); > > > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Compare __comp); > >template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> >__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> >lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2); > >} ># 74 "/usr/include/c++/13/algorithm" 2 3 ># 33 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 ># 47 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wdeprecated-declarations" > > >namespace boost >{ > >template<class T> class shared_ptr; >template<class T> class weak_ptr; >template<class T> class enable_shared_from_this; >class enable_shared_from_raw; > >namespace movelib >{ > > template< class T, class D > class unique_ptr; > >} > >namespace detail >{ > > > >template< class T > struct sp_element >{ > typedef T type; >}; > > > >template< class T > struct sp_element< T[] > >{ > typedef T type; >}; > > > >template< class T, std::size_t N > struct sp_element< T[N] > >{ > typedef T type; >}; > > > > > > > >template< class T > struct sp_dereference >{ > typedef T & type; >}; > >template<> struct sp_dereference< void > >{ > typedef void type; >}; > > > >template<> struct sp_dereference< void const > >{ > typedef void type; >}; > >template<> struct sp_dereference< void volatile > >{ > typedef void type; >}; > >template<> struct sp_dereference< void const volatile > >{ > typedef void type; >}; > > > > > >template< class T > struct sp_dereference< T[] > >{ > typedef void type; >}; > > > >template< class T, std::size_t N > struct sp_dereference< T[N] > >{ > typedef void type; >}; > > > > > > > >template< class T > struct sp_member_access >{ > typedef T * type; >}; > > > >template< class T > struct sp_member_access< T[] > >{ > typedef void type; >}; > > > >template< class T, std::size_t N > struct sp_member_access< T[N] > >{ > typedef void type; >}; > > > > > > > >template< class T > struct sp_array_access >{ > typedef void type; >}; > > > >template< class T > struct sp_array_access< T[] > >{ > typedef T & type; >}; > > > >template< class T, std::size_t N > struct sp_array_access< T[N] > >{ > typedef T & type; >}; > > > > > > > >template< class T > struct sp_extent >{ > enum _vt { value = 0 }; >}; > > > >template< class T, std::size_t N > struct sp_extent< T[N] > >{ > enum _vt { value = N }; >}; > > > > > >template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) >{ > if( pe != 0 ) > { > pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); > } >} > >template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); ># 236 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 >inline void sp_enable_shared_from_this( ... ) >{ >} > > > > > > > >template< class T, class R > struct sp_enable_if_auto_ptr >{ >}; > >template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > >{ > typedef R type; >}; > > > > > >template< class Y, class T > inline void sp_assert_convertible() noexcept >{ > > > > typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ]; > (void)sizeof( tmp ); > > > > > > > >} > > > >template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) >{ > boost::detail::shared_count( p ).swap( pn ); > boost::detail::sp_enable_shared_from_this( ppx, p, p ); >} > > > >template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * , Y * p, boost::detail::shared_count & pn ) >{ > sp_assert_convertible< Y[], T[] >(); > boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); >} > >template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * , Y * p, boost::detail::shared_count & pn ) >{ > sp_assert_convertible< Y[N], T[N] >(); > boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); >} > > > > > >template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) >{ > boost::detail::sp_enable_shared_from_this( ppx, p, p ); >} > > > >template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * , Y * ) >{ > sp_assert_convertible< Y[], T[] >(); >} > >template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * , Y * ) >{ > sp_assert_convertible< Y[N], T[N] >(); >} > > > >struct sp_internal_constructor_tag >{ >}; > >} ># 335 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 >template<class T> class shared_ptr >{ >private: > > > typedef shared_ptr<T> this_type; > >public: > > typedef typename boost::detail::sp_element< T >::type element_type; > > constexpr shared_ptr() noexcept : px( 0 ), pn() > { > } > > > > constexpr shared_ptr( boost::detail::sp_nullptr_t ) noexcept : px( 0 ), pn() > { > } > > > > constexpr shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count const & pn_ ) noexcept : px( px_ ), pn( pn_ ) > { > } > > > > constexpr shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count && pn_ ) noexcept : px( px_ ), pn( std::move( pn_ ) ) > { > } > > > > template<class Y> > explicit shared_ptr( Y * p ): px( p ), pn() > { > boost::detail::sp_pointer_construct( this, p, pn ); > } ># 384 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 > template<class Y, class D> shared_ptr( Y * p, D d ): px( p ), pn( p, static_cast< D&& >( d ) ) > { > boost::detail::sp_deleter_construct( this, p ); > } ># 402 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 > template<class D> shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, static_cast< D&& >( d ) ) > { > } ># 420 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 > template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, static_cast< D&& >( d ), a ) > { > boost::detail::sp_deleter_construct( this, p ); > } ># 438 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 > template<class D, class A> shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, static_cast< D&& >( d ), a ) > { > } ># 458 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 > shared_ptr( shared_ptr const & r ) noexcept : px( r.px ), pn( r.pn ) > { > } > > > > template<class Y> > explicit shared_ptr( weak_ptr<Y> const & r ): pn( r.pn ) > { > boost::detail::sp_assert_convertible< Y, T >(); > > > px = r.px; > } > > template<class Y> > shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag ) > noexcept : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) > { > if( !pn.empty() ) > { > px = r.px; > } > } > > template<class Y> > > > shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() ) > > > > > > > noexcept : px( r.px ), pn( r.pn ) > { > boost::detail::sp_assert_convertible< Y, T >(); > } > > > template< class Y > > shared_ptr( shared_ptr<Y> const & r, element_type * p ) noexcept : px( p ), pn( r.pn ) > { > } > > > > template<class Y> > explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn() > { > boost::detail::sp_assert_convertible< Y, T >(); > > Y * tmp = r.get(); > pn = boost::detail::shared_count( r ); > > boost::detail::sp_deleter_construct( this, tmp ); > } > > > > template<class Y> > shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn() > { > boost::detail::sp_assert_convertible< Y, T >(); > > Y * tmp = r.get(); > pn = boost::detail::shared_count( r ); > > boost::detail::sp_deleter_construct( this, tmp ); > } ># 551 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 > template< class Y, class D > > shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() > { > boost::detail::sp_assert_convertible< Y, T >(); > > typename std::unique_ptr< Y, D >::pointer tmp = r.get(); > > if( tmp != 0 ) > { > pn = boost::detail::shared_count( r ); > boost::detail::sp_deleter_construct( this, tmp ); > } > } > > > > template< class Y, class D > > shared_ptr( boost::movelib::unique_ptr< Y, D > r ): px( r.get() ), pn() > { > boost::detail::sp_assert_convertible< Y, T >(); > > typename boost::movelib::unique_ptr< Y, D >::pointer tmp = r.get(); > > if( tmp != 0 ) > { > pn = boost::detail::shared_count( r ); > boost::detail::sp_deleter_construct( this, tmp ); > } > } > > > > shared_ptr & operator=( shared_ptr const & r ) noexcept > { > this_type(r).swap(*this); > return *this; > } > > > > template<class Y> > shared_ptr & operator=(shared_ptr<Y> const & r) noexcept > { > this_type(r).swap(*this); > return *this; > } > > > > > > template<class Y> > shared_ptr & operator=( std::auto_ptr<Y> & r ) > { > this_type( r ).swap( *this ); > return *this; > } > > > > template<class Y> > shared_ptr & operator=( std::auto_ptr<Y> && r ) > { > this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this ); > return *this; > } ># 633 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 > template<class Y, class D> > shared_ptr & operator=( std::unique_ptr<Y, D> && r ) > { > this_type( static_cast< std::unique_ptr<Y, D> && >( r ) ).swap(*this); > return *this; > } > > > > template<class Y, class D> > shared_ptr & operator=( boost::movelib::unique_ptr<Y, D> r ) > { > > > boost::detail::sp_assert_convertible< Y, T >(); > > typename boost::movelib::unique_ptr< Y, D >::pointer p = r.get(); > > shared_ptr tmp; > > if( p != 0 ) > { > tmp.px = p; > tmp.pn = boost::detail::shared_count( r ); > > boost::detail::sp_deleter_construct( &tmp, p ); > } > > tmp.swap( *this ); > > return *this; > } > > > > > > shared_ptr( shared_ptr && r ) noexcept : px( r.px ), pn() > { > pn.swap( r.pn ); > r.px = 0; > } > > template<class Y> > > > shared_ptr( shared_ptr<Y> && r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() ) > > > > > > > noexcept : px( r.px ), pn() > { > boost::detail::sp_assert_convertible< Y, T >(); > > pn.swap( r.pn ); > r.px = 0; > } > > shared_ptr & operator=( shared_ptr && r ) noexcept > { > this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); > return *this; > } > > template<class Y> > shared_ptr & operator=( shared_ptr<Y> && r ) noexcept > { > this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this ); > return *this; > } > > > template<class Y> > shared_ptr( shared_ptr<Y> && r, element_type * p ) noexcept : px( p ), pn() > { > pn.swap( r.pn ); > r.px = 0; > } > > > > > > shared_ptr & operator=( boost::detail::sp_nullptr_t ) noexcept > { > this_type().swap(*this); > return *this; > } > > > > void reset() noexcept > { > this_type().swap(*this); > } > > template<class Y> void reset( Y * p ) > { > (static_cast <bool> (p == 0 || p != px) ? void (0) : __assert_fail ("p == 0 || p != px", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 734, __extension__ __PRETTY_FUNCTION__)); > this_type( p ).swap( *this ); > } > > > > template<class Y, class D> void reset( Y * p, D d ) > { > this_type( p, static_cast< D&& >( d ) ).swap( *this ); > } > > template<class Y, class D, class A> void reset( Y * p, D d, A a ) > { > this_type( p, static_cast< D&& >( d ), a ).swap( *this ); > } ># 764 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 > template<class Y> void reset( shared_ptr<Y> const & r, element_type * p ) noexcept > { > this_type( r, p ).swap( *this ); > } > > > > template<class Y> void reset( shared_ptr<Y> && r, element_type * p ) noexcept > { > this_type( static_cast< shared_ptr<Y> && >( r ), p ).swap( *this ); > } > > > > typename boost::detail::sp_dereference< T >::type operator* () const noexcept > { > (static_cast <bool> (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 780, __extension__ __PRETTY_FUNCTION__)); > return *px; > } > > typename boost::detail::sp_member_access< T >::type operator-> () const noexcept > { > (static_cast <bool> (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 786, __extension__ __PRETTY_FUNCTION__)); > return px; > } > > typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const noexcept > { > (static_cast <bool> (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 792, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 )) ? void (0) : __assert_fail ("i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 )", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 793, __extension__ __PRETTY_FUNCTION__)); > > return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] ); > } > > element_type * get() const noexcept > { > return px; > } > > ># 1 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 1 3 4 ># 12 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 > explicit operator bool () const noexcept > { > return px != 0; > } ># 61 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 > bool operator! () const noexcept > { > return px == 0; > } ># 805 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 > > bool unique() const noexcept > { > return pn.unique(); > } > > long use_count() const noexcept > { > return pn.use_count(); > } > > void swap( shared_ptr & other ) noexcept > { > std::swap(px, other.px); > pn.swap(other.pn); > } > > template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const noexcept > { > return pn < rhs.pn; > } > > template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const noexcept > { > return pn < rhs.pn; > } > > template<class Y> bool owner_equals( shared_ptr<Y> const & rhs ) const noexcept > { > return pn == rhs.pn; > } > > template<class Y> bool owner_equals( weak_ptr<Y> const & rhs ) const noexcept > { > return pn == rhs.pn; > } > > std::size_t owner_hash_value() const noexcept > { > return pn.hash_value(); > } > > void * _internal_get_deleter( boost::detail::sp_typeinfo_ const & ti ) const noexcept > { > return pn.get_deleter( ti ); > } > > void * _internal_get_local_deleter( boost::detail::sp_typeinfo_ const & ti ) const noexcept > { > return pn.get_local_deleter( ti ); > } > > void * _internal_get_untyped_deleter() const noexcept > { > return pn.get_untyped_deleter(); > } > > bool _internal_equiv( shared_ptr const & r ) const noexcept > { > return px == r.px && pn == r.pn; > } > > boost::detail::shared_count _internal_count() const noexcept > { > return pn; > } > > > > > > >private: > > template<class Y> friend class shared_ptr; > template<class Y> friend class weak_ptr; > > > > > element_type * px; > boost::detail::shared_count pn; > >}; > >template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) noexcept >{ > return a.get() == b.get(); >} > >template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) noexcept >{ > return a.get() != b.get(); >} ># 913 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 >template<class T> inline bool operator==( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) noexcept >{ > return p.get() == 0; >} > >template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) noexcept >{ > return p.get() == 0; >} > >template<class T> inline bool operator!=( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) noexcept >{ > return p.get() != 0; >} > >template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) noexcept >{ > return p.get() != 0; >} > > > >template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) noexcept >{ > return a.owner_before( b ); >} > >template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) noexcept >{ > a.swap(b); >} > >template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> const & r ) noexcept >{ > (void) static_cast< T* >( static_cast< U* >( 0 ) ); > > typedef typename shared_ptr<T>::element_type E; > > E * p = static_cast< E* >( r.get() ); > return shared_ptr<T>( r, p ); >} > >template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> const & r ) noexcept >{ > (void) const_cast< T* >( static_cast< U* >( 0 ) ); > > typedef typename shared_ptr<T>::element_type E; > > E * p = const_cast< E* >( r.get() ); > return shared_ptr<T>( r, p ); >} > >template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) noexcept >{ > (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); > > typedef typename shared_ptr<T>::element_type E; > > E * p = dynamic_cast< E* >( r.get() ); > return p? shared_ptr<T>( r, p ): shared_ptr<T>(); >} > >template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> const & r ) noexcept >{ > (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); > > typedef typename shared_ptr<T>::element_type E; > > E * p = reinterpret_cast< E* >( r.get() ); > return shared_ptr<T>( r, p ); >} > > > >template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> && r ) noexcept >{ > (void) static_cast< T* >( static_cast< U* >( 0 ) ); > > typedef typename shared_ptr<T>::element_type E; > > E * p = static_cast< E* >( r.get() ); > return shared_ptr<T>( std::move(r), p ); >} > >template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> && r ) noexcept >{ > (void) const_cast< T* >( static_cast< U* >( 0 ) ); > > typedef typename shared_ptr<T>::element_type E; > > E * p = const_cast< E* >( r.get() ); > return shared_ptr<T>( std::move(r), p ); >} > >template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> && r ) noexcept >{ > (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); > > typedef typename shared_ptr<T>::element_type E; > > E * p = dynamic_cast< E* >( r.get() ); > return p? shared_ptr<T>( std::move(r), p ): shared_ptr<T>(); >} > >template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> && r ) noexcept >{ > (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); > > typedef typename shared_ptr<T>::element_type E; > > E * p = reinterpret_cast< E* >( r.get() ); > return shared_ptr<T>( std::move(r), p ); >} > > > > > >template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p) noexcept >{ > return p.get(); >} ># 1058 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 >template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p) > >{ > os << p.get(); > return os; >} ># 1073 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 >namespace detail >{ > >template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) noexcept >{ > return static_cast<D *>( p._internal_get_deleter(typeid(D)) ); >} > >template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) noexcept; >template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) noexcept; > >class esft2_deleter_wrapper >{ >private: > > shared_ptr<void const volatile> deleter_; > >public: > > esft2_deleter_wrapper() noexcept > { > } > > template< class T > void set_deleter( shared_ptr<T> const & deleter ) noexcept > { > deleter_ = deleter; > } > > template<typename D> D* get_deleter() const noexcept > { > return boost::detail::basic_get_deleter<D>( deleter_ ); > } > > template< class T> void operator()( T* ) noexcept > { > (static_cast <bool> (deleter_.use_count() <= 1) ? void (0) : __assert_fail ("deleter_.use_count() <= 1", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 1108, __extension__ __PRETTY_FUNCTION__)); > deleter_.reset(); > } >}; > >} > >template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) noexcept >{ > D * d = boost::detail::basic_get_deleter<D>( p ); > > if( d == 0 ) > { > d = boost::detail::basic_get_local_deleter( d, p ); > } > > if( d == 0 ) > { > boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter<boost::detail::esft2_deleter_wrapper>(p); > > > if(del_wrapper) d = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>(); > } > > return d; >} > > > > > >template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * ) noexcept >{ > return false; >} > >template<class T> shared_ptr<T> atomic_load( shared_ptr<T> const * p ) noexcept >{ > boost::detail::spinlock_pool<2>::scoped_lock lock( p ); > return *p; >} > >template<class T, class M> inline shared_ptr<T> atomic_load_explicit( shared_ptr<T> const * p, M ) noexcept >{ > return atomic_load( p ); >} > >template<class T> void atomic_store( shared_ptr<T> * p, shared_ptr<T> r ) noexcept >{ > boost::detail::spinlock_pool<2>::scoped_lock lock( p ); > p->swap( r ); >} > >template<class T, class M> inline void atomic_store_explicit( shared_ptr<T> * p, shared_ptr<T> r, M ) noexcept >{ > atomic_store( p, r ); >} > >template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T> r ) noexcept >{ > boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); > > sp.lock(); > p->swap( r ); > sp.unlock(); > > return r; >} > >template<class T, class M> shared_ptr<T> inline atomic_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> r, M ) noexcept >{ > return atomic_exchange( p, r ); >} > >template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w ) noexcept >{ > boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); > > sp.lock(); > > if( p->_internal_equiv( *v ) ) > { > p->swap( w ); > > sp.unlock(); > > return true; > } > else > { > shared_ptr<T> tmp( *p ); > > sp.unlock(); > > tmp.swap( *v ); > return false; > } >} > >template<class T, class M> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w, M, M ) noexcept >{ > return atomic_compare_exchange( p, v, w ); >} > > > > > >template< class T > struct hash; > >template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) noexcept >{ > return boost::hash< typename boost::shared_ptr<T>::element_type* >()( p.get() ); >} > >} > > > > > >namespace std >{ > >template<class T> struct hash< ::boost::shared_ptr<T> > >{ > std::size_t operator()( ::boost::shared_ptr<T> const & p ) const noexcept > { > return std::hash< typename ::boost::shared_ptr<T>::element_type* >()( p.get() ); > } >}; > >} > > > ># 1 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 1 3 4 ># 20 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 3 4 ># 1 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 1 3 4 ># 24 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 3 4 >namespace boost >{ > >namespace detail >{ > >class __attribute__((__visibility__("default"))) local_counted_base >{ >private: > > local_counted_base & operator= ( local_counted_base const & ); > >private: > > > enum count_type { min_ = 0, initial_ = 1, max_ = 2147483647 }; > > count_type local_use_count_; > >public: > > constexpr local_counted_base() noexcept: local_use_count_( initial_ ) > { > } > > constexpr local_counted_base( local_counted_base const & ) noexcept: local_use_count_( initial_ ) > { > } > > virtual ~local_counted_base() > { > } > > virtual void local_cb_destroy() noexcept = 0; > > virtual boost::detail::shared_count local_cb_get_shared_count() const noexcept = 0; > > void add_ref() noexcept > { ># 73 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 3 4 > local_use_count_ = static_cast<count_type>( local_use_count_ + 1 ); > } > > void release() noexcept > { > local_use_count_ = static_cast<count_type>( local_use_count_ - 1 ); > > if( local_use_count_ == 0 ) > { > local_cb_destroy(); > } > } > > long local_use_count() const noexcept > { > return local_use_count_; > } >}; > >class __attribute__((__visibility__("default"))) local_counted_impl: public local_counted_base >{ >private: > > local_counted_impl( local_counted_impl const & ); > >private: > > shared_count pn_; > >public: > > explicit local_counted_impl( shared_count const& pn ) noexcept: pn_( pn ) > { > } > > > > explicit local_counted_impl( shared_count && pn ) noexcept: pn_( std::move(pn) ) > { > } > > > > void local_cb_destroy() noexcept override > { > delete this; > } > > boost::detail::shared_count local_cb_get_shared_count() const noexcept override > { > return pn_; > } >}; > >class __attribute__((__visibility__("default"))) local_counted_impl_em: public local_counted_base >{ >public: > > shared_count pn_; > > void local_cb_destroy() noexcept override > { > shared_count().swap( pn_ ); > } > > boost::detail::shared_count local_cb_get_shared_count() const noexcept override > { > return pn_; > } >}; > >} > >} ># 21 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 2 3 4 > > >namespace boost >{ > >namespace detail >{ > >template<class D> class local_sp_deleter: public local_counted_impl_em >{ >private: > > D d_; > >public: > > local_sp_deleter(): d_() > { > } > > explicit local_sp_deleter( D const& d ) noexcept: d_( d ) > { > } > > > > explicit local_sp_deleter( D&& d ) noexcept: d_( std::move(d) ) > { > } > > > > D& deleter() noexcept > { > return d_; > } > > template<class Y> void operator()( Y* p ) noexcept > { > d_( p ); > } > > > > void operator()( boost::detail::sp_nullptr_t p ) noexcept > { > d_( p ); > } > > >}; > >template<> class local_sp_deleter<void> >{ >}; > >template<class D> D * get_local_deleter( local_sp_deleter<D> * p ) noexcept >{ > return &p->deleter(); >} > >inline void * get_local_deleter( local_sp_deleter<void> * ) noexcept >{ > return 0; >} > >} > >} ># 1245 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 > >namespace boost >{ > >namespace detail >{ > >template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) noexcept >{ > return static_cast<D *>( p._internal_get_local_deleter( typeid(local_sp_deleter<D>) ) ); >} > >template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) noexcept >{ > return static_cast<D *>( p._internal_get_local_deleter( typeid(local_sp_deleter<D>) ) ); >} > >} > > > >template<class T> shared_ptr( weak_ptr<T> ) -> shared_ptr<T>; >template<class T, class D> shared_ptr( std::unique_ptr<T, D> ) -> shared_ptr<T>; > > > >} > > >#pragma GCC diagnostic pop ># 18 "/usr/include/boost/shared_ptr.hpp" 2 3 4 ># 23 "/usr/include/boost/format/alt_sstream.hpp" 2 3 4 > ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 25 "/usr/include/boost/format/alt_sstream.hpp" 2 3 4 > >namespace boost { > namespace io { > > template<class Ch, class Tr=::std::char_traits<Ch>, > class Alloc=::std::allocator<Ch> > > class basic_altstringbuf; > > template<class Ch, class Tr =::std::char_traits<Ch>, > class Alloc=::std::allocator<Ch> > > class basic_oaltstringstream; > > > template<class Ch, class Tr, class Alloc> > class basic_altstringbuf > : public ::std::basic_streambuf<Ch, Tr> > { > typedef ::std::basic_streambuf<Ch, Tr> streambuf_t; > typedef typename CompatAlloc<Alloc>::compatible_type compat_allocator_type; > typedef typename CompatTraits<Tr>::compatible_type compat_traits_type; > public: > typedef Ch char_type; > typedef Tr traits_type; > typedef typename compat_traits_type::int_type int_type; > typedef typename compat_traits_type::pos_type pos_type; > typedef typename compat_traits_type::off_type off_type; > typedef Alloc allocator_type; > typedef ::std::basic_string<Ch, Tr, Alloc> string_type; > typedef typename string_type::size_type size_type; > > typedef ::std::streamsize streamsize; > > > explicit basic_altstringbuf(std::ios_base::openmode mode > = std::ios_base::in | std::ios_base::out) > : putend_(__null), is_allocated_(false), mode_(mode) > {} > explicit basic_altstringbuf(const string_type& s, > ::std::ios_base::openmode mode > = ::std::ios_base::in | ::std::ios_base::out) > : putend_(__null), is_allocated_(false), mode_(mode) > { dealloc(); str(s); } > virtual ~basic_altstringbuf() noexcept > { dealloc(); } > using streambuf_t::pbase; > using streambuf_t::pptr; > using streambuf_t::epptr; > using streambuf_t::eback; > using streambuf_t::gptr; > using streambuf_t::egptr; > > void clear_buffer(); > void str(const string_type& s); > > > Ch * begin() const; > size_type size() const; > size_type cur_size() const; > Ch * pend() const > { return ((putend_ < pptr()) ? pptr() : putend_); } > size_type pcount() const > { return static_cast<size_type>( pptr() - pbase()) ;} > > > string_type str() const > { return string_type(begin(), size()); } > string_type cur_str() const > { return string_type(begin(), cur_size()); } > protected: > explicit basic_altstringbuf (basic_altstringbuf * s, > ::std::ios_base::openmode mode > = ::std::ios_base::in | ::std::ios_base::out) > : putend_(__null), is_allocated_(false), mode_(mode) > { dealloc(); str(s); } > > virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, > ::std::ios_base::openmode which > = ::std::ios_base::in | ::std::ios_base::out); > virtual pos_type seekpos (pos_type pos, > ::std::ios_base::openmode which > = ::std::ios_base::in | ::std::ios_base::out); > virtual int_type underflow(); > virtual int_type pbackfail(int_type meta = compat_traits_type::eof()); > virtual int_type overflow(int_type meta = compat_traits_type::eof()); > void dealloc(); > private: > enum { alloc_min = 256}; > > Ch *putend_; > bool is_allocated_; > ::std::ios_base::openmode mode_; > compat_allocator_type alloc_; > }; > > > > template <class Ch, class Tr, class Alloc> > class basic_oaltstringstream > : private base_from_member< shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, > public ::std::basic_ostream<Ch, Tr> > { > class No_Op { > > public: > template<class T> > const T & operator()(const T & arg) { return arg; } > }; > typedef ::std::basic_ostream<Ch, Tr> stream_t; > typedef boost::base_from_member<boost::shared_ptr< > basic_altstringbuf<Ch,Tr, Alloc> > > > pbase_type; > typedef ::std::basic_string<Ch, Tr, Alloc> string_type; > typedef typename string_type::size_type size_type; > typedef basic_altstringbuf<Ch, Tr, Alloc> stringbuf_t; > public: > typedef Alloc allocator_type; > basic_oaltstringstream() > : pbase_type(new stringbuf_t), stream_t(pbase_type::member.get()) > { } > basic_oaltstringstream(::boost::shared_ptr<stringbuf_t> buf) > : pbase_type(buf), stream_t(pbase_type::member.get()) > { } > basic_oaltstringstream(stringbuf_t * buf) > : pbase_type(buf, No_Op() ), stream_t(pbase_type::member.get()) > { } > stringbuf_t * rdbuf() const > { return pbase_type::member.get(); } > void clear_buffer() > { rdbuf()->clear_buffer(); } > > > Ch * begin() const > { return rdbuf()->begin(); } > size_type size() const > { return rdbuf()->size(); } > size_type cur_size() const > { return rdbuf()->cur_size(); } > > > string_type str() const > { return rdbuf()->str(); } > string_type cur_str() const > { return rdbuf()->cur_str(); } > void str(const string_type& s) > { rdbuf()->str(s); } > }; > > } >} > ># 1 "/usr/include/boost/format/alt_sstream_impl.hpp" 1 3 4 ># 16 "/usr/include/boost/format/alt_sstream_impl.hpp" 3 4 >namespace boost { > namespace io { > > > template<class Ch, class Tr, class Alloc> > void basic_altstringbuf<Ch, Tr, Alloc>:: > clear_buffer () { > const Ch * p = pptr(); > const Ch * b = pbase(); > if(p != __null && p != b) { > seekpos(0, ::std::ios_base::out); > } > p = gptr(); > b = eback(); > if(p != __null && p != b) { > seekpos(0, ::std::ios_base::in); > } > } > > template<class Ch, class Tr, class Alloc> > void basic_altstringbuf<Ch, Tr, Alloc>:: > str (const string_type& s) { > size_type sz=s.size(); > if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) { > > > > > Ch *new_ptr = boost::allocator_allocate(alloc_, sz, is_allocated_? eback() : 0); > > > dealloc(); > sz = s.copy(new_ptr, sz); > putend_ = new_ptr + sz; > if(mode_ & ::std::ios_base::in) > streambuf_t::setg(new_ptr, new_ptr, new_ptr + sz); > if(mode_ & ::std::ios_base::out) { > streambuf_t::setp(new_ptr, new_ptr + sz); > if(mode_ & (::std::ios_base::app | ::std::ios_base::ate)) > streambuf_t::pbump(static_cast<int>(sz)); > if(gptr() == __null) > streambuf_t::setg(new_ptr, __null, new_ptr); > } > is_allocated_ = true; > } > else > dealloc(); > } > template<class Ch, class Tr, class Alloc> > Ch* basic_altstringbuf<Ch, Tr, Alloc>:: > begin () const { > if(mode_ & ::std::ios_base::out && pptr() != __null) > return pbase(); > else if(mode_ & ::std::ios_base::in && gptr() != __null) > return eback(); > return __null; > } > > template<class Ch, class Tr, class Alloc> > typename std::basic_string<Ch,Tr,Alloc>::size_type > basic_altstringbuf<Ch, Tr, Alloc>:: > size () const { > if(mode_ & ::std::ios_base::out && pptr()) > return static_cast<size_type>(pend() - pbase()); > else if(mode_ & ::std::ios_base::in && gptr()) > return static_cast<size_type>(egptr() - eback()); > else > return 0; > } > > template<class Ch, class Tr, class Alloc> > typename std::basic_string<Ch,Tr,Alloc>::size_type > basic_altstringbuf<Ch, Tr, Alloc>:: > cur_size () const { > if(mode_ & ::std::ios_base::out && pptr()) > return static_cast<streamsize>( pptr() - pbase()); > else if(mode_ & ::std::ios_base::in && gptr()) > return static_cast<streamsize>( gptr() - eback()); > else > return 0; > } > > template<class Ch, class Tr, class Alloc> > typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type > basic_altstringbuf<Ch, Tr, Alloc>:: > seekoff (off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { > if(pptr() != __null && putend_ < pptr()) > putend_ = pptr(); > if(which & ::std::ios_base::in && gptr() != __null) { > > if(way == ::std::ios_base::end) > off += static_cast<off_type>(putend_ - gptr()); > else if(way == ::std::ios_base::beg) > off += static_cast<off_type>(eback() - gptr()); > else if(way != ::std::ios_base::cur || (which & ::std::ios_base::out) ) > > return pos_type(off_type(-1)); > if(eback() <= off+gptr() && off+gptr() <= putend_ ) { > > streambuf_t::gbump(static_cast<int>(off)); > if(which & ::std::ios_base::out && pptr() != __null) > > streambuf_t::pbump(static_cast<int>(gptr()-pptr())); > } > else > off = off_type(-1); > } > else if(which & ::std::ios_base::out && pptr() != __null) { > > if(way == ::std::ios_base::end) > off += static_cast<off_type>(putend_ - pptr()); > else if(way == ::std::ios_base::beg) > off += static_cast<off_type>(pbase() - pptr()); > else if(way != ::std::ios_base::beg) > return pos_type(off_type(-1)); > if(pbase() <= off+pptr() && off+pptr() <= putend_) > > streambuf_t::pbump(static_cast<int>(off)); > else > off = off_type(-1); > } > else > off = off_type(-1); > return (pos_type(off)); > } > > > > template<class Ch, class Tr, class Alloc> > typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type > basic_altstringbuf<Ch, Tr, Alloc>:: > seekpos (pos_type pos, ::std::ios_base::openmode which) { > off_type off = off_type(pos); > if(pptr() != __null && putend_ < pptr()) > putend_ = pptr(); > if(off != off_type(-1)) { > if(which & ::std::ios_base::in && gptr() != __null) { > > if(0 <= off && off <= putend_ - eback()) { > streambuf_t::gbump(static_cast<int>(eback() - gptr() + off)); > if(which & ::std::ios_base::out && pptr() != __null) { > > streambuf_t::pbump(static_cast<int>(gptr()-pptr())); > } > } > else > off = off_type(-1); > } > else if(which & ::std::ios_base::out && pptr() != __null) { > > if(0 <= off && off <= putend_ - eback()) > streambuf_t::pbump(static_cast<int>(eback() - pptr() + off)); > else > off = off_type(-1); > } > else > off = off_type(-1); > return (pos_type(off)); > } > else { > (static_cast <bool> (0) ? void (0) : __assert_fail ("0", "/usr/include/boost/format/alt_sstream_impl.hpp", 176, __extension__ __PRETTY_FUNCTION__)); > return pos_type(off_type(-1)); > } > } > > > > template<class Ch, class Tr, class Alloc> > typename basic_altstringbuf<Ch, Tr, Alloc>::int_type > basic_altstringbuf<Ch, Tr, Alloc>:: > underflow () { > if(gptr() == __null) > return (compat_traits_type::eof()); > else if(gptr() < egptr()) > return (compat_traits_type::to_int_type(*gptr())); > else if(mode_ & ::std::ios_base::in && pptr() != __null > && (gptr() < pptr() || gptr() < putend_) ) > { > if(putend_ < pptr()) > putend_ = pptr(); > streambuf_t::setg(eback(), gptr(), putend_); > return (compat_traits_type::to_int_type(*gptr())); > } > else > return (compat_traits_type::eof()); > } > > > > template<class Ch, class Tr, class Alloc> > typename basic_altstringbuf<Ch, Tr, Alloc>::int_type > basic_altstringbuf<Ch, Tr, Alloc>:: > pbackfail (int_type meta) { > if(gptr() != __null && (eback() < gptr()) > && (mode_ & (::std::ios_base::out) > || compat_traits_type::eq_int_type(compat_traits_type::eof(), meta) > || compat_traits_type::eq(compat_traits_type::to_char_type(meta), gptr()[-1]) ) ) { > streambuf_t::gbump(-1); > if(!compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) > > *gptr() = compat_traits_type::to_char_type(meta); > return (compat_traits_type::not_eof(meta)); > } > else > return (compat_traits_type::eof()); > } > > > > template<class Ch, class Tr, class Alloc> > typename basic_altstringbuf<Ch, Tr, Alloc>::int_type > basic_altstringbuf<Ch, Tr, Alloc>:: > overflow (int_type meta) { > > > > > if(compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) > return compat_traits_type::not_eof(meta); > else if(pptr() != __null && pptr() < epptr()) { > streambuf_t::sputc(compat_traits_type::to_char_type(meta)); > return meta; > } > else if(! (mode_ & ::std::ios_base::out)) > > return compat_traits_type::eof(); > else { > std::size_t prev_size = pptr() == __null ? 0 : epptr() - eback(); > std::size_t new_size = prev_size; > > std::size_t add_size = new_size / 2; > if(add_size < alloc_min) > add_size = alloc_min; > Ch * newptr = __null, *oldptr = eback(); > > > while (0 < add_size && ((std::numeric_limits<std::size_t>::max)() > - add_size < new_size) ) > add_size /= 2; > if(0 < add_size) { > new_size += add_size; > > > > > newptr = boost::allocator_allocate(alloc_, new_size, is_allocated_? oldptr : 0); > > } > > if(0 < prev_size) > compat_traits_type::copy(newptr, oldptr, prev_size); > if(is_allocated_) > alloc_.deallocate(oldptr, prev_size); > is_allocated_=true; > > if(prev_size == 0) { > putend_ = newptr; > streambuf_t::setp(newptr, newptr + new_size); > if(mode_ & ::std::ios_base::in) > streambuf_t::setg(newptr, newptr, newptr + 1); > else > streambuf_t::setg(newptr, 0, newptr); > } > else { > putend_ = putend_ - oldptr + newptr; > int pptr_count = static_cast<int>(pptr()-pbase()); > int gptr_count = static_cast<int>(gptr()-eback()); > streambuf_t::setp(pbase() - oldptr + newptr, newptr + new_size); > streambuf_t::pbump(pptr_count); > if(mode_ & ::std::ios_base::in) > streambuf_t::setg(newptr, newptr + gptr_count, pptr() + 1); > else > streambuf_t::setg(newptr, 0, newptr); > } > streambuf_t::sputc(compat_traits_type::to_char_type(meta)); > return meta; > } > > > > } > > > template<class Ch, class Tr, class Alloc> > void basic_altstringbuf<Ch, Tr, Alloc>:: dealloc() { > if(is_allocated_) > alloc_.deallocate(eback(), (pptr() != __null ? epptr() : egptr()) - eback()); > is_allocated_ = false; > streambuf_t::setg(0, 0, 0); > streambuf_t::setp(0, 0); > putend_ = __null; > } > > } >} ># 176 "/usr/include/boost/format/alt_sstream.hpp" 2 3 4 ># 25 "/usr/include/boost/format/internals.hpp" 2 3 4 > >namespace boost { >namespace io { >namespace detail { > > > > > > template<class Ch, class Tr> > struct stream_format_state > { > typedef ::std:: basic_ios<Ch, Tr> basic_ios; > > stream_format_state(Ch fill) { reset(fill); } > > > void reset(Ch fill); > void set_by_stream(const basic_ios& os); > void apply_on(basic_ios & os, > boost::io::detail::locale_t * loc_default = 0) const; > template<class T> > void apply_manip(T manipulator) > { apply_manip_body<Ch, Tr, T>( *this, manipulator) ; } > > > std::streamsize width_; > std::streamsize precision_; > Ch fill_; > std::ios_base::fmtflags flags_; > std::ios_base::iostate rdstate_; > std::ios_base::iostate exceptions_; > boost::optional<boost::io::detail::locale_t> loc_; > }; > > > > > > template<class Ch, class Tr, class Alloc> > struct format_item > { > enum pad_values { zeropad = 1, spacepad =2, centered=4, tabulation = 8 }; > > > > enum arg_values { argN_no_posit = -1, > argN_tabulation = -2, > argN_ignored = -3 > }; > typedef ::std:: basic_ios<Ch, Tr> basic_ios; > typedef detail::stream_format_state<Ch, Tr> stream_format_state; > typedef ::std::basic_string<Ch, Tr, Alloc> string_type; > > format_item(Ch fill) :argN_(argN_no_posit), fmtstate_(fill), > truncate_(max_streamsize()), pad_scheme_(0) {} > void reset(Ch fill); > void compute_states(); > > static std::streamsize max_streamsize() { > return (std::numeric_limits<std::streamsize>::max)(); > } > > > int argN_; > > string_type res_; > string_type appendix_; > > stream_format_state fmtstate_; > > std::streamsize truncate_; > unsigned int pad_scheme_; > }; > > > > > > > template<class Ch, class Tr> > void stream_format_state<Ch,Tr>:: apply_on (basic_ios & os, > boost::io::detail::locale_t * loc_default) const { > > > if(loc_) > os.imbue(loc_.get()); > else if(loc_default) > os.imbue(*loc_default); > > > > > if(width_ != -1) > os.width(width_); > if(precision_ != -1) > os.precision(precision_); > if(fill_ != 0) > os.fill(fill_); > os.flags(flags_); > os.clear(rdstate_); > os.exceptions(exceptions_); > } > > template<class Ch, class Tr> > void stream_format_state<Ch,Tr>:: set_by_stream(const basic_ios& os) { > > flags_ = os.flags(); > width_ = os.width(); > precision_ = os.precision(); > fill_ = os.fill(); > rdstate_ = os.rdstate(); > exceptions_ = os.exceptions(); > } > > > template<class Ch, class Tr, class T> > void apply_manip_body( stream_format_state<Ch, Tr>& self, > T manipulator) { > > basic_oaltstringstream<Ch, Tr> ss; > self.apply_on( ss ); > ss << manipulator; > self.set_by_stream( ss ); > } > > template<class Ch, class Tr> inline > void stream_format_state<Ch,Tr>:: reset(Ch fill) { > > width_=0; precision_=6; > fill_=fill; > flags_ = std::ios_base::dec | std::ios_base::skipws; > > exceptions_ = std::ios_base::goodbit; > rdstate_ = std::ios_base::goodbit; > } > > > > > template<class Ch, class Tr, class Alloc> > void format_item<Ch, Tr, Alloc>:: > reset (Ch fill) { > argN_=argN_no_posit; truncate_ = max_streamsize(); pad_scheme_ =0; > res_.resize(0); appendix_.resize(0); > fmtstate_.reset(fill); > } > > template<class Ch, class Tr, class Alloc> > void format_item<Ch, Tr, Alloc>:: > compute_states() { > > > if(pad_scheme_ & zeropad) { > > if(fmtstate_.flags_ & std::ios_base::left) { > (static_cast <bool> (!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left))) ? void (0) : __assert_fail ("!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left))", "/usr/include/boost/format/internals.hpp", 181, __extension__ __PRETTY_FUNCTION__)); > > pad_scheme_ = pad_scheme_ & (~zeropad); > } > else { > pad_scheme_ &= ~spacepad; > fmtstate_.fill_='0'; > fmtstate_.flags_ = (fmtstate_.flags_ & ~std::ios_base::adjustfield) > | std::ios_base::internal; > > } > } > if(pad_scheme_ & spacepad) { > if(fmtstate_.flags_ & std::ios_base::showpos) > pad_scheme_ &= ~spacepad; > } > } > > >} } } ># 39 "/usr/include/boost/format.hpp" 2 3 4 > > ># 1 "/usr/include/boost/format/format_class.hpp" 1 3 4 ># 27 "/usr/include/boost/format/format_class.hpp" 3 4 >namespace boost { > > template<class Ch, class Tr, class Alloc> > class basic_format > { > typedef typename io::CompatTraits<Tr>::compatible_type compat_traits; > public: > typedef Ch CharT; > typedef std::basic_string<Ch, Tr, Alloc> string_type; > typedef typename string_type::size_type size_type; > typedef io::detail::format_item<Ch, Tr, Alloc> format_item_t; > typedef io::basic_altstringbuf<Ch, Tr, Alloc> internal_streambuf_t; > > > explicit basic_format(const Ch* str=__null); > explicit basic_format(const string_type& s); > basic_format(const basic_format& x); > basic_format& operator= (const basic_format& x); > void swap(basic_format& x); > > > explicit basic_format(const Ch* str, const std::locale & loc); > explicit basic_format(const string_type& s, const std::locale & loc); > > io::detail::locale_t getloc() const; > > basic_format& clear(); > basic_format& clear_binds(); > basic_format& parse(const string_type&); > > > size_type size() const; > string_type str() const; > > > template<class T> > basic_format& operator%(const T& x) > { return io::detail::feed<CharT, Tr, Alloc, const T&>(*this,x); } > > > template<class T> basic_format& operator%(T& x) > { return io::detail::feed<CharT, Tr, Alloc, T&>(*this,x); } > > > template<class T> > basic_format& operator%(volatile const T& x) > { const T v(x); > return io::detail::feed<CharT, Tr, Alloc, const T&>(*this, v); } > > > template<class T> > basic_format& operator%(volatile T& x) > { T v(x); > return io::detail::feed<CharT, Tr, Alloc, T&>(*this, v); } > > > > > > basic_format& operator%(const int& x) > { return io::detail::feed<CharT, Tr, Alloc, const int&>(*this,x); } > > > basic_format& operator%(int& x) > { return io::detail::feed<CharT, Tr, Alloc, int&>(*this,x); } > > > > > int expected_args() const > { return num_args_; } > > int bound_args() const; > > int fed_args() const; > > int cur_arg() const; > > int remaining_args() const; > > > > template<class T> > basic_format& bind_arg(int argN, const T& val) > { return io::detail::bind_arg_body(*this, argN, val); } > basic_format& clear_bind(int argN); > template<class T> > basic_format& modify_item(int itemN, T manipulator) > { return io::detail::modify_item_body<Ch,Tr, Alloc, T> (*this, itemN, manipulator);} > > > unsigned char exceptions() const; > unsigned char exceptions(unsigned char newexcept); ># 128 "/usr/include/boost/format/format_class.hpp" 3 4 > template<class Ch2, class Tr2, class Alloc2> > friend std::basic_ostream<Ch2, Tr2> & > operator<<( std::basic_ostream<Ch2, Tr2> & , > const basic_format<Ch2, Tr2, Alloc2>& ); > > > > > > > > template<class Ch2, class Tr2, class Alloc2, class T> > friend basic_format<Ch2, Tr2, Alloc2>& > io::detail::feed_impl (basic_format<Ch2, Tr2, Alloc2>&, T); > > template<class Ch2, class Tr2, class Alloc2, class T> friend > void io::detail::distribute (basic_format<Ch2, Tr2, Alloc2>&, T); > > template<class Ch2, class Tr2, class Alloc2, class T> friend > basic_format<Ch2, Tr2, Alloc2>& > io::detail::modify_item_body (basic_format<Ch2, Tr2, Alloc2>&, int, T); > > template<class Ch2, class Tr2, class Alloc2, class T> friend > basic_format<Ch2, Tr2, Alloc2>& > io::detail::bind_arg_body (basic_format<Ch2, Tr2, Alloc2>&, int, const T&); > > private: > > typedef io::detail::stream_format_state<Ch, Tr> stream_format_state; > > enum style_values { ordered = 1, > special_needs = 4 }; > > void make_or_reuse_data(std::size_t nbitems); > > > std::vector<format_item_t> items_; > std::vector<bool> bound_; > > int style_; > int cur_arg_; > int num_args_; > mutable bool dumped_; > string_type prefix_; > unsigned char exceptions_; > internal_streambuf_t buf_; > boost::optional<io::detail::locale_t> loc_; > }; > >} ># 42 "/usr/include/boost/format.hpp" 2 3 4 > > ># 1 "/usr/include/boost/format/exceptions.hpp" 1 3 4 ># 23 "/usr/include/boost/format/exceptions.hpp" 3 4 >namespace boost { > > namespace io { > > > > class format_error : public std::exception > { > public: > format_error() {} > virtual const char *what() const throw() { > return "boost::format_error: " > "format generic failure"; > } > }; > > class bad_format_string : public format_error > { > std::size_t pos_, next_; > public: > bad_format_string(std::size_t pos, std::size_t size) > : pos_(pos), next_(size) {} > std::size_t get_pos() const { return pos_; } > std::size_t get_next() const { return next_; } > virtual const char *what() const throw() { > return "boost::bad_format_string: format-string is ill-formed"; > } > }; > > class too_few_args : public format_error > { > std::size_t cur_, expected_; > public: > too_few_args(std::size_t cur, std::size_t expected) > : cur_(cur), expected_(expected) {} > std::size_t get_cur() const { return cur_; } > std::size_t get_expected() const { return expected_; } > virtual const char *what() const throw() { > return "boost::too_few_args: " > "format-string referred to more arguments than were passed"; > } > }; > > class too_many_args : public format_error > { > std::size_t cur_, expected_; > public: > too_many_args(std::size_t cur, std::size_t expected) > : cur_(cur), expected_(expected) {} > std::size_t get_cur() const { return cur_; } > std::size_t get_expected() const { return expected_; } > virtual const char *what() const throw() { > return "boost::too_many_args: " > "format-string referred to fewer arguments than were passed"; > } > }; > > > class out_of_range : public format_error > { > int index_, beg_, end_; > public: > out_of_range(int index, int beg, int end) > : index_(index), beg_(beg), end_(end) {} > int get_index() const { return index_; } > int get_beg() const { return beg_; } > int get_end() const { return end_; } > virtual const char *what() const throw() { > return "boost::out_of_range: " > "tried to refer to an argument (or item) number which" > " is out of range, according to the format string"; > } > }; > > > } > >} ># 45 "/usr/include/boost/format.hpp" 2 3 4 > > ># 1 "/usr/include/boost/format/format_implementation.hpp" 1 3 4 ># 19 "/usr/include/boost/format/format_implementation.hpp" 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 20 "/usr/include/boost/format/format_implementation.hpp" 2 3 4 > > > >namespace boost { > > > > template< class Ch, class Tr, class Alloc> > basic_format<Ch, Tr, Alloc>:: basic_format(const Ch* s) > : style_(0), cur_arg_(0), num_args_(0), dumped_(false), > exceptions_(io::all_error_bits) > { > if( s) > parse( s ); > } > > > template< class Ch, class Tr, class Alloc> > basic_format<Ch, Tr, Alloc>:: basic_format(const Ch* s, const std::locale & loc) > : style_(0), cur_arg_(0), num_args_(0), dumped_(false), > exceptions_(io::all_error_bits), loc_(loc) > { > if(s) parse( s ); > } > > template< class Ch, class Tr, class Alloc> > basic_format<Ch, Tr, Alloc>:: basic_format(const string_type& s, const std::locale & loc) > : style_(0), cur_arg_(0), num_args_(0), dumped_(false), > exceptions_(io::all_error_bits), loc_(loc) > { > parse(s); > } > > template< class Ch, class Tr, class Alloc> > io::detail::locale_t basic_format<Ch, Tr, Alloc>:: > getloc() const { > return loc_ ? loc_.get() : io::detail::locale_t(); > } > > template< class Ch, class Tr, class Alloc> > basic_format<Ch, Tr, Alloc>:: basic_format(const string_type& s) > : style_(0), cur_arg_(0), num_args_(0), dumped_(false), > exceptions_(io::all_error_bits) > { > parse(s); > } > > template< class Ch, class Tr, class Alloc> > basic_format<Ch, Tr, Alloc>:: basic_format(const basic_format& x) > : items_(x.items_), bound_(x.bound_), style_(x.style_), > cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(x.dumped_), > prefix_(x.prefix_), exceptions_(x.exceptions_), loc_(x.loc_) > { > } > > template< class Ch, class Tr, class Alloc> > basic_format<Ch, Tr, Alloc>& basic_format<Ch, Tr, Alloc>:: > operator= (const basic_format& x) { > if(this == &x) > return *this; > (basic_format<Ch, Tr, Alloc>(x)).swap(*this); > return *this; > } > template< class Ch, class Tr, class Alloc> > void basic_format<Ch, Tr, Alloc>:: > swap (basic_format & x) { > std::swap(exceptions_, x.exceptions_); > std::swap(style_, x.style_); > std::swap(cur_arg_, x.cur_arg_); > std::swap(num_args_, x.num_args_); > std::swap(dumped_, x.dumped_); > > items_.swap(x.items_); > prefix_.swap(x.prefix_); > bound_.swap(x.bound_); > } > > template< class Ch, class Tr, class Alloc> > unsigned char basic_format<Ch,Tr, Alloc>:: exceptions() const { > return exceptions_; > } > > template< class Ch, class Tr, class Alloc> > unsigned char basic_format<Ch,Tr, Alloc>:: exceptions(unsigned char newexcept) { > unsigned char swp = exceptions_; > exceptions_ = newexcept; > return swp; > } > > template<class Ch, class Tr, class Alloc> > void basic_format<Ch, Tr, Alloc>:: > make_or_reuse_data (std::size_t nbitems) { > > Ch fill = ( std::use_facet< std::ctype<Ch> >(getloc()) ). widen(' '); > > > > if(items_.size() == 0) > items_.assign( nbitems, format_item_t(fill) ); > else { > if(nbitems>items_.size()) > items_.resize(nbitems, format_item_t(fill)); > bound_.resize(0); > for(std::size_t i=0; i < nbitems; ++i) > items_[i].reset(fill); > } > prefix_.resize(0); > } > > template< class Ch, class Tr, class Alloc> > basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>:: > clear () { > > > > (static_cast <bool> (bound_.size()==0 || num_args_ == static_cast<int>(bound_.size())) ? void (0) : __assert_fail ("bound_.size()==0 || num_args_ == static_cast<int>(bound_.size())", "/usr/include/boost/format/format_implementation.hpp", 135, __extension__ __PRETTY_FUNCTION__)); > > for(unsigned long i=0; i<items_.size(); ++i) { > > if( bound_.size()==0 || items_[i].argN_<0 || !bound_[ items_[i].argN_ ] ) > items_[i].res_.resize(0); > } > cur_arg_=0; dumped_=false; > > if(bound_.size() != 0) { > for(; cur_arg_ < num_args_ && bound_[cur_arg_]; ++cur_arg_) > {} > } > return *this; > } > > template< class Ch, class Tr, class Alloc> > basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>:: > clear_binds () { > > bound_.resize(0); > clear(); > return *this; > } > > template< class Ch, class Tr, class Alloc> > basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>:: > clear_bind (int argN) { > > if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] ) { > if( exceptions() & io::out_of_range_bit) > boost::throw_exception(io::out_of_range(argN, 1, num_args_+1 ) ); > else return *this; > } > bound_[argN-1]=false; > clear(); > return *this; > } > > template< class Ch, class Tr, class Alloc> > int basic_format<Ch,Tr, Alloc>:: > bound_args() const { > if(bound_.size()==0) > return 0; > int n=0; > for(int i=0; i<num_args_ ; ++i) > if(bound_[i]) > ++n; > return n; > } > > template< class Ch, class Tr, class Alloc> > int basic_format<Ch,Tr, Alloc>:: > fed_args() const { > if(bound_.size()==0) > return cur_arg_; > int n=0; > for(int i=0; i<cur_arg_ ; ++i) > if(!bound_[i]) > ++n; > return n; > } > > template< class Ch, class Tr, class Alloc> > int basic_format<Ch,Tr, Alloc>:: > cur_arg() const { > return cur_arg_+1; } > > template< class Ch, class Tr, class Alloc> > int basic_format<Ch,Tr, Alloc>:: > remaining_args() const { > if(bound_.size()==0) > return num_args_-cur_arg_; > int n=0; > for(int i=cur_arg_; i<num_args_ ; ++i) > if(!bound_[i]) > ++n; > return n; > } > > template< class Ch, class Tr, class Alloc> > typename basic_format<Ch, Tr, Alloc>::string_type > basic_format<Ch,Tr, Alloc>:: > str () const { > if(items_.size()==0) > return prefix_; > if( cur_arg_ < num_args_) > if( exceptions() & io::too_few_args_bit ) > > boost::throw_exception(io::too_few_args(cur_arg_, num_args_)); > > unsigned long i; > string_type res; > res.reserve(size()); > res += prefix_; > for(i=0; i < items_.size(); ++i) { > const format_item_t& item = items_[i]; > res += item.res_; > if( item.argN_ == format_item_t::argN_tabulation) { > (static_cast <bool> (item.pad_scheme_ & format_item_t::tabulation) ? void (0) : __assert_fail ("item.pad_scheme_ & format_item_t::tabulation", "/usr/include/boost/format/format_implementation.hpp", 234, __extension__ __PRETTY_FUNCTION__)); > if( static_cast<size_type>(item.fmtstate_.width_) > res.size() ) > res.append( static_cast<size_type>(item.fmtstate_.width_) - res.size(), > item.fmtstate_.fill_ ); > } > res += item.appendix_; > } > dumped_=true; > return res; > } > template< class Ch, class Tr, class Alloc> > typename std::basic_string<Ch, Tr, Alloc>::size_type basic_format<Ch,Tr, Alloc>:: > size () const { > > > > > > > > using std::max; > size_type sz = prefix_.size(); > unsigned long i; > for(i=0; i < items_.size(); ++i) { > const format_item_t& item = items_[i]; > sz += item.res_.size(); > if( item.argN_ == format_item_t::argN_tabulation) > sz = max (sz, > static_cast<size_type>(item.fmtstate_.width_) ); > sz += item.appendix_.size(); > } > return sz; > > > > } > >namespace io { >namespace detail { > > template<class Ch, class Tr, class Alloc, class T> > basic_format<Ch, Tr, Alloc>& > bind_arg_body (basic_format<Ch, Tr, Alloc>& self, int argN, const T& val) { > > > if(self.dumped_) > self.clear(); > if(argN<1 || argN > self.num_args_) { > if( self.exceptions() & io::out_of_range_bit ) > boost::throw_exception(io::out_of_range(argN, 1, self.num_args_+1 ) ); > else return self; > } > if(self.bound_.size()==0) > self.bound_.assign(self.num_args_,false); > else > (static_cast <bool> (self.num_args_ == static_cast<signed int>(self.bound_.size())) ? void (0) : __assert_fail ("self.num_args_ == static_cast<signed int>(self.bound_.size())", "/usr/include/boost/format/format_implementation.hpp", 289, __extension__ __PRETTY_FUNCTION__)); > int o_cur_arg = self.cur_arg_; > self.cur_arg_ = argN-1; > > self.bound_[self.cur_arg_]=false; > self.operator%(val); > > > > self.cur_arg_ = o_cur_arg; > self.bound_[argN-1]=true; > if(self.cur_arg_ == argN-1 ) { > > while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_]) > ++self.cur_arg_; > } > > (static_cast <bool> (self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]) ? void (0) : __assert_fail ("self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]", "/usr/include/boost/format/format_implementation.hpp", 306, __extension__ __PRETTY_FUNCTION__)); > return self; > } > > template<class Ch, class Tr, class Alloc, class T> basic_format<Ch, Tr, Alloc>& > modify_item_body (basic_format<Ch, Tr, Alloc>& self, int itemN, T manipulator) { > > > if(itemN<1 || itemN > static_cast<signed int>(self.items_.size() )) { > if( self.exceptions() & io::out_of_range_bit ) > boost::throw_exception(io::out_of_range(itemN, 1, static_cast<int>(self.items_.size()) )); > else return self; > } > self.items_[itemN-1].fmtstate_. template apply_manip<T> ( manipulator ); > return self; > } > >} >} >} ># 48 "/usr/include/boost/format.hpp" 2 3 4 ># 1 "/usr/include/boost/format/group.hpp" 1 3 4 ># 29 "/usr/include/boost/format/group.hpp" 3 4 >namespace boost { >namespace io { > > >namespace detail { > > > >struct group0 >{ > group0() {} >}; > >template <class Ch, class Tr> >inline >::std:: basic_ostream<Ch, Tr>& >operator << ( ::std:: basic_ostream<Ch, Tr>& os, > const group0& ) >{ > return os; >} > >template <class T1> >struct group1 >{ > T1 a1_; > group1(T1 a1) > : a1_(a1) > {} >private: > group1& operator=(const group1&); >}; > >template <class Ch, class Tr, class T1> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group1<T1>& x) >{ > os << x.a1_; > return os; >} > > > > >template <class T1,class T2> >struct group2 >{ > T1 a1_; > T2 a2_; > group2(T1 a1,T2 a2) > : a1_(a1),a2_(a2) > {} >private: > group2& operator=(const group2&); >}; > >template <class Ch, class Tr, class T1,class T2> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group2<T1,T2>& x) >{ > os << x.a1_<< x.a2_; > return os; >} > >template <class T1,class T2,class T3> >struct group3 >{ > T1 a1_; > T2 a2_; > T3 a3_; > group3(T1 a1,T2 a2,T3 a3) > : a1_(a1),a2_(a2),a3_(a3) > {} >private: > group3& operator=(const group3&); >}; > >template <class Ch, class Tr, class T1,class T2,class T3> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group3<T1,T2,T3>& x) >{ > os << x.a1_<< x.a2_<< x.a3_; > return os; >} > >template <class T1,class T2,class T3,class T4> >struct group4 >{ > T1 a1_; > T2 a2_; > T3 a3_; > T4 a4_; > group4(T1 a1,T2 a2,T3 a3,T4 a4) > : a1_(a1),a2_(a2),a3_(a3),a4_(a4) > {} >private: > group4& operator=(const group4&); >}; > >template <class Ch, class Tr, class T1,class T2,class T3,class T4> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group4<T1,T2,T3,T4>& x) >{ > os << x.a1_<< x.a2_<< x.a3_<< x.a4_; > return os; >} > >template <class T1,class T2,class T3,class T4,class T5> >struct group5 >{ > T1 a1_; > T2 a2_; > T3 a3_; > T4 a4_; > T5 a5_; > group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) > : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5) > {} >}; > >template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group5<T1,T2,T3,T4,T5>& x) >{ > os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_; > return os; >} > >template <class T1,class T2,class T3,class T4,class T5,class T6> >struct group6 >{ > T1 a1_; > T2 a2_; > T3 a3_; > T4 a4_; > T5 a5_; > T6 a6_; > group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) > : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6) > {} >}; > >template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group6<T1,T2,T3,T4,T5,T6>& x) >{ > os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_; > return os; >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> >struct group7 >{ > T1 a1_; > T2 a2_; > T3 a3_; > T4 a4_; > T5 a5_; > T6 a6_; > T7 a7_; > group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) > : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7) > {} >}; > >template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group7<T1,T2,T3,T4,T5,T6,T7>& x) >{ > os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_; > return os; >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> >struct group8 >{ > T1 a1_; > T2 a2_; > T3 a3_; > T4 a4_; > T5 a5_; > T6 a6_; > T7 a7_; > T8 a8_; > group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) > : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8) > {} >}; > >template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group8<T1,T2,T3,T4,T5,T6,T7,T8>& x) >{ > os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_; > return os; >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> >struct group9 >{ > T1 a1_; > T2 a2_; > T3 a3_; > T4 a4_; > T5 a5_; > T6 a6_; > T7 a7_; > T8 a8_; > T9 a9_; > group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) > : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9) > {} >}; > >template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group9<T1,T2,T3,T4,T5,T6,T7,T8,T9>& x) >{ > os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_; > return os; >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> >struct group10 >{ > T1 a1_; > T2 a2_; > T3 a3_; > T4 a4_; > T5 a5_; > T6 a6_; > T7 a7_; > T8 a8_; > T9 a9_; > T10 a10_; > group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10) > : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10) > {} >}; > >template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> >inline >::std:: basic_ostream<Ch, Tr>& >operator << (::std:: basic_ostream<Ch, Tr>& os, > const group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>& x) >{ > os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_; > return os; >} > > > > >template <class T1,class T2> >inline >group1<T1> >group_head( group2<T1,T2> const& x) >{ > return group1<T1> (x.a1_); >} > >template <class T1,class T2> >inline >group1<T2> >group_last( group2<T1,T2> const& x) >{ > return group1<T2> (x.a2_); >} > > > >template <class T1,class T2,class T3> >inline >group2<T1,T2> >group_head( group3<T1,T2,T3> const& x) >{ > return group2<T1,T2> (x.a1_,x.a2_); >} > >template <class T1,class T2,class T3> >inline >group1<T3> >group_last( group3<T1,T2,T3> const& x) >{ > return group1<T3> (x.a3_); >} > > > >template <class T1,class T2,class T3,class T4> >inline >group3<T1,T2,T3> >group_head( group4<T1,T2,T3,T4> const& x) >{ > return group3<T1,T2,T3> (x.a1_,x.a2_,x.a3_); >} > >template <class T1,class T2,class T3,class T4> >inline >group1<T4> >group_last( group4<T1,T2,T3,T4> const& x) >{ > return group1<T4> (x.a4_); >} > > > >template <class T1,class T2,class T3,class T4,class T5> >inline >group4<T1,T2,T3,T4> >group_head( group5<T1,T2,T3,T4,T5> const& x) >{ > return group4<T1,T2,T3,T4> (x.a1_,x.a2_,x.a3_,x.a4_); >} > >template <class T1,class T2,class T3,class T4,class T5> >inline >group1<T5> >group_last( group5<T1,T2,T3,T4,T5> const& x) >{ > return group1<T5> (x.a5_); >} > > > >template <class T1,class T2,class T3,class T4,class T5,class T6> >inline >group5<T1,T2,T3,T4,T5> >group_head( group6<T1,T2,T3,T4,T5,T6> const& x) >{ > return group5<T1,T2,T3,T4,T5> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6> >inline >group1<T6> >group_last( group6<T1,T2,T3,T4,T5,T6> const& x) >{ > return group1<T6> (x.a6_); >} > > > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> >inline >group6<T1,T2,T3,T4,T5,T6> >group_head( group7<T1,T2,T3,T4,T5,T6,T7> const& x) >{ > return group6<T1,T2,T3,T4,T5,T6> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> >inline >group1<T7> >group_last( group7<T1,T2,T3,T4,T5,T6,T7> const& x) >{ > return group1<T7> (x.a7_); >} > > > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> >inline >group7<T1,T2,T3,T4,T5,T6,T7> >group_head( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x) >{ > return group7<T1,T2,T3,T4,T5,T6,T7> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> >inline >group1<T8> >group_last( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x) >{ > return group1<T8> (x.a8_); >} > > > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> >inline >group8<T1,T2,T3,T4,T5,T6,T7,T8> >group_head( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x) >{ > return group8<T1,T2,T3,T4,T5,T6,T7,T8> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> >inline >group1<T9> >group_last( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x) >{ > return group1<T9> (x.a9_); >} > > > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> >inline >group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> >group_head( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x) >{ > return group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_,x.a9_); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> >inline >group1<T10> >group_last( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x) >{ > return group1<T10> (x.a10_); >} > > > > > >} > > > > > > >inline detail::group1< detail::group0 > >group() { return detail::group1< detail::group0 > ( detail::group0() ); } > >template <class T1, class Var> >inline >detail::group1< detail::group2<T1, Var const&> > > group(T1 a1, Var const& var) >{ > return detail::group1< detail::group2<T1, Var const&> > > ( detail::group2<T1, Var const&> > (a1, var) > ); >} > >template <class T1,class T2, class Var> >inline >detail::group1< detail::group3<T1,T2, Var const&> > > group(T1 a1,T2 a2, Var const& var) >{ > return detail::group1< detail::group3<T1,T2, Var const&> > > ( detail::group3<T1,T2, Var const&> > (a1,a2, var) > ); >} > >template <class T1,class T2,class T3, class Var> >inline >detail::group1< detail::group4<T1,T2,T3, Var const&> > > group(T1 a1,T2 a2,T3 a3, Var const& var) >{ > return detail::group1< detail::group4<T1,T2,T3, Var const&> > > ( detail::group4<T1,T2,T3, Var const&> > (a1,a2,a3, var) > ); >} > >template <class T1,class T2,class T3,class T4, class Var> >inline >detail::group1< detail::group5<T1,T2,T3,T4, Var const&> > > group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var) >{ > return detail::group1< detail::group5<T1,T2,T3,T4, Var const&> > > ( detail::group5<T1,T2,T3,T4, Var const&> > (a1,a2,a3,a4, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5, class Var> >inline >detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var) >{ > return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> > > ( detail::group6<T1,T2,T3,T4,T5, Var const&> > (a1,a2,a3,a4,a5, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6, class Var> >inline >detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var) >{ > return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> > > ( detail::group7<T1,T2,T3,T4,T5,T6, Var const&> > (a1,a2,a3,a4,a5,a6, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var> >inline >detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var) >{ > return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> > > ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> > (a1,a2,a3,a4,a5,a6,a7, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var> >inline >detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var) >{ > return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> > > ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> > (a1,a2,a3,a4,a5,a6,a7,a8, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var> >inline >detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var) >{ > return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> > > ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> > (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) > ); >} > > > > >template <class T1, class Var> >inline >detail::group1< detail::group2<T1, Var&> > > group(T1 a1, Var& var) >{ > return detail::group1< detail::group2<T1, Var&> > > ( detail::group2<T1, Var&> > (a1, var) > ); >} > >template <class T1,class T2, class Var> >inline >detail::group1< detail::group3<T1,T2, Var&> > > group(T1 a1,T2 a2, Var& var) >{ > return detail::group1< detail::group3<T1,T2, Var&> > > ( detail::group3<T1,T2, Var&> > (a1,a2, var) > ); >} > >template <class T1,class T2,class T3, class Var> >inline >detail::group1< detail::group4<T1,T2,T3, Var&> > > group(T1 a1,T2 a2,T3 a3, Var& var) >{ > return detail::group1< detail::group4<T1,T2,T3, Var&> > > ( detail::group4<T1,T2,T3, Var&> > (a1,a2,a3, var) > ); >} > >template <class T1,class T2,class T3,class T4, class Var> >inline >detail::group1< detail::group5<T1,T2,T3,T4, Var&> > > group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var) >{ > return detail::group1< detail::group5<T1,T2,T3,T4, Var&> > > ( detail::group5<T1,T2,T3,T4, Var&> > (a1,a2,a3,a4, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5, class Var> >inline >detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var) >{ > return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> > > ( detail::group6<T1,T2,T3,T4,T5, Var&> > (a1,a2,a3,a4,a5, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6, class Var> >inline >detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var) >{ > return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> > > ( detail::group7<T1,T2,T3,T4,T5,T6, Var&> > (a1,a2,a3,a4,a5,a6, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var> >inline >detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var) >{ > return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> > > ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> > (a1,a2,a3,a4,a5,a6,a7, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var> >inline >detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var) >{ > return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> > > ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> > (a1,a2,a3,a4,a5,a6,a7,a8, var) > ); >} > >template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var> >inline >detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> > > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var) >{ > return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> > > ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> > (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) > ); >} > > > > > >} > >} ># 49 "/usr/include/boost/format.hpp" 2 3 4 ># 1 "/usr/include/boost/format/feed_args.hpp" 1 3 4 ># 18 "/usr/include/boost/format/feed_args.hpp" 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 19 "/usr/include/boost/format/feed_args.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/format/detail/msvc_disambiguater.hpp" 1 3 4 ># 24 "/usr/include/boost/format/feed_args.hpp" 2 3 4 > >namespace boost { >namespace io { >namespace detail { > > template<class Ch, class Tr, class Alloc> > void mk_str( std::basic_string<Ch,Tr, Alloc> & res, > const Ch * beg, > typename std::basic_string<Ch,Tr,Alloc>::size_type size, > std::streamsize w, > const Ch fill_char, > std::ios_base::fmtflags f, > const Ch prefix_space, > bool center) > > > { > typedef typename std::basic_string<Ch,Tr,Alloc>::size_type size_type; > res.resize(0); > if(w<=0 || static_cast<size_type>(w) <=size) { > > res.reserve(size + !!prefix_space); > if(prefix_space) > res.append(1, prefix_space); > if (size) > res.append(beg, size); > } > else { > std::streamsize n=static_cast<std::streamsize>(w-size-!!prefix_space); > std::streamsize n_after = 0, n_before = 0; > res.reserve(static_cast<size_type>(w)); > if(center) > n_after = n/2, n_before = n - n_after; > else > if(f & std::ios_base::left) > n_after = n; > else > n_before = n; > > if(n_before) res.append(static_cast<size_type>(n_before), fill_char); > if(prefix_space) > res.append(1, prefix_space); > if (size) > res.append(beg, size); > if(n_after) res.append(static_cast<size_type>(n_after), fill_char); > } > } ># 88 "/usr/include/boost/format/feed_args.hpp" 3 4 > template< class Ch, class Tr, class T> inline > void put_head (::std:: basic_ostream<Ch, Tr> &, const T& ) { > } > > template< class Ch, class Tr, class T> inline > void put_head( ::std:: basic_ostream<Ch, Tr> & os, const group1<T>& x ) { > os << group_head(x.a1_); > } > > template< class Ch, class Tr, class T> inline > void put_last( ::std:: basic_ostream<Ch, Tr> & os, const T& x ) { > os << x ; > } > > template< class Ch, class Tr, class T> inline > void put_last( ::std:: basic_ostream<Ch, Tr> & os, const group1<T>& x ) { > os << group_last(x.a1_); > } > > > template< class Ch, class Tr, class T> inline > void put_head( ::std:: basic_ostream<Ch, Tr> &, T& ) { > } > > template< class Ch, class Tr, class T> inline > void put_last( ::std:: basic_ostream<Ch, Tr> & os, T& x) { > os << x ; > } > > > > template< class Ch, class Tr, class T> > void call_put_head(::std:: basic_ostream<Ch, Tr> & os, const void* x) { > put_head(os, *(static_cast<T const *>(x))); > } > > template< class Ch, class Tr, class T> > void call_put_last(::std:: basic_ostream<Ch, Tr> & os, const void* x) { > put_last(os, *(static_cast<T const *>(x))); > } > > template< class Ch, class Tr> > struct put_holder { > template<class T> > put_holder(T& t) > : arg(&t), > put_head(&call_put_head<Ch, Tr, T>), > put_last(&call_put_last<Ch, Tr, T>) > {} > const void* arg; > void (*put_head)(::std:: basic_ostream<Ch, Tr> & os, const void* x); > void (*put_last)(::std:: basic_ostream<Ch, Tr> & os, const void* x); > }; > > template< class Ch, class Tr> inline > void put_head( ::std:: basic_ostream<Ch, Tr> & os, const put_holder<Ch, Tr>& t) { > t.put_head(os, t.arg); > } > > template< class Ch, class Tr> inline > void put_last( ::std:: basic_ostream<Ch, Tr> & os, const put_holder<Ch, Tr>& t) { > t.put_last(os, t.arg); > } > > > template< class Ch, class Tr, class Alloc, class T> > void put( T x, > const format_item<Ch, Tr, Alloc>& specs, > typename basic_format<Ch, Tr, Alloc>::string_type& res, > typename basic_format<Ch, Tr, Alloc>::internal_streambuf_t & buf, > io::detail::locale_t *loc_p = __null) > { ># 170 "/usr/include/boost/format/feed_args.hpp" 3 4 > typedef typename basic_format<Ch, Tr, Alloc>::string_type string_type; > typedef typename basic_format<Ch, Tr, Alloc>::format_item_t format_item_t; > typedef typename string_type::size_type size_type; > > basic_oaltstringstream<Ch, Tr, Alloc> oss( &buf); > > > if(loc_p != __null) > oss.imbue(*loc_p); > > > specs.fmtstate_.apply_on(oss, loc_p); > > > put_head( oss, x ); > > > > const std::ios_base::fmtflags fl=oss.flags(); > const bool internal = (fl & std::ios_base::internal) != 0; > const std::streamsize w = oss.width(); > const bool two_stepped_padding= internal && (w!=0); > > res.resize(0); > if(! two_stepped_padding) { > if(w>0) > oss.width(0); > put_last( oss, x); > const Ch * res_beg = buf.pbase(); > Ch prefix_space = 0; > if(specs.pad_scheme_ & format_item_t::spacepad) > if(buf.pcount()== 0 || > (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) > prefix_space = oss.widen(' '); > size_type res_size = (std::min)( > (static_cast<size_type>((specs.truncate_ & (std::numeric_limits<size_type>::max)())) - !!prefix_space), > buf.pcount() ); > mk_str(res, res_beg, res_size, w, oss.fill(), fl, > prefix_space, (specs.pad_scheme_ & format_item_t::centered) !=0 ); > } > else { > > > > put_last( oss, x); > const Ch * res_beg = buf.pbase(); > size_type res_size = buf.pcount(); > bool prefix_space=false; > if(specs.pad_scheme_ & format_item_t::spacepad) > if(buf.pcount()== 0 || > (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) > prefix_space = true; > if(res_size == static_cast<size_type>(w) && w<=specs.truncate_ && !prefix_space) { > > res.assign(res_beg, res_size); > } > else { > > > > res.assign(res_beg, res_size); > res_beg=__null; > > > buf.clear_buffer(); > basic_oaltstringstream<Ch, Tr, Alloc> oss2( &buf); > specs.fmtstate_.apply_on(oss2, loc_p); > put_head( oss2, x ); > > oss2.width(0); > if(prefix_space) > oss2 << ' '; > put_last(oss2, x ); > if(buf.pcount()==0 && specs.pad_scheme_ & format_item_t::spacepad) { > prefix_space =true; > oss2 << ' '; > } > > const Ch * tmp_beg = buf.pbase(); > size_type tmp_size = (std::min)( > (static_cast<size_type>(specs.truncate_ & (std::numeric_limits<size_type>::max)())), > buf.pcount()); > > if(static_cast<size_type>(w) <= tmp_size) { > > res.assign(tmp_beg, tmp_size); > } > else { > > size_type sz = (std::min)(res_size + (prefix_space ? 1 : 0), tmp_size); > size_type i = prefix_space; > for(; i<sz && tmp_beg[i] == res[i - (prefix_space ? 1 : 0)]; ++i) {} > if(i>=tmp_size) i=prefix_space; > res.assign(tmp_beg, i); > std::streamsize d = w - static_cast<std::streamsize>(tmp_size); > (static_cast <bool> (d>0) ? void (0) : __assert_fail ("d>0", "/usr/include/boost/format/feed_args.hpp", 265, __extension__ __PRETTY_FUNCTION__)); > res.append(static_cast<size_type>( d ), oss2.fill()); > res.append(tmp_beg+i, tmp_size-i); > (static_cast <bool> (i+(tmp_size-i)+(std::max)(d,(std::streamsize)0) == static_cast<size_type>(w)) ? void (0) : __assert_fail ("i+(tmp_size-i)+(std::max)(d,(std::streamsize)0) == static_cast<size_type>(w)", "/usr/include/boost/format/feed_args.hpp", 268, __extension__ __PRETTY_FUNCTION__)) > ; > (static_cast <bool> (res.size() == static_cast<size_type>(w)) ? void (0) : __assert_fail ("res.size() == static_cast<size_type>(w)", "/usr/include/boost/format/feed_args.hpp", 270, __extension__ __PRETTY_FUNCTION__)); > } > } > } > buf.clear_buffer(); > > > > } > > > template< class Ch, class Tr, class Alloc, class T> > void distribute (basic_format<Ch,Tr, Alloc>& self, T x) { > > if(self.cur_arg_ >= self.num_args_) { > if( self.exceptions() & too_many_args_bit ) > boost::throw_exception(too_many_args(self.cur_arg_, self.num_args_)); > else return; > } > for(unsigned long i=0; i < self.items_.size(); ++i) { > if(self.items_[i].argN_ == self.cur_arg_) { > put<Ch, Tr, Alloc, T> (x, self.items_[i], self.items_[i].res_, > self.buf_, boost::get_pointer(self.loc_) ); > } > } > } > > template<class Ch, class Tr, class Alloc, class T> > basic_format<Ch, Tr, Alloc>& > feed_impl (basic_format<Ch,Tr, Alloc>& self, T x) { > if(self.dumped_) self.clear(); > distribute<Ch, Tr, Alloc, T> (self, x); > ++self.cur_arg_; > if(self.bound_.size() != 0) { > while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] ) > ++self.cur_arg_; > } > return self; > } > > template<class Ch, class Tr, class Alloc, class T> inline > basic_format<Ch, Tr, Alloc>& > feed (basic_format<Ch,Tr, Alloc>& self, T x) { > return feed_impl<Ch, Tr, Alloc, const put_holder<Ch, Tr>&>(self, put_holder<Ch, Tr>(x)); > } > >} >} >} ># 50 "/usr/include/boost/format.hpp" 2 3 4 ># 1 "/usr/include/boost/format/parsing.hpp" 1 3 4 ># 21 "/usr/include/boost/format/parsing.hpp" 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 22 "/usr/include/boost/format/parsing.hpp" 2 3 4 > > > >namespace boost { >namespace io { >namespace detail { ># 36 "/usr/include/boost/format/parsing.hpp" 3 4 > template<class T> > const T& const_or_not(const T& x) { > return x; > } > > > template<class Ch, class Facet> inline > char wrap_narrow(const Facet& fac, Ch c, char deflt) { > return const_or_not(fac).narrow(c, deflt); > } > > template<class Ch, class Facet> inline > bool wrap_isdigit(const Facet& fac, Ch c) { > > return fac.is(std::ctype<Ch>::digit, c); > > > > > > } > > template<class Iter, class Facet> > Iter wrap_scan_notdigit(const Facet & fac, Iter beg, Iter end) { > using namespace std; > for( ; beg!=end && wrap_isdigit(fac, *beg); ++beg) ; > return beg; > } > > > > > > > template<class Res, class Iter, class Facet> > Iter str2int (const Iter & start, const Iter & last, Res & res, > const Facet& fac) > { > using namespace std; > Iter it; > res=0; > for(it=start; it != last && wrap_isdigit(fac, *it); ++it ) { > char cur_ch = wrap_narrow(fac, *it, 0); > res *= 10; > res += cur_ch - '0'; > } > return it; > } > > > > > inline void maybe_throw_exception(unsigned char exceptions, > std::size_t pos, std::size_t size) > { > if(exceptions & io::bad_format_string_bit) > boost::throw_exception(io::bad_format_string(pos, size) ); > } ># 106 "/usr/include/boost/format/parsing.hpp" 3 4 > template<class Ch, class Tr, class Alloc, class Iter, class Facet> > bool parse_printf_directive(Iter & start, const Iter& last, > detail::format_item<Ch, Tr, Alloc> * fpar, > const Facet& fac, > std::size_t offset, unsigned char exceptions) > { > typedef typename basic_format<Ch, Tr, Alloc>::format_item_t format_item_t; > > fpar->argN_ = format_item_t::argN_no_posit; > bool precision_set = false; > bool in_brackets=false; > Iter start0 = start; > std::size_t fstring_size = last-start0+offset; > char mssiz = 0; > > if(start>= last) { > maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); > return false; > } > > if(*start== const_or_not(fac).widen( '|')) { > in_brackets=true; > if( ++start >= last ) { > maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); > return false; > } > } > > > if(*start== const_or_not(fac).widen( '0')) > goto parse_flags; > > > if(wrap_isdigit(fac, *start)) { > int n; > start = str2int(start, last, n, fac); > if( start >= last ) { > maybe_throw_exception(exceptions, start-start0+offset, fstring_size); > return false; > } > > > if( *start == const_or_not(fac).widen( '%') ) { > fpar->argN_ = n-1; > ++start; > if( in_brackets) > maybe_throw_exception(exceptions, start-start0+offset, fstring_size); > return true; > } > > if ( *start== const_or_not(fac).widen( '$') ) { > fpar->argN_ = n-1; > ++start; > } > else { > > fpar->fmtstate_.width_ = n; > fpar->argN_ = format_item_t::argN_no_posit; > goto parse_precision; > } > } > > parse_flags: > > while (start != last) { > switch ( wrap_narrow(fac, *start, 0)) { > case '\'': > break; > case '-': > fpar->fmtstate_.flags_ |= std::ios_base::left; > break; > case '=': > fpar->pad_scheme_ |= format_item_t::centered; > break; > case '_': > fpar->fmtstate_.flags_ |= std::ios_base::internal; > break; > case ' ': > fpar->pad_scheme_ |= format_item_t::spacepad; > break; > case '+': > fpar->fmtstate_.flags_ |= std::ios_base::showpos; > break; > case '0': > fpar->pad_scheme_ |= format_item_t::zeropad; > > > break; > case '#': > fpar->fmtstate_.flags_ |= std::ios_base::showpoint | std::ios_base::showbase; > break; > default: > goto parse_width; > } > ++start; > } > > if( start>=last) { > maybe_throw_exception(exceptions, start-start0+offset, fstring_size); > return true; > } > > > parse_width: > if(*start == const_or_not(fac).widen( '*') ) > ++start; > else if(start!=last && wrap_isdigit(fac, *start)) > start = str2int(start, last, fpar->fmtstate_.width_, fac); > > parse_precision: > if( start>= last) { > maybe_throw_exception(exceptions, start-start0+offset, fstring_size); > return true; > } > > if (*start== const_or_not(fac).widen( '.')) { > ++start; > if(start != last && *start == const_or_not(fac).widen( '*') ) > ++start; > else if(start != last && wrap_isdigit(fac, *start)) { > start = str2int(start, last, fpar->fmtstate_.precision_, fac); > precision_set = true; > } > else > fpar->fmtstate_.precision_ =0; > } > > > while (start != last) { > switch (wrap_narrow(fac, *start, 0)) { > case 'h': > case 'l': > case 'j': > case 'z': > case 'L': > > > break; ># 252 "/usr/include/boost/format/parsing.hpp" 3 4 > case 'w': > break; > case 'I': > mssiz = 'I'; > break; > case '3': > if (mssiz != 'I') { > maybe_throw_exception(exceptions, start - start0 + offset, fstring_size); > return true; > } > mssiz = '3'; > break; > case '2': > if (mssiz != '3') { > maybe_throw_exception(exceptions, start - start0 + offset, fstring_size); > return true; > } > mssiz = 0x00; > break; > case '6': > if (mssiz != 'I') { > maybe_throw_exception(exceptions, start - start0 + offset, fstring_size); > return true; > } > mssiz = '6'; > break; > case '4': > if (mssiz != '6') { > maybe_throw_exception(exceptions, start - start0 + offset, fstring_size); > return true; > } > mssiz = 0x00; > break; > default: > if (mssiz && mssiz == 'I') { > mssiz = 0; > } > goto parse_conversion_specification; > } > ++start; > } > > parse_conversion_specification: > if (start >= last || mssiz) { > maybe_throw_exception(exceptions, start - start0 + offset, fstring_size); > return true; > } > > if( in_brackets && *start== const_or_not(fac).widen( '|') ) { > ++start; > return true; > } > > > > > switch (wrap_narrow(fac, *start, 0)) > { > > case 'b': > fpar->fmtstate_.flags_ |= std::ios_base::boolalpha; > break; > > > case 'u': > case 'd': > case 'i': > > break; > > > case 'X': > fpar->fmtstate_.flags_ |= std::ios_base::uppercase; > __attribute__((fallthrough)); > case 'x': > case 'p': > fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; > fpar->fmtstate_.flags_ |= std::ios_base::hex; > break; > > > case 'o': > fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; > fpar->fmtstate_.flags_ |= std::ios_base::oct; > break; > > > case 'A': > fpar->fmtstate_.flags_ |= std::ios_base::uppercase; > __attribute__((fallthrough)); > case 'a': > fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; > fpar->fmtstate_.flags_ |= std::ios_base::fixed; > fpar->fmtstate_.flags_ |= std::ios_base::scientific; > break; > case 'E': > fpar->fmtstate_.flags_ |= std::ios_base::uppercase; > __attribute__((fallthrough)); > case 'e': > fpar->fmtstate_.flags_ |= std::ios_base::scientific; > break; > case 'F': > fpar->fmtstate_.flags_ |= std::ios_base::uppercase; > __attribute__((fallthrough)); > case 'f': > fpar->fmtstate_.flags_ |= std::ios_base::fixed; > break; > case 'G': > fpar->fmtstate_.flags_ |= std::ios_base::uppercase; > __attribute__((fallthrough)); > case 'g': > > break; > > > case 'T': > ++start; > if( start >= last) { > maybe_throw_exception(exceptions, start-start0+offset, fstring_size); > return false; > } else { > fpar->fmtstate_.fill_ = *start; > } > fpar->pad_scheme_ |= format_item_t::tabulation; > fpar->argN_ = format_item_t::argN_tabulation; > break; > case 't': > fpar->fmtstate_.fill_ = const_or_not(fac).widen( ' '); > fpar->pad_scheme_ |= format_item_t::tabulation; > fpar->argN_ = format_item_t::argN_tabulation; > break; > > > case 'C': > case 'c': > fpar->truncate_ = 1; > break; > > > case 'S': > case 's': > if(precision_set) > fpar->truncate_ = fpar->fmtstate_.precision_; > fpar->fmtstate_.precision_ = 6; > break; > > > case 'n' : > fpar->argN_ = format_item_t::argN_ignored; > break; > > default: > maybe_throw_exception(exceptions, start-start0+offset, fstring_size); > } > ++start; > > if( in_brackets ) { > if( start != last && *start== const_or_not(fac).widen( '|') ) { > ++start; > return true; > } > else maybe_throw_exception(exceptions, start-start0+offset, fstring_size); > } > return true; > } > > > template<class String, class Facet> > int upper_bound_from_fstring(const String& buf, > const typename String::value_type arg_mark, > const Facet& fac, > unsigned char exceptions) > { > > > using namespace boost::io; > typename String::size_type i1=0; > int num_items=0; > while( (i1=buf.find(arg_mark,i1)) != String::npos ) { > if( i1+1 >= buf.size() ) { > if(exceptions & bad_format_string_bit) > boost::throw_exception(bad_format_string(i1, buf.size() )); > else { > ++num_items; > break; > } > } > if(buf[i1+1] == buf[i1] ) { > i1+=2; continue; > } > > ++i1; > > i1 = detail::wrap_scan_notdigit(fac, buf.begin()+i1, buf.end()) - buf.begin(); > if( i1 < buf.size() && buf[i1] == arg_mark ) > ++i1; > ++num_items; > } > return num_items; > } > template<class String> inline > void append_string(String& dst, const String& src, > const typename String::size_type beg, > const typename String::size_type end) { > dst.append(src.begin()+beg, src.begin()+end); > } > >} >} > > > > > > > template<class Ch, class Tr, class Alloc> > basic_format<Ch, Tr, Alloc>& basic_format<Ch, Tr, Alloc>:: > parse (const string_type& buf) { > > using namespace std; > > const std::ctype<Ch> & fac = std::use_facet< std::ctype<Ch> >(getloc()); > > > > > > const Ch arg_mark = io::detail::const_or_not(fac).widen( '%'); > bool ordered_args=true; > int max_argN=-1; > > > int num_items = io::detail::upper_bound_from_fstring(buf, arg_mark, fac, exceptions()); > make_or_reuse_data(num_items); > > > num_items=0; > typename string_type::size_type i0=0, i1=0; > typename string_type::const_iterator it; > bool special_things=false; > int cur_item=0; > while( (i1=buf.find(arg_mark,i1)) != string_type::npos ) { > string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; > if( buf[i1+1] == buf[i1] ) { > io::detail::append_string(piece, buf, i0, i1+1); > i1+=2; i0=i1; > continue; > } > (static_cast <bool> (static_cast<unsigned int>(cur_item) < items_.size() || cur_item==0) ? void (0) : __assert_fail ("static_cast<unsigned int>(cur_item) < items_.size() || cur_item==0", "/usr/include/boost/format/parsing.hpp", 500, __extension__ __PRETTY_FUNCTION__)); > > if(i1!=i0) { > io::detail::append_string(piece, buf, i0, i1); > i0=i1; > } > ++i1; > it = buf.begin()+i1; > bool parse_ok = io::detail::parse_printf_directive( > it, buf.end(), &items_[cur_item], fac, i1, exceptions()); > i1 = it - buf.begin(); > if( ! parse_ok ) > continue; > i0=i1; > items_[cur_item].compute_states(); > > int argN=items_[cur_item].argN_; > if(argN == format_item_t::argN_ignored) > continue; > if(argN ==format_item_t::argN_no_posit) > ordered_args=false; > else if(argN == format_item_t::argN_tabulation) special_things=true; > else if(argN > max_argN) max_argN = argN; > ++num_items; > ++cur_item; > } > (static_cast <bool> (cur_item == num_items) ? void (0) : __assert_fail ("cur_item == num_items", "/usr/include/boost/format/parsing.hpp", 526, __extension__ __PRETTY_FUNCTION__)); > > > { > string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; > io::detail::append_string(piece, buf, i0, buf.size()); > } > > if( !ordered_args) { > if(max_argN >= 0 ) { > if(exceptions() & io::bad_format_string_bit) > boost::throw_exception( > io::bad_format_string(static_cast<std::size_t>(max_argN), 0)); > > } > > int non_ordered_items = 0; > for(int i=0; i< num_items; ++i) > if(items_[i].argN_ == format_item_t::argN_no_posit) { > items_[i].argN_ = non_ordered_items; > ++non_ordered_items; > } > max_argN = non_ordered_items-1; > } > > > items_.resize(num_items, format_item_t(io::detail::const_or_not(fac).widen( ' ')) ); > > if(special_things) style_ |= special_needs; > num_args_ = max_argN + 1; > if(ordered_args) style_ |= ordered; > else style_ &= ~ordered; > return *this; > } > >} ># 51 "/usr/include/boost/format.hpp" 2 3 4 > > ># 1 "/usr/include/boost/format/free_funcs.hpp" 1 3 4 ># 19 "/usr/include/boost/format/free_funcs.hpp" 3 4 >namespace boost { > > template<class Ch, class Tr, class Alloc> inline > std::basic_string<Ch, Tr, Alloc> str(const basic_format<Ch, Tr, Alloc>& f) { > > return f.str(); > } > namespace io { > using ::boost::str; > } > > > template<class Ch, class Tr, class Alloc> > std::basic_ostream<Ch, Tr> & > operator<<( std::basic_ostream<Ch, Tr> & os, > const basic_format<Ch, Tr, Alloc>& f) > > > > > > > > { > typedef boost::basic_format<Ch, Tr, Alloc> format_t; > if(f.items_.size()==0) > os << f.prefix_; > else { > if(f.cur_arg_ < f.num_args_) > if( f.exceptions() & io::too_few_args_bit ) > > boost::throw_exception(io::too_few_args(f.cur_arg_, f.num_args_)); > if(f.style_ & format_t::special_needs) > os << f.str(); > else { > > os << f.prefix_; > for(unsigned long i=0; i<f.items_.size(); ++i) { > const typename format_t::format_item_t& item = f.items_[i]; > os << item.res_; > os << item.appendix_; > } > } > } > f.dumped_=true; > return os; > } > >} ># 54 "/usr/include/boost/format.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/format/detail/unset_macros.hpp" 1 3 4 ># 58 "/usr/include/boost/format.hpp" 2 3 4 ># 8 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" 2 3 > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/bit/BitBlock.hpp" 1 3 > > > > >namespace point_util >{ >template<typename xBlock = uint64_t, uint BlockBytes = sizeof(xBlock), uint BlockBits = BlockBytes * 8, > typename Unsigned = typename std::enable_if_t<std::is_unsigned<xBlock>::value, xBlock>> >class BitBlockBase >{ >using BitBlock = BitBlockBase<xBlock>; > >public: > static constexpr uint32_t BitCount = (8UL * sizeof(xBlock)); > > using Block = xBlock; > > class iterator { > public: > typedef iterator self_type; > typedef uint32_t value_type; > typedef uint32_t reference; > typedef uint32_t pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > iterator(BitBlock b) : > _index(0), > _b(b._b) > { > if (_b != 0) { > uint32_t shift = firstBitSet(_b); > if (shift > 0) { > _index += shift; > _b >>= shift; > } > } > } > > self_type > operator ++() > { > uint32_t shift = firstBitSet(_b) + 1; > _index += shift; > _b >>= shift; > return *this; > } > > self_type > operator ++( ># 50 "../../subprojects/edfst/subprojects/point-util/src/bit/BitBlock.hpp" > __attribute__((unused)) ># 50 "../../subprojects/edfst/subprojects/point-util/src/bit/BitBlock.hpp" 3 > int postfixDisambiguator) > { > self_type pre = *this; > operator ++(); > return pre; > } > > reference > operator *() { return _index; } > > pointer > operator ->() const { return _index; } > > bool > operator ==(const self_type& other) const { return (_b == 0 && other._b == 0) || (_index == other._index && _b == other._b); } > > bool > operator !=(const self_type& other) const { return !operator ==(other); } > > private: > uint32_t _index; > xBlock _b; > }; > > BitBlockBase() : > _b{0} > {} > > BitBlockBase(xBlock b) : > _b{b} > {} > > BitBlockBase(const BitBlock& b) : > _b{b._b} > {} > > uint32_t > capacity() { return BlockBits; } > > xBlock > integer() const { return _b; } > > iterator > begin() { return iterator(_b); } > > iterator > end() { return iterator(0); } > > bool > is(uint32_t index) > { > if (index >= BlockBits) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitBlock.hpp", 102) << "Cannot get bit " << index << " from a BitBlock of capacity " << BlockBits; > > xBlock mask = (1 << index); > return (_b & mask) > 0; > } > > bool > isExcluded(xBlock mask) > { > return (_b & mask) == 0; > } > > int32_t > firstMatchIndex(const BitBlock& mask) > { > xBlock match = (_b & mask._b); > if (match == 0) > return -1; > else > return firstBitSet(match); > } > > int32_t > firstMatchIndex(xBlock mask) > { > xBlock match = (_b & mask); > if (match == 0) > return -1; > else > return firstBitSet(match); > } > > void > set(uint32_t index, bool on = true) > { > if (index >= BlockBits) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitBlock.hpp", 138) << "Cannot set bit " << index << " in a BitBlock of capacity " << BlockBits; > > xBlock mask = (1 << index); > if (on) { > _b |= mask; > } else { > _b &= ~mask; > } > } > > void > clear() { _b = static_cast<xBlock>(0); } > > BitBlock& > operator =(const BitBlock& other) > { > _b = other._b; > return *this; > } > > BitBlock > operator ~() > { > return BitBlock(~_b); > } > > BitBlock > operator >>(uint32_t count) > { > return BitBlock(_b >> count); > } > > BitBlock& > operator >>=(uint32_t count) > { > _b >>= count; > return *this; > } > > BitBlock > operator <<(uint32_t count) > { > return BitBlock(_b << count); > } > > BitBlock& > operator <<=(uint32_t count) > { > _b <<= count; > return *this; > } > > bool > operator ==(const BitBlock& other) const { return _b == other._b; } > > bool > operator !=(const BitBlock& other) const { return _b != other._b; } > > BitBlock > operator |(const BitBlock& other) > { > return BitBlock(_b | other._b); > } > > BitBlock > operator |(xBlock b) > { > return BitBlock(_b | b); > } > > BitBlock& > operator |=(const BitBlock& other) > { > _b |= other._b; > return *this; > } > > BitBlock& > operator |=(xBlock b) > { > _b |= b; > return *this; > } > > BitBlock > operator &(const BitBlock& other) > { > return BitBlock(_b & other._b); > } > > BitBlock > operator &(xBlock b) > { > return BitBlock(_b & b); > } > > BitBlock& > operator &=(const BitBlock& other) > { > _b &= other._b; > return *this; > } > > BitBlock& > operator &=(xBlock b) > { > _b &= b; > return *this; > } > >private: > static inline uint32_t > firstBitSet(xBlock b) { return static_cast<int32_t>(__builtin_ctzll(b)); } > > xBlock _b; >}; > >using BitBlock = BitBlockBase<>; >} ># 11 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/ostring.hpp" 1 3 > > > > > >namespace facile >{ >struct ostring { > static struct to_string_command {} > to_string; > > template<typename T> > ostring& > operator <<(T t) > { > _s << t; > return *this; > } > > ostring& > operator <<(StreamManipulator m) > { > _s << m; > return *this; > } > > std::string > operator <<( ># 28 "../../subprojects/edfst/subprojects/facile/src/io/ostring.hpp" > __attribute__((unused)) ># 28 "../../subprojects/edfst/subprojects/facile/src/io/ostring.hpp" 3 > to_string_command to_string) > { > return _s.str(); > } > > private: > std::stringstream _s; >}; >} ># 12 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" 2 3 > >namespace facile >{ >struct StreamAdapter { > virtual ~StreamAdapter() {} > > virtual std::ostream& > printToStream(std::ostream& o) const { return o; } >}; ># 46 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" 3 >class StreamBinder : > public StreamAdapter { >public: > using Printer = std::function<std::ostream& (std::ostream&)>; > > StreamBinder(Printer p) : > _p(p) > {} > > std::ostream& > printToStream(std::ostream& o) const > { > return _p(o); > } > >private: > Printer _p; >}; ># 107 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" 3 >struct NullDebugStream { > inline void > flush() {} > > operator std::ostream& () { return unopenedStream; } > > private: > std::fstream unopenedStream; >}; > >template<typename T> >inline NullDebugStream& >operator <<(NullDebugStream& s, const T& anything) >{ > return s; >} > >inline NullDebugStream& >operator <<(NullDebugStream& s, ># 125 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" > __attribute__((unused)) ># 125 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" 3 > std::ostream& (*manipulator)(std::ostream&)) >{ > return s; >} > >static NullDebugStream nullStream; > >template<typename Token> >static uint32_t >tokenLength(Token token) >{ > std::string output = (ostring() << token << ostring::to_string); > return output.length(); >} > >template<typename T> >struct HexFormat { > T value; >}; > >template<typename T> >struct RegisterFormat { > T value; >}; > >template<typename T> >struct ThousandsFormat { > T value; >}; > >template<typename T> >struct NumericFormat { > T value; >}; > >struct ByteStream { > uint16_t > next(); > > bool > empty() const { return count == 0; } > > uint16_t count; > loc_t src; >}; > >template<typename T, typename = typename std::enable_if_t<!std::is_enum<T>::value, void>> >static inline const struct HexFormat<T> >hex(T value) { > const struct HexFormat<T> format = { value }; > > return format; >} > >template<typename T, typename U = typename std::enable_if_t<std::is_enum<T>::value, typename std::underlying_type<T>::type>> >static inline const struct HexFormat<U> >hex(T value) { > const struct HexFormat<U> format = { static_cast<U>(value) }; > > return format; >} > >template<typename T> >static inline const struct HexFormat<void *> >loc(T * value) { > const struct HexFormat<void *> format = { static_cast<void *>(value) }; > > return format; >} > >template<typename T> >static inline const struct RegisterFormat<T> >reg(T value) { > const struct RegisterFormat<T> format = { value }; > > return format; >} > >template<typename T> >static inline const struct ThousandsFormat<T> >sep(T value) { > const struct ThousandsFormat<T> format = { value }; > > return format; >} > >template<typename T> >static inline const struct NumericFormat<T> >num(T value) { > const struct NumericFormat<T> format = { value }; > > return format; >} > >static inline struct ByteStream >bytes(uint16_t count, loc_t src) >{ > struct ByteStream block = { count, src }; > > return block; >} ># 244 "../../subprojects/edfst/subprojects/facile/src/io/StreamFormats.hpp" 3 >std::ostream& >operator <<(std::ostream& o, const struct StreamAdapter &a); > > > > > > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<nullptr_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<void *> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<const void *> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<uint64_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<uint32_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<uint16_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<uint8_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<int> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<long int> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<long long unsigned int> f); > >std::ostream& >operator <<(std::ostream& o, const struct HexFormat<loc_t> f); > >template<typename Integer, typename = typename std::enable_if_t<std::is_integral<Integer>::value, void>> >inline std::ostream& >operator <<(std::ostream& o, const struct HexFormat<BitBlockBase<Integer>> f) >{ > return o << hex(f.value.integer()); >} > >std::ostream& >operator <<(std::ostream& o, const struct RegisterFormat<long long unsigned int> f); > >std::ostream& >operator <<(std::ostream& o, const struct RegisterFormat<long int> f); > >std::ostream& >operator <<(std::ostream& o, const struct RegisterFormat<loc_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct RegisterFormat<void *> f); > >std::ostream& >operator <<(std::ostream& o, const struct RegisterFormat<uint64_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct RegisterFormat<uint32_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct RegisterFormat<uint16_t> f); > >std::ostream& >operator <<(std::ostream& o, const struct RegisterFormat<uint8_t> f); > >static std::stringstream >constructThousandsSeparatorStream() >{ > std::stringstream ss; > > ss.imbue(std::locale("en_US.utf8")); > return ss; >} > >template<typename T> >std::ostream& >operator <<(std::ostream& o, const struct ThousandsFormat<T> f) >{ > static thread_local std::stringstream ss = constructThousandsSeparatorStream(); > > ss.str(""); > ss.clear(); > > ss << f.value; > return o << ss.str(); >} > >template<typename T> >inline std::ostream& >operator <<(std::ostream& o, const struct NumericFormat<T> f) >{ > return o << static_cast<uint32_t>(f.value); >} > >std::ostream& >operator <<(std::ostream& o, struct ByteStream f); >} ># 24 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 1 3 ># 30 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 ># 1 "/usr/include/c++/13/numeric" 1 3 ># 58 "/usr/include/c++/13/numeric" 3 > ># 59 "/usr/include/c++/13/numeric" 3 > > > ># 1 "/usr/include/c++/13/bits/stl_numeric.h" 1 3 ># 64 "/usr/include/c++/13/bits/stl_numeric.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 85 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _ForwardIterator, typename _Tp> > > void > iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) > { > > > > > > ; > > for (; __first != __last; ++__first) > { > *__first = __value; > ++__value; > } > } > > > > > ># 131 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _InputIterator, typename _Tp> > > inline _Tp > accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) > { > > > ; > > for (; __first != __last; ++__first) > __init = __init + *__first; > return __init; > } ># 158 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _InputIterator, typename _Tp, typename _BinaryOperation> > > inline _Tp > accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, > _BinaryOperation __binary_op) > { > > > ; > > for (; __first != __last; ++__first) > __init = __binary_op(__init, *__first); > return __init; > } ># 187 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _InputIterator1, typename _InputIterator2, typename _Tp> > > inline _Tp > inner_product(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _Tp __init) > { > > > > ; > > for (; __first1 != __last1; ++__first1, (void)++__first2) > __init = __init + (*__first1 * *__first2); > return __init; > } ># 219 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _InputIterator1, typename _InputIterator2, typename _Tp, > typename _BinaryOperation1, typename _BinaryOperation2> > > inline _Tp > inner_product(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _Tp __init, > _BinaryOperation1 __binary_op1, > _BinaryOperation2 __binary_op2) > { > > > > ; > > for (; __first1 != __last1; ++__first1, (void)++__first2) > __init = __binary_op1(__init, > __binary_op2(*__first1, *__first2)); > return __init; > } ># 253 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _InputIterator, typename _OutputIterator> > > _OutputIterator > partial_sum(_InputIterator __first, _InputIterator __last, > _OutputIterator __result) > { > typedef typename iterator_traits<_InputIterator>::value_type _ValueType; > > > > > > ; > > if (__first == __last) > return __result; > _ValueType __value = *__first; > *__result = __value; > while (++__first != __last) > { > __value = __value + *__first; > *++__result = __value; > } > return ++__result; > } ># 294 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _BinaryOperation> > > _OutputIterator > partial_sum(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _BinaryOperation __binary_op) > { > typedef typename iterator_traits<_InputIterator>::value_type _ValueType; > > > > > > ; > > if (__first == __last) > return __result; > _ValueType __value = *__first; > *__result = __value; > while (++__first != __last) > { > __value = __binary_op(__value, *__first); > *++__result = __value; > } > return ++__result; > } ># 334 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _InputIterator, typename _OutputIterator> > > _OutputIterator > adjacent_difference(_InputIterator __first, > _InputIterator __last, _OutputIterator __result) > { > typedef typename iterator_traits<_InputIterator>::value_type _ValueType; > > > > > > ; > > if (__first == __last) > return __result; > _ValueType __value = *__first; > *__result = __value; > while (++__first != __last) > { > _ValueType __tmp = *__first; > *++__result = __tmp - __value; > __value = std::move(__tmp); > } > return ++__result; > } ># 376 "/usr/include/c++/13/bits/stl_numeric.h" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _BinaryOperation> > > _OutputIterator > adjacent_difference(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _BinaryOperation __binary_op) > { > typedef typename iterator_traits<_InputIterator>::value_type _ValueType; > > > > > > ; > > if (__first == __last) > return __result; > _ValueType __value = *__first; > *__result = __value; > while (++__first != __last) > { > _ValueType __tmp = *__first; > *++__result = __binary_op(__tmp, __value); > __value = std::move(__tmp); > } > return ++__result; > } > > > > > > >} ># 63 "/usr/include/c++/13/numeric" 2 3 ># 90 "/usr/include/c++/13/numeric" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > >namespace __detail >{ > > > template<typename _Res, typename _Tp> > constexpr _Res > __abs_r(_Tp __val) > { > static_assert(sizeof(_Res) >= sizeof(_Tp), > "result type must be at least as wide as the input type"); > > if (__val >= 0) > return __val; > > > > > return -static_cast<_Res>(__val); > } > > template<typename> void __abs_r(bool) = delete; > > > template<typename _Tp> > constexpr _Tp > __gcd(_Tp __m, _Tp __n) > { > static_assert(is_unsigned<_Tp>::value, "type must be unsigned"); > > if (__m == 0) > return __n; > if (__n == 0) > return __m; > > const int __i = std::__countr_zero(__m); > __m >>= __i; > const int __j = std::__countr_zero(__n); > __n >>= __j; > const int __k = __i < __j ? __i : __j; > > while (true) > { > if (__m > __n) > { > _Tp __tmp = __m; > __m = __n; > __n = __tmp; > } > > __n -= __m; > > if (__n == 0) > return __m << __k; > > __n >>= std::__countr_zero(__n); > } > } >} ># 162 "/usr/include/c++/13/numeric" 3 > template<typename _Mn, typename _Nn> > constexpr common_type_t<_Mn, _Nn> > gcd(_Mn __m, _Nn __n) noexcept > { > static_assert(is_integral_v<_Mn> && is_integral_v<_Nn>, > "std::gcd arguments must be integers"); > static_assert(_Mn(2) == 2 && _Nn(2) == 2, > "std::gcd arguments must not be bool"); > using _Ct = common_type_t<_Mn, _Nn>; > const _Ct __m2 = __detail::__abs_r<_Ct>(__m); > const _Ct __n2 = __detail::__abs_r<_Ct>(__n); > return __detail::__gcd<make_unsigned_t<_Ct>>(__m2, __n2); > } > > > template<typename _Mn, typename _Nn> > constexpr common_type_t<_Mn, _Nn> > lcm(_Mn __m, _Nn __n) noexcept > { > static_assert(is_integral_v<_Mn> && is_integral_v<_Nn>, > "std::lcm arguments must be integers"); > static_assert(_Mn(2) == 2 && _Nn(2) == 2, > "std::lcm arguments must not be bool"); > using _Ct = common_type_t<_Mn, _Nn>; > const _Ct __m2 = __detail::__abs_r<_Ct>(__m); > const _Ct __n2 = __detail::__abs_r<_Ct>(__n); > if (__m2 == 0 || __n2 == 0) > return 0; > _Ct __r = __m2 / __detail::__gcd<make_unsigned_t<_Ct>>(__m2, __n2); > > if constexpr (is_signed_v<_Ct>) > if (__is_constant_evaluated()) > return __r * __n2; > > bool __overflow = __builtin_mul_overflow(__r, __n2, &__r); > do { if (std::__is_constant_evaluated() && !bool(!__overflow)) __builtin_unreachable(); } while (false); > return __r; > } ># 284 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _Tp, typename _BinaryOperation> > > _Tp > reduce(_InputIterator __first, _InputIterator __last, _Tp __init, > _BinaryOperation __binary_op) > { > using __ref = typename iterator_traits<_InputIterator>::reference; > static_assert(is_invocable_r_v<_Tp, _BinaryOperation&, _Tp&, __ref>); > static_assert(is_invocable_r_v<_Tp, _BinaryOperation&, __ref, _Tp&>); > static_assert(is_invocable_r_v<_Tp, _BinaryOperation&, _Tp&, _Tp&>); > static_assert(is_invocable_r_v<_Tp, _BinaryOperation&, __ref, __ref>); > if constexpr (__is_random_access_iter<_InputIterator>::value) > { > while ((__last - __first) >= 4) > { > _Tp __v1 = __binary_op(__first[0], __first[1]); > _Tp __v2 = __binary_op(__first[2], __first[3]); > _Tp __v3 = __binary_op(__v1, __v2); > __init = __binary_op(__init, __v3); > __first += 4; > } > } > for (; __first != __last; ++__first) > __init = __binary_op(__init, *__first); > return __init; > } ># 322 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _Tp> > > inline _Tp > reduce(_InputIterator __first, _InputIterator __last, _Tp __init) > { return std::reduce(__first, __last, std::move(__init), plus<>()); } ># 339 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator> > > inline typename iterator_traits<_InputIterator>::value_type > reduce(_InputIterator __first, _InputIterator __last) > { > using value_type = typename iterator_traits<_InputIterator>::value_type; > return std::reduce(__first, __last, value_type{}, plus<>()); > } ># 366 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator1, typename _InputIterator2, typename _Tp, > typename _BinaryOperation1, typename _BinaryOperation2> > > _Tp > transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _Tp __init, > _BinaryOperation1 __binary_op1, > _BinaryOperation2 __binary_op2) > { > if constexpr (__and_v<__is_random_access_iter<_InputIterator1>, > __is_random_access_iter<_InputIterator2>>) > { > while ((__last1 - __first1) >= 4) > { > _Tp __v1 = __binary_op1(__binary_op2(__first1[0], __first2[0]), > __binary_op2(__first1[1], __first2[1])); > _Tp __v2 = __binary_op1(__binary_op2(__first1[2], __first2[2]), > __binary_op2(__first1[3], __first2[3])); > _Tp __v3 = __binary_op1(__v1, __v2); > __init = __binary_op1(__init, __v3); > __first1 += 4; > __first2 += 4; > } > } > for (; __first1 != __last1; ++__first1, (void) ++__first2) > __init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); > return __init; > } ># 410 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator1, typename _InputIterator2, typename _Tp> > > inline _Tp > transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _Tp __init) > { > return std::transform_reduce(__first1, __last1, __first2, > std::move(__init), > plus<>(), multiplies<>()); > } ># 435 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _Tp, > typename _BinaryOperation, typename _UnaryOperation> > > _Tp > transform_reduce(_InputIterator __first, _InputIterator __last, _Tp __init, > _BinaryOperation __binary_op, _UnaryOperation __unary_op) > { > if constexpr (__is_random_access_iter<_InputIterator>::value) > { > while ((__last - __first) >= 4) > { > _Tp __v1 = __binary_op(__unary_op(__first[0]), > __unary_op(__first[1])); > _Tp __v2 = __binary_op(__unary_op(__first[2]), > __unary_op(__first[3])); > _Tp __v3 = __binary_op(__v1, __v2); > __init = __binary_op(__init, __v3); > __first += 4; > } > } > for (; __first != __last; ++__first) > __init = __binary_op(__init, __unary_op(*__first)); > return __init; > } ># 478 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _OutputIterator, typename _Tp, > typename _BinaryOperation> > > _OutputIterator > exclusive_scan(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _Tp __init, > _BinaryOperation __binary_op) > { > while (__first != __last) > { > auto __v = __init; > __init = __binary_op(__init, *__first); > ++__first; > *__result++ = std::move(__v); > } > return __result; > } ># 513 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _OutputIterator, typename _Tp> > > inline _OutputIterator > exclusive_scan(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _Tp __init) > { > return std::exclusive_scan(__first, __last, __result, std::move(__init), > plus<>()); > } ># 541 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _BinaryOperation, typename _Tp> > > _OutputIterator > inclusive_scan(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _BinaryOperation __binary_op, > _Tp __init) > { > for (; __first != __last; ++__first) > *__result++ = __init = __binary_op(__init, *__first); > return __result; > } ># 570 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _BinaryOperation> > > _OutputIterator > inclusive_scan(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _BinaryOperation __binary_op) > { > if (__first != __last) > { > auto __init = *__first; > *__result++ = __init; > ++__first; > if (__first != __last) > __result = std::inclusive_scan(__first, __last, __result, > __binary_op, std::move(__init)); > } > return __result; > } ># 604 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _OutputIterator> > > inline _OutputIterator > inclusive_scan(_InputIterator __first, _InputIterator __last, > _OutputIterator __result) > { return std::inclusive_scan(__first, __last, __result, plus<>()); } ># 631 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _OutputIterator, typename _Tp, > typename _BinaryOperation, typename _UnaryOperation> > > _OutputIterator > transform_exclusive_scan(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _Tp __init, > _BinaryOperation __binary_op, > _UnaryOperation __unary_op) > { > while (__first != __last) > { > auto __v = __init; > __init = __binary_op(__init, __unary_op(*__first)); > ++__first; > *__result++ = std::move(__v); > } > return __result; > } ># 670 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _BinaryOperation, typename _UnaryOperation, typename _Tp> > > _OutputIterator > transform_inclusive_scan(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, > _BinaryOperation __binary_op, > _UnaryOperation __unary_op, > _Tp __init) > { > for (; __first != __last; ++__first) > *__result++ = __init = __binary_op(__init, __unary_op(*__first)); > return __result; > } ># 704 "/usr/include/c++/13/numeric" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _BinaryOperation, typename _UnaryOperation> > > _OutputIterator > transform_inclusive_scan(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, > _BinaryOperation __binary_op, > _UnaryOperation __unary_op) > { > if (__first != __last) > { > auto __init = __unary_op(*__first); > *__result++ = __init; > ++__first; > if (__first != __last) > __result = std::transform_inclusive_scan(__first, __last, __result, > __binary_op, __unary_op, > std::move(__init)); > } > return __result; > } > > > > > >} ># 739 "/usr/include/c++/13/numeric" 3 ># 1 "/usr/include/c++/13/pstl/glue_numeric_defs.h" 1 3 ># 15 "/usr/include/c++/13/pstl/glue_numeric_defs.h" 3 >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); > >} ># 740 "/usr/include/c++/13/numeric" 2 3 ># 31 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/adl_serializer.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/adl_serializer.hpp" 3 > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/abi_macros.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/abi_macros.hpp" 3 > ># 14 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/adl_serializer.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 3 > > > > ># 1 "/usr/include/c++/13/forward_list" 1 3 ># 32 "/usr/include/c++/13/forward_list" 3 > ># 33 "/usr/include/c++/13/forward_list" 3 > > > > > > > ># 1 "/usr/include/c++/13/bits/forward_list.h" 1 3 ># 33 "/usr/include/c++/13/bits/forward_list.h" 3 > ># 34 "/usr/include/c++/13/bits/forward_list.h" 3 ># 44 "/usr/include/c++/13/bits/forward_list.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > > struct _Fwd_list_node_base > { > _Fwd_list_node_base() = default; > _Fwd_list_node_base(_Fwd_list_node_base&& __x) noexcept > : _M_next(__x._M_next) > { __x._M_next = nullptr; } > > _Fwd_list_node_base(const _Fwd_list_node_base&) = delete; > _Fwd_list_node_base& operator=(const _Fwd_list_node_base&) = delete; > > _Fwd_list_node_base& > operator=(_Fwd_list_node_base&& __x) noexcept > { > _M_next = __x._M_next; > __x._M_next = nullptr; > return *this; > } > > _Fwd_list_node_base* _M_next = nullptr; > > _Fwd_list_node_base* > _M_transfer_after(_Fwd_list_node_base* __begin, > _Fwd_list_node_base* __end) noexcept > { > _Fwd_list_node_base* __keep = __begin->_M_next; > if (__end) > { > __begin->_M_next = __end->_M_next; > __end->_M_next = _M_next; > } > else > __begin->_M_next = nullptr; > _M_next = __keep; > return __end; > } > > void > _M_reverse_after() noexcept > { > _Fwd_list_node_base* __tail = _M_next; > if (!__tail) > return; > while (_Fwd_list_node_base* __temp = __tail->_M_next) > { > _Fwd_list_node_base* __keep = _M_next; > _M_next = __temp; > __tail->_M_next = __temp->_M_next; > _M_next->_M_next = __keep; > } > } > }; > > > > > > > > template<typename _Tp> > struct _Fwd_list_node > : public _Fwd_list_node_base > { > _Fwd_list_node() = default; > > __gnu_cxx::__aligned_buffer<_Tp> _M_storage; > > _Tp* > _M_valptr() noexcept > { return _M_storage._M_ptr(); } > > const _Tp* > _M_valptr() const noexcept > { return _M_storage._M_ptr(); } > }; > > > > > > > template<typename _Tp> > struct _Fwd_list_iterator > { > typedef _Fwd_list_iterator<_Tp> _Self; > typedef _Fwd_list_node<_Tp> _Node; > > typedef _Tp value_type; > typedef _Tp* pointer; > typedef _Tp& reference; > typedef ptrdiff_t difference_type; > typedef std::forward_iterator_tag iterator_category; > > _Fwd_list_iterator() noexcept > : _M_node() { } > > explicit > _Fwd_list_iterator(_Fwd_list_node_base* __n) noexcept > : _M_node(__n) { } > > [[__nodiscard__]] > reference > operator*() const noexcept > { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); } > > [[__nodiscard__]] > pointer > operator->() const noexcept > { return static_cast<_Node*>(this->_M_node)->_M_valptr(); } > > _Self& > operator++() noexcept > { > _M_node = _M_node->_M_next; > return *this; > } > > _Self > operator++(int) noexcept > { > _Self __tmp(*this); > _M_node = _M_node->_M_next; > return __tmp; > } > > > > > [[__nodiscard__]] > friend bool > operator==(const _Self& __x, const _Self& __y) noexcept > { return __x._M_node == __y._M_node; } > > > > > > [[__nodiscard__]] > friend bool > operator!=(const _Self& __x, const _Self& __y) noexcept > { return __x._M_node != __y._M_node; } > > > _Self > _M_next() const noexcept > { > if (_M_node) > return _Fwd_list_iterator(_M_node->_M_next); > else > return _Fwd_list_iterator(nullptr); > } > > _Fwd_list_node_base* _M_node; > }; > > > > > > > template<typename _Tp> > struct _Fwd_list_const_iterator > { > typedef _Fwd_list_const_iterator<_Tp> _Self; > typedef const _Fwd_list_node<_Tp> _Node; > typedef _Fwd_list_iterator<_Tp> iterator; > > typedef _Tp value_type; > typedef const _Tp* pointer; > typedef const _Tp& reference; > typedef ptrdiff_t difference_type; > typedef std::forward_iterator_tag iterator_category; > > _Fwd_list_const_iterator() noexcept > : _M_node() { } > > explicit > _Fwd_list_const_iterator(const _Fwd_list_node_base* __n) noexcept > : _M_node(__n) { } > > _Fwd_list_const_iterator(const iterator& __iter) noexcept > : _M_node(__iter._M_node) { } > > [[__nodiscard__]] > reference > operator*() const noexcept > { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); } > > [[__nodiscard__]] > pointer > operator->() const noexcept > { return static_cast<_Node*>(this->_M_node)->_M_valptr(); } > > _Self& > operator++() noexcept > { > _M_node = _M_node->_M_next; > return *this; > } > > _Self > operator++(int) noexcept > { > _Self __tmp(*this); > _M_node = _M_node->_M_next; > return __tmp; > } > > > > > [[__nodiscard__]] > friend bool > operator==(const _Self& __x, const _Self& __y) noexcept > { return __x._M_node == __y._M_node; } > > > > > > [[__nodiscard__]] > friend bool > operator!=(const _Self& __x, const _Self& __y) noexcept > { return __x._M_node != __y._M_node; } > > > _Self > _M_next() const noexcept > { > if (this->_M_node) > return _Fwd_list_const_iterator(_M_node->_M_next); > else > return _Fwd_list_const_iterator(nullptr); > } > > const _Fwd_list_node_base* _M_node; > }; > > > > > template<typename _Tp, typename _Alloc> > struct _Fwd_list_base > { > protected: > typedef __alloc_rebind<_Alloc, _Fwd_list_node<_Tp>> _Node_alloc_type; > typedef __gnu_cxx::__alloc_traits<_Node_alloc_type> _Node_alloc_traits; > > struct _Fwd_list_impl > : public _Node_alloc_type > { > _Fwd_list_node_base _M_head; > > _Fwd_list_impl() > noexcept(is_nothrow_default_constructible<_Node_alloc_type>::value) > : _Node_alloc_type(), _M_head() > { } > > _Fwd_list_impl(_Fwd_list_impl&&) = default; > > _Fwd_list_impl(_Fwd_list_impl&& __fl, _Node_alloc_type&& __a) > : _Node_alloc_type(std::move(__a)), _M_head(std::move(__fl._M_head)) > { } > > _Fwd_list_impl(_Node_alloc_type&& __a) > : _Node_alloc_type(std::move(__a)), _M_head() > { } > }; > > _Fwd_list_impl _M_impl; > > public: > typedef _Fwd_list_iterator<_Tp> iterator; > typedef _Fwd_list_const_iterator<_Tp> const_iterator; > typedef _Fwd_list_node<_Tp> _Node; > > _Node_alloc_type& > _M_get_Node_allocator() noexcept > { return this->_M_impl; } > > const _Node_alloc_type& > _M_get_Node_allocator() const noexcept > { return this->_M_impl; } > > _Fwd_list_base() = default; > > _Fwd_list_base(_Node_alloc_type&& __a) > : _M_impl(std::move(__a)) { } > > > _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a, > std::true_type) > : _M_impl(std::move(__lst._M_impl), std::move(__a)) > { } > > > _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a); > > _Fwd_list_base(_Fwd_list_base&&) = default; > > ~_Fwd_list_base() > { _M_erase_after(&_M_impl._M_head, nullptr); } > > protected: > _Node* > _M_get_node() > { > auto __ptr = _Node_alloc_traits::allocate(_M_get_Node_allocator(), 1); > return std::__to_address(__ptr); > } > > template<typename... _Args> > _Node* > _M_create_node(_Args&&... __args) > { > _Node* __node = this->_M_get_node(); > try > { > ::new ((void*)__node) _Node; > _Node_alloc_traits::construct(_M_get_Node_allocator(), > __node->_M_valptr(), > std::forward<_Args>(__args)...); > } > catch(...) > { > this->_M_put_node(__node); > throw; > } > return __node; > } > > template<typename... _Args> > _Fwd_list_node_base* > _M_insert_after(const_iterator __pos, _Args&&... __args); > > void > _M_put_node(_Node* __p) > { > typedef typename _Node_alloc_traits::pointer _Ptr; > auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__p); > _Node_alloc_traits::deallocate(_M_get_Node_allocator(), __ptr, 1); > } > > _Fwd_list_node_base* > _M_erase_after(_Fwd_list_node_base* __pos); > > _Fwd_list_node_base* > _M_erase_after(_Fwd_list_node_base* __pos, > _Fwd_list_node_base* __last); > }; ># 430 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _Tp, typename _Alloc = allocator<_Tp>> > class forward_list : private _Fwd_list_base<_Tp, _Alloc> > { > static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, > "std::forward_list must have a non-const, non-volatile value_type"); > > static_assert(is_same<typename _Alloc::value_type, _Tp>::value, > "std::forward_list must have the same value_type as its allocator"); > > > private: > typedef _Fwd_list_base<_Tp, _Alloc> _Base; > typedef _Fwd_list_node_base _Node_base; > typedef typename _Base::_Node _Node; > typedef typename _Base::_Node_alloc_type _Node_alloc_type; > typedef typename _Base::_Node_alloc_traits _Node_alloc_traits; > typedef allocator_traits<__alloc_rebind<_Alloc, _Tp>> _Alloc_traits; > > public: > > typedef _Tp value_type; > typedef typename _Alloc_traits::pointer pointer; > typedef typename _Alloc_traits::const_pointer const_pointer; > typedef value_type& reference; > typedef const value_type& const_reference; > > typedef typename _Base::iterator iterator; > typedef typename _Base::const_iterator const_iterator; > typedef std::size_t size_type; > typedef std::ptrdiff_t difference_type; > typedef _Alloc allocator_type; > > > > > > > forward_list() = default; > > > > > > explicit > forward_list(const _Alloc& __al) noexcept > : _Base(_Node_alloc_type(__al)) > { } > > > > > > > forward_list(const forward_list& __list, > const __type_identity_t<_Alloc>& __al) > : _Base(_Node_alloc_type(__al)) > { _M_range_initialize(__list.begin(), __list.end()); } > > private: > forward_list(forward_list&& __list, _Node_alloc_type&& __al, > false_type) > : _Base(std::move(__list), std::move(__al)) > { > > > insert_after(cbefore_begin(), > std::__make_move_if_noexcept_iterator(__list.begin()), > std::__make_move_if_noexcept_iterator(__list.end())); > } > > forward_list(forward_list&& __list, _Node_alloc_type&& __al, > true_type) > noexcept > : _Base(std::move(__list), _Node_alloc_type(__al), true_type{}) > { } > > public: > > > > > > forward_list(forward_list&& __list, > const __type_identity_t<_Alloc>& __al) > noexcept(_Node_alloc_traits::_S_always_equal()) > : forward_list(std::move(__list), _Node_alloc_type(__al), > typename _Node_alloc_traits::is_always_equal{}) > { } ># 527 "/usr/include/c++/13/bits/forward_list.h" 3 > explicit > forward_list(size_type __n, const _Alloc& __al = _Alloc()) > : _Base(_Node_alloc_type(__al)) > { _M_default_initialize(__n); } ># 541 "/usr/include/c++/13/bits/forward_list.h" 3 > forward_list(size_type __n, const _Tp& __value, > const _Alloc& __al = _Alloc()) > : _Base(_Node_alloc_type(__al)) > { _M_fill_initialize(__n, __value); } ># 556 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > forward_list(_InputIterator __first, _InputIterator __last, > const _Alloc& __al = _Alloc()) > : _Base(_Node_alloc_type(__al)) > { _M_range_initialize(__first, __last); } > > > > > > > forward_list(const forward_list& __list) > : _Base(_Node_alloc_traits::_S_select_on_copy( > __list._M_get_Node_allocator())) > { _M_range_initialize(__list.begin(), __list.end()); } ># 582 "/usr/include/c++/13/bits/forward_list.h" 3 > forward_list(forward_list&&) = default; ># 592 "/usr/include/c++/13/bits/forward_list.h" 3 > forward_list(std::initializer_list<_Tp> __il, > const _Alloc& __al = _Alloc()) > : _Base(_Node_alloc_type(__al)) > { _M_range_initialize(__il.begin(), __il.end()); } > > > > > ~forward_list() noexcept > { } ># 612 "/usr/include/c++/13/bits/forward_list.h" 3 > forward_list& > operator=(const forward_list& __list); ># 627 "/usr/include/c++/13/bits/forward_list.h" 3 > forward_list& > operator=(forward_list&& __list) > noexcept(_Node_alloc_traits::_S_nothrow_move()) > { > constexpr bool __move_storage = > _Node_alloc_traits::_S_propagate_on_move_assign() > || _Node_alloc_traits::_S_always_equal(); > _M_move_assign(std::move(__list), __bool_constant<__move_storage>()); > return *this; > } ># 646 "/usr/include/c++/13/bits/forward_list.h" 3 > forward_list& > operator=(std::initializer_list<_Tp> __il) > { > assign(__il); > return *this; > } ># 665 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > void > assign(_InputIterator __first, _InputIterator __last) > { > typedef is_assignable<_Tp, decltype(*__first)> __assignable; > _M_assign(__first, __last, __assignable()); > } ># 684 "/usr/include/c++/13/bits/forward_list.h" 3 > void > assign(size_type __n, const _Tp& __val) > { _M_assign_n(__n, __val, is_copy_assignable<_Tp>()); } ># 696 "/usr/include/c++/13/bits/forward_list.h" 3 > void > assign(std::initializer_list<_Tp> __il) > { assign(__il.begin(), __il.end()); } > > > allocator_type > get_allocator() const noexcept > { return allocator_type(this->_M_get_Node_allocator()); } > > > > > > > > [[__nodiscard__]] > iterator > before_begin() noexcept > { return iterator(&this->_M_impl._M_head); } > > > > > > > [[__nodiscard__]] > const_iterator > before_begin() const noexcept > { return const_iterator(&this->_M_impl._M_head); } > > > > > > [[__nodiscard__]] > iterator > begin() noexcept > { return iterator(this->_M_impl._M_head._M_next); } > > > > > > > [[__nodiscard__]] > const_iterator > begin() const noexcept > { return const_iterator(this->_M_impl._M_head._M_next); } > > > > > > > [[__nodiscard__]] > iterator > end() noexcept > { return iterator(nullptr); } > > > > > > > [[__nodiscard__]] > const_iterator > end() const noexcept > { return const_iterator(nullptr); } > > > > > > > [[__nodiscard__]] > const_iterator > cbegin() const noexcept > { return const_iterator(this->_M_impl._M_head._M_next); } > > > > > > > [[__nodiscard__]] > const_iterator > cbefore_begin() const noexcept > { return const_iterator(&this->_M_impl._M_head); } > > > > > > > [[__nodiscard__]] > const_iterator > cend() const noexcept > { return const_iterator(nullptr); } > > > > > > [[__nodiscard__]] > bool > empty() const noexcept > { return this->_M_impl._M_head._M_next == nullptr; } > > > > > [[__nodiscard__]] > size_type > max_size() const noexcept > { return _Node_alloc_traits::max_size(this->_M_get_Node_allocator()); } > > > > > > > > [[__nodiscard__]] > reference > front() > { > _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next); > return *__front->_M_valptr(); > } > > > > > > [[__nodiscard__]] > const_reference > front() const > { > _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next); > return *__front->_M_valptr(); > } ># 851 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename... _Args> > > reference > > > > emplace_front(_Args&&... __args) > { > this->_M_insert_after(cbefore_begin(), > std::forward<_Args>(__args)...); > > return front(); > > } ># 876 "/usr/include/c++/13/bits/forward_list.h" 3 > void > push_front(const _Tp& __val) > { this->_M_insert_after(cbefore_begin(), __val); } > > > > > void > push_front(_Tp&& __val) > { this->_M_insert_after(cbefore_begin(), std::move(__val)); } ># 899 "/usr/include/c++/13/bits/forward_list.h" 3 > void > pop_front() > { this->_M_erase_after(&this->_M_impl._M_head); } ># 916 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename... _Args> > iterator > emplace_after(const_iterator __pos, _Args&&... __args) > { return iterator(this->_M_insert_after(__pos, > std::forward<_Args>(__args)...)); } ># 934 "/usr/include/c++/13/bits/forward_list.h" 3 > iterator > insert_after(const_iterator __pos, const _Tp& __val) > { return iterator(this->_M_insert_after(__pos, __val)); } > > > > > iterator > insert_after(const_iterator __pos, _Tp&& __val) > { return iterator(this->_M_insert_after(__pos, std::move(__val))); } ># 960 "/usr/include/c++/13/bits/forward_list.h" 3 > iterator > insert_after(const_iterator __pos, size_type __n, const _Tp& __val); ># 978 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > iterator > insert_after(const_iterator __pos, > _InputIterator __first, _InputIterator __last); ># 999 "/usr/include/c++/13/bits/forward_list.h" 3 > iterator > insert_after(const_iterator __pos, std::initializer_list<_Tp> __il) > { return insert_after(__pos, __il.begin(), __il.end()); } ># 1020 "/usr/include/c++/13/bits/forward_list.h" 3 > iterator > erase_after(const_iterator __pos) > { return iterator(this->_M_erase_after(const_cast<_Node_base*> > (__pos._M_node))); } ># 1043 "/usr/include/c++/13/bits/forward_list.h" 3 > iterator > erase_after(const_iterator __pos, const_iterator __last) > { return iterator(this->_M_erase_after(const_cast<_Node_base*> > (__pos._M_node), > const_cast<_Node_base*> > (__last._M_node))); } ># 1062 "/usr/include/c++/13/bits/forward_list.h" 3 > void > swap(forward_list& __list) noexcept > { > std::swap(this->_M_impl._M_head._M_next, > __list._M_impl._M_head._M_next); > _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), > __list._M_get_Node_allocator()); > } ># 1082 "/usr/include/c++/13/bits/forward_list.h" 3 > void > resize(size_type __sz); ># 1097 "/usr/include/c++/13/bits/forward_list.h" 3 > void > resize(size_type __sz, const value_type& __val); ># 1108 "/usr/include/c++/13/bits/forward_list.h" 3 > void > clear() noexcept > { this->_M_erase_after(&this->_M_impl._M_head, nullptr); } ># 1125 "/usr/include/c++/13/bits/forward_list.h" 3 > void > splice_after(const_iterator __pos, forward_list&& __list) noexcept > { > if (!__list.empty()) > _M_splice_after(__pos, __list.before_begin(), __list.end()); > } > > void > splice_after(const_iterator __pos, forward_list& __list) noexcept > { splice_after(__pos, std::move(__list)); } ># 1146 "/usr/include/c++/13/bits/forward_list.h" 3 > void > splice_after(const_iterator __pos, forward_list&& __list, > const_iterator __i) noexcept; > > void > splice_after(const_iterator __pos, forward_list& __list, > const_iterator __i) noexcept > { splice_after(__pos, std::move(__list), __i); } ># 1169 "/usr/include/c++/13/bits/forward_list.h" 3 > void > splice_after(const_iterator __pos, forward_list&&, > const_iterator __before, const_iterator __last) noexcept > { _M_splice_after(__pos, __before, __last); } > > void > splice_after(const_iterator __pos, forward_list&, > const_iterator __before, const_iterator __last) noexcept > { _M_splice_after(__pos, __before, __last); } > > > private: > > > > > > > using __remove_return_type = void; > > > public: ># 1203 "/usr/include/c++/13/bits/forward_list.h" 3 > > __remove_return_type > remove(const _Tp& __val); ># 1218 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _Pred> > __remove_return_type > remove_if(_Pred __pred); ># 1232 "/usr/include/c++/13/bits/forward_list.h" 3 > > __remove_return_type > unique() > { return unique(std::equal_to<_Tp>()); } ># 1251 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _BinPred> > __remove_return_type > unique(_BinPred __binary_pred); ># 1264 "/usr/include/c++/13/bits/forward_list.h" 3 > void > merge(forward_list&& __list) > { merge(std::move(__list), std::less<_Tp>()); } > > void > merge(forward_list& __list) > { merge(std::move(__list)); } ># 1283 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _Comp> > void > merge(forward_list&& __list, _Comp __comp); > > template<typename _Comp> > void > merge(forward_list& __list, _Comp __comp) > { merge(std::move(__list), __comp); } > > > > > > > > void > sort() > { sort(std::less<_Tp>()); } > > > > > > > > template<typename _Comp> > void > sort(_Comp __comp); > > > > > > > void > reverse() noexcept > { this->_M_impl._M_head._M_reverse_after(); } > > private: > > template<typename _InputIterator> > void > _M_range_initialize(_InputIterator __first, _InputIterator __last); > > > > void > _M_fill_initialize(size_type __n, const value_type& __value); > > > iterator > _M_splice_after(const_iterator __pos, const_iterator __before, > const_iterator __last); > > > void > _M_default_initialize(size_type __n); > > > void > _M_default_insert_after(const_iterator __pos, size_type __n); > > > void > _M_move_assign(forward_list&& __list, true_type) noexcept > { > clear(); > this->_M_impl._M_head._M_next = __list._M_impl._M_head._M_next; > __list._M_impl._M_head._M_next = nullptr; > std::__alloc_on_move(this->_M_get_Node_allocator(), > __list._M_get_Node_allocator()); > } > > > void > _M_move_assign(forward_list&& __list, false_type) > { > if (__list._M_get_Node_allocator() == this->_M_get_Node_allocator()) > _M_move_assign(std::move(__list), true_type()); > else > > > this->assign(std::make_move_iterator(__list.begin()), > std::make_move_iterator(__list.end())); > } > > > > template<typename _InputIterator> > void > _M_assign(_InputIterator __first, _InputIterator __last, true_type) > { > auto __prev = before_begin(); > auto __curr = begin(); > auto __end = end(); > while (__curr != __end && __first != __last) > { > *__curr = *__first; > ++__prev; > ++__curr; > ++__first; > } > if (__first != __last) > insert_after(__prev, __first, __last); > else if (__curr != __end) > erase_after(__prev, __end); > } > > > > template<typename _InputIterator> > void > _M_assign(_InputIterator __first, _InputIterator __last, false_type) > { > clear(); > insert_after(cbefore_begin(), __first, __last); > } > > > void > _M_assign_n(size_type __n, const _Tp& __val, true_type) > { > auto __prev = before_begin(); > auto __curr = begin(); > auto __end = end(); > while (__curr != __end && __n > 0) > { > *__curr = __val; > ++__prev; > ++__curr; > --__n; > } > if (__n > 0) > insert_after(__prev, __n, __val); > else if (__curr != __end) > erase_after(__prev, __end); > } > > > void > _M_assign_n(size_type __n, const _Tp& __val, false_type) > { > clear(); > insert_after(cbefore_begin(), __n, __val); > } > }; > > > template<typename _InputIterator, typename _ValT > = typename iterator_traits<_InputIterator>::value_type, > typename _Allocator = allocator<_ValT>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > forward_list(_InputIterator, _InputIterator, _Allocator = _Allocator()) > -> forward_list<_ValT, _Allocator>; ># 1450 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > bool > operator==(const forward_list<_Tp, _Alloc>& __lx, > const forward_list<_Tp, _Alloc>& __ly); ># 1491 "/usr/include/c++/13/bits/forward_list.h" 3 > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<(const forward_list<_Tp, _Alloc>& __lx, > const forward_list<_Tp, _Alloc>& __ly) > { return std::lexicographical_compare(__lx.cbegin(), __lx.cend(), > __ly.cbegin(), __ly.cend()); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator!=(const forward_list<_Tp, _Alloc>& __lx, > const forward_list<_Tp, _Alloc>& __ly) > { return !(__lx == __ly); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>(const forward_list<_Tp, _Alloc>& __lx, > const forward_list<_Tp, _Alloc>& __ly) > { return (__ly < __lx); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator>=(const forward_list<_Tp, _Alloc>& __lx, > const forward_list<_Tp, _Alloc>& __ly) > { return !(__lx < __ly); } > > > template<typename _Tp, typename _Alloc> > [[__nodiscard__]] > inline bool > operator<=(const forward_list<_Tp, _Alloc>& __lx, > const forward_list<_Tp, _Alloc>& __ly) > { return !(__ly < __lx); } > > > > template<typename _Tp, typename _Alloc> > inline void > swap(forward_list<_Tp, _Alloc>& __lx, > forward_list<_Tp, _Alloc>& __ly) > noexcept(noexcept(__lx.swap(__ly))) > { __lx.swap(__ly); } > > > >} ># 41 "/usr/include/c++/13/forward_list" 2 3 > ># 1 "/usr/include/c++/13/bits/forward_list.tcc" 1 3 ># 33 "/usr/include/c++/13/bits/forward_list.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _Tp, typename _Alloc> > _Fwd_list_base<_Tp, _Alloc>:: > _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a) > : _M_impl(std::move(__a)) > { > if (__lst._M_get_Node_allocator() == _M_get_Node_allocator()) > this->_M_impl._M_head = std::move(__lst._M_impl._M_head); > } > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > _Fwd_list_node_base* > _Fwd_list_base<_Tp, _Alloc>:: > _M_insert_after(const_iterator __pos, _Args&&... __args) > { > _Fwd_list_node_base* __to > = const_cast<_Fwd_list_node_base*>(__pos._M_node); > _Node* __thing = _M_create_node(std::forward<_Args>(__args)...); > __thing->_M_next = __to->_M_next; > __to->_M_next = __thing; > return __to->_M_next; > } > > template<typename _Tp, typename _Alloc> > _Fwd_list_node_base* > _Fwd_list_base<_Tp, _Alloc>:: > _M_erase_after(_Fwd_list_node_base* __pos) > { > _Node* __curr = static_cast<_Node*>(__pos->_M_next); > __pos->_M_next = __curr->_M_next; > _Node_alloc_traits::destroy(_M_get_Node_allocator(), > __curr->_M_valptr()); > __curr->~_Node(); > _M_put_node(__curr); > return __pos->_M_next; > } > > template<typename _Tp, typename _Alloc> > _Fwd_list_node_base* > _Fwd_list_base<_Tp, _Alloc>:: > _M_erase_after(_Fwd_list_node_base* __pos, > _Fwd_list_node_base* __last) > { > _Node* __curr = static_cast<_Node*>(__pos->_M_next); > while (__curr != __last) > { > _Node* __temp = __curr; > __curr = static_cast<_Node*>(__curr->_M_next); > _Node_alloc_traits::destroy(_M_get_Node_allocator(), > __temp->_M_valptr()); > __temp->~_Node(); > _M_put_node(__temp); > } > __pos->_M_next = __last; > return __last; > } > > > template<typename _Tp, typename _Alloc> > template<typename _InputIterator> > void > forward_list<_Tp, _Alloc>:: > _M_range_initialize(_InputIterator __first, _InputIterator __last) > { > _Node_base* __to = &this->_M_impl._M_head; > for (; __first != __last; ++__first) > { > __to->_M_next = this->_M_create_node(*__first); > __to = __to->_M_next; > } > } > > > template<typename _Tp, typename _Alloc> > void > forward_list<_Tp, _Alloc>:: > _M_fill_initialize(size_type __n, const value_type& __value) > { > _Node_base* __to = &this->_M_impl._M_head; > for (; __n; --__n) > { > __to->_M_next = this->_M_create_node(__value); > __to = __to->_M_next; > } > } > > template<typename _Tp, typename _Alloc> > void > forward_list<_Tp, _Alloc>:: > _M_default_initialize(size_type __n) > { > _Node_base* __to = &this->_M_impl._M_head; > for (; __n; --__n) > { > __to->_M_next = this->_M_create_node(); > __to = __to->_M_next; > } > } > > template<typename _Tp, typename _Alloc> > forward_list<_Tp, _Alloc>& > forward_list<_Tp, _Alloc>:: > operator=(const forward_list& __list) > { > if (std::__addressof(__list) != this) > { > if (_Node_alloc_traits::_S_propagate_on_copy_assign()) > { > auto& __this_alloc = this->_M_get_Node_allocator(); > auto& __that_alloc = __list._M_get_Node_allocator(); > if (!_Node_alloc_traits::_S_always_equal() > && __this_alloc != __that_alloc) > { > > clear(); > } > std::__alloc_on_copy(__this_alloc, __that_alloc); > } > assign(__list.cbegin(), __list.cend()); > } > return *this; > } > > template<typename _Tp, typename _Alloc> > void > forward_list<_Tp, _Alloc>:: > _M_default_insert_after(const_iterator __pos, size_type __n) > { > const_iterator __saved_pos = __pos; > try > { > for (; __n; --__n) > __pos = emplace_after(__pos); > } > catch(...) > { > erase_after(__saved_pos, ++__pos); > throw; > } > } > > template<typename _Tp, typename _Alloc> > void > forward_list<_Tp, _Alloc>:: > resize(size_type __sz) > { > iterator __k = before_begin(); > > size_type __len = 0; > while (__k._M_next() != end() && __len < __sz) > { > ++__k; > ++__len; > } > if (__len == __sz) > erase_after(__k, end()); > else > _M_default_insert_after(__k, __sz - __len); > } > > template<typename _Tp, typename _Alloc> > void > forward_list<_Tp, _Alloc>:: > resize(size_type __sz, const value_type& __val) > { > iterator __k = before_begin(); > > size_type __len = 0; > while (__k._M_next() != end() && __len < __sz) > { > ++__k; > ++__len; > } > if (__len == __sz) > erase_after(__k, end()); > else > insert_after(__k, __sz - __len, __val); > } > > template<typename _Tp, typename _Alloc> > typename forward_list<_Tp, _Alloc>::iterator > forward_list<_Tp, _Alloc>:: > _M_splice_after(const_iterator __pos, > const_iterator __before, const_iterator __last) > { > _Node_base* __tmp = const_cast<_Node_base*>(__pos._M_node); > _Node_base* __b = const_cast<_Node_base*>(__before._M_node); > _Node_base* __end = __b; > > while (__end && __end->_M_next != __last._M_node) > __end = __end->_M_next; > > if (__b != __end) > return iterator(__tmp->_M_transfer_after(__b, __end)); > else > return iterator(__tmp); > } > > template<typename _Tp, typename _Alloc> > void > forward_list<_Tp, _Alloc>:: > splice_after(const_iterator __pos, forward_list&&, > const_iterator __i) noexcept > { > const_iterator __j = __i; > ++__j; > > if (__pos == __i || __pos == __j) > return; > > _Node_base* __tmp = const_cast<_Node_base*>(__pos._M_node); > __tmp->_M_transfer_after(const_cast<_Node_base*>(__i._M_node), > const_cast<_Node_base*>(__j._M_node)); > } > > template<typename _Tp, typename _Alloc> > typename forward_list<_Tp, _Alloc>::iterator > forward_list<_Tp, _Alloc>:: > insert_after(const_iterator __pos, size_type __n, const _Tp& __val) > { > if (__n) > { > forward_list __tmp(__n, __val, get_allocator()); > return _M_splice_after(__pos, __tmp.before_begin(), __tmp.end()); > } > else > return iterator(const_cast<_Node_base*>(__pos._M_node)); > } > > template<typename _Tp, typename _Alloc> > template<typename _InputIterator, typename> > typename forward_list<_Tp, _Alloc>::iterator > forward_list<_Tp, _Alloc>:: > insert_after(const_iterator __pos, > _InputIterator __first, _InputIterator __last) > { > forward_list __tmp(__first, __last, get_allocator()); > if (!__tmp.empty()) > return _M_splice_after(__pos, __tmp.before_begin(), __tmp.end()); > else > return iterator(const_cast<_Node_base*>(__pos._M_node)); > } > > > > > > > > template<typename _Tp, typename _Alloc> > auto > forward_list<_Tp, _Alloc>:: > remove(const _Tp& __val) -> __remove_return_type > { > size_type __removed __attribute__((__unused__)) = 0; > forward_list __to_destroy(get_allocator()); > > auto __prev_it = cbefore_begin(); > while (_Node* __tmp = static_cast<_Node*>(__prev_it._M_node->_M_next)) > if (*__tmp->_M_valptr() == __val) > { > __to_destroy.splice_after(__to_destroy.cbefore_begin(), > *this, __prev_it); > ; > } > else > ++__prev_it; > > return ; > } > > template<typename _Tp, typename _Alloc> > template<typename _Pred> > auto > forward_list<_Tp, _Alloc>:: > remove_if(_Pred __pred) -> __remove_return_type > { > size_type __removed __attribute__((__unused__)) = 0; > forward_list __to_destroy(get_allocator()); > > auto __prev_it = cbefore_begin(); > while (_Node* __tmp = static_cast<_Node*>(__prev_it._M_node->_M_next)) > if (__pred(*__tmp->_M_valptr())) > { > __to_destroy.splice_after(__to_destroy.cbefore_begin(), > *this, __prev_it); > ; > } > else > ++__prev_it; > > return ; > } > > template<typename _Tp, typename _Alloc> > template<typename _BinPred> > auto > forward_list<_Tp, _Alloc>:: > unique(_BinPred __binary_pred) -> __remove_return_type > { > iterator __first = begin(); > iterator __last = end(); > if (__first == __last) > return ; > > forward_list __to_destroy(get_allocator()); > size_type __removed __attribute__((__unused__)) = 0; > iterator __next = __first; > while (++__next != __last) > { > if (__binary_pred(*__first, *__next)) > { > __to_destroy.splice_after(__to_destroy.cbefore_begin(), > *this, __first); > ; > } > else > __first = __next; > __next = __first; > } > > return ; > } > > > > template<typename _Tp, typename _Alloc> > template<typename _Comp> > void > forward_list<_Tp, _Alloc>:: > merge(forward_list&& __list, _Comp __comp) > { > > > if (std::__addressof(__list) == this) > return; > > _Node_base* __node = &this->_M_impl._M_head; > while (__node->_M_next && __list._M_impl._M_head._M_next) > { > if (__comp(*static_cast<_Node*> > (__list._M_impl._M_head._M_next)->_M_valptr(), > *static_cast<_Node*> > (__node->_M_next)->_M_valptr())) > __node->_M_transfer_after(&__list._M_impl._M_head, > __list._M_impl._M_head._M_next); > __node = __node->_M_next; > } > > if (__list._M_impl._M_head._M_next) > *__node = std::move(__list._M_impl._M_head); > } > > template<typename _Tp, typename _Alloc> > bool > operator==(const forward_list<_Tp, _Alloc>& __lx, > const forward_list<_Tp, _Alloc>& __ly) > { > > > auto __ix = __lx.cbegin(); > auto __iy = __ly.cbegin(); > while (__ix != __lx.cend() && __iy != __ly.cend()) > { > if (!(*__ix == *__iy)) > return false; > ++__ix; > ++__iy; > } > if (__ix == __lx.cend() && __iy == __ly.cend()) > return true; > else > return false; > } > > template<typename _Tp, class _Alloc> > template<typename _Comp> > void > forward_list<_Tp, _Alloc>:: > sort(_Comp __comp) > { > > _Node* __list = static_cast<_Node*>(this->_M_impl._M_head._M_next); > if (!__list) > return; > > unsigned long __insize = 1; > > while (1) > { > _Node* __p = __list; > __list = nullptr; > _Node* __tail = nullptr; > > > unsigned long __nmerges = 0; > > while (__p) > { > ++__nmerges; > > > _Node* __q = __p; > unsigned long __psize = 0; > for (unsigned long __i = 0; __i < __insize; ++__i) > { > ++__psize; > __q = static_cast<_Node*>(__q->_M_next); > if (!__q) > break; > } > > > unsigned long __qsize = __insize; > > > while (__psize > 0 || (__qsize > 0 && __q)) > { > > _Node* __e; > if (__psize == 0) > { > > __e = __q; > __q = static_cast<_Node*>(__q->_M_next); > --__qsize; > } > else if (__qsize == 0 || !__q) > { > > __e = __p; > __p = static_cast<_Node*>(__p->_M_next); > --__psize; > } > else if (!__comp(*__q->_M_valptr(), *__p->_M_valptr())) > { > > __e = __p; > __p = static_cast<_Node*>(__p->_M_next); > --__psize; > } > else > { > > __e = __q; > __q = static_cast<_Node*>(__q->_M_next); > --__qsize; > } > > > if (__tail) > __tail->_M_next = __e; > else > __list = __e; > __tail = __e; > } > > > __p = __q; > } > __tail->_M_next = nullptr; > > > > if (__nmerges <= 1) > { > this->_M_impl._M_head._M_next = __list; > return; > } > > > __insize *= 2; > } > } > > > >} ># 43 "/usr/include/c++/13/forward_list" 2 3 > > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > namespace pmr > { > template<typename _Tp> > using forward_list = std::forward_list<_Tp, polymorphic_allocator<_Tp>>; > } > >} ># 14 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 2 3 > ># 1 "/usr/include/c++/13/map" 1 3 ># 58 "/usr/include/c++/13/map" 3 > ># 59 "/usr/include/c++/13/map" 3 > > > > > ># 1 "/usr/include/c++/13/bits/stl_multimap.h" 1 3 ># 64 "/usr/include/c++/13/bits/stl_multimap.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template <typename _Key, typename _Tp, typename _Compare, typename _Alloc> > class map; ># 96 "/usr/include/c++/13/bits/stl_multimap.h" 3 > 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: ># 122 "/usr/include/c++/13/bits/stl_multimap.h" 3 > 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; > > value_compare(_Compare __c) > : comp(__c) { } > > public: > bool operator()(const value_type& __x, const value_type& __y) const > { return comp(__x.first, __y.first); } > }; >#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; ># 185 "/usr/include/c++/13/bits/stl_multimap.h" 3 > multimap() = default; > > > > > > > > explicit > multimap(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Pair_alloc_type(__a)) { } ># 207 "/usr/include/c++/13/bits/stl_multimap.h" 3 > multimap(const multimap&) = default; ># 216 "/usr/include/c++/13/bits/stl_multimap.h" 3 > multimap(multimap&&) = default; ># 228 "/usr/include/c++/13/bits/stl_multimap.h" 3 > multimap(initializer_list<value_type> __l, > const _Compare& __comp = _Compare(), > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Pair_alloc_type(__a)) > { _M_t._M_insert_range_equal(__l.begin(), __l.end()); } > > > explicit > multimap(const allocator_type& __a) > : _M_t(_Pair_alloc_type(__a)) { } > > > multimap(const multimap& __m, > const __type_identity_t<allocator_type>& __a) > : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } > > > multimap(multimap&& __m, const __type_identity_t<allocator_type>& __a) > noexcept(is_nothrow_copy_constructible<_Compare>::value > && _Alloc_traits::_S_always_equal()) > : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } > > > multimap(initializer_list<value_type> __l, const allocator_type& __a) > : _M_t(_Pair_alloc_type(__a)) > { _M_t._M_insert_range_equal(__l.begin(), __l.end()); } > > > template<typename _InputIterator> > multimap(_InputIterator __first, _InputIterator __last, > const allocator_type& __a) > : _M_t(_Pair_alloc_type(__a)) > { _M_t._M_insert_range_equal(__first, __last); } ># 272 "/usr/include/c++/13/bits/stl_multimap.h" 3 > template<typename _InputIterator> > multimap(_InputIterator __first, _InputIterator __last) > : _M_t() > { _M_t._M_insert_range_equal(__first, __last); } ># 288 "/usr/include/c++/13/bits/stl_multimap.h" 3 > template<typename _InputIterator> > multimap(_InputIterator __first, _InputIterator __last, > const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Pair_alloc_type(__a)) > { _M_t._M_insert_range_equal(__first, __last); } > > > > > > > > ~multimap() = default; ># 317 "/usr/include/c++/13/bits/stl_multimap.h" 3 > multimap& > operator=(const multimap&) = default; > > > multimap& > operator=(multimap&&) = default; ># 335 "/usr/include/c++/13/bits/stl_multimap.h" 3 > multimap& > operator=(initializer_list<value_type> __l) > { > _M_t._M_assign_equal(__l.begin(), __l.end()); > return *this; > } > > > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_t.get_allocator()); } > > > > > > > > iterator > begin() noexcept > { return _M_t.begin(); } > > > > > > > const_iterator > begin() const noexcept > { return _M_t.begin(); } > > > > > > > iterator > end() noexcept > { return _M_t.end(); } > > > > > > > const_iterator > end() const noexcept > { return _M_t.end(); } > > > > > > > reverse_iterator > rbegin() noexcept > { return _M_t.rbegin(); } > > > > > > > const_reverse_iterator > rbegin() const noexcept > { return _M_t.rbegin(); } > > > > > > > reverse_iterator > rend() noexcept > { return _M_t.rend(); } > > > > > > > const_reverse_iterator > rend() const noexcept > { return _M_t.rend(); } > > > > > > > > const_iterator > cbegin() const noexcept > { return _M_t.begin(); } > > > > > > > const_iterator > cend() const noexcept > { return _M_t.end(); } > > > > > > > const_reverse_iterator > crbegin() const noexcept > { return _M_t.rbegin(); } > > > > > > > const_reverse_iterator > crend() const noexcept > { return _M_t.rend(); } > > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_t.empty(); } > > > size_type > size() const noexcept > { return _M_t.size(); } > > > size_type > max_size() const noexcept > { return _M_t.max_size(); } ># 493 "/usr/include/c++/13/bits/stl_multimap.h" 3 > template<typename... _Args> > iterator > emplace(_Args&&... __args) > { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } ># 520 "/usr/include/c++/13/bits/stl_multimap.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { > return _M_t._M_emplace_hint_equal(__pos, > std::forward<_Args>(__args)...); > } ># 542 "/usr/include/c++/13/bits/stl_multimap.h" 3 > iterator > insert(const value_type& __x) > { return _M_t._M_insert_equal(__x); } > > > > > iterator > insert(value_type&& __x) > { return _M_t._M_insert_equal(std::move(__x)); } > > template<typename _Pair> > __enable_if_t<is_constructible<value_type, _Pair>::value, iterator> > insert(_Pair&& __x) > { return _M_t._M_emplace_equal(std::forward<_Pair>(__x)); } ># 581 "/usr/include/c++/13/bits/stl_multimap.h" 3 > iterator > > insert(const_iterator __position, const value_type& __x) > > > > { return _M_t._M_insert_equal_(__position, __x); } > > > > > iterator > insert(const_iterator __position, value_type&& __x) > { return _M_t._M_insert_equal_(__position, std::move(__x)); } > > template<typename _Pair> > __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator> > insert(const_iterator __position, _Pair&& __x) > { > return _M_t._M_emplace_hint_equal(__position, > std::forward<_Pair>(__x)); > } ># 615 "/usr/include/c++/13/bits/stl_multimap.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_t._M_insert_range_equal(__first, __last); } ># 628 "/usr/include/c++/13/bits/stl_multimap.h" 3 > void > insert(initializer_list<value_type> __l) > { this->insert(__l.begin(), __l.end()); } > > > > > node_type > extract(const_iterator __pos) > { > do { if (std::__is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); > return _M_t.extract(__pos); > } > > > node_type > extract(const key_type& __x) > { return _M_t.extract(__x); } > > > iterator > insert(node_type&& __nh) > { return _M_t._M_reinsert_node_equal(std::move(__nh)); } > > > iterator > insert(const_iterator __hint, node_type&& __nh) > { return _M_t._M_reinsert_node_hint_equal(__hint, std::move(__nh)); } > > template<typename, typename> > friend struct std::_Rb_tree_merge_helper; > > template<typename _Cmp2> > void > merge(multimap<_Key, _Tp, _Cmp2, _Alloc>& __source) > { > using _Merge_helper = _Rb_tree_merge_helper<multimap, _Cmp2>; > _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); > } > > template<typename _Cmp2> > void > merge(multimap<_Key, _Tp, _Cmp2, _Alloc>&& __source) > { merge(__source); } > > template<typename _Cmp2> > void > merge(map<_Key, _Tp, _Cmp2, _Alloc>& __source) > { > using _Merge_helper = _Rb_tree_merge_helper<multimap, _Cmp2>; > _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); > } > > template<typename _Cmp2> > void > merge(map<_Key, _Tp, _Cmp2, _Alloc>&& __source) > { merge(__source); } ># 705 "/usr/include/c++/13/bits/stl_multimap.h" 3 > iterator > erase(const_iterator __position) > { return _M_t.erase(__position); } > > > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(iterator __position) > { return _M_t.erase(__position); } ># 742 "/usr/include/c++/13/bits/stl_multimap.h" 3 > size_type > erase(const key_type& __x) > { return _M_t.erase(__x); } ># 763 "/usr/include/c++/13/bits/stl_multimap.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_t.erase(__first, __last); } ># 800 "/usr/include/c++/13/bits/stl_multimap.h" 3 > void > swap(multimap& __x) > noexcept(__is_nothrow_swappable<_Compare>::value) > { _M_t.swap(__x._M_t); } > > > > > > > > void > clear() noexcept > { _M_t.clear(); } > > > > > > > key_compare > key_comp() const > { return _M_t.key_comp(); } > > > > > > value_compare > value_comp() const > { return value_compare(_M_t.key_comp()); } ># 846 "/usr/include/c++/13/bits/stl_multimap.h" 3 > iterator > find(const key_type& __x) > { return _M_t.find(__x); } > > > template<typename _Kt> > auto > find(const _Kt& __x) -> decltype(_M_t._M_find_tr(__x)) > { return _M_t._M_find_tr(__x); } ># 870 "/usr/include/c++/13/bits/stl_multimap.h" 3 > const_iterator > find(const key_type& __x) const > { return _M_t.find(__x); } > > > template<typename _Kt> > auto > find(const _Kt& __x) const -> decltype(_M_t._M_find_tr(__x)) > { return _M_t._M_find_tr(__x); } ># 888 "/usr/include/c++/13/bits/stl_multimap.h" 3 > size_type > count(const key_type& __x) const > { return _M_t.count(__x); } > > > template<typename _Kt> > auto > count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) > { return _M_t._M_count_tr(__x); } ># 931 "/usr/include/c++/13/bits/stl_multimap.h" 3 > iterator > lower_bound(const key_type& __x) > { return _M_t.lower_bound(__x); } > > > template<typename _Kt> > auto > lower_bound(const _Kt& __x) > -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) > { return iterator(_M_t._M_lower_bound_tr(__x)); } ># 956 "/usr/include/c++/13/bits/stl_multimap.h" 3 > const_iterator > lower_bound(const key_type& __x) const > { return _M_t.lower_bound(__x); } > > > template<typename _Kt> > auto > lower_bound(const _Kt& __x) const > -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) > { return const_iterator(_M_t._M_lower_bound_tr(__x)); } ># 976 "/usr/include/c++/13/bits/stl_multimap.h" 3 > iterator > upper_bound(const key_type& __x) > { return _M_t.upper_bound(__x); } > > > template<typename _Kt> > auto > upper_bound(const _Kt& __x) > -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) > { return iterator(_M_t._M_upper_bound_tr(__x)); } ># 996 "/usr/include/c++/13/bits/stl_multimap.h" 3 > const_iterator > upper_bound(const key_type& __x) const > { return _M_t.upper_bound(__x); } > > > template<typename _Kt> > auto > upper_bound(const _Kt& __x) const > -> decltype(const_iterator(_M_t._M_upper_bound_tr(__x))) > { return const_iterator(_M_t._M_upper_bound_tr(__x)); } ># 1023 "/usr/include/c++/13/bits/stl_multimap.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_t.equal_range(__x); } > > > template<typename _Kt> > auto > equal_range(const _Kt& __x) > -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) > { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } ># 1050 "/usr/include/c++/13/bits/stl_multimap.h" 3 > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_t.equal_range(__x); } > > > template<typename _Kt> > auto > equal_range(const _Kt& __x) const > -> decltype(pair<const_iterator, const_iterator>( > _M_t._M_equal_range_tr(__x))) > { > return pair<const_iterator, const_iterator>( > _M_t._M_equal_range_tr(__x)); > } > > > > template<typename _K1, typename _T1, typename _C1, typename _A1> > friend bool > operator==(const multimap<_K1, _T1, _C1, _A1>&, > const multimap<_K1, _T1, _C1, _A1>&); > > > > > > > > template<typename _K1, typename _T1, typename _C1, typename _A1> > friend bool > operator<(const multimap<_K1, _T1, _C1, _A1>&, > const multimap<_K1, _T1, _C1, _A1>&); > > }; > > > > template<typename _InputIterator, > typename _Compare = less<__iter_key_t<_InputIterator>>, > typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireAllocator<_Allocator>> > multimap(_InputIterator, _InputIterator, > _Compare = _Compare(), _Allocator = _Allocator()) > -> multimap<__iter_key_t<_InputIterator>, __iter_val_t<_InputIterator>, > _Compare, _Allocator>; > > template<typename _Key, typename _Tp, typename _Compare = less<_Key>, > typename _Allocator = allocator<pair<const _Key, _Tp>>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireAllocator<_Allocator>> > multimap(initializer_list<pair<_Key, _Tp>>, > _Compare = _Compare(), _Allocator = _Allocator()) > -> multimap<_Key, _Tp, _Compare, _Allocator>; > > template<typename _InputIterator, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > multimap(_InputIterator, _InputIterator, _Allocator) > -> multimap<__iter_key_t<_InputIterator>, __iter_val_t<_InputIterator>, > less<__iter_key_t<_InputIterator>>, _Allocator>; > > template<typename _Key, typename _Tp, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > multimap(initializer_list<pair<_Key, _Tp>>, _Allocator) > -> multimap<_Key, _Tp, less<_Key>, _Allocator>; ># 1130 "/usr/include/c++/13/bits/stl_multimap.h" 3 > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, > const multimap<_Key, _Tp, _Compare, _Alloc>& __y) > { return __x._M_t == __y._M_t; } ># 1168 "/usr/include/c++/13/bits/stl_multimap.h" 3 > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, > const multimap<_Key, _Tp, _Compare, _Alloc>& __y) > { return __x._M_t < __y._M_t; } > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, > const multimap<_Key, _Tp, _Compare, _Alloc>& __y) > { return !(__x == __y); } > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, > const multimap<_Key, _Tp, _Compare, _Alloc>& __y) > { return __y < __x; } > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, > const multimap<_Key, _Tp, _Compare, _Alloc>& __y) > { return !(__y < __x); } > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline bool > operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, > const multimap<_Key, _Tp, _Compare, _Alloc>& __y) > { return !(__x < __y); } > > > > template<typename _Key, typename _Tp, typename _Compare, typename _Alloc> > inline void > swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, > multimap<_Key, _Tp, _Compare, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > > > > > 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>; > > static auto& > _S_get_tree(std::map<_Key, _Val, _Cmp2, _Alloc>& __map) > { return __map._M_t; } > > static auto& > _S_get_tree(std::multimap<_Key, _Val, _Cmp2, _Alloc>& __map) > { return __map._M_t; } > }; > > > >} ># 65 "/usr/include/c++/13/map" 2 3 ># 74 "/usr/include/c++/13/map" 3 >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>>>; > } > >} ># 16 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 2 3 > > > > > ># 1 "/usr/include/c++/13/valarray" 1 3 ># 34 "/usr/include/c++/13/valarray" 3 > ># 35 "/usr/include/c++/13/valarray" 3 > > > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 > > > > > > > ># 1 "/usr/include/math.h" 1 3 4 ># 27 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/libc-header-start.h" 1 3 4 ># 28 "/usr/include/math.h" 2 3 4 > > > > > > >extern "C" { > > > > > ># 1 "/usr/include/bits/math-vector.h" 1 3 4 ># 25 "/usr/include/bits/math-vector.h" 3 4 ># 1 "/usr/include/bits/libm-simd-decl-stubs.h" 1 3 4 ># 26 "/usr/include/bits/math-vector.h" 2 3 4 ># 41 "/usr/include/math.h" 2 3 4 ># 152 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/flt-eval-method.h" 1 3 4 ># 153 "/usr/include/math.h" 2 3 4 ># 163 "/usr/include/math.h" 3 4 >typedef float float_t; >typedef double double_t; ># 204 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/fp-logb.h" 1 3 4 ># 205 "/usr/include/math.h" 2 3 4 ># 247 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/fp-fast.h" 1 3 4 ># 248 "/usr/include/math.h" 2 3 4 > > > >enum > { > FP_INT_UPWARD = > > 0, > FP_INT_DOWNWARD = > > 1, > FP_INT_TOWARDZERO = > > 2, > FP_INT_TONEARESTFROMZERO = > > 3, > FP_INT_TONEAREST = > > 4, > }; ># 312 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 ># 20 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 >extern int __fpclassify (double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __signbit (double __value) noexcept (true) > __attribute__ ((__const__)); > > > >extern int __isinf (double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __finite (double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __isnan (double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __iseqsig (double __x, double __y) noexcept (true); > > >extern int __issignaling (double __value) noexcept (true) > __attribute__ ((__const__)); ># 313 "/usr/include/math.h" 2 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > extern double acos (double __x) noexcept (true); extern double __acos (double __x) noexcept (true); > > extern double asin (double __x) noexcept (true); extern double __asin (double __x) noexcept (true); > > extern double atan (double __x) noexcept (true); extern double __atan (double __x) noexcept (true); > > extern double atan2 (double __y, double __x) noexcept (true); extern double __atan2 (double __y, double __x) noexcept (true); > > > extern double cos (double __x) noexcept (true); extern double __cos (double __x) noexcept (true); > > extern double sin (double __x) noexcept (true); extern double __sin (double __x) noexcept (true); > > extern double tan (double __x) noexcept (true); extern double __tan (double __x) noexcept (true); > > > > > extern double cosh (double __x) noexcept (true); extern double __cosh (double __x) noexcept (true); > > extern double sinh (double __x) noexcept (true); extern double __sinh (double __x) noexcept (true); > > extern double tanh (double __x) noexcept (true); extern double __tanh (double __x) noexcept (true); > > > > extern void sincos (double __x, double *__sinx, double *__cosx) noexcept (true); extern void __sincos (double __x, double *__sinx, double *__cosx) noexcept (true) > ; > > > > > extern double acosh (double __x) noexcept (true); extern double __acosh (double __x) noexcept (true); > > extern double asinh (double __x) noexcept (true); extern double __asinh (double __x) noexcept (true); > > extern double atanh (double __x) noexcept (true); extern double __atanh (double __x) noexcept (true); > > > > > > extern double exp (double __x) noexcept (true); extern double __exp (double __x) noexcept (true); > > >extern double frexp (double __x, int *__exponent) noexcept (true); extern double __frexp (double __x, int *__exponent) noexcept (true); > > >extern double ldexp (double __x, int __exponent) noexcept (true); extern double __ldexp (double __x, int __exponent) noexcept (true); > > > extern double log (double __x) noexcept (true); extern double __log (double __x) noexcept (true); > > > extern double log10 (double __x) noexcept (true); extern double __log10 (double __x) noexcept (true); > > >extern double modf (double __x, double *__iptr) noexcept (true); extern double __modf (double __x, double *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > extern double exp10 (double __x) noexcept (true); extern double __exp10 (double __x) noexcept (true); > > > > > extern double expm1 (double __x) noexcept (true); extern double __expm1 (double __x) noexcept (true); > > > extern double log1p (double __x) noexcept (true); extern double __log1p (double __x) noexcept (true); > > >extern double logb (double __x) noexcept (true); extern double __logb (double __x) noexcept (true); > > > > > extern double exp2 (double __x) noexcept (true); extern double __exp2 (double __x) noexcept (true); > > > extern double log2 (double __x) noexcept (true); extern double __log2 (double __x) noexcept (true); > > > > > > > extern double pow (double __x, double __y) noexcept (true); extern double __pow (double __x, double __y) noexcept (true); > > >extern double sqrt (double __x) noexcept (true); extern double __sqrt (double __x) noexcept (true); > > > > extern double hypot (double __x, double __y) noexcept (true); extern double __hypot (double __x, double __y) noexcept (true); > > > > > extern double cbrt (double __x) noexcept (true); extern double __cbrt (double __x) noexcept (true); > > > > > > >extern double ceil (double __x) noexcept (true) __attribute__ ((__const__)); extern double __ceil (double __x) noexcept (true) __attribute__ ((__const__)); > > >extern double fabs (double __x) noexcept (true) __attribute__ ((__const__)); extern double __fabs (double __x) noexcept (true) __attribute__ ((__const__)); > > >extern double floor (double __x) noexcept (true) __attribute__ ((__const__)); extern double __floor (double __x) noexcept (true) __attribute__ ((__const__)); > > >extern double fmod (double __x, double __y) noexcept (true); extern double __fmod (double __x, double __y) noexcept (true); ># 183 "/usr/include/bits/mathcalls.h" 3 4 >extern int finite (double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern double drem (double __x, double __y) noexcept (true); extern double __drem (double __x, double __y) noexcept (true); > > > >extern double significand (double __x) noexcept (true); extern double __significand (double __x) noexcept (true); > > > > > > >extern double copysign (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern double nan (const char *__tagb) noexcept (true); extern double __nan (const char *__tagb) noexcept (true); ># 220 "/usr/include/bits/mathcalls.h" 3 4 >extern double j0 (double) noexcept (true); extern double __j0 (double) noexcept (true); >extern double j1 (double) noexcept (true); extern double __j1 (double) noexcept (true); >extern double jn (int, double) noexcept (true); extern double __jn (int, double) noexcept (true); >extern double y0 (double) noexcept (true); extern double __y0 (double) noexcept (true); >extern double y1 (double) noexcept (true); extern double __y1 (double) noexcept (true); >extern double yn (int, double) noexcept (true); extern double __yn (int, double) noexcept (true); > > > > > > extern double erf (double) noexcept (true); extern double __erf (double) noexcept (true); > extern double erfc (double) noexcept (true); extern double __erfc (double) noexcept (true); >extern double lgamma (double) noexcept (true); extern double __lgamma (double) noexcept (true); > > > > >extern double tgamma (double) noexcept (true); extern double __tgamma (double) noexcept (true); > > > > > >extern double gamma (double) noexcept (true); extern double __gamma (double) noexcept (true); > > > > > > > >extern double lgamma_r (double, int *__signgamp) noexcept (true); extern double __lgamma_r (double, int *__signgamp) noexcept (true); > > > > > > >extern double rint (double __x) noexcept (true); extern double __rint (double __x) noexcept (true); > > >extern double nextafter (double __x, double __y) noexcept (true); extern double __nextafter (double __x, double __y) noexcept (true); > >extern double nexttoward (double __x, long double __y) noexcept (true); extern double __nexttoward (double __x, long double __y) noexcept (true); > > > > >extern double nextdown (double __x) noexcept (true); extern double __nextdown (double __x) noexcept (true); > >extern double nextup (double __x) noexcept (true); extern double __nextup (double __x) noexcept (true); > > > >extern double remainder (double __x, double __y) noexcept (true); extern double __remainder (double __x, double __y) noexcept (true); > > > >extern double scalbn (double __x, int __n) noexcept (true); extern double __scalbn (double __x, int __n) noexcept (true); > > > >extern int ilogb (double __x) noexcept (true); extern int __ilogb (double __x) noexcept (true); > > > > >extern long int llogb (double __x) noexcept (true); extern long int __llogb (double __x) noexcept (true); > > > > >extern double scalbln (double __x, long int __n) noexcept (true); extern double __scalbln (double __x, long int __n) noexcept (true); > > > >extern double nearbyint (double __x) noexcept (true); extern double __nearbyint (double __x) noexcept (true); > > > >extern double round (double __x) noexcept (true) __attribute__ ((__const__)); extern double __round (double __x) noexcept (true) __attribute__ ((__const__)); > > > >extern double trunc (double __x) noexcept (true) __attribute__ ((__const__)); extern double __trunc (double __x) noexcept (true) __attribute__ ((__const__)); > > > > >extern double remquo (double __x, double __y, int *__quo) noexcept (true); extern double __remquo (double __x, double __y, int *__quo) noexcept (true); > > > > > > >extern long int lrint (double __x) noexcept (true); extern long int __lrint (double __x) noexcept (true); >__extension__ >extern long long int llrint (double __x) noexcept (true); extern long long int __llrint (double __x) noexcept (true); > > > >extern long int lround (double __x) noexcept (true); extern long int __lround (double __x) noexcept (true); >__extension__ >extern long long int llround (double __x) noexcept (true); extern long long int __llround (double __x) noexcept (true); > > > >extern double fdim (double __x, double __y) noexcept (true); extern double __fdim (double __x, double __y) noexcept (true); > > > >extern double fmax (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fmin (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > > >extern double fma (double __x, double __y, double __z) noexcept (true); extern double __fma (double __x, double __y, double __z) noexcept (true); > > > > >extern double roundeven (double __x) noexcept (true) __attribute__ ((__const__)); extern double __roundeven (double __x) noexcept (true) __attribute__ ((__const__)); > > > >extern __intmax_t fromfp (double __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) noexcept (true) > ; > > > >extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) noexcept (true) > ; > > >extern int canonicalize (double *__cx, const double *__x) noexcept (true); > > > > > > >extern double fmaxmag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fminmag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern double fmaximum (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaximum (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fminimum (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminimum (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fmaximum_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaximum_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fminimum_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminimum_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fmaximum_mag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaximum_mag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fminimum_mag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminimum_mag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fmaximum_mag_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaximum_mag_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > >extern double fminimum_mag_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminimum_mag_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern int totalorder (const double *__x, const double *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern int totalordermag (const double *__x, const double *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern double getpayload (const double *__x) noexcept (true); extern double __getpayload (const double *__x) noexcept (true); > > >extern int setpayload (double *__x, double __payload) noexcept (true); > > >extern int setpayloadsig (double *__x, double __payload) noexcept (true); > > > > > > > >extern double scalb (double __x, double __n) noexcept (true); extern double __scalb (double __x, double __n) noexcept (true); ># 314 "/usr/include/math.h" 2 3 4 ># 329 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 ># 20 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 >extern int __fpclassifyf (float __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __signbitf (float __value) noexcept (true) > __attribute__ ((__const__)); > > > >extern int __isinff (float __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __finitef (float __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __isnanf (float __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __iseqsigf (float __x, float __y) noexcept (true); > > >extern int __issignalingf (float __value) noexcept (true) > __attribute__ ((__const__)); ># 330 "/usr/include/math.h" 2 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > extern float acosf (float __x) noexcept (true); extern float __acosf (float __x) noexcept (true); > > extern float asinf (float __x) noexcept (true); extern float __asinf (float __x) noexcept (true); > > extern float atanf (float __x) noexcept (true); extern float __atanf (float __x) noexcept (true); > > extern float atan2f (float __y, float __x) noexcept (true); extern float __atan2f (float __y, float __x) noexcept (true); > > > extern float cosf (float __x) noexcept (true); extern float __cosf (float __x) noexcept (true); > > extern float sinf (float __x) noexcept (true); extern float __sinf (float __x) noexcept (true); > > extern float tanf (float __x) noexcept (true); extern float __tanf (float __x) noexcept (true); > > > > > extern float coshf (float __x) noexcept (true); extern float __coshf (float __x) noexcept (true); > > extern float sinhf (float __x) noexcept (true); extern float __sinhf (float __x) noexcept (true); > > extern float tanhf (float __x) noexcept (true); extern float __tanhf (float __x) noexcept (true); > > > > extern void sincosf (float __x, float *__sinx, float *__cosx) noexcept (true); extern void __sincosf (float __x, float *__sinx, float *__cosx) noexcept (true) > ; > > > > > extern float acoshf (float __x) noexcept (true); extern float __acoshf (float __x) noexcept (true); > > extern float asinhf (float __x) noexcept (true); extern float __asinhf (float __x) noexcept (true); > > extern float atanhf (float __x) noexcept (true); extern float __atanhf (float __x) noexcept (true); > > > > > > extern float expf (float __x) noexcept (true); extern float __expf (float __x) noexcept (true); > > >extern float frexpf (float __x, int *__exponent) noexcept (true); extern float __frexpf (float __x, int *__exponent) noexcept (true); > > >extern float ldexpf (float __x, int __exponent) noexcept (true); extern float __ldexpf (float __x, int __exponent) noexcept (true); > > > extern float logf (float __x) noexcept (true); extern float __logf (float __x) noexcept (true); > > > extern float log10f (float __x) noexcept (true); extern float __log10f (float __x) noexcept (true); > > >extern float modff (float __x, float *__iptr) noexcept (true); extern float __modff (float __x, float *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > extern float exp10f (float __x) noexcept (true); extern float __exp10f (float __x) noexcept (true); > > > > > extern float expm1f (float __x) noexcept (true); extern float __expm1f (float __x) noexcept (true); > > > extern float log1pf (float __x) noexcept (true); extern float __log1pf (float __x) noexcept (true); > > >extern float logbf (float __x) noexcept (true); extern float __logbf (float __x) noexcept (true); > > > > > extern float exp2f (float __x) noexcept (true); extern float __exp2f (float __x) noexcept (true); > > > extern float log2f (float __x) noexcept (true); extern float __log2f (float __x) noexcept (true); > > > > > > > extern float powf (float __x, float __y) noexcept (true); extern float __powf (float __x, float __y) noexcept (true); > > >extern float sqrtf (float __x) noexcept (true); extern float __sqrtf (float __x) noexcept (true); > > > > extern float hypotf (float __x, float __y) noexcept (true); extern float __hypotf (float __x, float __y) noexcept (true); > > > > > extern float cbrtf (float __x) noexcept (true); extern float __cbrtf (float __x) noexcept (true); > > > > > > >extern float ceilf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __ceilf (float __x) noexcept (true) __attribute__ ((__const__)); > > >extern float fabsf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __fabsf (float __x) noexcept (true) __attribute__ ((__const__)); > > >extern float floorf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __floorf (float __x) noexcept (true) __attribute__ ((__const__)); > > >extern float fmodf (float __x, float __y) noexcept (true); extern float __fmodf (float __x, float __y) noexcept (true); ># 177 "/usr/include/bits/mathcalls.h" 3 4 >extern int isinff (float __value) noexcept (true) > __attribute__ ((__const__)); > > > > >extern int finitef (float __value) noexcept (true) > __attribute__ ((__const__)); > > >extern float dremf (float __x, float __y) noexcept (true); extern float __dremf (float __x, float __y) noexcept (true); > > > >extern float significandf (float __x) noexcept (true); extern float __significandf (float __x) noexcept (true); > > > > > > >extern float copysignf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern float nanf (const char *__tagb) noexcept (true); extern float __nanf (const char *__tagb) noexcept (true); ># 213 "/usr/include/bits/mathcalls.h" 3 4 >extern int isnanf (float __value) noexcept (true) > __attribute__ ((__const__)); > > > > > >extern float j0f (float) noexcept (true); extern float __j0f (float) noexcept (true); >extern float j1f (float) noexcept (true); extern float __j1f (float) noexcept (true); >extern float jnf (int, float) noexcept (true); extern float __jnf (int, float) noexcept (true); >extern float y0f (float) noexcept (true); extern float __y0f (float) noexcept (true); >extern float y1f (float) noexcept (true); extern float __y1f (float) noexcept (true); >extern float ynf (int, float) noexcept (true); extern float __ynf (int, float) noexcept (true); > > > > > > extern float erff (float) noexcept (true); extern float __erff (float) noexcept (true); > extern float erfcf (float) noexcept (true); extern float __erfcf (float) noexcept (true); >extern float lgammaf (float) noexcept (true); extern float __lgammaf (float) noexcept (true); > > > > >extern float tgammaf (float) noexcept (true); extern float __tgammaf (float) noexcept (true); > > > > > >extern float gammaf (float) noexcept (true); extern float __gammaf (float) noexcept (true); > > > > > > > >extern float lgammaf_r (float, int *__signgamp) noexcept (true); extern float __lgammaf_r (float, int *__signgamp) noexcept (true); > > > > > > >extern float rintf (float __x) noexcept (true); extern float __rintf (float __x) noexcept (true); > > >extern float nextafterf (float __x, float __y) noexcept (true); extern float __nextafterf (float __x, float __y) noexcept (true); > >extern float nexttowardf (float __x, long double __y) noexcept (true); extern float __nexttowardf (float __x, long double __y) noexcept (true); > > > > >extern float nextdownf (float __x) noexcept (true); extern float __nextdownf (float __x) noexcept (true); > >extern float nextupf (float __x) noexcept (true); extern float __nextupf (float __x) noexcept (true); > > > >extern float remainderf (float __x, float __y) noexcept (true); extern float __remainderf (float __x, float __y) noexcept (true); > > > >extern float scalbnf (float __x, int __n) noexcept (true); extern float __scalbnf (float __x, int __n) noexcept (true); > > > >extern int ilogbf (float __x) noexcept (true); extern int __ilogbf (float __x) noexcept (true); > > > > >extern long int llogbf (float __x) noexcept (true); extern long int __llogbf (float __x) noexcept (true); > > > > >extern float scalblnf (float __x, long int __n) noexcept (true); extern float __scalblnf (float __x, long int __n) noexcept (true); > > > >extern float nearbyintf (float __x) noexcept (true); extern float __nearbyintf (float __x) noexcept (true); > > > >extern float roundf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __roundf (float __x) noexcept (true) __attribute__ ((__const__)); > > > >extern float truncf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __truncf (float __x) noexcept (true) __attribute__ ((__const__)); > > > > >extern float remquof (float __x, float __y, int *__quo) noexcept (true); extern float __remquof (float __x, float __y, int *__quo) noexcept (true); > > > > > > >extern long int lrintf (float __x) noexcept (true); extern long int __lrintf (float __x) noexcept (true); >__extension__ >extern long long int llrintf (float __x) noexcept (true); extern long long int __llrintf (float __x) noexcept (true); > > > >extern long int lroundf (float __x) noexcept (true); extern long int __lroundf (float __x) noexcept (true); >__extension__ >extern long long int llroundf (float __x) noexcept (true); extern long long int __llroundf (float __x) noexcept (true); > > > >extern float fdimf (float __x, float __y) noexcept (true); extern float __fdimf (float __x, float __y) noexcept (true); > > > >extern float fmaxf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fminf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > > >extern float fmaf (float __x, float __y, float __z) noexcept (true); extern float __fmaf (float __x, float __y, float __z) noexcept (true); > > > > >extern float roundevenf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __roundevenf (float __x) noexcept (true) __attribute__ ((__const__)); > > > >extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) noexcept (true) > ; > > > >extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) noexcept (true) > ; > > >extern int canonicalizef (float *__cx, const float *__x) noexcept (true); > > > > > > >extern float fmaxmagf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fminmagf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern float fmaximumf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaximumf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fminimumf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminimumf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fmaximum_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaximum_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fminimum_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminimum_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fmaximum_magf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaximum_magf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fminimum_magf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminimum_magf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fmaximum_mag_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaximum_mag_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > >extern float fminimum_mag_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminimum_mag_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern int totalorderf (const float *__x, const float *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern int totalordermagf (const float *__x, const float *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern float getpayloadf (const float *__x) noexcept (true); extern float __getpayloadf (const float *__x) noexcept (true); > > >extern int setpayloadf (float *__x, float __payload) noexcept (true); > > >extern int setpayloadsigf (float *__x, float __payload) noexcept (true); > > > > > > > >extern float scalbf (float __x, float __n) noexcept (true); extern float __scalbf (float __x, float __n) noexcept (true); ># 331 "/usr/include/math.h" 2 3 4 ># 398 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 ># 20 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 >extern int __fpclassifyl (long double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __signbitl (long double __value) noexcept (true) > __attribute__ ((__const__)); > > > >extern int __isinfl (long double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __finitel (long double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __isnanl (long double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __iseqsigl (long double __x, long double __y) noexcept (true); > > >extern int __issignalingl (long double __value) noexcept (true) > __attribute__ ((__const__)); ># 399 "/usr/include/math.h" 2 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > extern long double acosl (long double __x) noexcept (true); extern long double __acosl (long double __x) noexcept (true); > > extern long double asinl (long double __x) noexcept (true); extern long double __asinl (long double __x) noexcept (true); > > extern long double atanl (long double __x) noexcept (true); extern long double __atanl (long double __x) noexcept (true); > > extern long double atan2l (long double __y, long double __x) noexcept (true); extern long double __atan2l (long double __y, long double __x) noexcept (true); > > > extern long double cosl (long double __x) noexcept (true); extern long double __cosl (long double __x) noexcept (true); > > extern long double sinl (long double __x) noexcept (true); extern long double __sinl (long double __x) noexcept (true); > > extern long double tanl (long double __x) noexcept (true); extern long double __tanl (long double __x) noexcept (true); > > > > > extern long double coshl (long double __x) noexcept (true); extern long double __coshl (long double __x) noexcept (true); > > extern long double sinhl (long double __x) noexcept (true); extern long double __sinhl (long double __x) noexcept (true); > > extern long double tanhl (long double __x) noexcept (true); extern long double __tanhl (long double __x) noexcept (true); > > > > extern void sincosl (long double __x, long double *__sinx, long double *__cosx) noexcept (true); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) noexcept (true) > ; > > > > > extern long double acoshl (long double __x) noexcept (true); extern long double __acoshl (long double __x) noexcept (true); > > extern long double asinhl (long double __x) noexcept (true); extern long double __asinhl (long double __x) noexcept (true); > > extern long double atanhl (long double __x) noexcept (true); extern long double __atanhl (long double __x) noexcept (true); > > > > > > extern long double expl (long double __x) noexcept (true); extern long double __expl (long double __x) noexcept (true); > > >extern long double frexpl (long double __x, int *__exponent) noexcept (true); extern long double __frexpl (long double __x, int *__exponent) noexcept (true); > > >extern long double ldexpl (long double __x, int __exponent) noexcept (true); extern long double __ldexpl (long double __x, int __exponent) noexcept (true); > > > extern long double logl (long double __x) noexcept (true); extern long double __logl (long double __x) noexcept (true); > > > extern long double log10l (long double __x) noexcept (true); extern long double __log10l (long double __x) noexcept (true); > > >extern long double modfl (long double __x, long double *__iptr) noexcept (true); extern long double __modfl (long double __x, long double *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > extern long double exp10l (long double __x) noexcept (true); extern long double __exp10l (long double __x) noexcept (true); > > > > > extern long double expm1l (long double __x) noexcept (true); extern long double __expm1l (long double __x) noexcept (true); > > > extern long double log1pl (long double __x) noexcept (true); extern long double __log1pl (long double __x) noexcept (true); > > >extern long double logbl (long double __x) noexcept (true); extern long double __logbl (long double __x) noexcept (true); > > > > > extern long double exp2l (long double __x) noexcept (true); extern long double __exp2l (long double __x) noexcept (true); > > > extern long double log2l (long double __x) noexcept (true); extern long double __log2l (long double __x) noexcept (true); > > > > > > > extern long double powl (long double __x, long double __y) noexcept (true); extern long double __powl (long double __x, long double __y) noexcept (true); > > >extern long double sqrtl (long double __x) noexcept (true); extern long double __sqrtl (long double __x) noexcept (true); > > > > extern long double hypotl (long double __x, long double __y) noexcept (true); extern long double __hypotl (long double __x, long double __y) noexcept (true); > > > > > extern long double cbrtl (long double __x) noexcept (true); extern long double __cbrtl (long double __x) noexcept (true); > > > > > > >extern long double ceill (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __ceill (long double __x) noexcept (true) __attribute__ ((__const__)); > > >extern long double fabsl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __fabsl (long double __x) noexcept (true) __attribute__ ((__const__)); > > >extern long double floorl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __floorl (long double __x) noexcept (true) __attribute__ ((__const__)); > > >extern long double fmodl (long double __x, long double __y) noexcept (true); extern long double __fmodl (long double __x, long double __y) noexcept (true); ># 177 "/usr/include/bits/mathcalls.h" 3 4 >extern int isinfl (long double __value) noexcept (true) > __attribute__ ((__const__)); > > > > >extern int finitel (long double __value) noexcept (true) > __attribute__ ((__const__)); > > >extern long double dreml (long double __x, long double __y) noexcept (true); extern long double __dreml (long double __x, long double __y) noexcept (true); > > > >extern long double significandl (long double __x) noexcept (true); extern long double __significandl (long double __x) noexcept (true); > > > > > > >extern long double copysignl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern long double nanl (const char *__tagb) noexcept (true); extern long double __nanl (const char *__tagb) noexcept (true); ># 213 "/usr/include/bits/mathcalls.h" 3 4 >extern int isnanl (long double __value) noexcept (true) > __attribute__ ((__const__)); > > > > > >extern long double j0l (long double) noexcept (true); extern long double __j0l (long double) noexcept (true); >extern long double j1l (long double) noexcept (true); extern long double __j1l (long double) noexcept (true); >extern long double jnl (int, long double) noexcept (true); extern long double __jnl (int, long double) noexcept (true); >extern long double y0l (long double) noexcept (true); extern long double __y0l (long double) noexcept (true); >extern long double y1l (long double) noexcept (true); extern long double __y1l (long double) noexcept (true); >extern long double ynl (int, long double) noexcept (true); extern long double __ynl (int, long double) noexcept (true); > > > > > > extern long double erfl (long double) noexcept (true); extern long double __erfl (long double) noexcept (true); > extern long double erfcl (long double) noexcept (true); extern long double __erfcl (long double) noexcept (true); >extern long double lgammal (long double) noexcept (true); extern long double __lgammal (long double) noexcept (true); > > > > >extern long double tgammal (long double) noexcept (true); extern long double __tgammal (long double) noexcept (true); > > > > > >extern long double gammal (long double) noexcept (true); extern long double __gammal (long double) noexcept (true); > > > > > > > >extern long double lgammal_r (long double, int *__signgamp) noexcept (true); extern long double __lgammal_r (long double, int *__signgamp) noexcept (true); > > > > > > >extern long double rintl (long double __x) noexcept (true); extern long double __rintl (long double __x) noexcept (true); > > >extern long double nextafterl (long double __x, long double __y) noexcept (true); extern long double __nextafterl (long double __x, long double __y) noexcept (true); > >extern long double nexttowardl (long double __x, long double __y) noexcept (true); extern long double __nexttowardl (long double __x, long double __y) noexcept (true); > > > > >extern long double nextdownl (long double __x) noexcept (true); extern long double __nextdownl (long double __x) noexcept (true); > >extern long double nextupl (long double __x) noexcept (true); extern long double __nextupl (long double __x) noexcept (true); > > > >extern long double remainderl (long double __x, long double __y) noexcept (true); extern long double __remainderl (long double __x, long double __y) noexcept (true); > > > >extern long double scalbnl (long double __x, int __n) noexcept (true); extern long double __scalbnl (long double __x, int __n) noexcept (true); > > > >extern int ilogbl (long double __x) noexcept (true); extern int __ilogbl (long double __x) noexcept (true); > > > > >extern long int llogbl (long double __x) noexcept (true); extern long int __llogbl (long double __x) noexcept (true); > > > > >extern long double scalblnl (long double __x, long int __n) noexcept (true); extern long double __scalblnl (long double __x, long int __n) noexcept (true); > > > >extern long double nearbyintl (long double __x) noexcept (true); extern long double __nearbyintl (long double __x) noexcept (true); > > > >extern long double roundl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __roundl (long double __x) noexcept (true) __attribute__ ((__const__)); > > > >extern long double truncl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __truncl (long double __x) noexcept (true) __attribute__ ((__const__)); > > > > >extern long double remquol (long double __x, long double __y, int *__quo) noexcept (true); extern long double __remquol (long double __x, long double __y, int *__quo) noexcept (true); > > > > > > >extern long int lrintl (long double __x) noexcept (true); extern long int __lrintl (long double __x) noexcept (true); >__extension__ >extern long long int llrintl (long double __x) noexcept (true); extern long long int __llrintl (long double __x) noexcept (true); > > > >extern long int lroundl (long double __x) noexcept (true); extern long int __lroundl (long double __x) noexcept (true); >__extension__ >extern long long int llroundl (long double __x) noexcept (true); extern long long int __llroundl (long double __x) noexcept (true); > > > >extern long double fdiml (long double __x, long double __y) noexcept (true); extern long double __fdiml (long double __x, long double __y) noexcept (true); > > > >extern long double fmaxl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fminl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > > >extern long double fmal (long double __x, long double __y, long double __z) noexcept (true); extern long double __fmal (long double __x, long double __y, long double __z) noexcept (true); > > > > >extern long double roundevenl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __roundevenl (long double __x) noexcept (true) __attribute__ ((__const__)); > > > >extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) noexcept (true) > ; > > > >extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) noexcept (true) > ; > > >extern int canonicalizel (long double *__cx, const long double *__x) noexcept (true); > > > > > > >extern long double fmaxmagl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fminmagl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern long double fmaximuml (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaximuml (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fminimuml (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminimuml (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fmaximum_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaximum_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fminimum_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminimum_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fmaximum_magl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaximum_magl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fminimum_magl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminimum_magl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fmaximum_mag_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaximum_mag_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > >extern long double fminimum_mag_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminimum_mag_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern int totalorderl (const long double *__x, const long double *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern int totalordermagl (const long double *__x, const long double *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern long double getpayloadl (const long double *__x) noexcept (true); extern long double __getpayloadl (const long double *__x) noexcept (true); > > >extern int setpayloadl (long double *__x, long double __payload) noexcept (true); > > >extern int setpayloadsigl (long double *__x, long double __payload) noexcept (true); > > > > > > > >extern long double scalbl (long double __x, long double __n) noexcept (true); extern long double __scalbl (long double __x, long double __n) noexcept (true); ># 400 "/usr/include/math.h" 2 3 4 ># 450 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > extern _Float32 acosf32 (_Float32 __x) noexcept (true); extern _Float32 __acosf32 (_Float32 __x) noexcept (true); > > extern _Float32 asinf32 (_Float32 __x) noexcept (true); extern _Float32 __asinf32 (_Float32 __x) noexcept (true); > > extern _Float32 atanf32 (_Float32 __x) noexcept (true); extern _Float32 __atanf32 (_Float32 __x) noexcept (true); > > extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) noexcept (true); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) noexcept (true); > > > extern _Float32 cosf32 (_Float32 __x) noexcept (true); extern _Float32 __cosf32 (_Float32 __x) noexcept (true); > > extern _Float32 sinf32 (_Float32 __x) noexcept (true); extern _Float32 __sinf32 (_Float32 __x) noexcept (true); > > extern _Float32 tanf32 (_Float32 __x) noexcept (true); extern _Float32 __tanf32 (_Float32 __x) noexcept (true); > > > > > extern _Float32 coshf32 (_Float32 __x) noexcept (true); extern _Float32 __coshf32 (_Float32 __x) noexcept (true); > > extern _Float32 sinhf32 (_Float32 __x) noexcept (true); extern _Float32 __sinhf32 (_Float32 __x) noexcept (true); > > extern _Float32 tanhf32 (_Float32 __x) noexcept (true); extern _Float32 __tanhf32 (_Float32 __x) noexcept (true); > > > > extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) noexcept (true); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) noexcept (true) > ; > > > > > extern _Float32 acoshf32 (_Float32 __x) noexcept (true); extern _Float32 __acoshf32 (_Float32 __x) noexcept (true); > > extern _Float32 asinhf32 (_Float32 __x) noexcept (true); extern _Float32 __asinhf32 (_Float32 __x) noexcept (true); > > extern _Float32 atanhf32 (_Float32 __x) noexcept (true); extern _Float32 __atanhf32 (_Float32 __x) noexcept (true); > > > > > > extern _Float32 expf32 (_Float32 __x) noexcept (true); extern _Float32 __expf32 (_Float32 __x) noexcept (true); > > >extern _Float32 frexpf32 (_Float32 __x, int *__exponent) noexcept (true); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) noexcept (true); > > >extern _Float32 ldexpf32 (_Float32 __x, int __exponent) noexcept (true); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) noexcept (true); > > > extern _Float32 logf32 (_Float32 __x) noexcept (true); extern _Float32 __logf32 (_Float32 __x) noexcept (true); > > > extern _Float32 log10f32 (_Float32 __x) noexcept (true); extern _Float32 __log10f32 (_Float32 __x) noexcept (true); > > >extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) noexcept (true); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > extern _Float32 exp10f32 (_Float32 __x) noexcept (true); extern _Float32 __exp10f32 (_Float32 __x) noexcept (true); > > > > > extern _Float32 expm1f32 (_Float32 __x) noexcept (true); extern _Float32 __expm1f32 (_Float32 __x) noexcept (true); > > > extern _Float32 log1pf32 (_Float32 __x) noexcept (true); extern _Float32 __log1pf32 (_Float32 __x) noexcept (true); > > >extern _Float32 logbf32 (_Float32 __x) noexcept (true); extern _Float32 __logbf32 (_Float32 __x) noexcept (true); > > > > > extern _Float32 exp2f32 (_Float32 __x) noexcept (true); extern _Float32 __exp2f32 (_Float32 __x) noexcept (true); > > > extern _Float32 log2f32 (_Float32 __x) noexcept (true); extern _Float32 __log2f32 (_Float32 __x) noexcept (true); > > > > > > > extern _Float32 powf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) noexcept (true); > > >extern _Float32 sqrtf32 (_Float32 __x) noexcept (true); extern _Float32 __sqrtf32 (_Float32 __x) noexcept (true); > > > > extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) noexcept (true); > > > > > extern _Float32 cbrtf32 (_Float32 __x) noexcept (true); extern _Float32 __cbrtf32 (_Float32 __x) noexcept (true); > > > > > > >extern _Float32 ceilf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fabsf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 floorf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) noexcept (true); ># 198 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float32 nanf32 (const char *__tagb) noexcept (true); extern _Float32 __nanf32 (const char *__tagb) noexcept (true); ># 220 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float32 j0f32 (_Float32) noexcept (true); extern _Float32 __j0f32 (_Float32) noexcept (true); >extern _Float32 j1f32 (_Float32) noexcept (true); extern _Float32 __j1f32 (_Float32) noexcept (true); >extern _Float32 jnf32 (int, _Float32) noexcept (true); extern _Float32 __jnf32 (int, _Float32) noexcept (true); >extern _Float32 y0f32 (_Float32) noexcept (true); extern _Float32 __y0f32 (_Float32) noexcept (true); >extern _Float32 y1f32 (_Float32) noexcept (true); extern _Float32 __y1f32 (_Float32) noexcept (true); >extern _Float32 ynf32 (int, _Float32) noexcept (true); extern _Float32 __ynf32 (int, _Float32) noexcept (true); > > > > > > extern _Float32 erff32 (_Float32) noexcept (true); extern _Float32 __erff32 (_Float32) noexcept (true); > extern _Float32 erfcf32 (_Float32) noexcept (true); extern _Float32 __erfcf32 (_Float32) noexcept (true); >extern _Float32 lgammaf32 (_Float32) noexcept (true); extern _Float32 __lgammaf32 (_Float32) noexcept (true); > > > > >extern _Float32 tgammaf32 (_Float32) noexcept (true); extern _Float32 __tgammaf32 (_Float32) noexcept (true); ># 252 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float32 lgammaf32_r (_Float32, int *__signgamp) noexcept (true); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) noexcept (true); > > > > > > >extern _Float32 rintf32 (_Float32 __x) noexcept (true); extern _Float32 __rintf32 (_Float32 __x) noexcept (true); > > >extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) noexcept (true); > > > > > > >extern _Float32 nextdownf32 (_Float32 __x) noexcept (true); extern _Float32 __nextdownf32 (_Float32 __x) noexcept (true); > >extern _Float32 nextupf32 (_Float32 __x) noexcept (true); extern _Float32 __nextupf32 (_Float32 __x) noexcept (true); > > > >extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) noexcept (true); > > > >extern _Float32 scalbnf32 (_Float32 __x, int __n) noexcept (true); extern _Float32 __scalbnf32 (_Float32 __x, int __n) noexcept (true); > > > >extern int ilogbf32 (_Float32 __x) noexcept (true); extern int __ilogbf32 (_Float32 __x) noexcept (true); > > > > >extern long int llogbf32 (_Float32 __x) noexcept (true); extern long int __llogbf32 (_Float32 __x) noexcept (true); > > > > >extern _Float32 scalblnf32 (_Float32 __x, long int __n) noexcept (true); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) noexcept (true); > > > >extern _Float32 nearbyintf32 (_Float32 __x) noexcept (true); extern _Float32 __nearbyintf32 (_Float32 __x) noexcept (true); > > > >extern _Float32 roundf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float32 truncf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) noexcept (true); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) noexcept (true); > > > > > > >extern long int lrintf32 (_Float32 __x) noexcept (true); extern long int __lrintf32 (_Float32 __x) noexcept (true); >__extension__ >extern long long int llrintf32 (_Float32 __x) noexcept (true); extern long long int __llrintf32 (_Float32 __x) noexcept (true); > > > >extern long int lroundf32 (_Float32 __x) noexcept (true); extern long int __lroundf32 (_Float32 __x) noexcept (true); >__extension__ >extern long long int llroundf32 (_Float32 __x) noexcept (true); extern long long int __llroundf32 (_Float32 __x) noexcept (true); > > > >extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) noexcept (true); > > > >extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fminf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) noexcept (true); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) noexcept (true); > > > > >extern _Float32 roundevenf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); > > > >extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true) > ; > > > >extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true) > ; > > >extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) noexcept (true); > > > > > > >extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float32 fmaximumf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaximumf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fminimumf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminimumf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fmaximum_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaximum_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fminimum_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminimum_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fmaximum_magf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaximum_magf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fminimum_magf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminimum_magf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fmaximum_mag_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaximum_mag_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32 fminimum_mag_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminimum_mag_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern int totalorderf32 (const _Float32 *__x, const _Float32 *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern int totalordermagf32 (const _Float32 *__x, const _Float32 *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern _Float32 getpayloadf32 (const _Float32 *__x) noexcept (true); extern _Float32 __getpayloadf32 (const _Float32 *__x) noexcept (true); > > >extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) noexcept (true); > > >extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) noexcept (true); ># 451 "/usr/include/math.h" 2 3 4 ># 467 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > extern _Float64 acosf64 (_Float64 __x) noexcept (true); extern _Float64 __acosf64 (_Float64 __x) noexcept (true); > > extern _Float64 asinf64 (_Float64 __x) noexcept (true); extern _Float64 __asinf64 (_Float64 __x) noexcept (true); > > extern _Float64 atanf64 (_Float64 __x) noexcept (true); extern _Float64 __atanf64 (_Float64 __x) noexcept (true); > > extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) noexcept (true); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) noexcept (true); > > > extern _Float64 cosf64 (_Float64 __x) noexcept (true); extern _Float64 __cosf64 (_Float64 __x) noexcept (true); > > extern _Float64 sinf64 (_Float64 __x) noexcept (true); extern _Float64 __sinf64 (_Float64 __x) noexcept (true); > > extern _Float64 tanf64 (_Float64 __x) noexcept (true); extern _Float64 __tanf64 (_Float64 __x) noexcept (true); > > > > > extern _Float64 coshf64 (_Float64 __x) noexcept (true); extern _Float64 __coshf64 (_Float64 __x) noexcept (true); > > extern _Float64 sinhf64 (_Float64 __x) noexcept (true); extern _Float64 __sinhf64 (_Float64 __x) noexcept (true); > > extern _Float64 tanhf64 (_Float64 __x) noexcept (true); extern _Float64 __tanhf64 (_Float64 __x) noexcept (true); > > > > extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) noexcept (true); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) noexcept (true) > ; > > > > > extern _Float64 acoshf64 (_Float64 __x) noexcept (true); extern _Float64 __acoshf64 (_Float64 __x) noexcept (true); > > extern _Float64 asinhf64 (_Float64 __x) noexcept (true); extern _Float64 __asinhf64 (_Float64 __x) noexcept (true); > > extern _Float64 atanhf64 (_Float64 __x) noexcept (true); extern _Float64 __atanhf64 (_Float64 __x) noexcept (true); > > > > > > extern _Float64 expf64 (_Float64 __x) noexcept (true); extern _Float64 __expf64 (_Float64 __x) noexcept (true); > > >extern _Float64 frexpf64 (_Float64 __x, int *__exponent) noexcept (true); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) noexcept (true); > > >extern _Float64 ldexpf64 (_Float64 __x, int __exponent) noexcept (true); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) noexcept (true); > > > extern _Float64 logf64 (_Float64 __x) noexcept (true); extern _Float64 __logf64 (_Float64 __x) noexcept (true); > > > extern _Float64 log10f64 (_Float64 __x) noexcept (true); extern _Float64 __log10f64 (_Float64 __x) noexcept (true); > > >extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) noexcept (true); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > extern _Float64 exp10f64 (_Float64 __x) noexcept (true); extern _Float64 __exp10f64 (_Float64 __x) noexcept (true); > > > > > extern _Float64 expm1f64 (_Float64 __x) noexcept (true); extern _Float64 __expm1f64 (_Float64 __x) noexcept (true); > > > extern _Float64 log1pf64 (_Float64 __x) noexcept (true); extern _Float64 __log1pf64 (_Float64 __x) noexcept (true); > > >extern _Float64 logbf64 (_Float64 __x) noexcept (true); extern _Float64 __logbf64 (_Float64 __x) noexcept (true); > > > > > extern _Float64 exp2f64 (_Float64 __x) noexcept (true); extern _Float64 __exp2f64 (_Float64 __x) noexcept (true); > > > extern _Float64 log2f64 (_Float64 __x) noexcept (true); extern _Float64 __log2f64 (_Float64 __x) noexcept (true); > > > > > > > extern _Float64 powf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) noexcept (true); > > >extern _Float64 sqrtf64 (_Float64 __x) noexcept (true); extern _Float64 __sqrtf64 (_Float64 __x) noexcept (true); > > > > extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) noexcept (true); > > > > > extern _Float64 cbrtf64 (_Float64 __x) noexcept (true); extern _Float64 __cbrtf64 (_Float64 __x) noexcept (true); > > > > > > >extern _Float64 ceilf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fabsf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 floorf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) noexcept (true); ># 198 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float64 nanf64 (const char *__tagb) noexcept (true); extern _Float64 __nanf64 (const char *__tagb) noexcept (true); ># 220 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float64 j0f64 (_Float64) noexcept (true); extern _Float64 __j0f64 (_Float64) noexcept (true); >extern _Float64 j1f64 (_Float64) noexcept (true); extern _Float64 __j1f64 (_Float64) noexcept (true); >extern _Float64 jnf64 (int, _Float64) noexcept (true); extern _Float64 __jnf64 (int, _Float64) noexcept (true); >extern _Float64 y0f64 (_Float64) noexcept (true); extern _Float64 __y0f64 (_Float64) noexcept (true); >extern _Float64 y1f64 (_Float64) noexcept (true); extern _Float64 __y1f64 (_Float64) noexcept (true); >extern _Float64 ynf64 (int, _Float64) noexcept (true); extern _Float64 __ynf64 (int, _Float64) noexcept (true); > > > > > > extern _Float64 erff64 (_Float64) noexcept (true); extern _Float64 __erff64 (_Float64) noexcept (true); > extern _Float64 erfcf64 (_Float64) noexcept (true); extern _Float64 __erfcf64 (_Float64) noexcept (true); >extern _Float64 lgammaf64 (_Float64) noexcept (true); extern _Float64 __lgammaf64 (_Float64) noexcept (true); > > > > >extern _Float64 tgammaf64 (_Float64) noexcept (true); extern _Float64 __tgammaf64 (_Float64) noexcept (true); ># 252 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float64 lgammaf64_r (_Float64, int *__signgamp) noexcept (true); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) noexcept (true); > > > > > > >extern _Float64 rintf64 (_Float64 __x) noexcept (true); extern _Float64 __rintf64 (_Float64 __x) noexcept (true); > > >extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) noexcept (true); > > > > > > >extern _Float64 nextdownf64 (_Float64 __x) noexcept (true); extern _Float64 __nextdownf64 (_Float64 __x) noexcept (true); > >extern _Float64 nextupf64 (_Float64 __x) noexcept (true); extern _Float64 __nextupf64 (_Float64 __x) noexcept (true); > > > >extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) noexcept (true); > > > >extern _Float64 scalbnf64 (_Float64 __x, int __n) noexcept (true); extern _Float64 __scalbnf64 (_Float64 __x, int __n) noexcept (true); > > > >extern int ilogbf64 (_Float64 __x) noexcept (true); extern int __ilogbf64 (_Float64 __x) noexcept (true); > > > > >extern long int llogbf64 (_Float64 __x) noexcept (true); extern long int __llogbf64 (_Float64 __x) noexcept (true); > > > > >extern _Float64 scalblnf64 (_Float64 __x, long int __n) noexcept (true); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) noexcept (true); > > > >extern _Float64 nearbyintf64 (_Float64 __x) noexcept (true); extern _Float64 __nearbyintf64 (_Float64 __x) noexcept (true); > > > >extern _Float64 roundf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float64 truncf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) noexcept (true); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) noexcept (true); > > > > > > >extern long int lrintf64 (_Float64 __x) noexcept (true); extern long int __lrintf64 (_Float64 __x) noexcept (true); >__extension__ >extern long long int llrintf64 (_Float64 __x) noexcept (true); extern long long int __llrintf64 (_Float64 __x) noexcept (true); > > > >extern long int lroundf64 (_Float64 __x) noexcept (true); extern long int __lroundf64 (_Float64 __x) noexcept (true); >__extension__ >extern long long int llroundf64 (_Float64 __x) noexcept (true); extern long long int __llroundf64 (_Float64 __x) noexcept (true); > > > >extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) noexcept (true); > > > >extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fminf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) noexcept (true); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) noexcept (true); > > > > >extern _Float64 roundevenf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); > > > >extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true) > ; > > > >extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true) > ; > > >extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) noexcept (true); > > > > > > >extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float64 fmaximumf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaximumf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fminimumf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminimumf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fmaximum_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaximum_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fminimum_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminimum_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fmaximum_magf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaximum_magf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fminimum_magf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminimum_magf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fmaximum_mag_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaximum_mag_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64 fminimum_mag_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminimum_mag_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern int totalorderf64 (const _Float64 *__x, const _Float64 *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern int totalordermagf64 (const _Float64 *__x, const _Float64 *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern _Float64 getpayloadf64 (const _Float64 *__x) noexcept (true); extern _Float64 __getpayloadf64 (const _Float64 *__x) noexcept (true); > > >extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) noexcept (true); > > >extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) noexcept (true); ># 468 "/usr/include/math.h" 2 3 4 ># 481 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 ># 20 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 >extern int __fpclassifyf128 (_Float128 __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __signbitf128 (_Float128 __value) noexcept (true) > __attribute__ ((__const__)); > > > >extern int __isinff128 (_Float128 __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __finitef128 (_Float128 __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __isnanf128 (_Float128 __value) noexcept (true) > __attribute__ ((__const__)); > > >extern int __iseqsigf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern int __issignalingf128 (_Float128 __value) noexcept (true) > __attribute__ ((__const__)); ># 482 "/usr/include/math.h" 2 3 4 > > ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > extern _Float128 acosf128 (_Float128 __x) noexcept (true); extern _Float128 __acosf128 (_Float128 __x) noexcept (true); > > extern _Float128 asinf128 (_Float128 __x) noexcept (true); extern _Float128 __asinf128 (_Float128 __x) noexcept (true); > > extern _Float128 atanf128 (_Float128 __x) noexcept (true); extern _Float128 __atanf128 (_Float128 __x) noexcept (true); > > extern _Float128 atan2f128 (_Float128 __y, _Float128 __x) noexcept (true); extern _Float128 __atan2f128 (_Float128 __y, _Float128 __x) noexcept (true); > > > extern _Float128 cosf128 (_Float128 __x) noexcept (true); extern _Float128 __cosf128 (_Float128 __x) noexcept (true); > > extern _Float128 sinf128 (_Float128 __x) noexcept (true); extern _Float128 __sinf128 (_Float128 __x) noexcept (true); > > extern _Float128 tanf128 (_Float128 __x) noexcept (true); extern _Float128 __tanf128 (_Float128 __x) noexcept (true); > > > > > extern _Float128 coshf128 (_Float128 __x) noexcept (true); extern _Float128 __coshf128 (_Float128 __x) noexcept (true); > > extern _Float128 sinhf128 (_Float128 __x) noexcept (true); extern _Float128 __sinhf128 (_Float128 __x) noexcept (true); > > extern _Float128 tanhf128 (_Float128 __x) noexcept (true); extern _Float128 __tanhf128 (_Float128 __x) noexcept (true); > > > > extern void sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) noexcept (true); extern void __sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) noexcept (true) > ; > > > > > extern _Float128 acoshf128 (_Float128 __x) noexcept (true); extern _Float128 __acoshf128 (_Float128 __x) noexcept (true); > > extern _Float128 asinhf128 (_Float128 __x) noexcept (true); extern _Float128 __asinhf128 (_Float128 __x) noexcept (true); > > extern _Float128 atanhf128 (_Float128 __x) noexcept (true); extern _Float128 __atanhf128 (_Float128 __x) noexcept (true); > > > > > > extern _Float128 expf128 (_Float128 __x) noexcept (true); extern _Float128 __expf128 (_Float128 __x) noexcept (true); > > >extern _Float128 frexpf128 (_Float128 __x, int *__exponent) noexcept (true); extern _Float128 __frexpf128 (_Float128 __x, int *__exponent) noexcept (true); > > >extern _Float128 ldexpf128 (_Float128 __x, int __exponent) noexcept (true); extern _Float128 __ldexpf128 (_Float128 __x, int __exponent) noexcept (true); > > > extern _Float128 logf128 (_Float128 __x) noexcept (true); extern _Float128 __logf128 (_Float128 __x) noexcept (true); > > > extern _Float128 log10f128 (_Float128 __x) noexcept (true); extern _Float128 __log10f128 (_Float128 __x) noexcept (true); > > >extern _Float128 modff128 (_Float128 __x, _Float128 *__iptr) noexcept (true); extern _Float128 __modff128 (_Float128 __x, _Float128 *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > extern _Float128 exp10f128 (_Float128 __x) noexcept (true); extern _Float128 __exp10f128 (_Float128 __x) noexcept (true); > > > > > extern _Float128 expm1f128 (_Float128 __x) noexcept (true); extern _Float128 __expm1f128 (_Float128 __x) noexcept (true); > > > extern _Float128 log1pf128 (_Float128 __x) noexcept (true); extern _Float128 __log1pf128 (_Float128 __x) noexcept (true); > > >extern _Float128 logbf128 (_Float128 __x) noexcept (true); extern _Float128 __logbf128 (_Float128 __x) noexcept (true); > > > > > extern _Float128 exp2f128 (_Float128 __x) noexcept (true); extern _Float128 __exp2f128 (_Float128 __x) noexcept (true); > > > extern _Float128 log2f128 (_Float128 __x) noexcept (true); extern _Float128 __log2f128 (_Float128 __x) noexcept (true); > > > > > > > extern _Float128 powf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __powf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float128 sqrtf128 (_Float128 __x) noexcept (true); extern _Float128 __sqrtf128 (_Float128 __x) noexcept (true); > > > > extern _Float128 hypotf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __hypotf128 (_Float128 __x, _Float128 __y) noexcept (true); > > > > > extern _Float128 cbrtf128 (_Float128 __x) noexcept (true); extern _Float128 __cbrtf128 (_Float128 __x) noexcept (true); > > > > > > >extern _Float128 ceilf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __ceilf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fabsf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fabsf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 floorf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __floorf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fmodf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __fmodf128 (_Float128 __x, _Float128 __y) noexcept (true); ># 198 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float128 copysignf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __copysignf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float128 nanf128 (const char *__tagb) noexcept (true); extern _Float128 __nanf128 (const char *__tagb) noexcept (true); ># 220 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float128 j0f128 (_Float128) noexcept (true); extern _Float128 __j0f128 (_Float128) noexcept (true); >extern _Float128 j1f128 (_Float128) noexcept (true); extern _Float128 __j1f128 (_Float128) noexcept (true); >extern _Float128 jnf128 (int, _Float128) noexcept (true); extern _Float128 __jnf128 (int, _Float128) noexcept (true); >extern _Float128 y0f128 (_Float128) noexcept (true); extern _Float128 __y0f128 (_Float128) noexcept (true); >extern _Float128 y1f128 (_Float128) noexcept (true); extern _Float128 __y1f128 (_Float128) noexcept (true); >extern _Float128 ynf128 (int, _Float128) noexcept (true); extern _Float128 __ynf128 (int, _Float128) noexcept (true); > > > > > > extern _Float128 erff128 (_Float128) noexcept (true); extern _Float128 __erff128 (_Float128) noexcept (true); > extern _Float128 erfcf128 (_Float128) noexcept (true); extern _Float128 __erfcf128 (_Float128) noexcept (true); >extern _Float128 lgammaf128 (_Float128) noexcept (true); extern _Float128 __lgammaf128 (_Float128) noexcept (true); > > > > >extern _Float128 tgammaf128 (_Float128) noexcept (true); extern _Float128 __tgammaf128 (_Float128) noexcept (true); ># 252 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float128 lgammaf128_r (_Float128, int *__signgamp) noexcept (true); extern _Float128 __lgammaf128_r (_Float128, int *__signgamp) noexcept (true); > > > > > > >extern _Float128 rintf128 (_Float128 __x) noexcept (true); extern _Float128 __rintf128 (_Float128 __x) noexcept (true); > > >extern _Float128 nextafterf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __nextafterf128 (_Float128 __x, _Float128 __y) noexcept (true); > > > > > > >extern _Float128 nextdownf128 (_Float128 __x) noexcept (true); extern _Float128 __nextdownf128 (_Float128 __x) noexcept (true); > >extern _Float128 nextupf128 (_Float128 __x) noexcept (true); extern _Float128 __nextupf128 (_Float128 __x) noexcept (true); > > > >extern _Float128 remainderf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __remainderf128 (_Float128 __x, _Float128 __y) noexcept (true); > > > >extern _Float128 scalbnf128 (_Float128 __x, int __n) noexcept (true); extern _Float128 __scalbnf128 (_Float128 __x, int __n) noexcept (true); > > > >extern int ilogbf128 (_Float128 __x) noexcept (true); extern int __ilogbf128 (_Float128 __x) noexcept (true); > > > > >extern long int llogbf128 (_Float128 __x) noexcept (true); extern long int __llogbf128 (_Float128 __x) noexcept (true); > > > > >extern _Float128 scalblnf128 (_Float128 __x, long int __n) noexcept (true); extern _Float128 __scalblnf128 (_Float128 __x, long int __n) noexcept (true); > > > >extern _Float128 nearbyintf128 (_Float128 __x) noexcept (true); extern _Float128 __nearbyintf128 (_Float128 __x) noexcept (true); > > > >extern _Float128 roundf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __roundf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float128 truncf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __truncf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float128 remquof128 (_Float128 __x, _Float128 __y, int *__quo) noexcept (true); extern _Float128 __remquof128 (_Float128 __x, _Float128 __y, int *__quo) noexcept (true); > > > > > > >extern long int lrintf128 (_Float128 __x) noexcept (true); extern long int __lrintf128 (_Float128 __x) noexcept (true); >__extension__ >extern long long int llrintf128 (_Float128 __x) noexcept (true); extern long long int __llrintf128 (_Float128 __x) noexcept (true); > > > >extern long int lroundf128 (_Float128 __x) noexcept (true); extern long int __lroundf128 (_Float128 __x) noexcept (true); >__extension__ >extern long long int llroundf128 (_Float128 __x) noexcept (true); extern long long int __llroundf128 (_Float128 __x) noexcept (true); > > > >extern _Float128 fdimf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __fdimf128 (_Float128 __x, _Float128 __y) noexcept (true); > > > >extern _Float128 fmaxf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaxf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fminf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float128 fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); extern _Float128 __fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); > > > > >extern _Float128 roundevenf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __roundevenf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); > > > >extern __intmax_t fromfpf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true) > ; > > > >extern __uintmax_t ufromfpf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __intmax_t fromfpxf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __uintmax_t ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true) > ; > > >extern int canonicalizef128 (_Float128 *__cx, const _Float128 *__x) noexcept (true); > > > > > > >extern _Float128 fmaxmagf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaxmagf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fminmagf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminmagf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float128 fmaximumf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaximumf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fminimumf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminimumf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fmaximum_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaximum_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fminimum_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminimum_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fmaximum_magf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaximum_magf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fminimum_magf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminimum_magf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fmaximum_mag_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaximum_mag_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float128 fminimum_mag_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminimum_mag_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern int totalorderf128 (const _Float128 *__x, const _Float128 *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern int totalordermagf128 (const _Float128 *__x, const _Float128 *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern _Float128 getpayloadf128 (const _Float128 *__x) noexcept (true); extern _Float128 __getpayloadf128 (const _Float128 *__x) noexcept (true); > > >extern int setpayloadf128 (_Float128 *__x, _Float128 __payload) noexcept (true); > > >extern int setpayloadsigf128 (_Float128 *__x, _Float128 __payload) noexcept (true); ># 485 "/usr/include/math.h" 2 3 4 ># 501 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > extern _Float32x acosf32x (_Float32x __x) noexcept (true); extern _Float32x __acosf32x (_Float32x __x) noexcept (true); > > extern _Float32x asinf32x (_Float32x __x) noexcept (true); extern _Float32x __asinf32x (_Float32x __x) noexcept (true); > > extern _Float32x atanf32x (_Float32x __x) noexcept (true); extern _Float32x __atanf32x (_Float32x __x) noexcept (true); > > extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) noexcept (true); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) noexcept (true); > > > extern _Float32x cosf32x (_Float32x __x) noexcept (true); extern _Float32x __cosf32x (_Float32x __x) noexcept (true); > > extern _Float32x sinf32x (_Float32x __x) noexcept (true); extern _Float32x __sinf32x (_Float32x __x) noexcept (true); > > extern _Float32x tanf32x (_Float32x __x) noexcept (true); extern _Float32x __tanf32x (_Float32x __x) noexcept (true); > > > > > extern _Float32x coshf32x (_Float32x __x) noexcept (true); extern _Float32x __coshf32x (_Float32x __x) noexcept (true); > > extern _Float32x sinhf32x (_Float32x __x) noexcept (true); extern _Float32x __sinhf32x (_Float32x __x) noexcept (true); > > extern _Float32x tanhf32x (_Float32x __x) noexcept (true); extern _Float32x __tanhf32x (_Float32x __x) noexcept (true); > > > > extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) noexcept (true); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) noexcept (true) > ; > > > > > extern _Float32x acoshf32x (_Float32x __x) noexcept (true); extern _Float32x __acoshf32x (_Float32x __x) noexcept (true); > > extern _Float32x asinhf32x (_Float32x __x) noexcept (true); extern _Float32x __asinhf32x (_Float32x __x) noexcept (true); > > extern _Float32x atanhf32x (_Float32x __x) noexcept (true); extern _Float32x __atanhf32x (_Float32x __x) noexcept (true); > > > > > > extern _Float32x expf32x (_Float32x __x) noexcept (true); extern _Float32x __expf32x (_Float32x __x) noexcept (true); > > >extern _Float32x frexpf32x (_Float32x __x, int *__exponent) noexcept (true); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) noexcept (true); > > >extern _Float32x ldexpf32x (_Float32x __x, int __exponent) noexcept (true); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) noexcept (true); > > > extern _Float32x logf32x (_Float32x __x) noexcept (true); extern _Float32x __logf32x (_Float32x __x) noexcept (true); > > > extern _Float32x log10f32x (_Float32x __x) noexcept (true); extern _Float32x __log10f32x (_Float32x __x) noexcept (true); > > >extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) noexcept (true); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > extern _Float32x exp10f32x (_Float32x __x) noexcept (true); extern _Float32x __exp10f32x (_Float32x __x) noexcept (true); > > > > > extern _Float32x expm1f32x (_Float32x __x) noexcept (true); extern _Float32x __expm1f32x (_Float32x __x) noexcept (true); > > > extern _Float32x log1pf32x (_Float32x __x) noexcept (true); extern _Float32x __log1pf32x (_Float32x __x) noexcept (true); > > >extern _Float32x logbf32x (_Float32x __x) noexcept (true); extern _Float32x __logbf32x (_Float32x __x) noexcept (true); > > > > > extern _Float32x exp2f32x (_Float32x __x) noexcept (true); extern _Float32x __exp2f32x (_Float32x __x) noexcept (true); > > > extern _Float32x log2f32x (_Float32x __x) noexcept (true); extern _Float32x __log2f32x (_Float32x __x) noexcept (true); > > > > > > > extern _Float32x powf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) noexcept (true); > > >extern _Float32x sqrtf32x (_Float32x __x) noexcept (true); extern _Float32x __sqrtf32x (_Float32x __x) noexcept (true); > > > > extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) noexcept (true); > > > > > extern _Float32x cbrtf32x (_Float32x __x) noexcept (true); extern _Float32x __cbrtf32x (_Float32x __x) noexcept (true); > > > > > > >extern _Float32x ceilf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fabsf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x floorf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) noexcept (true); ># 198 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float32x nanf32x (const char *__tagb) noexcept (true); extern _Float32x __nanf32x (const char *__tagb) noexcept (true); ># 220 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float32x j0f32x (_Float32x) noexcept (true); extern _Float32x __j0f32x (_Float32x) noexcept (true); >extern _Float32x j1f32x (_Float32x) noexcept (true); extern _Float32x __j1f32x (_Float32x) noexcept (true); >extern _Float32x jnf32x (int, _Float32x) noexcept (true); extern _Float32x __jnf32x (int, _Float32x) noexcept (true); >extern _Float32x y0f32x (_Float32x) noexcept (true); extern _Float32x __y0f32x (_Float32x) noexcept (true); >extern _Float32x y1f32x (_Float32x) noexcept (true); extern _Float32x __y1f32x (_Float32x) noexcept (true); >extern _Float32x ynf32x (int, _Float32x) noexcept (true); extern _Float32x __ynf32x (int, _Float32x) noexcept (true); > > > > > > extern _Float32x erff32x (_Float32x) noexcept (true); extern _Float32x __erff32x (_Float32x) noexcept (true); > extern _Float32x erfcf32x (_Float32x) noexcept (true); extern _Float32x __erfcf32x (_Float32x) noexcept (true); >extern _Float32x lgammaf32x (_Float32x) noexcept (true); extern _Float32x __lgammaf32x (_Float32x) noexcept (true); > > > > >extern _Float32x tgammaf32x (_Float32x) noexcept (true); extern _Float32x __tgammaf32x (_Float32x) noexcept (true); ># 252 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) noexcept (true); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) noexcept (true); > > > > > > >extern _Float32x rintf32x (_Float32x __x) noexcept (true); extern _Float32x __rintf32x (_Float32x __x) noexcept (true); > > >extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) noexcept (true); > > > > > > >extern _Float32x nextdownf32x (_Float32x __x) noexcept (true); extern _Float32x __nextdownf32x (_Float32x __x) noexcept (true); > >extern _Float32x nextupf32x (_Float32x __x) noexcept (true); extern _Float32x __nextupf32x (_Float32x __x) noexcept (true); > > > >extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) noexcept (true); > > > >extern _Float32x scalbnf32x (_Float32x __x, int __n) noexcept (true); extern _Float32x __scalbnf32x (_Float32x __x, int __n) noexcept (true); > > > >extern int ilogbf32x (_Float32x __x) noexcept (true); extern int __ilogbf32x (_Float32x __x) noexcept (true); > > > > >extern long int llogbf32x (_Float32x __x) noexcept (true); extern long int __llogbf32x (_Float32x __x) noexcept (true); > > > > >extern _Float32x scalblnf32x (_Float32x __x, long int __n) noexcept (true); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) noexcept (true); > > > >extern _Float32x nearbyintf32x (_Float32x __x) noexcept (true); extern _Float32x __nearbyintf32x (_Float32x __x) noexcept (true); > > > >extern _Float32x roundf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float32x truncf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) noexcept (true); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) noexcept (true); > > > > > > >extern long int lrintf32x (_Float32x __x) noexcept (true); extern long int __lrintf32x (_Float32x __x) noexcept (true); >__extension__ >extern long long int llrintf32x (_Float32x __x) noexcept (true); extern long long int __llrintf32x (_Float32x __x) noexcept (true); > > > >extern long int lroundf32x (_Float32x __x) noexcept (true); extern long int __lroundf32x (_Float32x __x) noexcept (true); >__extension__ >extern long long int llroundf32x (_Float32x __x) noexcept (true); extern long long int __llroundf32x (_Float32x __x) noexcept (true); > > > >extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) noexcept (true); > > > >extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fminf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) noexcept (true); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) noexcept (true); > > > > >extern _Float32x roundevenf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); > > > >extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true) > ; > > > >extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true) > ; > > >extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) noexcept (true); > > > > > > >extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float32x fmaximumf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaximumf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fminimumf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminimumf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fmaximum_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaximum_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fminimum_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminimum_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fmaximum_magf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaximum_magf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fminimum_magf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminimum_magf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fmaximum_mag_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaximum_mag_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float32x fminimum_mag_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminimum_mag_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern int totalorderf32x (const _Float32x *__x, const _Float32x *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern int totalordermagf32x (const _Float32x *__x, const _Float32x *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern _Float32x getpayloadf32x (const _Float32x *__x) noexcept (true); extern _Float32x __getpayloadf32x (const _Float32x *__x) noexcept (true); > > >extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) noexcept (true); > > >extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) noexcept (true); ># 502 "/usr/include/math.h" 2 3 4 ># 518 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > extern _Float64x acosf64x (_Float64x __x) noexcept (true); extern _Float64x __acosf64x (_Float64x __x) noexcept (true); > > extern _Float64x asinf64x (_Float64x __x) noexcept (true); extern _Float64x __asinf64x (_Float64x __x) noexcept (true); > > extern _Float64x atanf64x (_Float64x __x) noexcept (true); extern _Float64x __atanf64x (_Float64x __x) noexcept (true); > > extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) noexcept (true); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) noexcept (true); > > > extern _Float64x cosf64x (_Float64x __x) noexcept (true); extern _Float64x __cosf64x (_Float64x __x) noexcept (true); > > extern _Float64x sinf64x (_Float64x __x) noexcept (true); extern _Float64x __sinf64x (_Float64x __x) noexcept (true); > > extern _Float64x tanf64x (_Float64x __x) noexcept (true); extern _Float64x __tanf64x (_Float64x __x) noexcept (true); > > > > > extern _Float64x coshf64x (_Float64x __x) noexcept (true); extern _Float64x __coshf64x (_Float64x __x) noexcept (true); > > extern _Float64x sinhf64x (_Float64x __x) noexcept (true); extern _Float64x __sinhf64x (_Float64x __x) noexcept (true); > > extern _Float64x tanhf64x (_Float64x __x) noexcept (true); extern _Float64x __tanhf64x (_Float64x __x) noexcept (true); > > > > extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) noexcept (true); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) noexcept (true) > ; > > > > > extern _Float64x acoshf64x (_Float64x __x) noexcept (true); extern _Float64x __acoshf64x (_Float64x __x) noexcept (true); > > extern _Float64x asinhf64x (_Float64x __x) noexcept (true); extern _Float64x __asinhf64x (_Float64x __x) noexcept (true); > > extern _Float64x atanhf64x (_Float64x __x) noexcept (true); extern _Float64x __atanhf64x (_Float64x __x) noexcept (true); > > > > > > extern _Float64x expf64x (_Float64x __x) noexcept (true); extern _Float64x __expf64x (_Float64x __x) noexcept (true); > > >extern _Float64x frexpf64x (_Float64x __x, int *__exponent) noexcept (true); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) noexcept (true); > > >extern _Float64x ldexpf64x (_Float64x __x, int __exponent) noexcept (true); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) noexcept (true); > > > extern _Float64x logf64x (_Float64x __x) noexcept (true); extern _Float64x __logf64x (_Float64x __x) noexcept (true); > > > extern _Float64x log10f64x (_Float64x __x) noexcept (true); extern _Float64x __log10f64x (_Float64x __x) noexcept (true); > > >extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) noexcept (true); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > extern _Float64x exp10f64x (_Float64x __x) noexcept (true); extern _Float64x __exp10f64x (_Float64x __x) noexcept (true); > > > > > extern _Float64x expm1f64x (_Float64x __x) noexcept (true); extern _Float64x __expm1f64x (_Float64x __x) noexcept (true); > > > extern _Float64x log1pf64x (_Float64x __x) noexcept (true); extern _Float64x __log1pf64x (_Float64x __x) noexcept (true); > > >extern _Float64x logbf64x (_Float64x __x) noexcept (true); extern _Float64x __logbf64x (_Float64x __x) noexcept (true); > > > > > extern _Float64x exp2f64x (_Float64x __x) noexcept (true); extern _Float64x __exp2f64x (_Float64x __x) noexcept (true); > > > extern _Float64x log2f64x (_Float64x __x) noexcept (true); extern _Float64x __log2f64x (_Float64x __x) noexcept (true); > > > > > > > extern _Float64x powf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float64x sqrtf64x (_Float64x __x) noexcept (true); extern _Float64x __sqrtf64x (_Float64x __x) noexcept (true); > > > > extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) noexcept (true); > > > > > extern _Float64x cbrtf64x (_Float64x __x) noexcept (true); extern _Float64x __cbrtf64x (_Float64x __x) noexcept (true); > > > > > > >extern _Float64x ceilf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fabsf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x floorf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) noexcept (true); ># 198 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float64x nanf64x (const char *__tagb) noexcept (true); extern _Float64x __nanf64x (const char *__tagb) noexcept (true); ># 220 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float64x j0f64x (_Float64x) noexcept (true); extern _Float64x __j0f64x (_Float64x) noexcept (true); >extern _Float64x j1f64x (_Float64x) noexcept (true); extern _Float64x __j1f64x (_Float64x) noexcept (true); >extern _Float64x jnf64x (int, _Float64x) noexcept (true); extern _Float64x __jnf64x (int, _Float64x) noexcept (true); >extern _Float64x y0f64x (_Float64x) noexcept (true); extern _Float64x __y0f64x (_Float64x) noexcept (true); >extern _Float64x y1f64x (_Float64x) noexcept (true); extern _Float64x __y1f64x (_Float64x) noexcept (true); >extern _Float64x ynf64x (int, _Float64x) noexcept (true); extern _Float64x __ynf64x (int, _Float64x) noexcept (true); > > > > > > extern _Float64x erff64x (_Float64x) noexcept (true); extern _Float64x __erff64x (_Float64x) noexcept (true); > extern _Float64x erfcf64x (_Float64x) noexcept (true); extern _Float64x __erfcf64x (_Float64x) noexcept (true); >extern _Float64x lgammaf64x (_Float64x) noexcept (true); extern _Float64x __lgammaf64x (_Float64x) noexcept (true); > > > > >extern _Float64x tgammaf64x (_Float64x) noexcept (true); extern _Float64x __tgammaf64x (_Float64x) noexcept (true); ># 252 "/usr/include/bits/mathcalls.h" 3 4 >extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) noexcept (true); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) noexcept (true); > > > > > > >extern _Float64x rintf64x (_Float64x __x) noexcept (true); extern _Float64x __rintf64x (_Float64x __x) noexcept (true); > > >extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) noexcept (true); > > > > > > >extern _Float64x nextdownf64x (_Float64x __x) noexcept (true); extern _Float64x __nextdownf64x (_Float64x __x) noexcept (true); > >extern _Float64x nextupf64x (_Float64x __x) noexcept (true); extern _Float64x __nextupf64x (_Float64x __x) noexcept (true); > > > >extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) noexcept (true); > > > >extern _Float64x scalbnf64x (_Float64x __x, int __n) noexcept (true); extern _Float64x __scalbnf64x (_Float64x __x, int __n) noexcept (true); > > > >extern int ilogbf64x (_Float64x __x) noexcept (true); extern int __ilogbf64x (_Float64x __x) noexcept (true); > > > > >extern long int llogbf64x (_Float64x __x) noexcept (true); extern long int __llogbf64x (_Float64x __x) noexcept (true); > > > > >extern _Float64x scalblnf64x (_Float64x __x, long int __n) noexcept (true); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) noexcept (true); > > > >extern _Float64x nearbyintf64x (_Float64x __x) noexcept (true); extern _Float64x __nearbyintf64x (_Float64x __x) noexcept (true); > > > >extern _Float64x roundf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float64x truncf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) noexcept (true); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) noexcept (true); > > > > > > >extern long int lrintf64x (_Float64x __x) noexcept (true); extern long int __lrintf64x (_Float64x __x) noexcept (true); >__extension__ >extern long long int llrintf64x (_Float64x __x) noexcept (true); extern long long int __llrintf64x (_Float64x __x) noexcept (true); > > > >extern long int lroundf64x (_Float64x __x) noexcept (true); extern long int __lroundf64x (_Float64x __x) noexcept (true); >__extension__ >extern long long int llroundf64x (_Float64x __x) noexcept (true); extern long long int __llroundf64x (_Float64x __x) noexcept (true); > > > >extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) noexcept (true); > > > >extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fminf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > > >extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); > > > > >extern _Float64x roundevenf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); > > > >extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true) > ; > > > >extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true) > ; > > > > >extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true) > ; > > >extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) noexcept (true); > > > > > > >extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern _Float64x fmaximumf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaximumf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fminimumf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminimumf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fmaximum_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaximum_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fminimum_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminimum_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fmaximum_magf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaximum_magf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fminimum_magf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminimum_magf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fmaximum_mag_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaximum_mag_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > >extern _Float64x fminimum_mag_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminimum_mag_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); > > > > >extern int totalorderf64x (const _Float64x *__x, const _Float64x *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern int totalordermagf64x (const _Float64x *__x, const _Float64x *__y) noexcept (true) > > __attribute__ ((__pure__)); > > >extern _Float64x getpayloadf64x (const _Float64x *__x) noexcept (true); extern _Float64x __getpayloadf64x (const _Float64x *__x) noexcept (true); > > >extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) noexcept (true); > > >extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) noexcept (true); ># 519 "/usr/include/math.h" 2 3 4 ># 566 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern float fadd (double __x, double __y) noexcept (true); > > >extern float fdiv (double __x, double __y) noexcept (true); > > >extern float ffma (double __x, double __y, double __z) noexcept (true); > > >extern float fmul (double __x, double __y) noexcept (true); > > >extern float fsqrt (double __x) noexcept (true); > > >extern float fsub (double __x, double __y) noexcept (true); ># 567 "/usr/include/math.h" 2 3 4 ># 587 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern float faddl (long double __x, long double __y) noexcept (true); > > >extern float fdivl (long double __x, long double __y) noexcept (true); > > >extern float ffmal (long double __x, long double __y, long double __z) noexcept (true); > > >extern float fmull (long double __x, long double __y) noexcept (true); > > >extern float fsqrtl (long double __x) noexcept (true); > > >extern float fsubl (long double __x, long double __y) noexcept (true); ># 588 "/usr/include/math.h" 2 3 4 ># 616 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern double daddl (long double __x, long double __y) noexcept (true); > > >extern double ddivl (long double __x, long double __y) noexcept (true); > > >extern double dfmal (long double __x, long double __y, long double __z) noexcept (true); > > >extern double dmull (long double __x, long double __y) noexcept (true); > > >extern double dsqrtl (long double __x) noexcept (true); > > >extern double dsubl (long double __x, long double __y) noexcept (true); ># 617 "/usr/include/math.h" 2 3 4 ># 697 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) noexcept (true); > > >extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) noexcept (true); > > >extern _Float32 f32fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) noexcept (true); > > >extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) noexcept (true); > > >extern _Float32 f32sqrtf32x (_Float32x __x) noexcept (true); > > >extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) noexcept (true); ># 698 "/usr/include/math.h" 2 3 4 ># 707 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) noexcept (true); > > >extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) noexcept (true); > > >extern _Float32 f32fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) noexcept (true); > > >extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) noexcept (true); > > >extern _Float32 f32sqrtf64 (_Float64 __x) noexcept (true); > > >extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) noexcept (true); ># 708 "/usr/include/math.h" 2 3 4 ># 717 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float32 f32fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); > > >extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float32 f32sqrtf64x (_Float64x __x) noexcept (true); > > >extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) noexcept (true); ># 718 "/usr/include/math.h" 2 3 4 ># 727 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float32 f32addf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float32 f32divf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float32 f32fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); > > >extern _Float32 f32mulf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float32 f32sqrtf128 (_Float128 __x) noexcept (true); > > >extern _Float32 f32subf128 (_Float128 __x, _Float128 __y) noexcept (true); ># 728 "/usr/include/math.h" 2 3 4 ># 747 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) noexcept (true); > > >extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) noexcept (true); > > >extern _Float32x f32xfmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) noexcept (true); > > >extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) noexcept (true); > > >extern _Float32x f32xsqrtf64 (_Float64 __x) noexcept (true); > > >extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) noexcept (true); ># 748 "/usr/include/math.h" 2 3 4 ># 757 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float32x f32xfmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); > > >extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float32x f32xsqrtf64x (_Float64x __x) noexcept (true); > > >extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) noexcept (true); ># 758 "/usr/include/math.h" 2 3 4 ># 767 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float32x f32xaddf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float32x f32xdivf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float32x f32xfmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); > > >extern _Float32x f32xmulf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float32x f32xsqrtf128 (_Float128 __x) noexcept (true); > > >extern _Float32x f32xsubf128 (_Float128 __x, _Float128 __y) noexcept (true); ># 768 "/usr/include/math.h" 2 3 4 ># 787 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float64 f64fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); > > >extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) noexcept (true); > > >extern _Float64 f64sqrtf64x (_Float64x __x) noexcept (true); > > >extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) noexcept (true); ># 788 "/usr/include/math.h" 2 3 4 ># 797 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float64 f64addf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float64 f64divf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float64 f64fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); > > >extern _Float64 f64mulf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float64 f64sqrtf128 (_Float128 __x) noexcept (true); > > >extern _Float64 f64subf128 (_Float128 __x, _Float128 __y) noexcept (true); ># 798 "/usr/include/math.h" 2 3 4 ># 817 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls-narrow.h" 1 3 4 ># 24 "/usr/include/bits/mathcalls-narrow.h" 3 4 >extern _Float64x f64xaddf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float64x f64xdivf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float64x f64xfmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); > > >extern _Float64x f64xmulf128 (_Float128 __x, _Float128 __y) noexcept (true); > > >extern _Float64x f64xsqrtf128 (_Float128 __x) noexcept (true); > > >extern _Float64x f64xsubf128 (_Float128 __x, _Float128 __y) noexcept (true); ># 818 "/usr/include/math.h" 2 3 4 ># 854 "/usr/include/math.h" 3 4 >extern int signgam; ># 934 "/usr/include/math.h" 3 4 >enum > { > FP_NAN = > > 0, > FP_INFINITE = > > 1, > FP_ZERO = > > 2, > FP_SUBNORMAL = > > 3, > FP_NORMAL = > > 4 > }; ># 1054 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/iscanonical.h" 1 3 4 ># 23 "/usr/include/bits/iscanonical.h" 3 4 >extern int __iscanonicall (long double __x) > noexcept (true) __attribute__ ((__const__)); ># 46 "/usr/include/bits/iscanonical.h" 3 4 >extern "C++" { >inline int iscanonical (float __val) { return ((void) (__typeof (__val)) (__val), 1); } >inline int iscanonical (double __val) { return ((void) (__typeof (__val)) (__val), 1); } >inline int iscanonical (long double __val) { return __iscanonicall (__val); } > >inline int iscanonical (_Float128 __val) { return ((void) (__typeof (__val)) (__val), 1); } > >} ># 1055 "/usr/include/math.h" 2 3 4 ># 1066 "/usr/include/math.h" 3 4 >extern "C++" { >inline int issignaling (float __val) { return __issignalingf (__val); } >inline int issignaling (double __val) { return __issignaling (__val); } >inline int >issignaling (long double __val) >{ > > > > return __issignalingl (__val); > >} > > > >inline int issignaling (_Float128 __val) { return __issignalingf128 (__val); } > >} ># 1097 "/usr/include/math.h" 3 4 >extern "C++" { ># 1128 "/usr/include/math.h" 3 4 >template <class __T> inline bool >iszero (__T __val) >{ > return __val == 0; >} > >} ># 1363 "/usr/include/math.h" 3 4 >extern "C++" { >template<typename> struct __iseqsig_type; > >template<> struct __iseqsig_type<float> >{ > static int __call (float __x, float __y) throw () > { > return __iseqsigf (__x, __y); > } >}; > >template<> struct __iseqsig_type<double> >{ > static int __call (double __x, double __y) throw () > { > return __iseqsig (__x, __y); > } >}; > >template<> struct __iseqsig_type<long double> >{ > static int __call (long double __x, long double __y) throw () > { > > return __iseqsigl (__x, __y); > > > > } >}; > > >template<> struct __iseqsig_type<_Float32> >{ > static int __call (_Float32 __x, _Float32 __y) throw () > { > return __iseqsigf (__x, __y); > } >}; > > > >template<> struct __iseqsig_type<_Float64> >{ > static int __call (_Float64 __x, _Float64 __y) throw () > { > return __iseqsig (__x, __y); > } >}; > > > > > >template<> struct __iseqsig_type<_Float128> >{ > static int __call (_Float128 __x, _Float128 __y) throw () > { > > return __iseqsigf128 (__x, __y); > > > > } >}; > > > >template<> struct __iseqsig_type<_Float32x> >{ > static int __call (_Float32x __x, _Float32x __y) throw () > { > return __iseqsig (__x, __y); > } >}; > > > >template<> struct __iseqsig_type<_Float64x> >{ > static int __call (_Float64x __x, _Float64x __y) throw () > { > > return __iseqsigl (__x, __y); > > > > } >}; > > >template<typename _T1, typename _T2> >inline int >iseqsig (_T1 __x, _T2 __y) throw () >{ > > typedef decltype (((__x) + (__y) + 0.0f)) _T3; > > > > return __iseqsig_type<_T3>::__call (__x, __y); >} > >} > > > > >} ># 48 "/usr/include/c++/13/cmath" 2 3 ># 79 "/usr/include/c++/13/cmath" 3 >extern "C++" >{ >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > using ::acos; > > > inline constexpr float > acos(float __x) > { return __builtin_acosf(__x); } > > inline constexpr long double > acos(long double __x) > { return __builtin_acosl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > acos(_Tp __x) > { return __builtin_acos(__x); } > > using ::asin; > > > inline constexpr float > asin(float __x) > { return __builtin_asinf(__x); } > > inline constexpr long double > asin(long double __x) > { return __builtin_asinl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > asin(_Tp __x) > { return __builtin_asin(__x); } > > using ::atan; > > > inline constexpr float > atan(float __x) > { return __builtin_atanf(__x); } > > inline constexpr long double > atan(long double __x) > { return __builtin_atanl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > atan(_Tp __x) > { return __builtin_atan(__x); } > > using ::atan2; > > > inline constexpr float > atan2(float __y, float __x) > { return __builtin_atan2f(__y, __x); } > > inline constexpr long double > atan2(long double __y, long double __x) > { return __builtin_atan2l(__y, __x); } > > > template<typename _Tp, typename _Up> > inline constexpr > typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > atan2(_Tp __y, _Up __x) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return atan2(__type(__y), __type(__x)); > } > > using ::ceil; > > > inline constexpr float > ceil(float __x) > { return __builtin_ceilf(__x); } > > inline constexpr long double > ceil(long double __x) > { return __builtin_ceill(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > ceil(_Tp __x) > { return __builtin_ceil(__x); } > > using ::cos; > > > inline constexpr float > cos(float __x) > { return __builtin_cosf(__x); } > > inline constexpr long double > cos(long double __x) > { return __builtin_cosl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > cos(_Tp __x) > { return __builtin_cos(__x); } > > using ::cosh; > > > inline constexpr float > cosh(float __x) > { return __builtin_coshf(__x); } > > inline constexpr long double > cosh(long double __x) > { return __builtin_coshl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > cosh(_Tp __x) > { return __builtin_cosh(__x); } > > using ::exp; > > > inline constexpr float > exp(float __x) > { return __builtin_expf(__x); } > > inline constexpr long double > exp(long double __x) > { return __builtin_expl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > exp(_Tp __x) > { return __builtin_exp(__x); } > > using ::fabs; > > > inline constexpr float > fabs(float __x) > { return __builtin_fabsf(__x); } > > inline constexpr long double > fabs(long double __x) > { return __builtin_fabsl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > fabs(_Tp __x) > { return __builtin_fabs(__x); } > > using ::floor; > > > inline constexpr float > floor(float __x) > { return __builtin_floorf(__x); } > > inline constexpr long double > floor(long double __x) > { return __builtin_floorl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > floor(_Tp __x) > { return __builtin_floor(__x); } > > using ::fmod; > > > inline constexpr float > fmod(float __x, float __y) > { return __builtin_fmodf(__x, __y); } > > inline constexpr long double > fmod(long double __x, long double __y) > { return __builtin_fmodl(__x, __y); } > > > template<typename _Tp, typename _Up> > inline constexpr > typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > fmod(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return fmod(__type(__x), __type(__y)); > } > > using ::frexp; > > > inline float > frexp(float __x, int* __exp) > { return __builtin_frexpf(__x, __exp); } > > inline long double > frexp(long double __x, int* __exp) > { return __builtin_frexpl(__x, __exp); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > frexp(_Tp __x, int* __exp) > { return __builtin_frexp(__x, __exp); } > > using ::ldexp; > > > inline constexpr float > ldexp(float __x, int __exp) > { return __builtin_ldexpf(__x, __exp); } > > inline constexpr long double > ldexp(long double __x, int __exp) > { return __builtin_ldexpl(__x, __exp); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > ldexp(_Tp __x, int __exp) > { return __builtin_ldexp(__x, __exp); } > > using ::log; > > > inline constexpr float > log(float __x) > { return __builtin_logf(__x); } > > inline constexpr long double > log(long double __x) > { return __builtin_logl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > log(_Tp __x) > { return __builtin_log(__x); } > > using ::log10; > > > inline constexpr float > log10(float __x) > { return __builtin_log10f(__x); } > > inline constexpr long double > log10(long double __x) > { return __builtin_log10l(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > log10(_Tp __x) > { return __builtin_log10(__x); } > > using ::modf; > > > inline float > modf(float __x, float* __iptr) > { return __builtin_modff(__x, __iptr); } > > inline long double > modf(long double __x, long double* __iptr) > { return __builtin_modfl(__x, __iptr); } > > > using ::pow; > > > inline constexpr float > pow(float __x, float __y) > { return __builtin_powf(__x, __y); } > > inline constexpr long double > pow(long double __x, long double __y) > { return __builtin_powl(__x, __y); } ># 414 "/usr/include/c++/13/cmath" 3 > template<typename _Tp, typename _Up> > inline constexpr > typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > pow(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return pow(__type(__x), __type(__y)); > } > > using ::sin; > > > inline constexpr float > sin(float __x) > { return __builtin_sinf(__x); } > > inline constexpr long double > sin(long double __x) > { return __builtin_sinl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > sin(_Tp __x) > { return __builtin_sin(__x); } > > using ::sinh; > > > inline constexpr float > sinh(float __x) > { return __builtin_sinhf(__x); } > > inline constexpr long double > sinh(long double __x) > { return __builtin_sinhl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > sinh(_Tp __x) > { return __builtin_sinh(__x); } > > using ::sqrt; > > > inline constexpr float > sqrt(float __x) > { return __builtin_sqrtf(__x); } > > inline constexpr long double > sqrt(long double __x) > { return __builtin_sqrtl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > sqrt(_Tp __x) > { return __builtin_sqrt(__x); } > > using ::tan; > > > inline constexpr float > tan(float __x) > { return __builtin_tanf(__x); } > > inline constexpr long double > tan(long double __x) > { return __builtin_tanl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > tan(_Tp __x) > { return __builtin_tan(__x); } > > using ::tanh; > > > inline constexpr float > tanh(float __x) > { return __builtin_tanhf(__x); } > > inline constexpr long double > tanh(long double __x) > { return __builtin_tanhl(__x); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > tanh(_Tp __x) > { return __builtin_tanh(__x); } ># 1096 "/usr/include/c++/13/cmath" 3 > constexpr int > fpclassify(float __x) > { return __builtin_fpclassify(0, 1, 4, > 3, 2, __x); } > > constexpr int > fpclassify(double __x) > { return __builtin_fpclassify(0, 1, 4, > 3, 2, __x); } > > constexpr int > fpclassify(long double __x) > { return __builtin_fpclassify(0, 1, 4, > 3, 2, __x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > int>::__type > fpclassify(_Tp __x) > { return __x != 0 ? 4 : 2; } > > > > constexpr bool > isfinite(float __x) > { return __builtin_isfinite(__x); } > > constexpr bool > isfinite(double __x) > { return __builtin_isfinite(__x); } > > constexpr bool > isfinite(long double __x) > { return __builtin_isfinite(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > bool>::__type > isfinite(_Tp __x) > { return true; } > > > > constexpr bool > isinf(float __x) > { return __builtin_isinf(__x); } > > > > > > constexpr bool > isinf(double __x) > { return __builtin_isinf(__x); } > > > constexpr bool > isinf(long double __x) > { return __builtin_isinf(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > bool>::__type > isinf(_Tp __x) > { return false; } > > > > constexpr bool > isnan(float __x) > { return __builtin_isnan(__x); } > > > > > > constexpr bool > isnan(double __x) > { return __builtin_isnan(__x); } > > > constexpr bool > isnan(long double __x) > { return __builtin_isnan(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > bool>::__type > isnan(_Tp __x) > { return false; } > > > > constexpr bool > isnormal(float __x) > { return __builtin_isnormal(__x); } > > constexpr bool > isnormal(double __x) > { return __builtin_isnormal(__x); } > > constexpr bool > isnormal(long double __x) > { return __builtin_isnormal(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > bool>::__type > isnormal(_Tp __x) > { return __x != 0 ? true : false; } > > > > > constexpr bool > signbit(float __x) > { return __builtin_signbit(__x); } > > constexpr bool > signbit(double __x) > { return __builtin_signbit(__x); } > > constexpr bool > signbit(long double __x) > { return __builtin_signbit(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > bool>::__type > signbit(_Tp __x) > { return __x < 0 ? true : false; } > > > > constexpr bool > isgreater(float __x, float __y) > { return __builtin_isgreater(__x, __y); } > > constexpr bool > isgreater(double __x, double __y) > { return __builtin_isgreater(__x, __y); } > > constexpr bool > isgreater(long double __x, long double __y) > { return __builtin_isgreater(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename > __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value > && __is_arithmetic<_Up>::__value), bool>::__type > isgreater(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return __builtin_isgreater(__type(__x), __type(__y)); > } > > > > constexpr bool > isgreaterequal(float __x, float __y) > { return __builtin_isgreaterequal(__x, __y); } > > constexpr bool > isgreaterequal(double __x, double __y) > { return __builtin_isgreaterequal(__x, __y); } > > constexpr bool > isgreaterequal(long double __x, long double __y) > { return __builtin_isgreaterequal(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename > __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value > && __is_arithmetic<_Up>::__value), bool>::__type > isgreaterequal(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return __builtin_isgreaterequal(__type(__x), __type(__y)); > } > > > > constexpr bool > isless(float __x, float __y) > { return __builtin_isless(__x, __y); } > > constexpr bool > isless(double __x, double __y) > { return __builtin_isless(__x, __y); } > > constexpr bool > isless(long double __x, long double __y) > { return __builtin_isless(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename > __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value > && __is_arithmetic<_Up>::__value), bool>::__type > isless(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return __builtin_isless(__type(__x), __type(__y)); > } > > > > constexpr bool > islessequal(float __x, float __y) > { return __builtin_islessequal(__x, __y); } > > constexpr bool > islessequal(double __x, double __y) > { return __builtin_islessequal(__x, __y); } > > constexpr bool > islessequal(long double __x, long double __y) > { return __builtin_islessequal(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename > __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value > && __is_arithmetic<_Up>::__value), bool>::__type > islessequal(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return __builtin_islessequal(__type(__x), __type(__y)); > } > > > > constexpr bool > islessgreater(float __x, float __y) > { return __builtin_islessgreater(__x, __y); } > > constexpr bool > islessgreater(double __x, double __y) > { return __builtin_islessgreater(__x, __y); } > > constexpr bool > islessgreater(long double __x, long double __y) > { return __builtin_islessgreater(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename > __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value > && __is_arithmetic<_Up>::__value), bool>::__type > islessgreater(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return __builtin_islessgreater(__type(__x), __type(__y)); > } > > > > constexpr bool > isunordered(float __x, float __y) > { return __builtin_isunordered(__x, __y); } > > constexpr bool > isunordered(double __x, double __y) > { return __builtin_isunordered(__x, __y); } > > constexpr bool > isunordered(long double __x, long double __y) > { return __builtin_isunordered(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename > __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value > && __is_arithmetic<_Up>::__value), bool>::__type > isunordered(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return __builtin_isunordered(__type(__x), __type(__y)); > } ># 1881 "/usr/include/c++/13/cmath" 3 > using ::double_t; > using ::float_t; > > > using ::acosh; > using ::acoshf; > using ::acoshl; > > using ::asinh; > using ::asinhf; > using ::asinhl; > > using ::atanh; > using ::atanhf; > using ::atanhl; > > using ::cbrt; > using ::cbrtf; > using ::cbrtl; > > using ::copysign; > using ::copysignf; > using ::copysignl; > > using ::erf; > using ::erff; > using ::erfl; > > using ::erfc; > using ::erfcf; > using ::erfcl; > > using ::exp2; > using ::exp2f; > using ::exp2l; > > using ::expm1; > using ::expm1f; > using ::expm1l; > > using ::fdim; > using ::fdimf; > using ::fdiml; > > using ::fma; > using ::fmaf; > using ::fmal; > > using ::fmax; > using ::fmaxf; > using ::fmaxl; > > using ::fmin; > using ::fminf; > using ::fminl; > > using ::hypot; > using ::hypotf; > using ::hypotl; > > using ::ilogb; > using ::ilogbf; > using ::ilogbl; > > using ::lgamma; > using ::lgammaf; > using ::lgammal; > > > using ::llrint; > using ::llrintf; > using ::llrintl; > > using ::llround; > using ::llroundf; > using ::llroundl; > > > using ::log1p; > using ::log1pf; > using ::log1pl; > > using ::log2; > using ::log2f; > using ::log2l; > > using ::logb; > using ::logbf; > using ::logbl; > > using ::lrint; > using ::lrintf; > using ::lrintl; > > using ::lround; > using ::lroundf; > using ::lroundl; > > using ::nan; > using ::nanf; > using ::nanl; > > using ::nearbyint; > using ::nearbyintf; > using ::nearbyintl; > > using ::nextafter; > using ::nextafterf; > using ::nextafterl; > > using ::nexttoward; > using ::nexttowardf; > using ::nexttowardl; > > using ::remainder; > using ::remainderf; > using ::remainderl; > > using ::remquo; > using ::remquof; > using ::remquol; > > using ::rint; > using ::rintf; > using ::rintl; > > using ::round; > using ::roundf; > using ::roundl; > > using ::scalbln; > using ::scalblnf; > using ::scalblnl; > > using ::scalbn; > using ::scalbnf; > using ::scalbnl; > > using ::tgamma; > using ::tgammaf; > using ::tgammal; > > using ::trunc; > using ::truncf; > using ::truncl; > > > > constexpr float > acosh(float __x) > { return __builtin_acoshf(__x); } > > constexpr long double > acosh(long double __x) > { return __builtin_acoshl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > acosh(_Tp __x) > { return __builtin_acosh(__x); } > > > > constexpr float > asinh(float __x) > { return __builtin_asinhf(__x); } > > constexpr long double > asinh(long double __x) > { return __builtin_asinhl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > asinh(_Tp __x) > { return __builtin_asinh(__x); } > > > > constexpr float > atanh(float __x) > { return __builtin_atanhf(__x); } > > constexpr long double > atanh(long double __x) > { return __builtin_atanhl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > atanh(_Tp __x) > { return __builtin_atanh(__x); } > > > > constexpr float > cbrt(float __x) > { return __builtin_cbrtf(__x); } > > constexpr long double > cbrt(long double __x) > { return __builtin_cbrtl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > cbrt(_Tp __x) > { return __builtin_cbrt(__x); } > > > > constexpr float > copysign(float __x, float __y) > { return __builtin_copysignf(__x, __y); } > > constexpr long double > copysign(long double __x, long double __y) > { return __builtin_copysignl(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > copysign(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return copysign(__type(__x), __type(__y)); > } > > > > constexpr float > erf(float __x) > { return __builtin_erff(__x); } > > constexpr long double > erf(long double __x) > { return __builtin_erfl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > erf(_Tp __x) > { return __builtin_erf(__x); } > > > > constexpr float > erfc(float __x) > { return __builtin_erfcf(__x); } > > constexpr long double > erfc(long double __x) > { return __builtin_erfcl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > erfc(_Tp __x) > { return __builtin_erfc(__x); } > > > > constexpr float > exp2(float __x) > { return __builtin_exp2f(__x); } > > constexpr long double > exp2(long double __x) > { return __builtin_exp2l(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > exp2(_Tp __x) > { return __builtin_exp2(__x); } > > > > constexpr float > expm1(float __x) > { return __builtin_expm1f(__x); } > > constexpr long double > expm1(long double __x) > { return __builtin_expm1l(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > expm1(_Tp __x) > { return __builtin_expm1(__x); } > > > > constexpr float > fdim(float __x, float __y) > { return __builtin_fdimf(__x, __y); } > > constexpr long double > fdim(long double __x, long double __y) > { return __builtin_fdiml(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > fdim(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return fdim(__type(__x), __type(__y)); > } > > > > constexpr float > fma(float __x, float __y, float __z) > { return __builtin_fmaf(__x, __y, __z); } > > constexpr long double > fma(long double __x, long double __y, long double __z) > { return __builtin_fmal(__x, __y, __z); } > > > > template<typename _Tp, typename _Up, typename _Vp> > constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type > fma(_Tp __x, _Up __y, _Vp __z) > { > typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; > return fma(__type(__x), __type(__y), __type(__z)); > } > > > > constexpr float > fmax(float __x, float __y) > { return __builtin_fmaxf(__x, __y); } > > constexpr long double > fmax(long double __x, long double __y) > { return __builtin_fmaxl(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > fmax(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return fmax(__type(__x), __type(__y)); > } > > > > constexpr float > fmin(float __x, float __y) > { return __builtin_fminf(__x, __y); } > > constexpr long double > fmin(long double __x, long double __y) > { return __builtin_fminl(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > fmin(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return fmin(__type(__x), __type(__y)); > } > > > > constexpr float > hypot(float __x, float __y) > { return __builtin_hypotf(__x, __y); } > > constexpr long double > hypot(long double __x, long double __y) > { return __builtin_hypotl(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > hypot(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return hypot(__type(__x), __type(__y)); > } > > > > constexpr int > ilogb(float __x) > { return __builtin_ilogbf(__x); } > > constexpr int > ilogb(long double __x) > { return __builtin_ilogbl(__x); } > > > > template<typename _Tp> > constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > int>::__type > ilogb(_Tp __x) > { return __builtin_ilogb(__x); } > > > > constexpr float > lgamma(float __x) > { return __builtin_lgammaf(__x); } > > constexpr long double > lgamma(long double __x) > { return __builtin_lgammal(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > lgamma(_Tp __x) > { return __builtin_lgamma(__x); } > > > > constexpr long long > llrint(float __x) > { return __builtin_llrintf(__x); } > > constexpr long long > llrint(long double __x) > { return __builtin_llrintl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > long long>::__type > llrint(_Tp __x) > { return __builtin_llrint(__x); } > > > > constexpr long long > llround(float __x) > { return __builtin_llroundf(__x); } > > constexpr long long > llround(long double __x) > { return __builtin_llroundl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > long long>::__type > llround(_Tp __x) > { return __builtin_llround(__x); } > > > > constexpr float > log1p(float __x) > { return __builtin_log1pf(__x); } > > constexpr long double > log1p(long double __x) > { return __builtin_log1pl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > log1p(_Tp __x) > { return __builtin_log1p(__x); } > > > > > constexpr float > log2(float __x) > { return __builtin_log2f(__x); } > > constexpr long double > log2(long double __x) > { return __builtin_log2l(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > log2(_Tp __x) > { return __builtin_log2(__x); } > > > > constexpr float > logb(float __x) > { return __builtin_logbf(__x); } > > constexpr long double > logb(long double __x) > { return __builtin_logbl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > logb(_Tp __x) > { return __builtin_logb(__x); } > > > > constexpr long > lrint(float __x) > { return __builtin_lrintf(__x); } > > constexpr long > lrint(long double __x) > { return __builtin_lrintl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > long>::__type > lrint(_Tp __x) > { return __builtin_lrint(__x); } > > > > constexpr long > lround(float __x) > { return __builtin_lroundf(__x); } > > constexpr long > lround(long double __x) > { return __builtin_lroundl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > long>::__type > lround(_Tp __x) > { return __builtin_lround(__x); } > > > > constexpr float > nearbyint(float __x) > { return __builtin_nearbyintf(__x); } > > constexpr long double > nearbyint(long double __x) > { return __builtin_nearbyintl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > nearbyint(_Tp __x) > { return __builtin_nearbyint(__x); } > > > > constexpr float > nextafter(float __x, float __y) > { return __builtin_nextafterf(__x, __y); } > > constexpr long double > nextafter(long double __x, long double __y) > { return __builtin_nextafterl(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > nextafter(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return nextafter(__type(__x), __type(__y)); > } > > > > constexpr float > nexttoward(float __x, long double __y) > { return __builtin_nexttowardf(__x, __y); } > > constexpr long double > nexttoward(long double __x, long double __y) > { return __builtin_nexttowardl(__x, __y); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > nexttoward(_Tp __x, long double __y) > { return __builtin_nexttoward(__x, __y); } > > > > constexpr float > remainder(float __x, float __y) > { return __builtin_remainderf(__x, __y); } > > constexpr long double > remainder(long double __x, long double __y) > { return __builtin_remainderl(__x, __y); } > > > > template<typename _Tp, typename _Up> > constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > remainder(_Tp __x, _Up __y) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return remainder(__type(__x), __type(__y)); > } > > > > inline float > remquo(float __x, float __y, int* __pquo) > { return __builtin_remquof(__x, __y, __pquo); } > > inline long double > remquo(long double __x, long double __y, int* __pquo) > { return __builtin_remquol(__x, __y, __pquo); } > > > > template<typename _Tp, typename _Up> > inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > remquo(_Tp __x, _Up __y, int* __pquo) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > return remquo(__type(__x), __type(__y), __pquo); > } > > > > constexpr float > rint(float __x) > { return __builtin_rintf(__x); } > > constexpr long double > rint(long double __x) > { return __builtin_rintl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > rint(_Tp __x) > { return __builtin_rint(__x); } > > > > constexpr float > round(float __x) > { return __builtin_roundf(__x); } > > constexpr long double > round(long double __x) > { return __builtin_roundl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > round(_Tp __x) > { return __builtin_round(__x); } > > > > constexpr float > scalbln(float __x, long __ex) > { return __builtin_scalblnf(__x, __ex); } > > constexpr long double > scalbln(long double __x, long __ex) > { return __builtin_scalblnl(__x, __ex); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > scalbln(_Tp __x, long __ex) > { return __builtin_scalbln(__x, __ex); } > > > > constexpr float > scalbn(float __x, int __ex) > { return __builtin_scalbnf(__x, __ex); } > > constexpr long double > scalbn(long double __x, int __ex) > { return __builtin_scalbnl(__x, __ex); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > scalbn(_Tp __x, int __ex) > { return __builtin_scalbn(__x, __ex); } > > > > constexpr float > tgamma(float __x) > { return __builtin_tgammaf(__x); } > > constexpr long double > tgamma(long double __x) > { return __builtin_tgammal(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > tgamma(_Tp __x) > { return __builtin_tgamma(__x); } > > > > constexpr float > trunc(float __x) > { return __builtin_truncf(__x); } > > constexpr long double > trunc(long double __x) > { return __builtin_truncl(__x); } > > > > template<typename _Tp> > constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > trunc(_Tp __x) > { return __builtin_trunc(__x); } ># 3567 "/usr/include/c++/13/cmath" 3 > template<typename _Tp> > inline _Tp > __hypot3(_Tp __x, _Tp __y, _Tp __z) > { > __x = std::abs(__x); > __y = std::abs(__y); > __z = std::abs(__z); > if (_Tp __a = __x < __y ? __y < __z ? __z : __y : __x < __z ? __z : __x) > return __a * std::sqrt((__x / __a) * (__x / __a) > + (__y / __a) * (__y / __a) > + (__z / __a) * (__z / __a)); > else > return {}; > } > > inline float > hypot(float __x, float __y, float __z) > { return std::__hypot3<float>(__x, __y, __z); } > > inline double > hypot(double __x, double __y, double __z) > { return std::__hypot3<double>(__x, __y, __z); } > > inline long double > hypot(long double __x, long double __y, long double __z) > { return std::__hypot3<long double>(__x, __y, __z); } > > template<typename _Tp, typename _Up, typename _Vp> > __gnu_cxx::__promoted_t<_Tp, _Up, _Vp> > hypot(_Tp __x, _Up __y, _Vp __z) > { > using __type = __gnu_cxx::__promoted_t<_Tp, _Up, _Vp>; > return std::__hypot3<__type>(__x, __y, __z); > } ># 3712 "/usr/include/c++/13/cmath" 3 > >} > > ># 1 "/usr/include/c++/13/bits/specfun.h" 1 3 ># 47 "/usr/include/c++/13/bits/specfun.h" 3 ># 1 "/usr/include/c++/13/tr1/gamma.tcc" 1 3 ># 49 "/usr/include/c++/13/tr1/gamma.tcc" 3 ># 1 "/usr/include/c++/13/tr1/special_function_util.h" 1 3 ># 39 "/usr/include/c++/13/tr1/special_function_util.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 50 "/usr/include/c++/13/tr1/special_function_util.h" 3 > namespace __detail > { > > > > template<typename _Tp> > struct __floating_point_constant > { > static const _Tp __value; > }; > > > > template<typename _Tp> > struct __numeric_constants > { > > static _Tp __pi() throw() > { return static_cast<_Tp>(3.1415926535897932384626433832795029L); } > > static _Tp __pi_2() throw() > { return static_cast<_Tp>(1.5707963267948966192313216916397514L); } > > static _Tp __pi_3() throw() > { return static_cast<_Tp>(1.0471975511965977461542144610931676L); } > > static _Tp __pi_4() throw() > { return static_cast<_Tp>(0.7853981633974483096156608458198757L); } > > static _Tp __1_pi() throw() > { return static_cast<_Tp>(0.3183098861837906715377675267450287L); } > > static _Tp __2_sqrtpi() throw() > { return static_cast<_Tp>(1.1283791670955125738961589031215452L); } > > static _Tp __sqrt2() throw() > { return static_cast<_Tp>(1.4142135623730950488016887242096981L); } > > static _Tp __sqrt3() throw() > { return static_cast<_Tp>(1.7320508075688772935274463415058723L); } > > static _Tp __sqrtpio2() throw() > { return static_cast<_Tp>(1.2533141373155002512078826424055226L); } > > static _Tp __sqrt1_2() throw() > { return static_cast<_Tp>(0.7071067811865475244008443621048490L); } > > static _Tp __lnpi() throw() > { return static_cast<_Tp>(1.1447298858494001741434273513530587L); } > > static _Tp __gamma_e() throw() > { return static_cast<_Tp>(0.5772156649015328606065120900824024L); } > > static _Tp __euler() throw() > { return static_cast<_Tp>(2.7182818284590452353602874713526625L); } > }; ># 114 "/usr/include/c++/13/tr1/special_function_util.h" 3 > template<typename _Tp> > inline bool __isnan(_Tp __x) > { return std::isnan(__x); } ># 133 "/usr/include/c++/13/tr1/special_function_util.h" 3 > } > > > > > >} ># 50 "/usr/include/c++/13/tr1/gamma.tcc" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 65 "/usr/include/c++/13/tr1/gamma.tcc" 3 > namespace __detail > { ># 76 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template <typename _Tp> > _Tp > __bernoulli_series(unsigned int __n) > { > > static const _Tp __num[28] = { > _Tp(1UL), -_Tp(1UL) / _Tp(2UL), > _Tp(1UL) / _Tp(6UL), _Tp(0UL), > -_Tp(1UL) / _Tp(30UL), _Tp(0UL), > _Tp(1UL) / _Tp(42UL), _Tp(0UL), > -_Tp(1UL) / _Tp(30UL), _Tp(0UL), > _Tp(5UL) / _Tp(66UL), _Tp(0UL), > -_Tp(691UL) / _Tp(2730UL), _Tp(0UL), > _Tp(7UL) / _Tp(6UL), _Tp(0UL), > -_Tp(3617UL) / _Tp(510UL), _Tp(0UL), > _Tp(43867UL) / _Tp(798UL), _Tp(0UL), > -_Tp(174611) / _Tp(330UL), _Tp(0UL), > _Tp(854513UL) / _Tp(138UL), _Tp(0UL), > -_Tp(236364091UL) / _Tp(2730UL), _Tp(0UL), > _Tp(8553103UL) / _Tp(6UL), _Tp(0UL) > }; > > if (__n == 0) > return _Tp(1); > > if (__n == 1) > return -_Tp(1) / _Tp(2); > > > if (__n % 2 == 1) > return _Tp(0); > > > if (__n < 28) > return __num[__n]; > > > _Tp __fact = _Tp(1); > if ((__n / 2) % 2 == 0) > __fact *= _Tp(-1); > for (unsigned int __k = 1; __k <= __n; ++__k) > __fact *= __k / (_Tp(2) * __numeric_constants<_Tp>::__pi()); > __fact *= _Tp(2); > > _Tp __sum = _Tp(0); > for (unsigned int __i = 1; __i < 1000; ++__i) > { > _Tp __term = std::pow(_Tp(__i), -_Tp(__n)); > if (__term < std::numeric_limits<_Tp>::epsilon()) > break; > __sum += __term; > } > > return __fact * __sum; > } ># 139 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > inline _Tp > __bernoulli(int __n) > { return __bernoulli_series<_Tp>(__n); } ># 153 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __log_gamma_bernoulli(_Tp __x) > { > _Tp __lg = (__x - _Tp(0.5L)) * std::log(__x) - __x > + _Tp(0.5L) * std::log(_Tp(2) > * __numeric_constants<_Tp>::__pi()); > > const _Tp __xx = __x * __x; > _Tp __help = _Tp(1) / __x; > for ( unsigned int __i = 1; __i < 20; ++__i ) > { > const _Tp __2i = _Tp(2 * __i); > __help /= __2i * (__2i - _Tp(1)) * __xx; > __lg += __bernoulli<_Tp>(2 * __i) * __help; > } > > return __lg; > } ># 181 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __log_gamma_lanczos(_Tp __x) > { > const _Tp __xm1 = __x - _Tp(1); > > static const _Tp __lanczos_cheb_7[9] = { > _Tp( 0.99999999999980993227684700473478L), > _Tp( 676.520368121885098567009190444019L), > _Tp(-1259.13921672240287047156078755283L), > _Tp( 771.3234287776530788486528258894L), > _Tp(-176.61502916214059906584551354L), > _Tp( 12.507343278686904814458936853L), > _Tp(-0.13857109526572011689554707L), > _Tp( 9.984369578019570859563e-6L), > _Tp( 1.50563273514931155834e-7L) > }; > > static const _Tp __LOGROOT2PI > = _Tp(0.9189385332046727417803297364056176L); > > _Tp __sum = __lanczos_cheb_7[0]; > for(unsigned int __k = 1; __k < 9; ++__k) > __sum += __lanczos_cheb_7[__k] / (__xm1 + __k); > > const _Tp __term1 = (__xm1 + _Tp(0.5L)) > * std::log((__xm1 + _Tp(7.5L)) > / __numeric_constants<_Tp>::__euler()); > const _Tp __term2 = __LOGROOT2PI + std::log(__sum); > const _Tp __result = __term1 + (__term2 - _Tp(7)); > > return __result; > } ># 225 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __log_gamma(_Tp __x) > { > if (__x > _Tp(0.5L)) > return __log_gamma_lanczos(__x); > else > { > const _Tp __sin_fact > = std::abs(std::sin(__numeric_constants<_Tp>::__pi() * __x)); > if (__sin_fact == _Tp(0)) > std::__throw_domain_error(("Argument is nonpositive integer " "in __log_gamma") > ); > return __numeric_constants<_Tp>::__lnpi() > - std::log(__sin_fact) > - __log_gamma_lanczos(_Tp(1) - __x); > } > } ># 252 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __log_gamma_sign(_Tp __x) > { > if (__x > _Tp(0)) > return _Tp(1); > else > { > const _Tp __sin_fact > = std::sin(__numeric_constants<_Tp>::__pi() * __x); > if (__sin_fact > _Tp(0)) > return (1); > else if (__sin_fact < _Tp(0)) > return -_Tp(1); > else > return _Tp(0); > } > } ># 283 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __log_bincoef(unsigned int __n, unsigned int __k) > { > > static const _Tp __max_bincoeff > = std::numeric_limits<_Tp>::max_exponent10 > * std::log(_Tp(10)) - _Tp(1); > > _Tp __coeff = ::std::lgamma(_Tp(1 + __n)) > - ::std::lgamma(_Tp(1 + __k)) > - ::std::lgamma(_Tp(1 + __n - __k)); > > > > > > } ># 314 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __bincoef(unsigned int __n, unsigned int __k) > { > > static const _Tp __max_bincoeff > = std::numeric_limits<_Tp>::max_exponent10 > * std::log(_Tp(10)) - _Tp(1); > > const _Tp __log_coeff = __log_bincoef<_Tp>(__n, __k); > if (__log_coeff > __max_bincoeff) > return std::numeric_limits<_Tp>::quiet_NaN(); > else > return std::exp(__log_coeff); > } ># 337 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > inline _Tp > __gamma(_Tp __x) > { return std::exp(__log_gamma(__x)); } ># 356 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __psi_series(_Tp __x) > { > _Tp __sum = -__numeric_constants<_Tp>::__gamma_e() - _Tp(1) / __x; > const unsigned int __max_iter = 100000; > for (unsigned int __k = 1; __k < __max_iter; ++__k) > { > const _Tp __term = __x / (__k * (__k + __x)); > __sum += __term; > if (std::abs(__term / __sum) < std::numeric_limits<_Tp>::epsilon()) > break; > } > return __sum; > } ># 386 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __psi_asymp(_Tp __x) > { > _Tp __sum = std::log(__x) - _Tp(0.5L) / __x; > const _Tp __xx = __x * __x; > _Tp __xp = __xx; > const unsigned int __max_iter = 100; > for (unsigned int __k = 1; __k < __max_iter; ++__k) > { > const _Tp __term = __bernoulli<_Tp>(2 * __k) / (2 * __k * __xp); > __sum -= __term; > if (std::abs(__term / __sum) < std::numeric_limits<_Tp>::epsilon()) > break; > __xp *= __xx; > } > return __sum; > } ># 417 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __psi(_Tp __x) > { > const int __n = static_cast<int>(__x + 0.5L); > const _Tp __eps = _Tp(4) * std::numeric_limits<_Tp>::epsilon(); > if (__n <= 0 && std::abs(__x - _Tp(__n)) < __eps) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__x < _Tp(0)) > { > const _Tp __pi = __numeric_constants<_Tp>::__pi(); > return __psi(_Tp(1) - __x) > - __pi * std::cos(__pi * __x) / std::sin(__pi * __x); > } > else if (__x > _Tp(100)) > return __psi_asymp(__x); > else > return __psi_series(__x); > } ># 446 "/usr/include/c++/13/tr1/gamma.tcc" 3 > template<typename _Tp> > _Tp > __psi(unsigned int __n, _Tp __x) > { > if (__x <= _Tp(0)) > std::__throw_domain_error(("Argument out of range " "in __psi") > ); > else if (__n == 0) > return __psi(__x); > else > { > const _Tp __hzeta = __hurwitz_zeta(_Tp(__n + 1), __x); > > const _Tp __ln_nfact = ::std::lgamma(_Tp(__n + 1)); > > > > _Tp __result = std::exp(__ln_nfact) * __hzeta; > if (__n % 2 == 1) > __result = -__result; > return __result; > } > } > } > > > > > > >} ># 48 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/bessel_function.tcc" 1 3 ># 55 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 71 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > namespace __detail > { ># 98 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template <typename _Tp> > void > __gamma_temme(_Tp __mu, > _Tp & __gam1, _Tp & __gam2, _Tp & __gampl, _Tp & __gammi) > { > > __gampl = _Tp(1) / ::std::tgamma(_Tp(1) + __mu); > __gammi = _Tp(1) / ::std::tgamma(_Tp(1) - __mu); > > > > > > if (std::abs(__mu) < std::numeric_limits<_Tp>::epsilon()) > __gam1 = -_Tp(__numeric_constants<_Tp>::__gamma_e()); > else > __gam1 = (__gammi - __gampl) / (_Tp(2) * __mu); > > __gam2 = (__gammi + __gampl) / (_Tp(2)); > > return; > } ># 136 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template <typename _Tp> > void > __bessel_jn(_Tp __nu, _Tp __x, > _Tp & __Jnu, _Tp & __Nnu, _Tp & __Jpnu, _Tp & __Npnu) > { > if (__x == _Tp(0)) > { > if (__nu == _Tp(0)) > { > __Jnu = _Tp(1); > __Jpnu = _Tp(0); > } > else if (__nu == _Tp(1)) > { > __Jnu = _Tp(0); > __Jpnu = _Tp(0.5L); > } > else > { > __Jnu = _Tp(0); > __Jpnu = _Tp(0); > } > __Nnu = -std::numeric_limits<_Tp>::infinity(); > __Npnu = std::numeric_limits<_Tp>::infinity(); > return; > } > > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > > > > > const _Tp __fp_min = std::sqrt(std::numeric_limits<_Tp>::min()); > const int __max_iter = 15000; > const _Tp __x_min = _Tp(2); > > const int __nl = (__x < __x_min > ? static_cast<int>(__nu + _Tp(0.5L)) > : std::max(0, static_cast<int>(__nu - __x + _Tp(1.5L)))); > > const _Tp __mu = __nu - __nl; > const _Tp __mu2 = __mu * __mu; > const _Tp __xi = _Tp(1) / __x; > const _Tp __xi2 = _Tp(2) * __xi; > _Tp __w = __xi2 / __numeric_constants<_Tp>::__pi(); > int __isign = 1; > _Tp __h = __nu * __xi; > if (__h < __fp_min) > __h = __fp_min; > _Tp __b = __xi2 * __nu; > _Tp __d = _Tp(0); > _Tp __c = __h; > int __i; > for (__i = 1; __i <= __max_iter; ++__i) > { > __b += __xi2; > __d = __b - __d; > if (std::abs(__d) < __fp_min) > __d = __fp_min; > __c = __b - _Tp(1) / __c; > if (std::abs(__c) < __fp_min) > __c = __fp_min; > __d = _Tp(1) / __d; > const _Tp __del = __c * __d; > __h *= __del; > if (__d < _Tp(0)) > __isign = -__isign; > if (std::abs(__del - _Tp(1)) < __eps) > break; > } > if (__i > __max_iter) > std::__throw_runtime_error(("Argument x too large in __bessel_jn; " "try asymptotic expansion.") > ); > _Tp __Jnul = __isign * __fp_min; > _Tp __Jpnul = __h * __Jnul; > _Tp __Jnul1 = __Jnul; > _Tp __Jpnu1 = __Jpnul; > _Tp __fact = __nu * __xi; > for ( int __l = __nl; __l >= 1; --__l ) > { > const _Tp __Jnutemp = __fact * __Jnul + __Jpnul; > __fact -= __xi; > __Jpnul = __fact * __Jnutemp - __Jnul; > __Jnul = __Jnutemp; > } > if (__Jnul == _Tp(0)) > __Jnul = __eps; > _Tp __f= __Jpnul / __Jnul; > _Tp __Nmu, __Nnu1, __Npmu, __Jmu; > if (__x < __x_min) > { > const _Tp __x2 = __x / _Tp(2); > const _Tp __pimu = __numeric_constants<_Tp>::__pi() * __mu; > _Tp __fact = (std::abs(__pimu) < __eps > ? _Tp(1) : __pimu / std::sin(__pimu)); > _Tp __d = -std::log(__x2); > _Tp __e = __mu * __d; > _Tp __fact2 = (std::abs(__e) < __eps > ? _Tp(1) : std::sinh(__e) / __e); > _Tp __gam1, __gam2, __gampl, __gammi; > __gamma_temme(__mu, __gam1, __gam2, __gampl, __gammi); > _Tp __ff = (_Tp(2) / __numeric_constants<_Tp>::__pi()) > * __fact * (__gam1 * std::cosh(__e) + __gam2 * __fact2 * __d); > __e = std::exp(__e); > _Tp __p = __e / (__numeric_constants<_Tp>::__pi() * __gampl); > _Tp __q = _Tp(1) / (__e * __numeric_constants<_Tp>::__pi() * __gammi); > const _Tp __pimu2 = __pimu / _Tp(2); > _Tp __fact3 = (std::abs(__pimu2) < __eps > ? _Tp(1) : std::sin(__pimu2) / __pimu2 ); > _Tp __r = __numeric_constants<_Tp>::__pi() * __pimu2 * __fact3 * __fact3; > _Tp __c = _Tp(1); > __d = -__x2 * __x2; > _Tp __sum = __ff + __r * __q; > _Tp __sum1 = __p; > for (__i = 1; __i <= __max_iter; ++__i) > { > __ff = (__i * __ff + __p + __q) / (__i * __i - __mu2); > __c *= __d / _Tp(__i); > __p /= _Tp(__i) - __mu; > __q /= _Tp(__i) + __mu; > const _Tp __del = __c * (__ff + __r * __q); > __sum += __del; > const _Tp __del1 = __c * __p - __i * __del; > __sum1 += __del1; > if ( std::abs(__del) < __eps * (_Tp(1) + std::abs(__sum)) ) > break; > } > if ( __i > __max_iter ) > std::__throw_runtime_error(("Bessel y series failed to converge " "in __bessel_jn.") > ); > __Nmu = -__sum; > __Nnu1 = -__sum1 * __xi2; > __Npmu = __mu * __xi * __Nmu - __Nnu1; > __Jmu = __w / (__Npmu - __f * __Nmu); > } > else > { > _Tp __a = _Tp(0.25L) - __mu2; > _Tp __q = _Tp(1); > _Tp __p = -__xi / _Tp(2); > _Tp __br = _Tp(2) * __x; > _Tp __bi = _Tp(2); > _Tp __fact = __a * __xi / (__p * __p + __q * __q); > _Tp __cr = __br + __q * __fact; > _Tp __ci = __bi + __p * __fact; > _Tp __den = __br * __br + __bi * __bi; > _Tp __dr = __br / __den; > _Tp __di = -__bi / __den; > _Tp __dlr = __cr * __dr - __ci * __di; > _Tp __dli = __cr * __di + __ci * __dr; > _Tp __temp = __p * __dlr - __q * __dli; > __q = __p * __dli + __q * __dlr; > __p = __temp; > int __i; > for (__i = 2; __i <= __max_iter; ++__i) > { > __a += _Tp(2 * (__i - 1)); > __bi += _Tp(2); > __dr = __a * __dr + __br; > __di = __a * __di + __bi; > if (std::abs(__dr) + std::abs(__di) < __fp_min) > __dr = __fp_min; > __fact = __a / (__cr * __cr + __ci * __ci); > __cr = __br + __cr * __fact; > __ci = __bi - __ci * __fact; > if (std::abs(__cr) + std::abs(__ci) < __fp_min) > __cr = __fp_min; > __den = __dr * __dr + __di * __di; > __dr /= __den; > __di /= -__den; > __dlr = __cr * __dr - __ci * __di; > __dli = __cr * __di + __ci * __dr; > __temp = __p * __dlr - __q * __dli; > __q = __p * __dli + __q * __dlr; > __p = __temp; > if (std::abs(__dlr - _Tp(1)) + std::abs(__dli) < __eps) > break; > } > if (__i > __max_iter) > std::__throw_runtime_error(("Lentz's method failed " "in __bessel_jn.") > ); > const _Tp __gam = (__p - __f) / __q; > __Jmu = std::sqrt(__w / ((__p - __f) * __gam + __q)); > > __Jmu = ::std::copysign(__Jmu, __Jnul); > > > > > __Nmu = __gam * __Jmu; > __Npmu = (__p + __q / __gam) * __Nmu; > __Nnu1 = __mu * __xi * __Nmu - __Npmu; > } > __fact = __Jmu / __Jnul; > __Jnu = __fact * __Jnul1; > __Jpnu = __fact * __Jpnu1; > for (__i = 1; __i <= __nl; ++__i) > { > const _Tp __Nnutemp = (__mu + __i) * __xi2 * __Nnu1 - __Nmu; > __Nmu = __Nnu1; > __Nnu1 = __Nnutemp; > } > __Nnu = __Nmu; > __Npnu = __nu * __xi * __Nmu - __Nnu1; > > return; > } ># 361 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template <typename _Tp> > void > __cyl_bessel_jn_asymp(_Tp __nu, _Tp __x, _Tp & __Jnu, _Tp & __Nnu) > { > const _Tp __mu = _Tp(4) * __nu * __nu; > const _Tp __8x = _Tp(8) * __x; > > _Tp __P = _Tp(0); > _Tp __Q = _Tp(0); > > _Tp __k = _Tp(0); > _Tp __term = _Tp(1); > > int __epsP = 0; > int __epsQ = 0; > > _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > > do > { > __term *= (__k == 0 > ? _Tp(1) > : -(__mu - (2 * __k - 1) * (2 * __k - 1)) / (__k * __8x)); > > __epsP = std::abs(__term) < __eps * std::abs(__P); > __P += __term; > > __k++; > > __term *= (__mu - (2 * __k - 1) * (2 * __k - 1)) / (__k * __8x); > __epsQ = std::abs(__term) < __eps * std::abs(__Q); > __Q += __term; > > if (__epsP && __epsQ && __k > (__nu / 2.)) > break; > > __k++; > } > while (__k < 1000); > > const _Tp __chi = __x - (__nu + _Tp(0.5L)) > * __numeric_constants<_Tp>::__pi_2(); > > const _Tp __c = std::cos(__chi); > const _Tp __s = std::sin(__chi); > > const _Tp __coef = std::sqrt(_Tp(2) > / (__numeric_constants<_Tp>::__pi() * __x)); > > __Jnu = __coef * (__c * __P - __s * __Q); > __Nnu = __coef * (__s * __P + __c * __Q); > > return; > } ># 444 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template <typename _Tp> > _Tp > __cyl_bessel_ij_series(_Tp __nu, _Tp __x, _Tp __sgn, > unsigned int __max_iter) > { > if (__x == _Tp(0)) > return __nu == _Tp(0) ? _Tp(1) : _Tp(0); > > const _Tp __x2 = __x / _Tp(2); > _Tp __fact = __nu * std::log(__x2); > > __fact -= ::std::lgamma(__nu + _Tp(1)); > > > > __fact = std::exp(__fact); > const _Tp __xx4 = __sgn * __x2 * __x2; > _Tp __Jn = _Tp(1); > _Tp __term = _Tp(1); > > for (unsigned int __i = 1; __i < __max_iter; ++__i) > { > __term *= __xx4 / (_Tp(__i) * (__nu + _Tp(__i))); > __Jn += __term; > if (std::abs(__term / __Jn) < std::numeric_limits<_Tp>::epsilon()) > break; > } > > return __fact * __Jn; > } ># 490 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template<typename _Tp> > _Tp > __cyl_bessel_j(_Tp __nu, _Tp __x) > { > if (__nu < _Tp(0) || __x < _Tp(0)) > std::__throw_domain_error(("Bad argument " "in __cyl_bessel_j.") > ); > else if (__isnan(__nu) || __isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__x * __x < _Tp(10) * (__nu + _Tp(1))) > return __cyl_bessel_ij_series(__nu, __x, -_Tp(1), 200); > else if (__x > _Tp(1000)) > { > _Tp __J_nu, __N_nu; > __cyl_bessel_jn_asymp(__nu, __x, __J_nu, __N_nu); > return __J_nu; > } > else > { > _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; > __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); > return __J_nu; > } > } ># 532 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template<typename _Tp> > _Tp > __cyl_neumann_n(_Tp __nu, _Tp __x) > { > if (__nu < _Tp(0) || __x < _Tp(0)) > std::__throw_domain_error(("Bad argument " "in __cyl_neumann_n.") > ); > else if (__isnan(__nu) || __isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__x > _Tp(1000)) > { > _Tp __J_nu, __N_nu; > __cyl_bessel_jn_asymp(__nu, __x, __J_nu, __N_nu); > return __N_nu; > } > else > { > _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; > __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); > return __N_nu; > } > } ># 569 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template <typename _Tp> > void > __sph_bessel_jn(unsigned int __n, _Tp __x, > _Tp & __j_n, _Tp & __n_n, _Tp & __jp_n, _Tp & __np_n) > { > const _Tp __nu = _Tp(__n) + _Tp(0.5L); > > _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; > __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); > > const _Tp __factor = __numeric_constants<_Tp>::__sqrtpio2() > / std::sqrt(__x); > > __j_n = __factor * __J_nu; > __n_n = __factor * __N_nu; > __jp_n = __factor * __Jp_nu - __j_n / (_Tp(2) * __x); > __np_n = __factor * __Np_nu - __n_n / (_Tp(2) * __x); > > return; > } ># 604 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template <typename _Tp> > _Tp > __sph_bessel(unsigned int __n, _Tp __x) > { > if (__x < _Tp(0)) > std::__throw_domain_error(("Bad argument " "in __sph_bessel.") > ); > else if (__isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__x == _Tp(0)) > { > if (__n == 0) > return _Tp(1); > else > return _Tp(0); > } > else > { > _Tp __j_n, __n_n, __jp_n, __np_n; > __sph_bessel_jn(__n, __x, __j_n, __n_n, __jp_n, __np_n); > return __j_n; > } > } ># 642 "/usr/include/c++/13/tr1/bessel_function.tcc" 3 > template <typename _Tp> > _Tp > __sph_neumann(unsigned int __n, _Tp __x) > { > if (__x < _Tp(0)) > std::__throw_domain_error(("Bad argument " "in __sph_neumann.") > ); > else if (__isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__x == _Tp(0)) > return -std::numeric_limits<_Tp>::infinity(); > else > { > _Tp __j_n, __n_n, __jp_n, __np_n; > __sph_bessel_jn(__n, __x, __j_n, __n_n, __jp_n, __np_n); > return __n_n; > } > } > } > > > > > > >} ># 49 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/beta_function.tcc" 1 3 ># 49 "/usr/include/c++/13/tr1/beta_function.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 65 "/usr/include/c++/13/tr1/beta_function.tcc" 3 > namespace __detail > { ># 79 "/usr/include/c++/13/tr1/beta_function.tcc" 3 > template<typename _Tp> > _Tp > __beta_gamma(_Tp __x, _Tp __y) > { > > _Tp __bet; > > if (__x > __y) > { > __bet = ::std::tgamma(__x) > / ::std::tgamma(__x + __y); > __bet *= ::std::tgamma(__y); > } > else > { > __bet = ::std::tgamma(__y) > / ::std::tgamma(__x + __y); > __bet *= ::std::tgamma(__x); > } ># 111 "/usr/include/c++/13/tr1/beta_function.tcc" 3 > return __bet; > } ># 127 "/usr/include/c++/13/tr1/beta_function.tcc" 3 > template<typename _Tp> > _Tp > __beta_lgamma(_Tp __x, _Tp __y) > { > > _Tp __bet = ::std::lgamma(__x) > + ::std::lgamma(__y) > - ::std::lgamma(__x + __y); > > > > > > __bet = std::exp(__bet); > return __bet; > } ># 158 "/usr/include/c++/13/tr1/beta_function.tcc" 3 > template<typename _Tp> > _Tp > __beta_product(_Tp __x, _Tp __y) > { > > _Tp __bet = (__x + __y) / (__x * __y); > > unsigned int __max_iter = 1000000; > for (unsigned int __k = 1; __k < __max_iter; ++__k) > { > _Tp __term = (_Tp(1) + (__x + __y) / __k) > / ((_Tp(1) + __x / __k) * (_Tp(1) + __y / __k)); > __bet *= __term; > } > > return __bet; > } ># 189 "/usr/include/c++/13/tr1/beta_function.tcc" 3 > template<typename _Tp> > inline _Tp > __beta(_Tp __x, _Tp __y) > { > if (__isnan(__x) || __isnan(__y)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else > return __beta_lgamma(__x, __y); > } > } > > > > > > >} ># 50 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/ell_integral.tcc" 1 3 ># 45 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 59 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > namespace __detail > { ># 76 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __ellint_rf(_Tp __x, _Tp __y, _Tp __z) > { > const _Tp __min = std::numeric_limits<_Tp>::min(); > const _Tp __lolim = _Tp(5) * __min; > > if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0)) > std::__throw_domain_error(("Argument less than zero " "in __ellint_rf.") > ); > else if (__x + __y < __lolim || __x + __z < __lolim > || __y + __z < __lolim) > std::__throw_domain_error(("Argument too small in __ellint_rf")); > else > { > const _Tp __c0 = _Tp(1) / _Tp(4); > const _Tp __c1 = _Tp(1) / _Tp(24); > const _Tp __c2 = _Tp(1) / _Tp(10); > const _Tp __c3 = _Tp(3) / _Tp(44); > const _Tp __c4 = _Tp(1) / _Tp(14); > > _Tp __xn = __x; > _Tp __yn = __y; > _Tp __zn = __z; > > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __errtol = std::pow(__eps, _Tp(1) / _Tp(6)); > _Tp __mu; > _Tp __xndev, __yndev, __zndev; > > const unsigned int __max_iter = 100; > for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) > { > __mu = (__xn + __yn + __zn) / _Tp(3); > __xndev = 2 - (__mu + __xn) / __mu; > __yndev = 2 - (__mu + __yn) / __mu; > __zndev = 2 - (__mu + __zn) / __mu; > _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); > __epsilon = std::max(__epsilon, std::abs(__zndev)); > if (__epsilon < __errtol) > break; > const _Tp __xnroot = std::sqrt(__xn); > const _Tp __ynroot = std::sqrt(__yn); > const _Tp __znroot = std::sqrt(__zn); > const _Tp __lambda = __xnroot * (__ynroot + __znroot) > + __ynroot * __znroot; > __xn = __c0 * (__xn + __lambda); > __yn = __c0 * (__yn + __lambda); > __zn = __c0 * (__zn + __lambda); > } > > const _Tp __e2 = __xndev * __yndev - __zndev * __zndev; > const _Tp __e3 = __xndev * __yndev * __zndev; > const _Tp __s = _Tp(1) + (__c1 * __e2 - __c2 - __c3 * __e3) * __e2 > + __c4 * __e3; > > return __s / std::sqrt(__mu); > } > } ># 153 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __comp_ellint_1_series(_Tp __k) > { > > const _Tp __kk = __k * __k; > > _Tp __term = __kk / _Tp(4); > _Tp __sum = _Tp(1) + __term; > > const unsigned int __max_iter = 1000; > for (unsigned int __i = 2; __i < __max_iter; ++__i) > { > __term *= (2 * __i - 1) * __kk / (2 * __i); > if (__term < std::numeric_limits<_Tp>::epsilon()) > break; > __sum += __term; > } > > return __numeric_constants<_Tp>::__pi_2() * __sum; > } ># 191 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __comp_ellint_1(_Tp __k) > { > > if (__isnan(__k)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (std::abs(__k) >= _Tp(1)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else > return __ellint_rf(_Tp(0), _Tp(1) - __k * __k, _Tp(1)); > } ># 219 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __ellint_1(_Tp __k, _Tp __phi) > { > > if (__isnan(__k) || __isnan(__phi)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (std::abs(__k) > _Tp(1)) > std::__throw_domain_error(("Bad argument in __ellint_1.")); > else > { > > const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() > + _Tp(0.5L)); > const _Tp __phi_red = __phi > - __n * __numeric_constants<_Tp>::__pi(); > > const _Tp __s = std::sin(__phi_red); > const _Tp __c = std::cos(__phi_red); > > const _Tp __F = __s > * __ellint_rf(__c * __c, > _Tp(1) - __k * __k * __s * __s, _Tp(1)); > > if (__n == 0) > return __F; > else > return __F + _Tp(2) * __n * __comp_ellint_1(__k); > } > } ># 266 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __comp_ellint_2_series(_Tp __k) > { > > const _Tp __kk = __k * __k; > > _Tp __term = __kk; > _Tp __sum = __term; > > const unsigned int __max_iter = 1000; > for (unsigned int __i = 2; __i < __max_iter; ++__i) > { > const _Tp __i2m = 2 * __i - 1; > const _Tp __i2 = 2 * __i; > __term *= __i2m * __i2m * __kk / (__i2 * __i2); > if (__term < std::numeric_limits<_Tp>::epsilon()) > break; > __sum += __term / __i2m; > } > > return __numeric_constants<_Tp>::__pi_2() * (_Tp(1) - __sum); > } ># 314 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __ellint_rd(_Tp __x, _Tp __y, _Tp __z) > { > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __errtol = std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6)); > const _Tp __max = std::numeric_limits<_Tp>::max(); > const _Tp __lolim = _Tp(2) / std::pow(__max, _Tp(2) / _Tp(3)); > > if (__x < _Tp(0) || __y < _Tp(0)) > std::__throw_domain_error(("Argument less than zero " "in __ellint_rd.") > ); > else if (__x + __y < __lolim || __z < __lolim) > std::__throw_domain_error(("Argument too small " "in __ellint_rd.") > ); > else > { > const _Tp __c0 = _Tp(1) / _Tp(4); > const _Tp __c1 = _Tp(3) / _Tp(14); > const _Tp __c2 = _Tp(1) / _Tp(6); > const _Tp __c3 = _Tp(9) / _Tp(22); > const _Tp __c4 = _Tp(3) / _Tp(26); > > _Tp __xn = __x; > _Tp __yn = __y; > _Tp __zn = __z; > _Tp __sigma = _Tp(0); > _Tp __power4 = _Tp(1); > > _Tp __mu; > _Tp __xndev, __yndev, __zndev; > > const unsigned int __max_iter = 100; > for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) > { > __mu = (__xn + __yn + _Tp(3) * __zn) / _Tp(5); > __xndev = (__mu - __xn) / __mu; > __yndev = (__mu - __yn) / __mu; > __zndev = (__mu - __zn) / __mu; > _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); > __epsilon = std::max(__epsilon, std::abs(__zndev)); > if (__epsilon < __errtol) > break; > _Tp __xnroot = std::sqrt(__xn); > _Tp __ynroot = std::sqrt(__yn); > _Tp __znroot = std::sqrt(__zn); > _Tp __lambda = __xnroot * (__ynroot + __znroot) > + __ynroot * __znroot; > __sigma += __power4 / (__znroot * (__zn + __lambda)); > __power4 *= __c0; > __xn = __c0 * (__xn + __lambda); > __yn = __c0 * (__yn + __lambda); > __zn = __c0 * (__zn + __lambda); > } > > _Tp __ea = __xndev * __yndev; > _Tp __eb = __zndev * __zndev; > _Tp __ec = __ea - __eb; > _Tp __ed = __ea - _Tp(6) * __eb; > _Tp __ef = __ed + __ec + __ec; > _Tp __s1 = __ed * (-__c1 + __c3 * __ed > / _Tp(3) - _Tp(3) * __c4 * __zndev * __ef > / _Tp(2)); > _Tp __s2 = __zndev > * (__c2 * __ef > + __zndev * (-__c3 * __ec - __zndev * __c4 - __ea)); > > return _Tp(3) * __sigma + __power4 * (_Tp(1) + __s1 + __s2) > / (__mu * std::sqrt(__mu)); > } > } ># 399 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __comp_ellint_2(_Tp __k) > { > > if (__isnan(__k)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (std::abs(__k) == 1) > return _Tp(1); > else if (std::abs(__k) > _Tp(1)) > std::__throw_domain_error(("Bad argument in __comp_ellint_2.")); > else > { > const _Tp __kk = __k * __k; > > return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1)) > - __kk * __ellint_rd(_Tp(0), _Tp(1) - __kk, _Tp(1)) / _Tp(3); > } > } ># 433 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __ellint_2(_Tp __k, _Tp __phi) > { > > if (__isnan(__k) || __isnan(__phi)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (std::abs(__k) > _Tp(1)) > std::__throw_domain_error(("Bad argument in __ellint_2.")); > else > { > > const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() > + _Tp(0.5L)); > const _Tp __phi_red = __phi > - __n * __numeric_constants<_Tp>::__pi(); > > const _Tp __kk = __k * __k; > const _Tp __s = std::sin(__phi_red); > const _Tp __ss = __s * __s; > const _Tp __sss = __ss * __s; > const _Tp __c = std::cos(__phi_red); > const _Tp __cc = __c * __c; > > const _Tp __E = __s > * __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1)) > - __kk * __sss > * __ellint_rd(__cc, _Tp(1) - __kk * __ss, _Tp(1)) > / _Tp(3); > > if (__n == 0) > return __E; > else > return __E + _Tp(2) * __n * __comp_ellint_2(__k); > } > } ># 492 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __ellint_rc(_Tp __x, _Tp __y) > { > const _Tp __min = std::numeric_limits<_Tp>::min(); > const _Tp __lolim = _Tp(5) * __min; > > if (__x < _Tp(0) || __y < _Tp(0) || __x + __y < __lolim) > std::__throw_domain_error(("Argument less than zero " "in __ellint_rc.") > ); > else > { > const _Tp __c0 = _Tp(1) / _Tp(4); > const _Tp __c1 = _Tp(1) / _Tp(7); > const _Tp __c2 = _Tp(9) / _Tp(22); > const _Tp __c3 = _Tp(3) / _Tp(10); > const _Tp __c4 = _Tp(3) / _Tp(8); > > _Tp __xn = __x; > _Tp __yn = __y; > > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __errtol = std::pow(__eps / _Tp(30), _Tp(1) / _Tp(6)); > _Tp __mu; > _Tp __sn; > > const unsigned int __max_iter = 100; > for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) > { > __mu = (__xn + _Tp(2) * __yn) / _Tp(3); > __sn = (__yn + __mu) / __mu - _Tp(2); > if (std::abs(__sn) < __errtol) > break; > const _Tp __lambda = _Tp(2) * std::sqrt(__xn) * std::sqrt(__yn) > + __yn; > __xn = __c0 * (__xn + __lambda); > __yn = __c0 * (__yn + __lambda); > } > > _Tp __s = __sn * __sn > * (__c3 + __sn*(__c1 + __sn * (__c4 + __sn * __c2))); > > return (_Tp(1) + __s) / std::sqrt(__mu); > } > } ># 561 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __ellint_rj(_Tp __x, _Tp __y, _Tp __z, _Tp __p) > { > const _Tp __min = std::numeric_limits<_Tp>::min(); > const _Tp __lolim = std::pow(_Tp(5) * __min, _Tp(1)/_Tp(3)); > > if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0)) > std::__throw_domain_error(("Argument less than zero " "in __ellint_rj.") > ); > else if (__x + __y < __lolim || __x + __z < __lolim > || __y + __z < __lolim || __p < __lolim) > std::__throw_domain_error(("Argument too small " "in __ellint_rj") > ); > else > { > const _Tp __c0 = _Tp(1) / _Tp(4); > const _Tp __c1 = _Tp(3) / _Tp(14); > const _Tp __c2 = _Tp(1) / _Tp(3); > const _Tp __c3 = _Tp(3) / _Tp(22); > const _Tp __c4 = _Tp(3) / _Tp(26); > > _Tp __xn = __x; > _Tp __yn = __y; > _Tp __zn = __z; > _Tp __pn = __p; > _Tp __sigma = _Tp(0); > _Tp __power4 = _Tp(1); > > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __errtol = std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6)); > > _Tp __mu; > _Tp __xndev, __yndev, __zndev, __pndev; > > const unsigned int __max_iter = 100; > for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) > { > __mu = (__xn + __yn + __zn + _Tp(2) * __pn) / _Tp(5); > __xndev = (__mu - __xn) / __mu; > __yndev = (__mu - __yn) / __mu; > __zndev = (__mu - __zn) / __mu; > __pndev = (__mu - __pn) / __mu; > _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); > __epsilon = std::max(__epsilon, std::abs(__zndev)); > __epsilon = std::max(__epsilon, std::abs(__pndev)); > if (__epsilon < __errtol) > break; > const _Tp __xnroot = std::sqrt(__xn); > const _Tp __ynroot = std::sqrt(__yn); > const _Tp __znroot = std::sqrt(__zn); > const _Tp __lambda = __xnroot * (__ynroot + __znroot) > + __ynroot * __znroot; > const _Tp __alpha1 = __pn * (__xnroot + __ynroot + __znroot) > + __xnroot * __ynroot * __znroot; > const _Tp __alpha2 = __alpha1 * __alpha1; > const _Tp __beta = __pn * (__pn + __lambda) > * (__pn + __lambda); > __sigma += __power4 * __ellint_rc(__alpha2, __beta); > __power4 *= __c0; > __xn = __c0 * (__xn + __lambda); > __yn = __c0 * (__yn + __lambda); > __zn = __c0 * (__zn + __lambda); > __pn = __c0 * (__pn + __lambda); > } > > _Tp __ea = __xndev * (__yndev + __zndev) + __yndev * __zndev; > _Tp __eb = __xndev * __yndev * __zndev; > _Tp __ec = __pndev * __pndev; > _Tp __e2 = __ea - _Tp(3) * __ec; > _Tp __e3 = __eb + _Tp(2) * __pndev * (__ea - __ec); > _Tp __s1 = _Tp(1) + __e2 * (-__c1 + _Tp(3) * __c3 * __e2 / _Tp(4) > - _Tp(3) * __c4 * __e3 / _Tp(2)); > _Tp __s2 = __eb * (__c2 / _Tp(2) > + __pndev * (-__c3 - __c3 + __pndev * __c4)); > _Tp __s3 = __pndev * __ea * (__c2 - __pndev * __c3) > - __c2 * __pndev * __ec; > > return _Tp(3) * __sigma + __power4 * (__s1 + __s2 + __s3) > / (__mu * std::sqrt(__mu)); > } > } ># 661 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __comp_ellint_3(_Tp __k, _Tp __nu) > { > > if (__isnan(__k) || __isnan(__nu)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__nu == _Tp(1)) > return std::numeric_limits<_Tp>::infinity(); > else if (std::abs(__k) > _Tp(1)) > std::__throw_domain_error(("Bad argument in __comp_ellint_3.")); > else > { > const _Tp __kk = __k * __k; > > return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1)) > + __nu > * __ellint_rj(_Tp(0), _Tp(1) - __kk, _Tp(1), _Tp(1) - __nu) > / _Tp(3); > } > } ># 701 "/usr/include/c++/13/tr1/ell_integral.tcc" 3 > template<typename _Tp> > _Tp > __ellint_3(_Tp __k, _Tp __nu, _Tp __phi) > { > > if (__isnan(__k) || __isnan(__nu) || __isnan(__phi)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (std::abs(__k) > _Tp(1)) > std::__throw_domain_error(("Bad argument in __ellint_3.")); > else > { > > const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() > + _Tp(0.5L)); > const _Tp __phi_red = __phi > - __n * __numeric_constants<_Tp>::__pi(); > > const _Tp __kk = __k * __k; > const _Tp __s = std::sin(__phi_red); > const _Tp __ss = __s * __s; > const _Tp __sss = __ss * __s; > const _Tp __c = std::cos(__phi_red); > const _Tp __cc = __c * __c; > > const _Tp __Pi = __s > * __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1)) > + __nu * __sss > * __ellint_rj(__cc, _Tp(1) - __kk * __ss, _Tp(1), > _Tp(1) - __nu * __ss) / _Tp(3); > > if (__n == 0) > return __Pi; > else > return __Pi + _Tp(2) * __n * __comp_ellint_3(__k, __nu); > } > } > } > > > > > >} ># 51 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/exp_integral.tcc" 1 3 ># 50 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 64 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > namespace __detail > { > template<typename _Tp> _Tp __expint_E1(_Tp); ># 81 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_E1_series(_Tp __x) > { > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > _Tp __term = _Tp(1); > _Tp __esum = _Tp(0); > _Tp __osum = _Tp(0); > const unsigned int __max_iter = 1000; > for (unsigned int __i = 1; __i < __max_iter; ++__i) > { > __term *= - __x / __i; > if (std::abs(__term) < __eps) > break; > if (__term >= _Tp(0)) > __esum += __term / __i; > else > __osum += __term / __i; > } > > return - __esum - __osum > - __numeric_constants<_Tp>::__gamma_e() - std::log(__x); > } ># 118 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_E1_asymp(_Tp __x) > { > _Tp __term = _Tp(1); > _Tp __esum = _Tp(1); > _Tp __osum = _Tp(0); > const unsigned int __max_iter = 1000; > for (unsigned int __i = 1; __i < __max_iter; ++__i) > { > _Tp __prev = __term; > __term *= - __i / __x; > if (std::abs(__term) > std::abs(__prev)) > break; > if (__term >= _Tp(0)) > __esum += __term; > else > __osum += __term; > } > > return std::exp(- __x) * (__esum + __osum) / __x; > } ># 155 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_En_series(unsigned int __n, _Tp __x) > { > const unsigned int __max_iter = 1000; > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const int __nm1 = __n - 1; > _Tp __ans = (__nm1 != 0 > ? _Tp(1) / __nm1 : -std::log(__x) > - __numeric_constants<_Tp>::__gamma_e()); > _Tp __fact = _Tp(1); > for (int __i = 1; __i <= __max_iter; ++__i) > { > __fact *= -__x / _Tp(__i); > _Tp __del; > if ( __i != __nm1 ) > __del = -__fact / _Tp(__i - __nm1); > else > { > _Tp __psi = -__numeric_constants<_Tp>::gamma_e(); > for (int __ii = 1; __ii <= __nm1; ++__ii) > __psi += _Tp(1) / _Tp(__ii); > __del = __fact * (__psi - std::log(__x)); > } > __ans += __del; > if (std::abs(__del) < __eps * std::abs(__ans)) > return __ans; > } > std::__throw_runtime_error(("Series summation failed " "in __expint_En_series.") > ); > } ># 201 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_En_cont_frac(unsigned int __n, _Tp __x) > { > const unsigned int __max_iter = 1000; > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __fp_min = std::numeric_limits<_Tp>::min(); > const int __nm1 = __n - 1; > _Tp __b = __x + _Tp(__n); > _Tp __c = _Tp(1) / __fp_min; > _Tp __d = _Tp(1) / __b; > _Tp __h = __d; > for ( unsigned int __i = 1; __i <= __max_iter; ++__i ) > { > _Tp __a = -_Tp(__i * (__nm1 + __i)); > __b += _Tp(2); > __d = _Tp(1) / (__a * __d + __b); > __c = __b + __a / __c; > const _Tp __del = __c * __d; > __h *= __del; > if (std::abs(__del - _Tp(1)) < __eps) > { > const _Tp __ans = __h * std::exp(-__x); > return __ans; > } > } > std::__throw_runtime_error(("Continued fraction failed " "in __expint_En_cont_frac.") > ); > } ># 246 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_En_recursion(unsigned int __n, _Tp __x) > { > _Tp __En; > _Tp __E1 = __expint_E1(__x); > if (__x < _Tp(__n)) > { > > __En = __E1; > for (unsigned int __j = 2; __j < __n; ++__j) > __En = (std::exp(-__x) - __x * __En) / _Tp(__j - 1); > } > else > { > > __En = _Tp(1); > const int __N = __n + 20; > _Tp __save = _Tp(0); > for (int __j = __N; __j > 0; --__j) > { > __En = (std::exp(-__x) - __j * __En) / __x; > if (__j == __n) > __save = __En; > } > _Tp __norm = __En / __E1; > __En /= __norm; > } > > return __En; > } ># 290 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_Ei_series(_Tp __x) > { > _Tp __term = _Tp(1); > _Tp __sum = _Tp(0); > const unsigned int __max_iter = 1000; > for (unsigned int __i = 1; __i < __max_iter; ++__i) > { > __term *= __x / __i; > __sum += __term / __i; > if (__term < std::numeric_limits<_Tp>::epsilon() * __sum) > break; > } > > return __numeric_constants<_Tp>::__gamma_e() + __sum + std::log(__x); > } ># 321 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_Ei_asymp(_Tp __x) > { > _Tp __term = _Tp(1); > _Tp __sum = _Tp(1); > const unsigned int __max_iter = 1000; > for (unsigned int __i = 1; __i < __max_iter; ++__i) > { > _Tp __prev = __term; > __term *= __i / __x; > if (__term < std::numeric_limits<_Tp>::epsilon()) > break; > if (__term >= __prev) > break; > __sum += __term; > } > > return std::exp(__x) * __sum / __x; > } ># 354 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_Ei(_Tp __x) > { > if (__x < _Tp(0)) > return -__expint_E1(-__x); > else if (__x < -std::log(std::numeric_limits<_Tp>::epsilon())) > return __expint_Ei_series(__x); > else > return __expint_Ei_asymp(__x); > } ># 378 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_E1(_Tp __x) > { > if (__x < _Tp(0)) > return -__expint_Ei(-__x); > else if (__x < _Tp(1)) > return __expint_E1_series(__x); > else if (__x < _Tp(100)) > return __expint_En_cont_frac(1, __x); > else > return __expint_E1_asymp(__x); > } ># 408 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_asymp(unsigned int __n, _Tp __x) > { > _Tp __term = _Tp(1); > _Tp __sum = _Tp(1); > for (unsigned int __i = 1; __i <= __n; ++__i) > { > _Tp __prev = __term; > __term *= -(__n - __i + 1) / __x; > if (std::abs(__term) > std::abs(__prev)) > break; > __sum += __term; > } > > return std::exp(-__x) * __sum / __x; > } ># 442 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint_large_n(unsigned int __n, _Tp __x) > { > const _Tp __xpn = __x + __n; > const _Tp __xpn2 = __xpn * __xpn; > _Tp __term = _Tp(1); > _Tp __sum = _Tp(1); > for (unsigned int __i = 1; __i <= __n; ++__i) > { > _Tp __prev = __term; > __term *= (__n - 2 * (__i - 1) * __x) / __xpn2; > if (std::abs(__term) < std::numeric_limits<_Tp>::epsilon()) > break; > __sum += __term; > } > > return std::exp(-__x) * __sum / __xpn; > } ># 476 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > _Tp > __expint(unsigned int __n, _Tp __x) > { > > if (__isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__n <= 1 && __x == _Tp(0)) > return std::numeric_limits<_Tp>::infinity(); > else > { > _Tp __E0 = std::exp(__x) / __x; > if (__n == 0) > return __E0; > > _Tp __E1 = __expint_E1(__x); > if (__n == 1) > return __E1; > > if (__x == _Tp(0)) > return _Tp(1) / static_cast<_Tp>(__n - 1); > > _Tp __En = __expint_En_recursion(__n, __x); > > return __En; > } > } ># 516 "/usr/include/c++/13/tr1/exp_integral.tcc" 3 > template<typename _Tp> > inline _Tp > __expint(_Tp __x) > { > if (__isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else > return __expint_Ei(__x); > } > } > > > > > >} ># 52 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/hypergeometric.tcc" 1 3 ># 44 "/usr/include/c++/13/tr1/hypergeometric.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 60 "/usr/include/c++/13/tr1/hypergeometric.tcc" 3 > namespace __detail > { ># 83 "/usr/include/c++/13/tr1/hypergeometric.tcc" 3 > template<typename _Tp> > _Tp > __conf_hyperg_series(_Tp __a, _Tp __c, _Tp __x) > { > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > > _Tp __term = _Tp(1); > _Tp __Fac = _Tp(1); > const unsigned int __max_iter = 100000; > unsigned int __i; > for (__i = 0; __i < __max_iter; ++__i) > { > __term *= (__a + _Tp(__i)) * __x > / ((__c + _Tp(__i)) * _Tp(1 + __i)); > if (std::abs(__term) < __eps) > { > break; > } > __Fac += __term; > } > if (__i == __max_iter) > std::__throw_runtime_error(("Series failed to converge " "in __conf_hyperg_series.") > ); > > return __Fac; > } ># 120 "/usr/include/c++/13/tr1/hypergeometric.tcc" 3 > template<typename _Tp> > _Tp > __conf_hyperg_luke(_Tp __a, _Tp __c, _Tp __xin) > { > const _Tp __big = std::pow(std::numeric_limits<_Tp>::max(), _Tp(0.16L)); > const int __nmax = 20000; > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __x = -__xin; > const _Tp __x3 = __x * __x * __x; > const _Tp __t0 = __a / __c; > const _Tp __t1 = (__a + _Tp(1)) / (_Tp(2) * __c); > const _Tp __t2 = (__a + _Tp(2)) / (_Tp(2) * (__c + _Tp(1))); > _Tp __F = _Tp(1); > _Tp __prec; > > _Tp __Bnm3 = _Tp(1); > _Tp __Bnm2 = _Tp(1) + __t1 * __x; > _Tp __Bnm1 = _Tp(1) + __t2 * __x * (_Tp(1) + __t1 / _Tp(3) * __x); > > _Tp __Anm3 = _Tp(1); > _Tp __Anm2 = __Bnm2 - __t0 * __x; > _Tp __Anm1 = __Bnm1 - __t0 * (_Tp(1) + __t2 * __x) * __x > + __t0 * __t1 * (__c / (__c + _Tp(1))) * __x * __x; > > int __n = 3; > while(1) > { > _Tp __npam1 = _Tp(__n - 1) + __a; > _Tp __npcm1 = _Tp(__n - 1) + __c; > _Tp __npam2 = _Tp(__n - 2) + __a; > _Tp __npcm2 = _Tp(__n - 2) + __c; > _Tp __tnm1 = _Tp(2 * __n - 1); > _Tp __tnm3 = _Tp(2 * __n - 3); > _Tp __tnm5 = _Tp(2 * __n - 5); > _Tp __F1 = (_Tp(__n - 2) - __a) / (_Tp(2) * __tnm3 * __npcm1); > _Tp __F2 = (_Tp(__n) + __a) * __npam1 > / (_Tp(4) * __tnm1 * __tnm3 * __npcm2 * __npcm1); > _Tp __F3 = -__npam2 * __npam1 * (_Tp(__n - 2) - __a) > / (_Tp(8) * __tnm3 * __tnm3 * __tnm5 > * (_Tp(__n - 3) + __c) * __npcm2 * __npcm1); > _Tp __E = -__npam1 * (_Tp(__n - 1) - __c) > / (_Tp(2) * __tnm3 * __npcm2 * __npcm1); > > _Tp __An = (_Tp(1) + __F1 * __x) * __Anm1 > + (__E + __F2 * __x) * __x * __Anm2 + __F3 * __x3 * __Anm3; > _Tp __Bn = (_Tp(1) + __F1 * __x) * __Bnm1 > + (__E + __F2 * __x) * __x * __Bnm2 + __F3 * __x3 * __Bnm3; > _Tp __r = __An / __Bn; > > __prec = std::abs((__F - __r) / __F); > __F = __r; > > if (__prec < __eps || __n > __nmax) > break; > > if (std::abs(__An) > __big || std::abs(__Bn) > __big) > { > __An /= __big; > __Bn /= __big; > __Anm1 /= __big; > __Bnm1 /= __big; > __Anm2 /= __big; > __Bnm2 /= __big; > __Anm3 /= __big; > __Bnm3 /= __big; > } > else if (std::abs(__An) < _Tp(1) / __big > || std::abs(__Bn) < _Tp(1) / __big) > { > __An *= __big; > __Bn *= __big; > __Anm1 *= __big; > __Bnm1 *= __big; > __Anm2 *= __big; > __Bnm2 *= __big; > __Anm3 *= __big; > __Bnm3 *= __big; > } > > ++__n; > __Bnm3 = __Bnm2; > __Bnm2 = __Bnm1; > __Bnm1 = __Bn; > __Anm3 = __Anm2; > __Anm2 = __Anm1; > __Anm1 = __An; > } > > if (__n >= __nmax) > std::__throw_runtime_error(("Iteration failed to converge " "in __conf_hyperg_luke.") > ); > > return __F; > } ># 227 "/usr/include/c++/13/tr1/hypergeometric.tcc" 3 > template<typename _Tp> > _Tp > __conf_hyperg(_Tp __a, _Tp __c, _Tp __x) > { > > const _Tp __c_nint = ::std::nearbyint(__c); > > > > if (__isnan(__a) || __isnan(__c) || __isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__c_nint == __c && __c_nint <= 0) > return std::numeric_limits<_Tp>::infinity(); > else if (__a == _Tp(0)) > return _Tp(1); > else if (__c == __a) > return std::exp(__x); > else if (__x < _Tp(0)) > return __conf_hyperg_luke(__a, __c, __x); > else > return __conf_hyperg_series(__a, __c, __x); > } ># 271 "/usr/include/c++/13/tr1/hypergeometric.tcc" 3 > template<typename _Tp> > _Tp > __hyperg_series(_Tp __a, _Tp __b, _Tp __c, _Tp __x) > { > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > > _Tp __term = _Tp(1); > _Tp __Fabc = _Tp(1); > const unsigned int __max_iter = 100000; > unsigned int __i; > for (__i = 0; __i < __max_iter; ++__i) > { > __term *= (__a + _Tp(__i)) * (__b + _Tp(__i)) * __x > / ((__c + _Tp(__i)) * _Tp(1 + __i)); > if (std::abs(__term) < __eps) > { > break; > } > __Fabc += __term; > } > if (__i == __max_iter) > std::__throw_runtime_error(("Series failed to converge " "in __hyperg_series.") > ); > > return __Fabc; > } > > > > > > > > template<typename _Tp> > _Tp > __hyperg_luke(_Tp __a, _Tp __b, _Tp __c, _Tp __xin) > { > const _Tp __big = std::pow(std::numeric_limits<_Tp>::max(), _Tp(0.16L)); > const int __nmax = 20000; > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __x = -__xin; > const _Tp __x3 = __x * __x * __x; > const _Tp __t0 = __a * __b / __c; > const _Tp __t1 = (__a + _Tp(1)) * (__b + _Tp(1)) / (_Tp(2) * __c); > const _Tp __t2 = (__a + _Tp(2)) * (__b + _Tp(2)) > / (_Tp(2) * (__c + _Tp(1))); > > _Tp __F = _Tp(1); > > _Tp __Bnm3 = _Tp(1); > _Tp __Bnm2 = _Tp(1) + __t1 * __x; > _Tp __Bnm1 = _Tp(1) + __t2 * __x * (_Tp(1) + __t1 / _Tp(3) * __x); > > _Tp __Anm3 = _Tp(1); > _Tp __Anm2 = __Bnm2 - __t0 * __x; > _Tp __Anm1 = __Bnm1 - __t0 * (_Tp(1) + __t2 * __x) * __x > + __t0 * __t1 * (__c / (__c + _Tp(1))) * __x * __x; > > int __n = 3; > while (1) > { > const _Tp __npam1 = _Tp(__n - 1) + __a; > const _Tp __npbm1 = _Tp(__n - 1) + __b; > const _Tp __npcm1 = _Tp(__n - 1) + __c; > const _Tp __npam2 = _Tp(__n - 2) + __a; > const _Tp __npbm2 = _Tp(__n - 2) + __b; > const _Tp __npcm2 = _Tp(__n - 2) + __c; > const _Tp __tnm1 = _Tp(2 * __n - 1); > const _Tp __tnm3 = _Tp(2 * __n - 3); > const _Tp __tnm5 = _Tp(2 * __n - 5); > const _Tp __n2 = __n * __n; > const _Tp __F1 = (_Tp(3) * __n2 + (__a + __b - _Tp(6)) * __n > + _Tp(2) - __a * __b - _Tp(2) * (__a + __b)) > / (_Tp(2) * __tnm3 * __npcm1); > const _Tp __F2 = -(_Tp(3) * __n2 - (__a + __b + _Tp(6)) * __n > + _Tp(2) - __a * __b) * __npam1 * __npbm1 > / (_Tp(4) * __tnm1 * __tnm3 * __npcm2 * __npcm1); > const _Tp __F3 = (__npam2 * __npam1 * __npbm2 * __npbm1 > * (_Tp(__n - 2) - __a) * (_Tp(__n - 2) - __b)) > / (_Tp(8) * __tnm3 * __tnm3 * __tnm5 > * (_Tp(__n - 3) + __c) * __npcm2 * __npcm1); > const _Tp __E = -__npam1 * __npbm1 * (_Tp(__n - 1) - __c) > / (_Tp(2) * __tnm3 * __npcm2 * __npcm1); > > _Tp __An = (_Tp(1) + __F1 * __x) * __Anm1 > + (__E + __F2 * __x) * __x * __Anm2 + __F3 * __x3 * __Anm3; > _Tp __Bn = (_Tp(1) + __F1 * __x) * __Bnm1 > + (__E + __F2 * __x) * __x * __Bnm2 + __F3 * __x3 * __Bnm3; > const _Tp __r = __An / __Bn; > > const _Tp __prec = std::abs((__F - __r) / __F); > __F = __r; > > if (__prec < __eps || __n > __nmax) > break; > > if (std::abs(__An) > __big || std::abs(__Bn) > __big) > { > __An /= __big; > __Bn /= __big; > __Anm1 /= __big; > __Bnm1 /= __big; > __Anm2 /= __big; > __Bnm2 /= __big; > __Anm3 /= __big; > __Bnm3 /= __big; > } > else if (std::abs(__An) < _Tp(1) / __big > || std::abs(__Bn) < _Tp(1) / __big) > { > __An *= __big; > __Bn *= __big; > __Anm1 *= __big; > __Bnm1 *= __big; > __Anm2 *= __big; > __Bnm2 *= __big; > __Anm3 *= __big; > __Bnm3 *= __big; > } > > ++__n; > __Bnm3 = __Bnm2; > __Bnm2 = __Bnm1; > __Bnm1 = __Bn; > __Anm3 = __Anm2; > __Anm2 = __Anm1; > __Anm1 = __An; > } > > if (__n >= __nmax) > std::__throw_runtime_error(("Iteration failed to converge " "in __hyperg_luke.") > ); > > return __F; > } ># 438 "/usr/include/c++/13/tr1/hypergeometric.tcc" 3 > template<typename _Tp> > _Tp > __hyperg_reflect(_Tp __a, _Tp __b, _Tp __c, _Tp __x) > { > const _Tp __d = __c - __a - __b; > const int __intd = std::floor(__d + _Tp(0.5L)); > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __toler = _Tp(1000) * __eps; > const _Tp __log_max = std::log(std::numeric_limits<_Tp>::max()); > const bool __d_integer = (std::abs(__d - __intd) < __toler); > > if (__d_integer) > { > const _Tp __ln_omx = std::log(_Tp(1) - __x); > const _Tp __ad = std::abs(__d); > _Tp __F1, __F2; > > _Tp __d1, __d2; > if (__d >= _Tp(0)) > { > __d1 = __d; > __d2 = _Tp(0); > } > else > { > __d1 = _Tp(0); > __d2 = __d; > } > > const _Tp __lng_c = __log_gamma(__c); > > > if (__ad < __eps) > { > > __F1 = _Tp(0); > } > else > { > > bool __ok_d1 = true; > _Tp __lng_ad, __lng_ad1, __lng_bd1; > try > { > __lng_ad = __log_gamma(__ad); > __lng_ad1 = __log_gamma(__a + __d1); > __lng_bd1 = __log_gamma(__b + __d1); > } > catch(...) > { > __ok_d1 = false; > } > > if (__ok_d1) > { > > > > _Tp __sum1 = _Tp(1); > _Tp __term = _Tp(1); > _Tp __ln_pre1 = __lng_ad + __lng_c + __d2 * __ln_omx > - __lng_ad1 - __lng_bd1; > > > > for (int __i = 1; __i < __ad; ++__i) > { > const int __j = __i - 1; > __term *= (__a + __d2 + __j) * (__b + __d2 + __j) > / (_Tp(1) + __d2 + __j) / __i * (_Tp(1) - __x); > __sum1 += __term; > } > > if (__ln_pre1 > __log_max) > std::__throw_runtime_error(("Overflow of gamma functions" " in __hyperg_luke.") > ); > else > __F1 = std::exp(__ln_pre1) * __sum1; > } > else > { > > > __F1 = _Tp(0); > } > } > > > bool __ok_d2 = true; > _Tp __lng_ad2, __lng_bd2; > try > { > __lng_ad2 = __log_gamma(__a + __d2); > __lng_bd2 = __log_gamma(__b + __d2); > } > catch(...) > { > __ok_d2 = false; > } > > if (__ok_d2) > { > > > const int __maxiter = 2000; > const _Tp __psi_1 = -__numeric_constants<_Tp>::__gamma_e(); > const _Tp __psi_1pd = __psi(_Tp(1) + __ad); > const _Tp __psi_apd1 = __psi(__a + __d1); > const _Tp __psi_bpd1 = __psi(__b + __d1); > > _Tp __psi_term = __psi_1 + __psi_1pd - __psi_apd1 > - __psi_bpd1 - __ln_omx; > _Tp __fact = _Tp(1); > _Tp __sum2 = __psi_term; > _Tp __ln_pre2 = __lng_c + __d1 * __ln_omx > - __lng_ad2 - __lng_bd2; > > > int __j; > for (__j = 1; __j < __maxiter; ++__j) > { > > > const _Tp __term1 = _Tp(1) / _Tp(__j) > + _Tp(1) / (__ad + __j); > const _Tp __term2 = _Tp(1) / (__a + __d1 + _Tp(__j - 1)) > + _Tp(1) / (__b + __d1 + _Tp(__j - 1)); > __psi_term += __term1 - __term2; > __fact *= (__a + __d1 + _Tp(__j - 1)) > * (__b + __d1 + _Tp(__j - 1)) > / ((__ad + __j) * __j) * (_Tp(1) - __x); > const _Tp __delta = __fact * __psi_term; > __sum2 += __delta; > if (std::abs(__delta) < __eps * std::abs(__sum2)) > break; > } > if (__j == __maxiter) > std::__throw_runtime_error(("Sum F2 failed to converge " "in __hyperg_reflect") > ); > > if (__sum2 == _Tp(0)) > __F2 = _Tp(0); > else > __F2 = std::exp(__ln_pre2) * __sum2; > } > else > { > > > __F2 = _Tp(0); > } > > const _Tp __sgn_2 = (__intd % 2 == 1 ? -_Tp(1) : _Tp(1)); > const _Tp __F = __F1 + __sgn_2 * __F2; > > return __F; > } > else > { > > > > > bool __ok1 = true; > _Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0); > _Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0); > try > { > __sgn_g1ca = __log_gamma_sign(__c - __a); > __ln_g1ca = __log_gamma(__c - __a); > __sgn_g1cb = __log_gamma_sign(__c - __b); > __ln_g1cb = __log_gamma(__c - __b); > } > catch(...) > { > __ok1 = false; > } > > bool __ok2 = true; > _Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0); > _Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0); > try > { > __sgn_g2a = __log_gamma_sign(__a); > __ln_g2a = __log_gamma(__a); > __sgn_g2b = __log_gamma_sign(__b); > __ln_g2b = __log_gamma(__b); > } > catch(...) > { > __ok2 = false; > } > > const _Tp __sgn_gc = __log_gamma_sign(__c); > const _Tp __ln_gc = __log_gamma(__c); > const _Tp __sgn_gd = __log_gamma_sign(__d); > const _Tp __ln_gd = __log_gamma(__d); > const _Tp __sgn_gmd = __log_gamma_sign(-__d); > const _Tp __ln_gmd = __log_gamma(-__d); > > const _Tp __sgn1 = __sgn_gc * __sgn_gd * __sgn_g1ca * __sgn_g1cb; > const _Tp __sgn2 = __sgn_gc * __sgn_gmd * __sgn_g2a * __sgn_g2b; > > _Tp __pre1, __pre2; > if (__ok1 && __ok2) > { > _Tp __ln_pre1 = __ln_gc + __ln_gd - __ln_g1ca - __ln_g1cb; > _Tp __ln_pre2 = __ln_gc + __ln_gmd - __ln_g2a - __ln_g2b > + __d * std::log(_Tp(1) - __x); > if (__ln_pre1 < __log_max && __ln_pre2 < __log_max) > { > __pre1 = std::exp(__ln_pre1); > __pre2 = std::exp(__ln_pre2); > __pre1 *= __sgn1; > __pre2 *= __sgn2; > } > else > { > std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") > ); > } > } > else if (__ok1 && !__ok2) > { > _Tp __ln_pre1 = __ln_gc + __ln_gd - __ln_g1ca - __ln_g1cb; > if (__ln_pre1 < __log_max) > { > __pre1 = std::exp(__ln_pre1); > __pre1 *= __sgn1; > __pre2 = _Tp(0); > } > else > { > std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") > ); > } > } > else if (!__ok1 && __ok2) > { > _Tp __ln_pre2 = __ln_gc + __ln_gmd - __ln_g2a - __ln_g2b > + __d * std::log(_Tp(1) - __x); > if (__ln_pre2 < __log_max) > { > __pre1 = _Tp(0); > __pre2 = std::exp(__ln_pre2); > __pre2 *= __sgn2; > } > else > { > std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") > ); > } > } > else > { > __pre1 = _Tp(0); > __pre2 = _Tp(0); > std::__throw_runtime_error(("Underflow of gamma functions " "in __hyperg_reflect") > ); > } > > const _Tp __F1 = __hyperg_series(__a, __b, _Tp(1) - __d, > _Tp(1) - __x); > const _Tp __F2 = __hyperg_series(__c - __a, __c - __b, _Tp(1) + __d, > _Tp(1) - __x); > > const _Tp __F = __pre1 * __F1 + __pre2 * __F2; > > return __F; > } > } ># 728 "/usr/include/c++/13/tr1/hypergeometric.tcc" 3 > template<typename _Tp> > _Tp > __hyperg(_Tp __a, _Tp __b, _Tp __c, _Tp __x) > { > > const _Tp __a_nint = ::std::nearbyint(__a); > const _Tp __b_nint = ::std::nearbyint(__b); > const _Tp __c_nint = ::std::nearbyint(__c); > > > > > > const _Tp __toler = _Tp(1000) * std::numeric_limits<_Tp>::epsilon(); > if (std::abs(__x) >= _Tp(1)) > std::__throw_domain_error(("Argument outside unit circle " "in __hyperg.") > ); > else if (__isnan(__a) || __isnan(__b) > || __isnan(__c) || __isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__c_nint == __c && __c_nint <= _Tp(0)) > return std::numeric_limits<_Tp>::infinity(); > else if (std::abs(__c - __b) < __toler || std::abs(__c - __a) < __toler) > return std::pow(_Tp(1) - __x, __c - __a - __b); > else if (__a >= _Tp(0) && __b >= _Tp(0) && __c >= _Tp(0) > && __x >= _Tp(0) && __x < _Tp(0.995L)) > return __hyperg_series(__a, __b, __c, __x); > else if (std::abs(__a) < _Tp(10) && std::abs(__b) < _Tp(10)) > { > > > if (__a < _Tp(0) && std::abs(__a - __a_nint) < __toler) > return __hyperg_series(__a_nint, __b, __c, __x); > else if (__b < _Tp(0) && std::abs(__b - __b_nint) < __toler) > return __hyperg_series(__a, __b_nint, __c, __x); > else if (__x < -_Tp(0.25L)) > return __hyperg_luke(__a, __b, __c, __x); > else if (__x < _Tp(0.5L)) > return __hyperg_series(__a, __b, __c, __x); > else > if (std::abs(__c) > _Tp(10)) > return __hyperg_series(__a, __b, __c, __x); > else > return __hyperg_reflect(__a, __b, __c, __x); > } > else > return __hyperg_luke(__a, __b, __c, __x); > } > } > > > > > > >} ># 53 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/legendre_function.tcc" 1 3 ># 49 "/usr/include/c++/13/tr1/legendre_function.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 65 "/usr/include/c++/13/tr1/legendre_function.tcc" 3 > namespace __detail > { ># 80 "/usr/include/c++/13/tr1/legendre_function.tcc" 3 > template<typename _Tp> > _Tp > __poly_legendre_p(unsigned int __l, _Tp __x) > { > > if (__isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__x == +_Tp(1)) > return +_Tp(1); > else if (__x == -_Tp(1)) > return (__l % 2 == 1 ? -_Tp(1) : +_Tp(1)); > else > { > _Tp __p_lm2 = _Tp(1); > if (__l == 0) > return __p_lm2; > > _Tp __p_lm1 = __x; > if (__l == 1) > return __p_lm1; > > _Tp __p_l = 0; > for (unsigned int __ll = 2; __ll <= __l; ++__ll) > { > > > __p_l = _Tp(2) * __x * __p_lm1 - __p_lm2 > - (__x * __p_lm1 - __p_lm2) / _Tp(__ll); > __p_lm2 = __p_lm1; > __p_lm1 = __p_l; > } > > return __p_l; > } > } ># 136 "/usr/include/c++/13/tr1/legendre_function.tcc" 3 > template<typename _Tp> > _Tp > __assoc_legendre_p(unsigned int __l, unsigned int __m, _Tp __x, > _Tp __phase = _Tp(+1)) > { > > if (__m > __l) > return _Tp(0); > else if (__isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__m == 0) > return __poly_legendre_p(__l, __x); > else > { > _Tp __p_mm = _Tp(1); > if (__m > 0) > { > > > _Tp __root = std::sqrt(_Tp(1) - __x) * std::sqrt(_Tp(1) + __x); > _Tp __fact = _Tp(1); > for (unsigned int __i = 1; __i <= __m; ++__i) > { > __p_mm *= __phase * __fact * __root; > __fact += _Tp(2); > } > } > if (__l == __m) > return __p_mm; > > _Tp __p_mp1m = _Tp(2 * __m + 1) * __x * __p_mm; > if (__l == __m + 1) > return __p_mp1m; > > _Tp __p_lm2m = __p_mm; > _Tp __P_lm1m = __p_mp1m; > _Tp __p_lm = _Tp(0); > for (unsigned int __j = __m + 2; __j <= __l; ++__j) > { > __p_lm = (_Tp(2 * __j - 1) * __x * __P_lm1m > - _Tp(__j + __m - 1) * __p_lm2m) / _Tp(__j - __m); > __p_lm2m = __P_lm1m; > __P_lm1m = __p_lm; > } > > return __p_lm; > } > } ># 214 "/usr/include/c++/13/tr1/legendre_function.tcc" 3 > template <typename _Tp> > _Tp > __sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta) > { > if (__isnan(__theta)) > return std::numeric_limits<_Tp>::quiet_NaN(); > > const _Tp __x = std::cos(__theta); > > if (__m > __l) > return _Tp(0); > else if (__m == 0) > { > _Tp __P = __poly_legendre_p(__l, __x); > _Tp __fact = std::sqrt(_Tp(2 * __l + 1) > / (_Tp(4) * __numeric_constants<_Tp>::__pi())); > __P *= __fact; > return __P; > } > else if (__x == _Tp(1) || __x == -_Tp(1)) > { > > return _Tp(0); > } > else > { > > > > > > const _Tp __sgn = ( __m % 2 == 1 ? -_Tp(1) : _Tp(1)); > const _Tp __y_mp1m_factor = __x * std::sqrt(_Tp(2 * __m + 3)); > > const _Tp __lncirc = ::std::log1p(-__x * __x); > > > > > > const _Tp __lnpoch = ::std::lgamma(_Tp(__m + _Tp(0.5L))) > - ::std::lgamma(_Tp(__m)); > > > > > const _Tp __lnpre_val = > -_Tp(0.25L) * __numeric_constants<_Tp>::__lnpi() > + _Tp(0.5L) * (__lnpoch + __m * __lncirc); > const _Tp __sr = std::sqrt((_Tp(2) + _Tp(1) / __m) > / (_Tp(4) * __numeric_constants<_Tp>::__pi())); > _Tp __y_mm = __sgn * __sr * std::exp(__lnpre_val); > _Tp __y_mp1m = __y_mp1m_factor * __y_mm; > > if (__l == __m) > return __y_mm; > else if (__l == __m + 1) > return __y_mp1m; > else > { > _Tp __y_lm = _Tp(0); > > > for (unsigned int __ll = __m + 2; __ll <= __l; ++__ll) > { > const _Tp __rat1 = _Tp(__ll - __m) / _Tp(__ll + __m); > const _Tp __rat2 = _Tp(__ll - __m - 1) / _Tp(__ll + __m - 1); > const _Tp __fact1 = std::sqrt(__rat1 * _Tp(2 * __ll + 1) > * _Tp(2 * __ll - 1)); > const _Tp __fact2 = std::sqrt(__rat1 * __rat2 * _Tp(2 * __ll + 1) > / _Tp(2 * __ll - 3)); > __y_lm = (__x * __y_mp1m * __fact1 > - (__ll + __m - 1) * __y_mm * __fact2) / _Tp(__ll - __m); > __y_mm = __y_mp1m; > __y_mp1m = __y_lm; > } > > return __y_lm; > } > } > } > } > > > > > > >} ># 54 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/modified_bessel_func.tcc" 1 3 ># 51 "/usr/include/c++/13/tr1/modified_bessel_func.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 65 "/usr/include/c++/13/tr1/modified_bessel_func.tcc" 3 > namespace __detail > { ># 83 "/usr/include/c++/13/tr1/modified_bessel_func.tcc" 3 > template <typename _Tp> > void > __bessel_ik(_Tp __nu, _Tp __x, > _Tp & __Inu, _Tp & __Knu, _Tp & __Ipnu, _Tp & __Kpnu) > { > if (__x == _Tp(0)) > { > if (__nu == _Tp(0)) > { > __Inu = _Tp(1); > __Ipnu = _Tp(0); > } > else if (__nu == _Tp(1)) > { > __Inu = _Tp(0); > __Ipnu = _Tp(0.5L); > } > else > { > __Inu = _Tp(0); > __Ipnu = _Tp(0); > } > __Knu = std::numeric_limits<_Tp>::infinity(); > __Kpnu = -std::numeric_limits<_Tp>::infinity(); > return; > } > > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > const _Tp __fp_min = _Tp(10) * std::numeric_limits<_Tp>::epsilon(); > const int __max_iter = 15000; > const _Tp __x_min = _Tp(2); > > const int __nl = static_cast<int>(__nu + _Tp(0.5L)); > > const _Tp __mu = __nu - __nl; > const _Tp __mu2 = __mu * __mu; > const _Tp __xi = _Tp(1) / __x; > const _Tp __xi2 = _Tp(2) * __xi; > _Tp __h = __nu * __xi; > if ( __h < __fp_min ) > __h = __fp_min; > _Tp __b = __xi2 * __nu; > _Tp __d = _Tp(0); > _Tp __c = __h; > int __i; > for ( __i = 1; __i <= __max_iter; ++__i ) > { > __b += __xi2; > __d = _Tp(1) / (__b + __d); > __c = __b + _Tp(1) / __c; > const _Tp __del = __c * __d; > __h *= __del; > if (std::abs(__del - _Tp(1)) < __eps) > break; > } > if (__i > __max_iter) > std::__throw_runtime_error(("Argument x too large " "in __bessel_ik; " "try asymptotic expansion.") > > ); > _Tp __Inul = __fp_min; > _Tp __Ipnul = __h * __Inul; > _Tp __Inul1 = __Inul; > _Tp __Ipnu1 = __Ipnul; > _Tp __fact = __nu * __xi; > for (int __l = __nl; __l >= 1; --__l) > { > const _Tp __Inutemp = __fact * __Inul + __Ipnul; > __fact -= __xi; > __Ipnul = __fact * __Inutemp + __Inul; > __Inul = __Inutemp; > } > _Tp __f = __Ipnul / __Inul; > _Tp __Kmu, __Knu1; > if (__x < __x_min) > { > const _Tp __x2 = __x / _Tp(2); > const _Tp __pimu = __numeric_constants<_Tp>::__pi() * __mu; > const _Tp __fact = (std::abs(__pimu) < __eps > ? _Tp(1) : __pimu / std::sin(__pimu)); > _Tp __d = -std::log(__x2); > _Tp __e = __mu * __d; > const _Tp __fact2 = (std::abs(__e) < __eps > ? _Tp(1) : std::sinh(__e) / __e); > _Tp __gam1, __gam2, __gampl, __gammi; > __gamma_temme(__mu, __gam1, __gam2, __gampl, __gammi); > _Tp __ff = __fact > * (__gam1 * std::cosh(__e) + __gam2 * __fact2 * __d); > _Tp __sum = __ff; > __e = std::exp(__e); > _Tp __p = __e / (_Tp(2) * __gampl); > _Tp __q = _Tp(1) / (_Tp(2) * __e * __gammi); > _Tp __c = _Tp(1); > __d = __x2 * __x2; > _Tp __sum1 = __p; > int __i; > for (__i = 1; __i <= __max_iter; ++__i) > { > __ff = (__i * __ff + __p + __q) / (__i * __i - __mu2); > __c *= __d / __i; > __p /= __i - __mu; > __q /= __i + __mu; > const _Tp __del = __c * __ff; > __sum += __del; > const _Tp __del1 = __c * (__p - __i * __ff); > __sum1 += __del1; > if (std::abs(__del) < __eps * std::abs(__sum)) > break; > } > if (__i > __max_iter) > std::__throw_runtime_error(("Bessel k series failed to converge " "in __bessel_ik.") > ); > __Kmu = __sum; > __Knu1 = __sum1 * __xi2; > } > else > { > _Tp __b = _Tp(2) * (_Tp(1) + __x); > _Tp __d = _Tp(1) / __b; > _Tp __delh = __d; > _Tp __h = __delh; > _Tp __q1 = _Tp(0); > _Tp __q2 = _Tp(1); > _Tp __a1 = _Tp(0.25L) - __mu2; > _Tp __q = __c = __a1; > _Tp __a = -__a1; > _Tp __s = _Tp(1) + __q * __delh; > int __i; > for (__i = 2; __i <= __max_iter; ++__i) > { > __a -= 2 * (__i - 1); > __c = -__a * __c / __i; > const _Tp __qnew = (__q1 - __b * __q2) / __a; > __q1 = __q2; > __q2 = __qnew; > __q += __c * __qnew; > __b += _Tp(2); > __d = _Tp(1) / (__b + __a * __d); > __delh = (__b * __d - _Tp(1)) * __delh; > __h += __delh; > const _Tp __dels = __q * __delh; > __s += __dels; > if ( std::abs(__dels / __s) < __eps ) > break; > } > if (__i > __max_iter) > std::__throw_runtime_error(("Steed's method failed " "in __bessel_ik.") > ); > __h = __a1 * __h; > __Kmu = std::sqrt(__numeric_constants<_Tp>::__pi() / (_Tp(2) * __x)) > * std::exp(-__x) / __s; > __Knu1 = __Kmu * (__mu + __x + _Tp(0.5L) - __h) * __xi; > } > > _Tp __Kpmu = __mu * __xi * __Kmu - __Knu1; > _Tp __Inumu = __xi / (__f * __Kmu - __Kpmu); > __Inu = __Inumu * __Inul1 / __Inul; > __Ipnu = __Inumu * __Ipnu1 / __Inul; > for ( __i = 1; __i <= __nl; ++__i ) > { > const _Tp __Knutemp = (__mu + __i) * __xi2 * __Knu1 + __Kmu; > __Kmu = __Knu1; > __Knu1 = __Knutemp; > } > __Knu = __Kmu; > __Kpnu = __nu * __xi * __Kmu - __Knu1; > > return; > } ># 267 "/usr/include/c++/13/tr1/modified_bessel_func.tcc" 3 > template<typename _Tp> > _Tp > __cyl_bessel_i(_Tp __nu, _Tp __x) > { > if (__nu < _Tp(0) || __x < _Tp(0)) > std::__throw_domain_error(("Bad argument " "in __cyl_bessel_i.") > ); > else if (__isnan(__nu) || __isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__x * __x < _Tp(10) * (__nu + _Tp(1))) > return __cyl_bessel_ij_series(__nu, __x, +_Tp(1), 200); > else > { > _Tp __I_nu, __K_nu, __Ip_nu, __Kp_nu; > __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); > return __I_nu; > } > } ># 303 "/usr/include/c++/13/tr1/modified_bessel_func.tcc" 3 > template<typename _Tp> > _Tp > __cyl_bessel_k(_Tp __nu, _Tp __x) > { > if (__nu < _Tp(0) || __x < _Tp(0)) > std::__throw_domain_error(("Bad argument " "in __cyl_bessel_k.") > ); > else if (__isnan(__nu) || __isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else > { > _Tp __I_nu, __K_nu, __Ip_nu, __Kp_nu; > __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); > return __K_nu; > } > } ># 337 "/usr/include/c++/13/tr1/modified_bessel_func.tcc" 3 > template <typename _Tp> > void > __sph_bessel_ik(unsigned int __n, _Tp __x, > _Tp & __i_n, _Tp & __k_n, _Tp & __ip_n, _Tp & __kp_n) > { > const _Tp __nu = _Tp(__n) + _Tp(0.5L); > > _Tp __I_nu, __Ip_nu, __K_nu, __Kp_nu; > __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); > > const _Tp __factor = __numeric_constants<_Tp>::__sqrtpio2() > / std::sqrt(__x); > > __i_n = __factor * __I_nu; > __k_n = __factor * __K_nu; > __ip_n = __factor * __Ip_nu - __i_n / (_Tp(2) * __x); > __kp_n = __factor * __Kp_nu - __k_n / (_Tp(2) * __x); > > return; > } ># 373 "/usr/include/c++/13/tr1/modified_bessel_func.tcc" 3 > template <typename _Tp> > void > __airy(_Tp __x, _Tp & __Ai, _Tp & __Bi, _Tp & __Aip, _Tp & __Bip) > { > const _Tp __absx = std::abs(__x); > const _Tp __rootx = std::sqrt(__absx); > const _Tp __z = _Tp(2) * __absx * __rootx / _Tp(3); > const _Tp _S_inf = std::numeric_limits<_Tp>::infinity(); > > if (__isnan(__x)) > __Bip = __Aip = __Bi = __Ai = std::numeric_limits<_Tp>::quiet_NaN(); > else if (__z == _S_inf) > { > __Aip = __Ai = _Tp(0); > __Bip = __Bi = _S_inf; > } > else if (__z == -_S_inf) > __Bip = __Aip = __Bi = __Ai = _Tp(0); > else if (__x > _Tp(0)) > { > _Tp __I_nu, __Ip_nu, __K_nu, __Kp_nu; > > __bessel_ik(_Tp(1) / _Tp(3), __z, __I_nu, __K_nu, __Ip_nu, __Kp_nu); > __Ai = __rootx * __K_nu > / (__numeric_constants<_Tp>::__sqrt3() > * __numeric_constants<_Tp>::__pi()); > __Bi = __rootx * (__K_nu / __numeric_constants<_Tp>::__pi() > + _Tp(2) * __I_nu / __numeric_constants<_Tp>::__sqrt3()); > > __bessel_ik(_Tp(2) / _Tp(3), __z, __I_nu, __K_nu, __Ip_nu, __Kp_nu); > __Aip = -__x * __K_nu > / (__numeric_constants<_Tp>::__sqrt3() > * __numeric_constants<_Tp>::__pi()); > __Bip = __x * (__K_nu / __numeric_constants<_Tp>::__pi() > + _Tp(2) * __I_nu > / __numeric_constants<_Tp>::__sqrt3()); > } > else if (__x < _Tp(0)) > { > _Tp __J_nu, __Jp_nu, __N_nu, __Np_nu; > > __bessel_jn(_Tp(1) / _Tp(3), __z, __J_nu, __N_nu, __Jp_nu, __Np_nu); > __Ai = __rootx * (__J_nu > - __N_nu / __numeric_constants<_Tp>::__sqrt3()) / _Tp(2); > __Bi = -__rootx * (__N_nu > + __J_nu / __numeric_constants<_Tp>::__sqrt3()) / _Tp(2); > > __bessel_jn(_Tp(2) / _Tp(3), __z, __J_nu, __N_nu, __Jp_nu, __Np_nu); > __Aip = __absx * (__N_nu / __numeric_constants<_Tp>::__sqrt3() > + __J_nu) / _Tp(2); > __Bip = __absx * (__J_nu / __numeric_constants<_Tp>::__sqrt3() > - __N_nu) / _Tp(2); > } > else > { > > > > __Ai = _Tp(0.35502805388781723926L); > __Bi = __Ai * __numeric_constants<_Tp>::__sqrt3(); > > > > > __Aip = -_Tp(0.25881940379280679840L); > __Bip = -__Aip * __numeric_constants<_Tp>::__sqrt3(); > } > > return; > } > } > > > > > >} ># 55 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/poly_hermite.tcc" 1 3 ># 42 "/usr/include/c++/13/tr1/poly_hermite.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 56 "/usr/include/c++/13/tr1/poly_hermite.tcc" 3 > namespace __detail > { ># 72 "/usr/include/c++/13/tr1/poly_hermite.tcc" 3 > template<typename _Tp> > _Tp > __poly_hermite_recursion(unsigned int __n, _Tp __x) > { > > _Tp __H_0 = 1; > if (__n == 0) > return __H_0; > > > _Tp __H_1 = 2 * __x; > if (__n == 1) > return __H_1; > > > _Tp __H_n, __H_nm1, __H_nm2; > unsigned int __i; > for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i) > { > __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2); > __H_nm2 = __H_nm1; > __H_nm1 = __H_n; > } > > return __H_n; > } ># 114 "/usr/include/c++/13/tr1/poly_hermite.tcc" 3 > template<typename _Tp> > inline _Tp > __poly_hermite(unsigned int __n, _Tp __x) > { > if (__isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else > return __poly_hermite_recursion(__n, __x); > } > } > > > > > >} ># 56 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 1 3 ># 44 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 60 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 3 > namespace __detail > { ># 75 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 3 > template<typename _Tpa, typename _Tp> > _Tp > __poly_laguerre_large_n(unsigned __n, _Tpa __alpha1, _Tp __x) > { > const _Tp __a = -_Tp(__n); > const _Tp __b = _Tp(__alpha1) + _Tp(1); > const _Tp __eta = _Tp(2) * __b - _Tp(4) * __a; > const _Tp __cos2th = __x / __eta; > const _Tp __sin2th = _Tp(1) - __cos2th; > const _Tp __th = std::acos(std::sqrt(__cos2th)); > const _Tp __pre_h = __numeric_constants<_Tp>::__pi_2() > * __numeric_constants<_Tp>::__pi_2() > * __eta * __eta * __cos2th * __sin2th; > > > const _Tp __lg_b = ::std::lgamma(_Tp(__n) + __b); > const _Tp __lnfact = ::std::lgamma(_Tp(__n + 1)); > > > > > > _Tp __pre_term1 = _Tp(0.5L) * (_Tp(1) - __b) > * std::log(_Tp(0.25L) * __x * __eta); > _Tp __pre_term2 = _Tp(0.25L) * std::log(__pre_h); > _Tp __lnpre = __lg_b - __lnfact + _Tp(0.5L) * __x > + __pre_term1 - __pre_term2; > _Tp __ser_term1 = std::sin(__a * __numeric_constants<_Tp>::__pi()); > _Tp __ser_term2 = std::sin(_Tp(0.25L) * __eta > * (_Tp(2) * __th > - std::sin(_Tp(2) * __th)) > + __numeric_constants<_Tp>::__pi_4()); > _Tp __ser = __ser_term1 + __ser_term2; > > return std::exp(__lnpre) * __ser; > } ># 129 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 3 > template<typename _Tpa, typename _Tp> > _Tp > __poly_laguerre_hyperg(unsigned int __n, _Tpa __alpha1, _Tp __x) > { > const _Tp __b = _Tp(__alpha1) + _Tp(1); > const _Tp __mx = -__x; > const _Tp __tc_sgn = (__x < _Tp(0) ? _Tp(1) > : ((__n % 2 == 1) ? -_Tp(1) : _Tp(1))); > > _Tp __tc = _Tp(1); > const _Tp __ax = std::abs(__x); > for (unsigned int __k = 1; __k <= __n; ++__k) > __tc *= (__ax / __k); > > _Tp __term = __tc * __tc_sgn; > _Tp __sum = __term; > for (int __k = int(__n) - 1; __k >= 0; --__k) > { > __term *= ((__b + _Tp(__k)) / _Tp(int(__n) - __k)) > * _Tp(__k + 1) / __mx; > __sum += __term; > } > > return __sum; > } ># 185 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 3 > template<typename _Tpa, typename _Tp> > _Tp > __poly_laguerre_recursion(unsigned int __n, _Tpa __alpha1, _Tp __x) > { > > _Tp __l_0 = _Tp(1); > if (__n == 0) > return __l_0; > > > _Tp __l_1 = -__x + _Tp(1) + _Tp(__alpha1); > if (__n == 1) > return __l_1; > > > _Tp __l_n2 = __l_0; > _Tp __l_n1 = __l_1; > _Tp __l_n = _Tp(0); > for (unsigned int __nn = 2; __nn <= __n; ++__nn) > { > __l_n = (_Tp(2 * __nn - 1) + _Tp(__alpha1) - __x) > * __l_n1 / _Tp(__nn) > - (_Tp(__nn - 1) + _Tp(__alpha1)) * __l_n2 / _Tp(__nn); > __l_n2 = __l_n1; > __l_n1 = __l_n; > } > > return __l_n; > } ># 244 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 3 > template<typename _Tpa, typename _Tp> > _Tp > __poly_laguerre(unsigned int __n, _Tpa __alpha1, _Tp __x) > { > if (__x < _Tp(0)) > std::__throw_domain_error(("Negative argument " "in __poly_laguerre.") > ); > > else if (__isnan(__x)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__n == 0) > return _Tp(1); > else if (__n == 1) > return _Tp(1) + _Tp(__alpha1) - __x; > else if (__x == _Tp(0)) > { > _Tp __prod = _Tp(__alpha1) + _Tp(1); > for (unsigned int __k = 2; __k <= __n; ++__k) > __prod *= (_Tp(__alpha1) + _Tp(__k)) / _Tp(__k); > return __prod; > } > else if (__n > 10000000 && _Tp(__alpha1) > -_Tp(1) > && __x < _Tp(2) * (_Tp(__alpha1) + _Tp(1)) + _Tp(4 * __n)) > return __poly_laguerre_large_n(__n, __alpha1, __x); > else if (_Tp(__alpha1) >= _Tp(0) > || (__x > _Tp(0) && _Tp(__alpha1) < -_Tp(__n + 1))) > return __poly_laguerre_recursion(__n, __alpha1, __x); > else > return __poly_laguerre_hyperg(__n, __alpha1, __x); > } ># 296 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 3 > template<typename _Tp> > inline _Tp > __assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x) > { return __poly_laguerre<unsigned int, _Tp>(__n, __m, __x); } ># 316 "/usr/include/c++/13/tr1/poly_laguerre.tcc" 3 > template<typename _Tp> > inline _Tp > __laguerre(unsigned int __n, _Tp __x) > { return __poly_laguerre<unsigned int, _Tp>(__n, 0, __x); } > } > > > > > > >} ># 57 "/usr/include/c++/13/bits/specfun.h" 2 3 ># 1 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 1 3 ># 47 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 63 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 > namespace __detail > { ># 78 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 > template<typename _Tp> > _Tp > __riemann_zeta_sum(_Tp __s) > { > > if (__s < _Tp(1)) > std::__throw_domain_error(("Bad argument in zeta sum.")); > > const unsigned int max_iter = 10000; > _Tp __zeta = _Tp(0); > for (unsigned int __k = 1; __k < max_iter; ++__k) > { > _Tp __term = std::pow(static_cast<_Tp>(__k), -__s); > if (__term < std::numeric_limits<_Tp>::epsilon()) > { > break; > } > __zeta += __term; > } > > return __zeta; > } ># 115 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 > template<typename _Tp> > _Tp > __riemann_zeta_alt(_Tp __s) > { > _Tp __sgn = _Tp(1); > _Tp __zeta = _Tp(0); > for (unsigned int __i = 1; __i < 10000000; ++__i) > { > _Tp __term = __sgn / std::pow(__i, __s); > if (std::abs(__term) < std::numeric_limits<_Tp>::epsilon()) > break; > __zeta += __term; > __sgn *= _Tp(-1); > } > __zeta /= _Tp(1) - std::pow(_Tp(2), _Tp(1) - __s); > > return __zeta; > } ># 157 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 > template<typename _Tp> > _Tp > __riemann_zeta_glob(_Tp __s) > { > _Tp __zeta = _Tp(0); > > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > > const _Tp __max_bincoeff = std::numeric_limits<_Tp>::max_exponent10 > * std::log(_Tp(10)) - _Tp(1); > > > > if (__s < _Tp(0)) > { > > if (::std::fmod(__s,_Tp(2)) == _Tp(0)) > return _Tp(0); > else > > { > _Tp __zeta = __riemann_zeta_glob(_Tp(1) - __s); > __zeta *= std::pow(_Tp(2) > * __numeric_constants<_Tp>::__pi(), __s) > * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) > > * std::exp(::std::lgamma(_Tp(1) - __s)) > > > > / __numeric_constants<_Tp>::__pi(); > return __zeta; > } > } > > _Tp __num = _Tp(0.5L); > const unsigned int __maxit = 10000; > for (unsigned int __i = 0; __i < __maxit; ++__i) > { > bool __punt = false; > _Tp __sgn = _Tp(1); > _Tp __term = _Tp(0); > for (unsigned int __j = 0; __j <= __i; ++__j) > { > > _Tp __bincoeff = ::std::lgamma(_Tp(1 + __i)) > - ::std::lgamma(_Tp(1 + __j)) > - ::std::lgamma(_Tp(1 + __i - __j)); > > > > > > if (__bincoeff > __max_bincoeff) > { > > __punt = true; > break; > } > __bincoeff = std::exp(__bincoeff); > __term += __sgn * __bincoeff * std::pow(_Tp(1 + __j), -__s); > __sgn *= _Tp(-1); > } > if (__punt) > break; > __term *= __num; > __zeta += __term; > if (std::abs(__term/__zeta) < __eps) > break; > __num *= _Tp(0.5L); > } > > __zeta /= _Tp(1) - std::pow(_Tp(2), _Tp(1) - __s); > > return __zeta; > } ># 252 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 > template<typename _Tp> > _Tp > __riemann_zeta_product(_Tp __s) > { > static const _Tp __prime[] = { > _Tp(2), _Tp(3), _Tp(5), _Tp(7), _Tp(11), _Tp(13), _Tp(17), _Tp(19), > _Tp(23), _Tp(29), _Tp(31), _Tp(37), _Tp(41), _Tp(43), _Tp(47), > _Tp(53), _Tp(59), _Tp(61), _Tp(67), _Tp(71), _Tp(73), _Tp(79), > _Tp(83), _Tp(89), _Tp(97), _Tp(101), _Tp(103), _Tp(107), _Tp(109) > }; > static const unsigned int __num_primes = sizeof(__prime) / sizeof(_Tp); > > _Tp __zeta = _Tp(1); > for (unsigned int __i = 0; __i < __num_primes; ++__i) > { > const _Tp __fact = _Tp(1) - std::pow(__prime[__i], -__s); > __zeta *= __fact; > if (_Tp(1) - __fact < std::numeric_limits<_Tp>::epsilon()) > break; > } > > __zeta = _Tp(1) / __zeta; > > return __zeta; > } ># 293 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 > template<typename _Tp> > _Tp > __riemann_zeta(_Tp __s) > { > if (__isnan(__s)) > return std::numeric_limits<_Tp>::quiet_NaN(); > else if (__s == _Tp(1)) > return std::numeric_limits<_Tp>::infinity(); > else if (__s < -_Tp(19)) > { > _Tp __zeta = __riemann_zeta_product(_Tp(1) - __s); > __zeta *= std::pow(_Tp(2) * __numeric_constants<_Tp>::__pi(), __s) > * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) > > * std::exp(::std::lgamma(_Tp(1) - __s)) > > > > / __numeric_constants<_Tp>::__pi(); > return __zeta; > } > else if (__s < _Tp(20)) > { > > bool __glob = true; > if (__glob) > return __riemann_zeta_glob(__s); > else > { > if (__s > _Tp(1)) > return __riemann_zeta_sum(__s); > else > { > _Tp __zeta = std::pow(_Tp(2) > * __numeric_constants<_Tp>::__pi(), __s) > * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) > > * ::std::tgamma(_Tp(1) - __s) > > > > * __riemann_zeta_sum(_Tp(1) - __s); > return __zeta; > } > } > } > else > return __riemann_zeta_product(__s); > } ># 365 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 > template<typename _Tp> > _Tp > __hurwitz_zeta_glob(_Tp __a, _Tp __s) > { > _Tp __zeta = _Tp(0); > > const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); > > const _Tp __max_bincoeff = std::numeric_limits<_Tp>::max_exponent10 > * std::log(_Tp(10)) - _Tp(1); > > const unsigned int __maxit = 10000; > for (unsigned int __i = 0; __i < __maxit; ++__i) > { > bool __punt = false; > _Tp __sgn = _Tp(1); > _Tp __term = _Tp(0); > for (unsigned int __j = 0; __j <= __i; ++__j) > { > > _Tp __bincoeff = ::std::lgamma(_Tp(1 + __i)) > - ::std::lgamma(_Tp(1 + __j)) > - ::std::lgamma(_Tp(1 + __i - __j)); > > > > > > if (__bincoeff > __max_bincoeff) > { > > __punt = true; > break; > } > __bincoeff = std::exp(__bincoeff); > __term += __sgn * __bincoeff * std::pow(_Tp(__a + __j), -__s); > __sgn *= _Tp(-1); > } > if (__punt) > break; > __term /= _Tp(__i + 1); > if (std::abs(__term / __zeta) < __eps) > break; > __zeta += __term; > } > > __zeta /= __s - _Tp(1); > > return __zeta; > } ># 430 "/usr/include/c++/13/tr1/riemann_zeta.tcc" 3 > template<typename _Tp> > inline _Tp > __hurwitz_zeta(_Tp __a, _Tp __s) > { return __hurwitz_zeta_glob(__a, __s); } > } > > > > > > >} ># 58 "/usr/include/c++/13/bits/specfun.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 203 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > assoc_laguerref(unsigned int __n, unsigned int __m, float __x) > { return __detail::__assoc_laguerre<float>(__n, __m, __x); } > > > > > > > > inline long double > assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x) > { return __detail::__assoc_laguerre<long double>(__n, __m, __x); } ># 248 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__assoc_laguerre<__type>(__n, __m, __x); > } ># 264 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > assoc_legendref(unsigned int __l, unsigned int __m, float __x) > { return __detail::__assoc_legendre_p<float>(__l, __m, __x); } > > > > > > > inline long double > assoc_legendrel(unsigned int __l, unsigned int __m, long double __x) > { return __detail::__assoc_legendre_p<long double>(__l, __m, __x); } ># 294 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__assoc_legendre_p<__type>(__l, __m, __x); > } ># 309 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > betaf(float __a, float __b) > { return __detail::__beta<float>(__a, __b); } > > > > > > > > inline long double > betal(long double __a, long double __b) > { return __detail::__beta<long double>(__a, __b); } ># 339 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tpa, typename _Tpb> > inline typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type > beta(_Tpa __a, _Tpb __b) > { > typedef typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type __type; > return __detail::__beta<__type>(__a, __b); > } ># 355 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > comp_ellint_1f(float __k) > { return __detail::__comp_ellint_1<float>(__k); } > > > > > > > > inline long double > comp_ellint_1l(long double __k) > { return __detail::__comp_ellint_1<long double>(__k); } ># 387 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > comp_ellint_1(_Tp __k) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__comp_ellint_1<__type>(__k); > } ># 403 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > comp_ellint_2f(float __k) > { return __detail::__comp_ellint_2<float>(__k); } > > > > > > > > inline long double > comp_ellint_2l(long double __k) > { return __detail::__comp_ellint_2<long double>(__k); } ># 434 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > comp_ellint_2(_Tp __k) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__comp_ellint_2<__type>(__k); > } ># 450 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > comp_ellint_3f(float __k, float __nu) > { return __detail::__comp_ellint_3<float>(__k, __nu); } > > > > > > > > inline long double > comp_ellint_3l(long double __k, long double __nu) > { return __detail::__comp_ellint_3<long double>(__k, __nu); } ># 485 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp, typename _Tpn> > inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type > comp_ellint_3(_Tp __k, _Tpn __nu) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type; > return __detail::__comp_ellint_3<__type>(__k, __nu); > } ># 501 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > cyl_bessel_if(float __nu, float __x) > { return __detail::__cyl_bessel_i<float>(__nu, __x); } > > > > > > > > inline long double > cyl_bessel_il(long double __nu, long double __x) > { return __detail::__cyl_bessel_i<long double>(__nu, __x); } ># 531 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tpnu, typename _Tp> > inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type > cyl_bessel_i(_Tpnu __nu, _Tp __x) > { > typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; > return __detail::__cyl_bessel_i<__type>(__nu, __x); > } ># 547 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > cyl_bessel_jf(float __nu, float __x) > { return __detail::__cyl_bessel_j<float>(__nu, __x); } > > > > > > > > inline long double > cyl_bessel_jl(long double __nu, long double __x) > { return __detail::__cyl_bessel_j<long double>(__nu, __x); } ># 577 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tpnu, typename _Tp> > inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type > cyl_bessel_j(_Tpnu __nu, _Tp __x) > { > typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; > return __detail::__cyl_bessel_j<__type>(__nu, __x); > } ># 593 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > cyl_bessel_kf(float __nu, float __x) > { return __detail::__cyl_bessel_k<float>(__nu, __x); } > > > > > > > > inline long double > cyl_bessel_kl(long double __nu, long double __x) > { return __detail::__cyl_bessel_k<long double>(__nu, __x); } ># 629 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tpnu, typename _Tp> > inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type > cyl_bessel_k(_Tpnu __nu, _Tp __x) > { > typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; > return __detail::__cyl_bessel_k<__type>(__nu, __x); > } ># 645 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > cyl_neumannf(float __nu, float __x) > { return __detail::__cyl_neumann_n<float>(__nu, __x); } > > > > > > > > inline long double > cyl_neumannl(long double __nu, long double __x) > { return __detail::__cyl_neumann_n<long double>(__nu, __x); } ># 677 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tpnu, typename _Tp> > inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type > cyl_neumann(_Tpnu __nu, _Tp __x) > { > typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; > return __detail::__cyl_neumann_n<__type>(__nu, __x); > } ># 693 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > ellint_1f(float __k, float __phi) > { return __detail::__ellint_1<float>(__k, __phi); } > > > > > > > > inline long double > ellint_1l(long double __k, long double __phi) > { return __detail::__ellint_1<long double>(__k, __phi); } ># 725 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp, typename _Tpp> > inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type > ellint_1(_Tp __k, _Tpp __phi) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type; > return __detail::__ellint_1<__type>(__k, __phi); > } ># 741 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > ellint_2f(float __k, float __phi) > { return __detail::__ellint_2<float>(__k, __phi); } > > > > > > > > inline long double > ellint_2l(long double __k, long double __phi) > { return __detail::__ellint_2<long double>(__k, __phi); } ># 773 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp, typename _Tpp> > inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type > ellint_2(_Tp __k, _Tpp __phi) > { > typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type; > return __detail::__ellint_2<__type>(__k, __phi); > } ># 789 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > ellint_3f(float __k, float __nu, float __phi) > { return __detail::__ellint_3<float>(__k, __nu, __phi); } > > > > > > > > inline long double > ellint_3l(long double __k, long double __nu, long double __phi) > { return __detail::__ellint_3<long double>(__k, __nu, __phi); } ># 826 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp, typename _Tpn, typename _Tpp> > inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type > ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi) > { > typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type; > return __detail::__ellint_3<__type>(__k, __nu, __phi); > } ># 841 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > expintf(float __x) > { return __detail::__expint<float>(__x); } > > > > > > > > inline long double > expintl(long double __x) > { return __detail::__expint<long double>(__x); } ># 866 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > expint(_Tp __x) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__expint<__type>(__x); > } ># 882 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > hermitef(unsigned int __n, float __x) > { return __detail::__poly_hermite<float>(__n, __x); } > > > > > > > > inline long double > hermitel(unsigned int __n, long double __x) > { return __detail::__poly_hermite<long double>(__n, __x); } ># 914 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > hermite(unsigned int __n, _Tp __x) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__poly_hermite<__type>(__n, __x); > } ># 930 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > laguerref(unsigned int __n, float __x) > { return __detail::__laguerre<float>(__n, __x); } > > > > > > > > inline long double > laguerrel(unsigned int __n, long double __x) > { return __detail::__laguerre<long double>(__n, __x); } ># 958 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > laguerre(unsigned int __n, _Tp __x) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__laguerre<__type>(__n, __x); > } ># 974 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > legendref(unsigned int __l, float __x) > { return __detail::__poly_legendre_p<float>(__l, __x); } > > > > > > > > inline long double > legendrel(unsigned int __l, long double __x) > { return __detail::__poly_legendre_p<long double>(__l, __x); } ># 1003 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > legendre(unsigned int __l, _Tp __x) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__poly_legendre_p<__type>(__l, __x); > } ># 1019 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > riemann_zetaf(float __s) > { return __detail::__riemann_zeta<float>(__s); } > > > > > > > > inline long double > riemann_zetal(long double __s) > { return __detail::__riemann_zeta<long double>(__s); } ># 1054 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > riemann_zeta(_Tp __s) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__riemann_zeta<__type>(__s); > } ># 1070 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > sph_besself(unsigned int __n, float __x) > { return __detail::__sph_bessel<float>(__n, __x); } > > > > > > > > inline long double > sph_bessell(unsigned int __n, long double __x) > { return __detail::__sph_bessel<long double>(__n, __x); } ># 1098 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > sph_bessel(unsigned int __n, _Tp __x) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__sph_bessel<__type>(__n, __x); > } ># 1114 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > sph_legendref(unsigned int __l, unsigned int __m, float __theta) > { return __detail::__sph_legendre<float>(__l, __m, __theta); } ># 1125 "/usr/include/c++/13/bits/specfun.h" 3 > inline long double > sph_legendrel(unsigned int __l, unsigned int __m, long double __theta) > { return __detail::__sph_legendre<long double>(__l, __m, __theta); } ># 1145 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__sph_legendre<__type>(__l, __m, __theta); > } ># 1161 "/usr/include/c++/13/bits/specfun.h" 3 > inline float > sph_neumannf(unsigned int __n, float __x) > { return __detail::__sph_neumann<float>(__n, __x); } > > > > > > > > inline long double > sph_neumannl(unsigned int __n, long double __x) > { return __detail::__sph_neumann<long double>(__n, __x); } ># 1189 "/usr/include/c++/13/bits/specfun.h" 3 > template<typename _Tp> > inline typename __gnu_cxx::__promote<_Tp>::__type > sph_neumann(unsigned int __n, _Tp __x) > { > typedef typename __gnu_cxx::__promote<_Tp>::__type __type; > return __detail::__sph_neumann<__type>(__n, __x); > } > > > > >} ># 3717 "/usr/include/c++/13/cmath" 2 3 > > >} ># 40 "/usr/include/c++/13/valarray" 2 3 > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<class _Clos, typename _Tp> > class _Expr; > > template<typename _Tp1, typename _Tp2> > class _ValArray; > >namespace __detail >{ > template<class _Oper, template<class, class> class _Meta, class _Dom> > struct _UnClos; > > template<class _Oper, > template<class, class> class _Meta1, > template<class, class> class _Meta2, > class _Dom1, class _Dom2> > class _BinClos; > > template<template<class, class> class _Meta, class _Dom> > class _SClos; > > template<template<class, class> class _Meta, class _Dom> > class _GClos; > > template<template<class, class> class _Meta, class _Dom> > class _IClos; > > template<template<class, class> class _Meta, class _Dom> > class _ValFunClos; > > template<template<class, class> class _Meta, class _Dom> > class _RefFunClos; >} > > using __detail::_UnClos; > using __detail::_BinClos; > using __detail::_SClos; > using __detail::_GClos; > using __detail::_IClos; > using __detail::_ValFunClos; > using __detail::_RefFunClos; > > template<class _Tp> class valarray; > class slice; > template<class _Tp> class slice_array; > class gslice; > template<class _Tp> class gslice_array; > template<class _Tp> class mask_array; > template<class _Tp> class indirect_array; > > >} > ># 1 "/usr/include/c++/13/bits/valarray_array.h" 1 3 ># 35 "/usr/include/c++/13/bits/valarray_array.h" 3 > ># 36 "/usr/include/c++/13/bits/valarray_array.h" 3 > > > ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 40 "/usr/include/c++/13/bits/valarray_array.h" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > template<typename _Tp> > _Tp* > __valarray_get_storage(size_t) __attribute__((__malloc__)); > > template<typename _Tp> > inline _Tp* > __valarray_get_storage(size_t __n) > { return static_cast<_Tp*>(operator new(__n * sizeof(_Tp))); } > > > inline void > __valarray_release_memory(void* __p) > { operator delete(__p); } > > > > template<typename _Tp, bool> > struct _Array_default_ctor > { > > > inline static void > _S_do_it(_Tp* __b, _Tp* __e) > { > while (__b != __e) > new(__b++) _Tp(); > } > }; > > template<typename _Tp> > struct _Array_default_ctor<_Tp, true> > { > > inline static void > _S_do_it(_Tp* __b, _Tp* __e) > { __builtin_memset(__b, 0, (__e - __b) * sizeof(_Tp)); } > }; > > template<typename _Tp> > inline void > __valarray_default_construct(_Tp* __b, _Tp* __e) > { > _Array_default_ctor<_Tp, __is_scalar<_Tp>::__value>::_S_do_it(__b, __e); > } > > > > > template<typename _Tp, bool> > struct _Array_init_ctor > { > > > inline static void > _S_do_it(_Tp* __b, _Tp* __e, const _Tp __t) > { > while (__b != __e) > new(__b++) _Tp(__t); > } > }; > > template<typename _Tp> > struct _Array_init_ctor<_Tp, true> > { > inline static void > _S_do_it(_Tp* __b, _Tp* __e, const _Tp __t) > { > while (__b != __e) > *__b++ = __t; > } > }; > > template<typename _Tp> > inline void > __valarray_fill_construct(_Tp* __b, _Tp* __e, const _Tp __t) > { > _Array_init_ctor<_Tp, __is_trivial(_Tp)>::_S_do_it(__b, __e, __t); > } > > > > > > template<typename _Tp, bool> > struct _Array_copy_ctor > { > > > inline static void > _S_do_it(const _Tp* __b, const _Tp* __e, _Tp* __restrict__ __o) > { > while (__b != __e) > new(__o++) _Tp(*__b++); > } > }; > > template<typename _Tp> > struct _Array_copy_ctor<_Tp, true> > { > inline static void > _S_do_it(const _Tp* __b, const _Tp* __e, _Tp* __restrict__ __o) > { > if (__b) > __builtin_memcpy(__o, __b, (__e - __b) * sizeof(_Tp)); > } > }; > > template<typename _Tp> > inline void > __valarray_copy_construct(const _Tp* __b, const _Tp* __e, > _Tp* __restrict__ __o) > { > _Array_copy_ctor<_Tp, __is_trivial(_Tp)>::_S_do_it(__b, __e, __o); > } > > > template<typename _Tp> > inline void > __valarray_copy_construct (const _Tp* __restrict__ __a, size_t __n, > size_t __s, _Tp* __restrict__ __o) > { > if (__is_trivial(_Tp)) > while (__n--) > { > *__o++ = *__a; > __a += __s; > } > else > while (__n--) > { > new(__o++) _Tp(*__a); > __a += __s; > } > } > > > template<typename _Tp> > inline void > __valarray_copy_construct (const _Tp* __restrict__ __a, > const size_t* __restrict__ __i, > _Tp* __restrict__ __o, size_t __n) > { > if (__is_trivial(_Tp)) > while (__n--) > *__o++ = __a[*__i++]; > else > while (__n--) > new (__o++) _Tp(__a[*__i++]); > } > > > template<typename _Tp> > inline void > __valarray_destroy_elements(_Tp* __b, _Tp* __e) > { > if (!__is_trivial(_Tp)) > while (__b != __e) > { > __b->~_Tp(); > ++__b; > } > } > > > template<typename _Tp> > inline void > __valarray_fill(_Tp* __restrict__ __a, size_t __n, const _Tp& __t) > { > while (__n--) > *__a++ = __t; > } > > > template<typename _Tp> > inline void > __valarray_fill(_Tp* __restrict__ __a, size_t __n, > size_t __s, const _Tp& __t) > { > for (size_t __i = 0; __i < __n; ++__i, __a += __s) > *__a = __t; > } > > > template<typename _Tp> > inline void > __valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i, > size_t __n, const _Tp& __t) > { > for (size_t __j = 0; __j < __n; ++__j, ++__i) > __a[*__i] = __t; > } > > > > template<typename _Tp, bool> > struct _Array_copier > { > inline static void > _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b) > { > while(__n--) > *__b++ = *__a++; > } > }; > > template<typename _Tp> > struct _Array_copier<_Tp, true> > { > inline static void > _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b) > { > if (__n != 0) > __builtin_memcpy(__b, __a, __n * sizeof (_Tp)); > } > }; > > > template<typename _Tp> > inline void > __valarray_copy(const _Tp* __restrict__ __a, size_t __n, > _Tp* __restrict__ __b) > { > _Array_copier<_Tp, __is_trivial(_Tp)>::_S_do_it(__a, __n, __b); > } > > > template<typename _Tp> > inline void > __valarray_copy(const _Tp* __restrict__ __a, size_t __n, size_t __s, > _Tp* __restrict__ __b) > { > for (size_t __i = 0; __i < __n; ++__i, ++__b, __a += __s) > *__b = *__a; > } > > > template<typename _Tp> > inline void > __valarray_copy(const _Tp* __restrict__ __a, _Tp* __restrict__ __b, > size_t __n, size_t __s) > { > for (size_t __i = 0; __i < __n; ++__i, ++__a, __b += __s) > *__b = *__a; > } > > > > template<typename _Tp> > inline void > __valarray_copy(const _Tp* __restrict__ __src, size_t __n, size_t __s1, > _Tp* __restrict__ __dst, size_t __s2) > { > for (size_t __i = 0; __i < __n; ++__i) > __dst[__i * __s2] = __src[__i * __s1]; > } > > > template<typename _Tp> > inline void > __valarray_copy(const _Tp* __restrict__ __a, > const size_t* __restrict__ __i, > _Tp* __restrict__ __b, size_t __n) > { > for (size_t __j = 0; __j < __n; ++__j, ++__b, ++__i) > *__b = __a[*__i]; > } > > > template<typename _Tp> > inline void > __valarray_copy(const _Tp* __restrict__ __a, size_t __n, > _Tp* __restrict__ __b, const size_t* __restrict__ __i) > { > for (size_t __j = 0; __j < __n; ++__j, ++__a, ++__i) > __b[*__i] = *__a; > } > > > > template<typename _Tp> > inline void > __valarray_copy(const _Tp* __restrict__ __src, size_t __n, > const size_t* __restrict__ __i, > _Tp* __restrict__ __dst, const size_t* __restrict__ __j) > { > for (size_t __k = 0; __k < __n; ++__k) > __dst[*__j++] = __src[*__i++]; > } > > > > > > > > template<typename _Tp> > inline _Tp > __valarray_sum(const _Tp* __f, const _Tp* __l) > { > _Tp __r = *__f++; > while (__f != __l) > __r += *__f++; > return __r; > } > > > template<typename _Ta> > inline typename _Ta::value_type > __valarray_min(const _Ta& __a) > { > size_t __s = __a.size(); > typedef typename _Ta::value_type _Value_type; > _Value_type __r = __s == 0 ? _Value_type() : __a[0]; > for (size_t __i = 1; __i < __s; ++__i) > { > _Value_type __t = __a[__i]; > if (__t < __r) > __r = __t; > } > return __r; > } > > template<typename _Ta> > inline typename _Ta::value_type > __valarray_max(const _Ta& __a) > { > size_t __s = __a.size(); > typedef typename _Ta::value_type _Value_type; > _Value_type __r = __s == 0 ? _Value_type() : __a[0]; > for (size_t __i = 1; __i < __s; ++__i) > { > _Value_type __t = __a[__i]; > if (__t > __r) > __r = __t; > } > return __r; > } > > > > > > > > template<typename _Tp> > struct _Array > { > explicit _Array(_Tp* const __restrict__); > explicit _Array(const valarray<_Tp>&); > _Array(const _Tp* __restrict__, size_t); > > _Tp* begin() const; > > _Tp* const __restrict__ _M_data; > }; > > > > template<typename _Tp> > inline void > __valarray_copy_construct(_Array<_Tp> __a, _Array<size_t> __i, > _Array<_Tp> __b, size_t __n) > { std::__valarray_copy_construct(__a._M_data, __i._M_data, > __b._M_data, __n); } > > > template<typename _Tp> > inline void > __valarray_copy_construct(_Array<_Tp> __a, size_t __n, size_t __s, > _Array<_Tp> __b) > { std::__valarray_copy_construct(__a._M_data, __n, __s, __b._M_data); } > > template<typename _Tp> > inline void > __valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t) > { std::__valarray_fill(__a._M_data, __n, __t); } > > template<typename _Tp> > inline void > __valarray_fill(_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t) > { std::__valarray_fill(__a._M_data, __n, __s, __t); } > > template<typename _Tp> > inline void > __valarray_fill(_Array<_Tp> __a, _Array<size_t> __i, > size_t __n, const _Tp& __t) > { std::__valarray_fill(__a._M_data, __i._M_data, __n, __t); } > > > template<typename _Tp> > inline void > __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) > { std::__valarray_copy(__a._M_data, __n, __b._M_data); } > > > template<typename _Tp> > inline void > __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) > { std::__valarray_copy(__a._M_data, __n, __s, __b._M_data); } > > > template<typename _Tp> > inline void > __valarray_copy(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) > { __valarray_copy(__a._M_data, __b._M_data, __n, __s); } > > > > template<typename _Tp> > inline void > __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s1, > _Array<_Tp> __b, size_t __s2) > { std::__valarray_copy(__a._M_data, __n, __s1, __b._M_data, __s2); } > > > template<typename _Tp> > inline void > __valarray_copy(_Array<_Tp> __a, _Array<size_t> __i, > _Array<_Tp> __b, size_t __n) > { std::__valarray_copy(__a._M_data, __i._M_data, __b._M_data, __n); } > > > template<typename _Tp> > inline void > __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, > _Array<size_t> __i) > { std::__valarray_copy(__a._M_data, __n, __b._M_data, __i._M_data); } > > > > template<typename _Tp> > inline void > __valarray_copy(_Array<_Tp> __src, size_t __n, _Array<size_t> __i, > _Array<_Tp> __dst, _Array<size_t> __j) > { > std::__valarray_copy(__src._M_data, __n, __i._M_data, > __dst._M_data, __j._M_data); > } > > template<typename _Tp> > inline > _Array<_Tp>::_Array(_Tp* const __restrict__ __p) > : _M_data (__p) {} > > template<typename _Tp> > inline > _Array<_Tp>::_Array(const valarray<_Tp>& __v) > : _M_data (__v._M_data) {} > > template<typename _Tp> > inline > _Array<_Tp>::_Array(const _Tp* __restrict__ __b, size_t __s) > : _M_data(__valarray_get_storage<_Tp>(__s)) > { std::__valarray_copy_construct(__b, __s, _M_data); } > > template<typename _Tp> > inline _Tp* > _Array<_Tp>::begin () const > { return _M_data; } ># 659 "/usr/include/c++/13/bits/valarray_array.h" 3 > template<typename _Tp> inline void _Array_augmented___plus(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p += __t; } template<typename _Tp> inline void _Array_augmented___plus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p += *__q; } template<typename _Tp, class _Dom> void _Array_augmented___plus(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p += __e[__i]; } template<typename _Tp> inline void _Array_augmented___plus(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p += *__q; } template<typename _Tp> inline void _Array_augmented___plus(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p += *__q; } template<typename _Tp, class _Dom> void _Array_augmented___plus(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p += __e[__i]; } template<typename _Tp> inline void _Array_augmented___plus(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] += *__q; } template<typename _Tp> inline void _Array_augmented___plus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p += __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___plus(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] += __e[__k]; } template<typename _Tp> void _Array_augmented___plus(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p += *__q; } } template<typename _Tp> void _Array_augmented___plus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p += *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___plus(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p += __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___minus(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p -= __t; } template<typename _Tp> inline void _Array_augmented___minus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p -= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___minus(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p -= __e[__i]; } template<typename _Tp> inline void _Array_augmented___minus(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p -= *__q; } template<typename _Tp> inline void _Array_augmented___minus(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p -= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___minus(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p -= __e[__i]; } template<typename _Tp> inline void _Array_augmented___minus(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] -= *__q; } template<typename _Tp> inline void _Array_augmented___minus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p -= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___minus(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] -= __e[__k]; } template<typename _Tp> void _Array_augmented___minus(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p -= *__q; } } template<typename _Tp> void _Array_augmented___minus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p -= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___minus(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p -= __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___multiplies(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p *= __t; } template<typename _Tp> inline void _Array_augmented___multiplies(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p *= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___multiplies(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p *= __e[__i]; } template<typename _Tp> inline void _Array_augmented___multiplies(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p *= *__q; } template<typename _Tp> inline void _Array_augmented___multiplies(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p *= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___multiplies(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p *= __e[__i]; } template<typename _Tp> inline void _Array_augmented___multiplies(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] *= *__q; } template<typename _Tp> inline void _Array_augmented___multiplies(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p *= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___multiplies(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] *= __e[__k]; } template<typename _Tp> void _Array_augmented___multiplies(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p *= *__q; } } template<typename _Tp> void _Array_augmented___multiplies(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p *= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___multiplies(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p *= __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___divides(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p /= __t; } template<typename _Tp> inline void _Array_augmented___divides(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p /= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___divides(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p /= __e[__i]; } template<typename _Tp> inline void _Array_augmented___divides(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p /= *__q; } template<typename _Tp> inline void _Array_augmented___divides(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p /= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___divides(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p /= __e[__i]; } template<typename _Tp> inline void _Array_augmented___divides(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] /= *__q; } template<typename _Tp> inline void _Array_augmented___divides(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p /= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___divides(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] /= __e[__k]; } template<typename _Tp> void _Array_augmented___divides(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p /= *__q; } } template<typename _Tp> void _Array_augmented___divides(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p /= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___divides(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p /= __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___modulus(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p %= __t; } template<typename _Tp> inline void _Array_augmented___modulus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p %= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___modulus(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p %= __e[__i]; } template<typename _Tp> inline void _Array_augmented___modulus(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p %= *__q; } template<typename _Tp> inline void _Array_augmented___modulus(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p %= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___modulus(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p %= __e[__i]; } template<typename _Tp> inline void _Array_augmented___modulus(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] %= *__q; } template<typename _Tp> inline void _Array_augmented___modulus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p %= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___modulus(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] %= __e[__k]; } template<typename _Tp> void _Array_augmented___modulus(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p %= *__q; } } template<typename _Tp> void _Array_augmented___modulus(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p %= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___modulus(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p %= __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___bitwise_xor(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p ^= __t; } template<typename _Tp> inline void _Array_augmented___bitwise_xor(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p ^= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_xor(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p ^= __e[__i]; } template<typename _Tp> inline void _Array_augmented___bitwise_xor(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p ^= *__q; } template<typename _Tp> inline void _Array_augmented___bitwise_xor(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p ^= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_xor(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p ^= __e[__i]; } template<typename _Tp> inline void _Array_augmented___bitwise_xor(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] ^= *__q; } template<typename _Tp> inline void _Array_augmented___bitwise_xor(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p ^= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_xor(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] ^= __e[__k]; } template<typename _Tp> void _Array_augmented___bitwise_xor(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p ^= *__q; } } template<typename _Tp> void _Array_augmented___bitwise_xor(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p ^= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_xor(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p ^= __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___bitwise_or(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p |= __t; } template<typename _Tp> inline void _Array_augmented___bitwise_or(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p |= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_or(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p |= __e[__i]; } template<typename _Tp> inline void _Array_augmented___bitwise_or(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p |= *__q; } template<typename _Tp> inline void _Array_augmented___bitwise_or(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p |= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_or(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p |= __e[__i]; } template<typename _Tp> inline void _Array_augmented___bitwise_or(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] |= *__q; } template<typename _Tp> inline void _Array_augmented___bitwise_or(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p |= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_or(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] |= __e[__k]; } template<typename _Tp> void _Array_augmented___bitwise_or(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p |= *__q; } } template<typename _Tp> void _Array_augmented___bitwise_or(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p |= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_or(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p |= __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___bitwise_and(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p &= __t; } template<typename _Tp> inline void _Array_augmented___bitwise_and(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p &= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_and(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p &= __e[__i]; } template<typename _Tp> inline void _Array_augmented___bitwise_and(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p &= *__q; } template<typename _Tp> inline void _Array_augmented___bitwise_and(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p &= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_and(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p &= __e[__i]; } template<typename _Tp> inline void _Array_augmented___bitwise_and(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] &= *__q; } template<typename _Tp> inline void _Array_augmented___bitwise_and(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p &= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_and(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] &= __e[__k]; } template<typename _Tp> void _Array_augmented___bitwise_and(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p &= *__q; } } template<typename _Tp> void _Array_augmented___bitwise_and(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p &= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___bitwise_and(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p &= __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___shift_left(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p <<= __t; } template<typename _Tp> inline void _Array_augmented___shift_left(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p <<= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___shift_left(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p <<= __e[__i]; } template<typename _Tp> inline void _Array_augmented___shift_left(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p <<= *__q; } template<typename _Tp> inline void _Array_augmented___shift_left(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p <<= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___shift_left(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p <<= __e[__i]; } template<typename _Tp> inline void _Array_augmented___shift_left(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] <<= *__q; } template<typename _Tp> inline void _Array_augmented___shift_left(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p <<= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___shift_left(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] <<= __e[__k]; } template<typename _Tp> void _Array_augmented___shift_left(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p <<= *__q; } } template<typename _Tp> void _Array_augmented___shift_left(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p <<= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___shift_left(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p <<= __e[__i]; } } > template<typename _Tp> inline void _Array_augmented___shift_right(_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) *__p >>= __t; } template<typename _Tp> inline void _Array_augmented___shift_right(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p = __a._M_data; for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) *__p >>= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___shift_right(_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__p) *__p >>= __e[__i]; } template<typename _Tp> inline void _Array_augmented___shift_right(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; __p += __s, ++__q) *__p >>= *__q; } template<typename _Tp> inline void _Array_augmented___shift_right(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, __q += __s) *__p >>= *__q; } template<typename _Tp, class _Dom> void _Array_augmented___shift_right(_Array<_Tp> __a, size_t __s, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, __p += __s) *__p >>= __e[__i]; } template<typename _Tp> inline void _Array_augmented___shift_right(_Array<_Tp> __a, _Array<size_t> __i, _Array<_Tp> __b, size_t __n) { _Tp* __q(__b._M_data); for (size_t* __j = __i._M_data; __j < __i._M_data + __n; ++__j, ++__q) __a._M_data[*__j] >>= *__q; } template<typename _Tp> inline void _Array_augmented___shift_right(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<size_t> __i) { _Tp* __p(__a._M_data); for (size_t* __j = __i._M_data; __j<__i._M_data + __n; ++__j, ++__p) *__p >>= __b._M_data[*__j]; } template<typename _Tp, class _Dom> void _Array_augmented___shift_right(_Array<_Tp> __a, _Array<size_t> __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j(__i._M_data); for (size_t __k = 0; __k<__n; ++__k, ++__j) __a._M_data[*__j] >>= __e[__k]; } template<typename _Tp> void _Array_augmented___shift_right(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p >>= *__q; } } template<typename _Tp> void _Array_augmented___shift_right(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array<bool> __m) { bool* __ok(__m._M_data); _Tp* __q(__b._M_data); for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__p >>= *__q; } } template<typename _Tp, class _Dom> void _Array_augmented___shift_right(_Array<_Tp> __a, _Array<bool> __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* __ok(__m._M_data); _Tp* __p(__a._M_data); for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p >>= __e[__i]; } } > > > > >} > ># 1 "/usr/include/c++/13/bits/valarray_array.tcc" 1 3 ># 35 "/usr/include/c++/13/bits/valarray_array.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Tp> > void > __valarray_fill(_Array<_Tp> __a, size_t __n, _Array<bool> __m, > const _Tp& __t) > { > _Tp* __p = __a._M_data; > bool* __ok (__m._M_data); > for (size_t __i=0; __i < __n; ++__i, ++__ok, ++__p) > { > while (!*__ok) > { > ++__ok; > ++__p; > } > *__p = __t; > } > } > > > > > > > > template<typename _Tp> > void > __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b, > size_t __n) > { > _Tp* __p (__a._M_data); > bool* __ok (__m._M_data); > for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; > ++__q, ++__ok, ++__p) > { > while (! *__ok) > { > ++__ok; > ++__p; > } > *__q = *__p; > } > } > > > > > > > > template<typename _Tp> > void > __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, > _Array<bool> __m) > { > _Tp* __q (__b._M_data); > bool* __ok (__m._M_data); > for (_Tp* __p = __a._M_data; __p < __a._M_data+__n; > ++__p, ++__ok, ++__q) > { > while (! *__ok) > { > ++__ok; > ++__q; > } > *__q = *__p; > } > } > > > > > > > template<typename _Tp> > void > __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, size_t __n, > _Array<_Tp> __b, _Array<bool> __k) > { > _Tp* __p (__a._M_data); > _Tp* __q (__b._M_data); > bool* __srcok (__m._M_data); > bool* __dstok (__k._M_data); > for (size_t __i = 0; __i < __n; > ++__srcok, ++__p, ++__dstok, ++__q, ++__i) > { > while (! *__srcok) > { > ++__srcok; > ++__p; > } > while (! *__dstok) > { > ++__dstok; > ++__q; > } > *__q = *__p; > } > } > > > > template<typename _Tp, class _Dom> > void > __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a) > { > _Tp* __p (__a._M_data); > for (size_t __i = 0; __i < __n; ++__i, ++__p) > *__p = __e[__i]; > } > > > > template<typename _Tp, class _Dom> > void > __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, > _Array<_Tp> __a, size_t __s) > { > _Tp* __p (__a._M_data); > for (size_t __i = 0; __i < __n; ++__i, __p += __s) > *__p = __e[__i]; > } > > > > template<typename _Tp, class _Dom> > void > __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, > _Array<_Tp> __a, _Array<size_t> __i) > { > size_t* __j (__i._M_data); > for (size_t __k = 0; __k < __n; ++__k, ++__j) > __a._M_data[*__j] = __e[__k]; > } > > > > template<typename _Tp> > void > __valarray_copy(_Array<_Tp> __e, _Array<size_t> __f, > size_t __n, > _Array<_Tp> __a, _Array<size_t> __i) > { > size_t* __g (__f._M_data); > size_t* __j (__i._M_data); > for (size_t __k = 0; __k < __n; ++__k, ++__j, ++__g) > __a._M_data[*__j] = __e._M_data[*__g]; > } > > > > > > > > template<typename _Tp, class _Dom> > void > __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, > _Array<_Tp> __a, _Array<bool> __m) > { > bool* __ok (__m._M_data); > _Tp* __p (__a._M_data); > for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) > { > while (! *__ok) > { > ++__ok; > ++__p; > } > *__p = __e[__i]; > } > } > > > template<typename _Tp, class _Dom> > void > __valarray_copy_construct(const _Expr<_Dom, _Tp>& __e, size_t __n, > _Array<_Tp> __a) > { > _Tp* __p (__a._M_data); > for (size_t __i = 0; __i < __n; ++__i, ++__p) > new (__p) _Tp(__e[__i]); > } > > > template<typename _Tp> > void > __valarray_copy_construct(_Array<_Tp> __a, _Array<bool> __m, > _Array<_Tp> __b, size_t __n) > { > _Tp* __p (__a._M_data); > bool* __ok (__m._M_data); > for (_Tp* __q = __b._M_data; __q < __b._M_data+__n; ++__q, ++__ok, ++__p) > { > while (! *__ok) > { > ++__ok; > ++__p; > } > new (__q) _Tp(*__p); > } > } > > >} ># 676 "/usr/include/c++/13/bits/valarray_array.h" 2 3 ># 103 "/usr/include/c++/13/valarray" 2 3 ># 1 "/usr/include/c++/13/bits/valarray_before.h" 1 3 ># 35 "/usr/include/c++/13/bits/valarray_before.h" 3 > ># 36 "/usr/include/c++/13/bits/valarray_before.h" 3 > ># 1 "/usr/include/c++/13/bits/slice_array.h" 1 3 ># 35 "/usr/include/c++/13/bits/slice_array.h" 3 > ># 36 "/usr/include/c++/13/bits/slice_array.h" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 59 "/usr/include/c++/13/bits/slice_array.h" 3 > class slice > { > public: > > slice(); ># 72 "/usr/include/c++/13/bits/slice_array.h" 3 > slice(size_t __o, size_t __d, size_t __s); > > > size_t start() const; > > size_t size() const; > > size_t stride() const; > > > > > > > private: > size_t _M_off; > size_t _M_sz; > size_t _M_st; > }; > > > > inline > slice::slice() > : _M_off(0), _M_sz(0), _M_st(0) {} > > inline > slice::slice(size_t __o, size_t __d, size_t __s) > : _M_off(__o), _M_sz(__d), _M_st(__s) {} > > inline size_t > slice::start() const > { return _M_off; } > > inline size_t > slice::size() const > { return _M_sz; } > > inline size_t > slice::stride() const > { return _M_st; } ># 127 "/usr/include/c++/13/bits/slice_array.h" 3 > template<typename _Tp> > class slice_array > { > public: > typedef _Tp value_type; > > > > > > slice_array(const slice_array&); > > > > slice_array& operator=(const slice_array&); > > > void operator=(const valarray<_Tp>&) const; > > void operator*=(const valarray<_Tp>&) const; > > void operator/=(const valarray<_Tp>&) const; > > void operator%=(const valarray<_Tp>&) const; > > void operator+=(const valarray<_Tp>&) const; > > void operator-=(const valarray<_Tp>&) const; > > void operator^=(const valarray<_Tp>&) const; > > void operator&=(const valarray<_Tp>&) const; > > void operator|=(const valarray<_Tp>&) const; > > void operator<<=(const valarray<_Tp>&) const; > > void operator>>=(const valarray<_Tp>&) const; > > void operator=(const _Tp &) const; > > > template<class _Dom> > void operator=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator*=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator/=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator%=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator+=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator-=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator^=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator&=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator|=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator<<=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator>>=(const _Expr<_Dom, _Tp>&) const; > > private: > friend class valarray<_Tp>; > slice_array(_Array<_Tp>, const slice&); > > const size_t _M_sz; > const size_t _M_stride; > const _Array<_Tp> _M_array; > > > > > > public: > slice_array() = delete; > > }; > > template<typename _Tp> > inline > slice_array<_Tp>::slice_array(_Array<_Tp> __a, const slice& __s) > : _M_sz(__s.size()), _M_stride(__s.stride()), > _M_array(__a.begin() + __s.start()) {} > > template<typename _Tp> > inline > slice_array<_Tp>::slice_array(const slice_array<_Tp>& __a) > : _M_sz(__a._M_sz), _M_stride(__a._M_stride), _M_array(__a._M_array) {} > > > > > template<typename _Tp> > inline slice_array<_Tp>& > slice_array<_Tp>::operator=(const slice_array<_Tp>& __a) > { > std::__valarray_copy(__a._M_array, __a._M_sz, __a._M_stride, > _M_array, _M_stride); > return *this; > } > > template<typename _Tp> > inline void > slice_array<_Tp>::operator=(const _Tp& __t) const > { std::__valarray_fill(_M_array, _M_sz, _M_stride, __t); } > > template<typename _Tp> > inline void > slice_array<_Tp>::operator=(const valarray<_Tp>& __v) const > { std::__valarray_copy(_Array<_Tp>(__v), _M_array, _M_sz, _M_stride); } > > template<typename _Tp> > template<class _Dom> > inline void > slice_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const > { std::__valarray_copy(__e, _M_sz, _M_array, _M_stride); } ># 266 "/usr/include/c++/13/bits/slice_array.h" 3 >template<typename _Tp> inline void slice_array<_Tp>::operator *=(const valarray<_Tp>& __v) const { _Array_augmented___multiplies(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator *=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___multiplies(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator /=(const valarray<_Tp>& __v) const { _Array_augmented___divides(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator /=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___divides(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator %=(const valarray<_Tp>& __v) const { _Array_augmented___modulus(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator %=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___modulus(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator +=(const valarray<_Tp>& __v) const { _Array_augmented___plus(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator +=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___plus(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator -=(const valarray<_Tp>& __v) const { _Array_augmented___minus(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator -=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___minus(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator ^=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_xor(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator ^=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___bitwise_xor(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator &=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_and(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator &=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___bitwise_and(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator |=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_or(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator |=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___bitwise_or(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator <<=(const valarray<_Tp>& __v) const { _Array_augmented___shift_left(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator <<=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___shift_left(_M_array, _M_stride, __e, _M_sz); } >template<typename _Tp> inline void slice_array<_Tp>::operator >>=(const valarray<_Tp>& __v) const { _Array_augmented___shift_right(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v)); } template<typename _Tp> template<class _Dom> inline void slice_array<_Tp>::operator >>=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___shift_right(_M_array, _M_stride, __e, _M_sz); } > > > > > > >} ># 38 "/usr/include/c++/13/bits/valarray_before.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 53 "/usr/include/c++/13/bits/valarray_before.h" 3 > template<typename _Tp1, typename _Tp2> class _Constant; ># 63 "/usr/include/c++/13/bits/valarray_before.h" 3 > struct _Abs > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return abs(__t); } > }; > > struct _Cos > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return cos(__t); } > }; > > struct _Acos > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return acos(__t); } > }; > > struct _Cosh > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return cosh(__t); } > }; > > struct _Sin > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return sin(__t); } > }; > > struct _Asin > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return asin(__t); } > }; > > struct _Sinh > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return sinh(__t); } > }; > > struct _Tan > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return tan(__t); } > }; > > struct _Atan > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return atan(__t); } > }; > > struct _Tanh > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return tanh(__t); } > }; > > struct _Exp > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return exp(__t); } > }; > > struct _Log > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return log(__t); } > }; > > struct _Log10 > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return log10(__t); } > }; > > struct _Sqrt > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return sqrt(__t); } > }; > > > > > > struct __unary_plus > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return +__t; } > }; > > struct __negate > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return -__t; } > }; > > struct __bitwise_not > { > template<typename _Tp> > _Tp operator()(const _Tp& __t) const > { return ~__t; } > }; > > struct __plus > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x + __y; } > }; > > struct __minus > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x - __y; } > }; > > struct __multiplies > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x * __y; } > }; > > struct __divides > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x / __y; } > }; > > struct __modulus > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x % __y; } > }; > > struct __bitwise_xor > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x ^ __y; } > }; > > struct __bitwise_and > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x & __y; } > }; > > struct __bitwise_or > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x | __y; } > }; > > struct __shift_left > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x << __y; } > }; > > struct __shift_right > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return __x >> __y; } > }; > > struct __logical_and > { > template<typename _Tp> > bool operator()(const _Tp& __x, const _Tp& __y) const > { return __x && __y; } > }; > > struct __logical_or > { > template<typename _Tp> > bool operator()(const _Tp& __x, const _Tp& __y) const > { return __x || __y; } > }; > > struct __logical_not > { > template<typename _Tp> > bool operator()(const _Tp& __x) const > { return !__x; } > }; > > struct __equal_to > { > template<typename _Tp> > bool operator()(const _Tp& __x, const _Tp& __y) const > { return __x == __y; } > }; > > struct __not_equal_to > { > template<typename _Tp> > bool operator()(const _Tp& __x, const _Tp& __y) const > { return __x != __y; } > }; > > struct __less > { > template<typename _Tp> > bool operator()(const _Tp& __x, const _Tp& __y) const > { return __x < __y; } > }; > > struct __greater > { > template<typename _Tp> > bool operator()(const _Tp& __x, const _Tp& __y) const > { return __x > __y; } > }; > > struct __less_equal > { > template<typename _Tp> > bool operator()(const _Tp& __x, const _Tp& __y) const > { return __x <= __y; } > }; > > struct __greater_equal > { > template<typename _Tp> > bool operator()(const _Tp& __x, const _Tp& __y) const > { return __x >= __y; } > }; > > > struct _Atan2 > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return atan2(__x, __y); } > }; > > struct _Pow > { > template<typename _Tp> > _Tp operator()(const _Tp& __x, const _Tp& __y) const > { return pow(__x, __y); } > }; > > template<typename _Tp, bool _IsValidValarrayValue = !__is_abstract(_Tp)> > struct __fun_with_valarray > { > typedef _Tp result_type; > }; > > template<typename _Tp> > struct __fun_with_valarray<_Tp, false> > { > > }; > > > > > template<typename, typename _Tp> > struct __fun : __fun_with_valarray<_Tp> > { > }; > > > template<typename _Tp> > struct __fun<__logical_not, _Tp> > { > typedef bool result_type; > }; > > template<typename _Tp> > struct __fun<__logical_and, _Tp> > { > typedef bool result_type; > }; > > template<typename _Tp> > struct __fun<__logical_or, _Tp> > { > typedef bool result_type; > }; > > template<typename _Tp> > struct __fun<__less, _Tp> > { > typedef bool result_type; > }; > > template<typename _Tp> > struct __fun<__greater, _Tp> > { > typedef bool result_type; > }; > > template<typename _Tp> > struct __fun<__less_equal, _Tp> > { > typedef bool result_type; > }; > > template<typename _Tp> > struct __fun<__greater_equal, _Tp> > { > typedef bool result_type; > }; > > template<typename _Tp> > struct __fun<__equal_to, _Tp> > { > typedef bool result_type; > }; > > template<typename _Tp> > struct __fun<__not_equal_to, _Tp> > { > typedef bool result_type; > }; > >namespace __detail >{ > > > > template<typename _Tp> > struct _ValArrayRef > { typedef const _Tp __type; }; > > > template<typename _Tp> > struct _ValArrayRef< valarray<_Tp> > > { typedef const valarray<_Tp>& __type; }; > > > > > > template<typename _Dom, typename _Arg> > class _FunBase > { > public: > typedef typename _Dom::value_type value_type; > > _FunBase(const _Dom& __e, value_type __f(_Arg)) > : _M_expr(__e), _M_func(__f) {} > > value_type operator[](size_t __i) const > { return _M_func (_M_expr[__i]); } > > size_t size() const { return _M_expr.size ();} > > private: > typename _ValArrayRef<_Dom>::__type _M_expr; > value_type (*_M_func)(_Arg); > }; > > template<class _Dom> > struct _ValFunClos<_Expr,_Dom> : _FunBase<_Dom, typename _Dom::value_type> > { > typedef _FunBase<_Dom, typename _Dom::value_type> _Base; > typedef typename _Base::value_type value_type; > typedef value_type _Tp; > > _ValFunClos(const _Dom& __e, _Tp __f(_Tp)) : _Base(__e, __f) {} > }; > > template<typename _Tp> > struct _ValFunClos<_ValArray,_Tp> : _FunBase<valarray<_Tp>, _Tp> > { > typedef _FunBase<valarray<_Tp>, _Tp> _Base; > typedef _Tp value_type; > > _ValFunClos(const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base(__v, __f) {} > }; > > template<class _Dom> > struct _RefFunClos<_Expr, _Dom> > : _FunBase<_Dom, const typename _Dom::value_type&> > { > typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base; > typedef typename _Base::value_type value_type; > typedef value_type _Tp; > > _RefFunClos(const _Dom& __e, _Tp __f(const _Tp&)) > : _Base(__e, __f) {} > }; > > template<typename _Tp> > struct _RefFunClos<_ValArray, _Tp> > : _FunBase<valarray<_Tp>, const _Tp&> > { > typedef _FunBase<valarray<_Tp>, const _Tp&> _Base; > typedef _Tp value_type; > > _RefFunClos(const valarray<_Tp>& __v, _Tp __f(const _Tp&)) > : _Base(__v, __f) {} > }; > > > > > > template<class _Oper, class _Arg> > class _UnBase > { > public: > typedef typename _Arg::value_type _Vt; > typedef typename __fun<_Oper, _Vt>::result_type value_type; > > _UnBase(const _Arg& __e) : _M_expr(__e) {} > > value_type operator[](size_t __i) const > { return _Oper()(_M_expr[__i]); } > > size_t size() const { return _M_expr.size(); } > > private: > typename _ValArrayRef<_Arg>::__type _M_expr; > }; > > template<class _Oper, class _Dom> > struct _UnClos<_Oper, _Expr, _Dom> > : _UnBase<_Oper, _Dom> > { > typedef _Dom _Arg; > typedef _UnBase<_Oper, _Dom> _Base; > typedef typename _Base::value_type value_type; > > _UnClos(const _Arg& __e) : _Base(__e) {} > }; > > template<class _Oper, typename _Tp> > struct _UnClos<_Oper, _ValArray, _Tp> > : _UnBase<_Oper, valarray<_Tp> > > { > typedef valarray<_Tp> _Arg; > typedef _UnBase<_Oper, valarray<_Tp> > _Base; > typedef typename _Base::value_type value_type; > > _UnClos(const _Arg& __e) : _Base(__e) {} > }; > > > > > > > template<class _Oper, class _FirstArg, class _SecondArg> > class _BinBase > { > public: > typedef typename _FirstArg::value_type _Vt; > typedef typename __fun<_Oper, _Vt>::result_type value_type; > > _BinBase(const _FirstArg& __e1, const _SecondArg& __e2) > : _M_expr1(__e1), _M_expr2(__e2) {} > > value_type operator[](size_t __i) const > { return _Oper()(_M_expr1[__i], _M_expr2[__i]); } > > size_t size() const { return _M_expr1.size(); } > > private: > typename _ValArrayRef<_FirstArg>::__type _M_expr1; > typename _ValArrayRef<_SecondArg>::__type _M_expr2; > }; > > > template<class _Oper, class _Clos> > class _BinBase2 > { > public: > typedef typename _Clos::value_type _Vt; > typedef typename __fun<_Oper, _Vt>::result_type value_type; > > _BinBase2(const _Clos& __e, const _Vt& __t) > : _M_expr1(__e), _M_expr2(__t) {} > > value_type operator[](size_t __i) const > { return _Oper()(_M_expr1[__i], _M_expr2); } > > size_t size() const { return _M_expr1.size(); } > > private: > typename _ValArrayRef<_Clos>::__type _M_expr1; > _Vt _M_expr2; > }; > > template<class _Oper, class _Clos> > class _BinBase1 > { > public: > typedef typename _Clos::value_type _Vt; > typedef typename __fun<_Oper, _Vt>::result_type value_type; > > _BinBase1(const _Vt& __t, const _Clos& __e) > : _M_expr1(__t), _M_expr2(__e) {} > > value_type operator[](size_t __i) const > { return _Oper()(_M_expr1, _M_expr2[__i]); } > > size_t size() const { return _M_expr2.size(); } > > private: > _Vt _M_expr1; > typename _ValArrayRef<_Clos>::__type _M_expr2; > }; > > template<class _Oper, class _Dom1, class _Dom2> > struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2> > : _BinBase<_Oper, _Dom1, _Dom2> > { > typedef _BinBase<_Oper, _Dom1, _Dom2> _Base; > typedef typename _Base::value_type value_type; > > _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {} > }; > > template<class _Oper, typename _Tp> > struct _BinClos<_Oper, _ValArray, _ValArray, _Tp, _Tp> > : _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > > { > typedef _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > _Base; > typedef typename _Base::value_type value_type; > > _BinClos(const valarray<_Tp>& __v, const valarray<_Tp>& __w) > : _Base(__v, __w) {} > }; > > template<class _Oper, class _Dom> > struct _BinClos<_Oper, _Expr, _ValArray, _Dom, typename _Dom::value_type> > : _BinBase<_Oper, _Dom, valarray<typename _Dom::value_type> > > { > typedef typename _Dom::value_type _Tp; > typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base; > typedef typename _Base::value_type value_type; > > _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2) > : _Base(__e1, __e2) {} > }; > > template<class _Oper, class _Dom> > struct _BinClos<_Oper, _ValArray, _Expr, typename _Dom::value_type, _Dom> > : _BinBase<_Oper, valarray<typename _Dom::value_type>,_Dom> > { > typedef typename _Dom::value_type _Tp; > typedef _BinBase<_Oper, valarray<_Tp>, _Dom> _Base; > typedef typename _Base::value_type value_type; > > _BinClos(const valarray<_Tp>& __e1, const _Dom& __e2) > : _Base(__e1, __e2) {} > }; > > template<class _Oper, class _Dom> > struct _BinClos<_Oper, _Expr, _Constant, _Dom, typename _Dom::value_type> > : _BinBase2<_Oper, _Dom> > { > typedef typename _Dom::value_type _Tp; > typedef _BinBase2<_Oper,_Dom> _Base; > typedef typename _Base::value_type value_type; > > _BinClos(const _Dom& __e1, const _Tp& __e2) : _Base(__e1, __e2) {} > }; > > template<class _Oper, class _Dom> > struct _BinClos<_Oper, _Constant, _Expr, typename _Dom::value_type, _Dom> > : _BinBase1<_Oper, _Dom> > { > typedef typename _Dom::value_type _Tp; > typedef _BinBase1<_Oper, _Dom> _Base; > typedef typename _Base::value_type value_type; > > _BinClos(const _Tp& __e1, const _Dom& __e2) : _Base(__e1, __e2) {} > }; > > template<class _Oper, typename _Tp> > struct _BinClos<_Oper, _ValArray, _Constant, _Tp, _Tp> > : _BinBase2<_Oper, valarray<_Tp> > > { > typedef _BinBase2<_Oper,valarray<_Tp> > _Base; > typedef typename _Base::value_type value_type; > > _BinClos(const valarray<_Tp>& __v, const _Tp& __t) : _Base(__v, __t) {} > }; > > template<class _Oper, typename _Tp> > struct _BinClos<_Oper, _Constant, _ValArray, _Tp, _Tp> > : _BinBase1<_Oper, valarray<_Tp> > > { > typedef _BinBase1<_Oper, valarray<_Tp> > _Base; > typedef typename _Base::value_type value_type; > > _BinClos(const _Tp& __t, const valarray<_Tp>& __v) : _Base(__t, __v) {} > }; > > > > > template<typename _Dom> > class _SBase > { > public: > typedef typename _Dom::value_type value_type; > > _SBase (const _Dom& __e, const slice& __s) > : _M_expr (__e), _M_slice (__s) {} > > value_type > operator[] (size_t __i) const > { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; } > > size_t > size() const > { return _M_slice.size (); } > > private: > typename _ValArrayRef<_Dom>::__type _M_expr; > const slice& _M_slice; > }; > > template<typename _Tp> > class _SBase<_Array<_Tp> > > { > public: > typedef _Tp value_type; > > _SBase (_Array<_Tp> __a, const slice& __s) > : _M_array (__a._M_data+__s.start()), _M_size (__s.size()), > _M_stride (__s.stride()) {} > > value_type > operator[] (size_t __i) const > { return _M_array._M_data[__i * _M_stride]; } > > size_t > size() const > { return _M_size; } > > private: > const _Array<_Tp> _M_array; > const size_t _M_size; > const size_t _M_stride; > }; > > template<class _Dom> > struct _SClos<_Expr, _Dom> > : _SBase<_Dom> > { > typedef _SBase<_Dom> _Base; > typedef typename _Base::value_type value_type; > > _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {} > }; > > template<typename _Tp> > struct _SClos<_ValArray, _Tp> > : _SBase<_Array<_Tp> > > { > typedef _SBase<_Array<_Tp> > _Base; > typedef _Tp value_type; > > _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {} > }; >} > > >} ># 104 "/usr/include/c++/13/valarray" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 128 "/usr/include/c++/13/valarray" 3 > template<class _Tp> > class valarray > { > template<class _Op> > struct _UnaryOp > { > typedef typename __fun<_Op, _Tp>::result_type __rt; > typedef _Expr<_UnClos<_Op, _ValArray, _Tp>, __rt> _Rt; > }; > public: > typedef _Tp value_type; > > > > valarray() noexcept; > > > explicit valarray(size_t); > > > valarray(const _Tp&, size_t); > > > valarray(const _Tp* __restrict__, size_t); > > > valarray(const valarray&); > > > > valarray(valarray&&) noexcept; > > > > valarray(const slice_array<_Tp>&); > > > valarray(const gslice_array<_Tp>&); > > > valarray(const mask_array<_Tp>&); > > > valarray(const indirect_array<_Tp>&); > > > > valarray(initializer_list<_Tp>); > > > template<class _Dom> > valarray(const _Expr<_Dom, _Tp>& __e); > > ~valarray() noexcept; ># 191 "/usr/include/c++/13/valarray" 3 > valarray<_Tp>& operator=(const valarray<_Tp>& __v); ># 201 "/usr/include/c++/13/valarray" 3 > valarray<_Tp>& operator=(valarray<_Tp>&& __v) noexcept; ># 211 "/usr/include/c++/13/valarray" 3 > valarray<_Tp>& operator=(const _Tp& __t); ># 221 "/usr/include/c++/13/valarray" 3 > valarray<_Tp>& operator=(const slice_array<_Tp>& __sa); ># 231 "/usr/include/c++/13/valarray" 3 > valarray<_Tp>& operator=(const gslice_array<_Tp>& __ga); ># 241 "/usr/include/c++/13/valarray" 3 > valarray<_Tp>& operator=(const mask_array<_Tp>& __ma); ># 251 "/usr/include/c++/13/valarray" 3 > valarray<_Tp>& operator=(const indirect_array<_Tp>& __ia); ># 262 "/usr/include/c++/13/valarray" 3 > valarray& operator=(initializer_list<_Tp> __l); > > > template<class _Dom> valarray<_Tp>& > operator= (const _Expr<_Dom, _Tp>&); ># 275 "/usr/include/c++/13/valarray" 3 > _Tp& operator[](size_t __i) noexcept; > > > > const _Tp& operator[](size_t) const noexcept; ># 292 "/usr/include/c++/13/valarray" 3 > _Expr<_SClos<_ValArray, _Tp>, _Tp> operator[](slice __s) const; ># 304 "/usr/include/c++/13/valarray" 3 > slice_array<_Tp> operator[](slice __s); ># 315 "/usr/include/c++/13/valarray" 3 > _Expr<_GClos<_ValArray, _Tp>, _Tp> operator[](const gslice& __s) const; ># 327 "/usr/include/c++/13/valarray" 3 > gslice_array<_Tp> operator[](const gslice& __s); ># 341 "/usr/include/c++/13/valarray" 3 > valarray<_Tp> operator[](const valarray<bool>& __m) const; ># 355 "/usr/include/c++/13/valarray" 3 > mask_array<_Tp> operator[](const valarray<bool>& __m); ># 368 "/usr/include/c++/13/valarray" 3 > _Expr<_IClos<_ValArray, _Tp>, _Tp> > operator[](const valarray<size_t>& __i) const; ># 383 "/usr/include/c++/13/valarray" 3 > indirect_array<_Tp> operator[](const valarray<size_t>& __i); > > > > typename _UnaryOp<__unary_plus>::_Rt operator+() const; > > > typename _UnaryOp<__negate>::_Rt operator-() const; > > > typename _UnaryOp<__bitwise_not>::_Rt operator~() const; > > > typename _UnaryOp<__logical_not>::_Rt operator!() const; > > > > valarray<_Tp>& operator*=(const _Tp&); > > > valarray<_Tp>& operator/=(const _Tp&); > > > valarray<_Tp>& operator%=(const _Tp&); > > > valarray<_Tp>& operator+=(const _Tp&); > > > valarray<_Tp>& operator-=(const _Tp&); > > > valarray<_Tp>& operator^=(const _Tp&); > > > valarray<_Tp>& operator&=(const _Tp&); > > > valarray<_Tp>& operator|=(const _Tp&); > > > valarray<_Tp>& operator<<=(const _Tp&); > > > valarray<_Tp>& operator>>=(const _Tp&); > > > valarray<_Tp>& operator*=(const valarray<_Tp>&); > > > valarray<_Tp>& operator/=(const valarray<_Tp>&); > > > valarray<_Tp>& operator%=(const valarray<_Tp>&); > > > valarray<_Tp>& operator+=(const valarray<_Tp>&); > > > valarray<_Tp>& operator-=(const valarray<_Tp>&); > > > valarray<_Tp>& operator^=(const valarray<_Tp>&); > > > valarray<_Tp>& operator|=(const valarray<_Tp>&); > > > valarray<_Tp>& operator&=(const valarray<_Tp>&); > > > valarray<_Tp>& operator<<=(const valarray<_Tp>&); > > > valarray<_Tp>& operator>>=(const valarray<_Tp>&); > > template<class _Dom> > valarray<_Tp>& operator*=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator/=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator%=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator+=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator-=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator^=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator|=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator&=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator<<=(const _Expr<_Dom, _Tp>&); > template<class _Dom> > valarray<_Tp>& operator>>=(const _Expr<_Dom, _Tp>&); > > > > > void swap(valarray<_Tp>& __v) noexcept; > > > > size_t size() const; > > > > > > > > _Tp sum() const; > > > _Tp min() const; > > > _Tp max() const; ># 518 "/usr/include/c++/13/valarray" 3 > valarray<_Tp> shift (int __n) const; ># 535 "/usr/include/c++/13/valarray" 3 > valarray<_Tp> cshift(int __n) const; ># 547 "/usr/include/c++/13/valarray" 3 > _Expr<_ValFunClos<_ValArray, _Tp>, _Tp> apply(_Tp __func(_Tp)) const; ># 559 "/usr/include/c++/13/valarray" 3 > _Expr<_RefFunClos<_ValArray, _Tp>, _Tp> apply(_Tp __func(const _Tp&)) const; ># 570 "/usr/include/c++/13/valarray" 3 > void resize(size_t __size, _Tp __c = _Tp()); > > private: > size_t _M_size; > _Tp* __restrict__ _M_data; > > friend struct _Array<_Tp>; > }; > > > template<typename _Tp, size_t _Nm> > valarray(const _Tp(&)[_Nm], size_t) -> valarray<_Tp>; > > > template<typename _Tp> > inline const _Tp& > valarray<_Tp>::operator[](size_t __i) const noexcept > { > ; > return _M_data[__i]; > } > > template<typename _Tp> > inline _Tp& > valarray<_Tp>::operator[](size_t __i) noexcept > { > ; > return _M_data[__i]; > } > > > > >} > ># 1 "/usr/include/c++/13/bits/valarray_after.h" 1 3 ># 35 "/usr/include/c++/13/bits/valarray_after.h" 3 > ># 36 "/usr/include/c++/13/bits/valarray_after.h" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace __detail >{ > > > > template<class _Dom> > class _GBase > { > public: > typedef typename _Dom::value_type value_type; > > _GBase (const _Dom& __e, const valarray<size_t>& __i) > : _M_expr (__e), _M_index(__i) {} > > value_type > operator[] (size_t __i) const > { return _M_expr[_M_index[__i]]; } > > size_t > size () const > { return _M_index.size(); } > > private: > typename _ValArrayRef<_Dom>::__type _M_expr; > const valarray<size_t>& _M_index; > }; > > template<typename _Tp> > class _GBase<_Array<_Tp> > > { > public: > typedef _Tp value_type; > > _GBase (_Array<_Tp> __a, const valarray<size_t>& __i) > : _M_array (__a), _M_index(__i) {} > > value_type > operator[] (size_t __i) const > { return _M_array._M_data[_M_index[__i]]; } > > size_t > size () const > { return _M_index.size(); } > > private: > const _Array<_Tp> _M_array; > const valarray<size_t>& _M_index; > }; > > template<class _Dom> > struct _GClos<_Expr, _Dom> > : _GBase<_Dom> > { > typedef _GBase<_Dom> _Base; > typedef typename _Base::value_type value_type; > > _GClos (const _Dom& __e, const valarray<size_t>& __i) > : _Base (__e, __i) {} > }; > > template<typename _Tp> > struct _GClos<_ValArray, _Tp> > : _GBase<_Array<_Tp> > > { > typedef _GBase<_Array<_Tp> > _Base; > typedef typename _Base::value_type value_type; > > _GClos (_Array<_Tp> __a, const valarray<size_t>& __i) > : _Base (__a, __i) {} > }; > > > > > template<class _Dom> > class _IBase > { > public: > typedef typename _Dom::value_type value_type; > > _IBase (const _Dom& __e, const valarray<size_t>& __i) > : _M_expr (__e), _M_index (__i) {} > > value_type > operator[] (size_t __i) const > { return _M_expr[_M_index[__i]]; } > > size_t > size() const > { return _M_index.size(); } > > private: > typename _ValArrayRef<_Dom>::__type _M_expr; > const valarray<size_t>& _M_index; > }; > > template<class _Dom> > struct _IClos<_Expr, _Dom> > : _IBase<_Dom> > { > typedef _IBase<_Dom> _Base; > typedef typename _Base::value_type value_type; > > _IClos (const _Dom& __e, const valarray<size_t>& __i) > : _Base (__e, __i) {} > }; > > template<typename _Tp> > struct _IClos<_ValArray, _Tp> > : _IBase<valarray<_Tp> > > { > typedef _IBase<valarray<_Tp> > _Base; > typedef _Tp value_type; > > _IClos (const valarray<_Tp>& __a, const valarray<size_t>& __i) > : _Base (__a, __i) {} > }; >} > > > > > template<class _Clos, typename _Tp> > class _Expr > { > public: > typedef _Tp value_type; > > _Expr(const _Clos&); > > const _Clos& operator()() const; > > value_type operator[](size_t) const; > valarray<value_type> operator[](slice) const; > valarray<value_type> operator[](const gslice&) const; > valarray<value_type> operator[](const valarray<bool>&) const; > valarray<value_type> operator[](const valarray<size_t>&) const; > > _Expr<_UnClos<__unary_plus, std::_Expr, _Clos>, value_type> > operator+() const; > > _Expr<_UnClos<__negate, std::_Expr, _Clos>, value_type> > operator-() const; > > _Expr<_UnClos<__bitwise_not, std::_Expr, _Clos>, value_type> > operator~() const; > > _Expr<_UnClos<__logical_not, std::_Expr, _Clos>, bool> > operator!() const; > > size_t size() const; > value_type sum() const; > > valarray<value_type> shift(int) const; > valarray<value_type> cshift(int) const; > > value_type min() const; > value_type max() const; > > valarray<value_type> apply(value_type (*)(const value_type&)) const; > valarray<value_type> apply(value_type (*)(value_type)) const; > > private: > const _Clos _M_closure; > }; > > template<class _Clos, typename _Tp> > inline > _Expr<_Clos, _Tp>::_Expr(const _Clos& __c) : _M_closure(__c) {} > > template<class _Clos, typename _Tp> > inline const _Clos& > _Expr<_Clos, _Tp>::operator()() const > { return _M_closure; } > > template<class _Clos, typename _Tp> > inline _Tp > _Expr<_Clos, _Tp>::operator[](size_t __i) const > { return _M_closure[__i]; } > > template<class _Clos, typename _Tp> > inline valarray<_Tp> > _Expr<_Clos, _Tp>::operator[](slice __s) const > { > valarray<_Tp> __v = valarray<_Tp>(*this)[__s]; > return __v; > } > > template<class _Clos, typename _Tp> > inline valarray<_Tp> > _Expr<_Clos, _Tp>::operator[](const gslice& __gs) const > { > valarray<_Tp> __v = valarray<_Tp>(*this)[__gs]; > return __v; > } > > template<class _Clos, typename _Tp> > inline valarray<_Tp> > _Expr<_Clos, _Tp>::operator[](const valarray<bool>& __m) const > { > valarray<_Tp> __v = valarray<_Tp>(*this)[__m]; > return __v; > } > > template<class _Clos, typename _Tp> > inline valarray<_Tp> > _Expr<_Clos, _Tp>::operator[](const valarray<size_t>& __i) const > { > valarray<_Tp> __v = valarray<_Tp>(*this)[__i]; > return __v; > } > > template<class _Clos, typename _Tp> > inline size_t > _Expr<_Clos, _Tp>::size() const > { return _M_closure.size(); } > > template<class _Clos, typename _Tp> > inline valarray<_Tp> > _Expr<_Clos, _Tp>::shift(int __n) const > { > valarray<_Tp> __v = valarray<_Tp>(*this).shift(__n); > return __v; > } > > template<class _Clos, typename _Tp> > inline valarray<_Tp> > _Expr<_Clos, _Tp>::cshift(int __n) const > { > valarray<_Tp> __v = valarray<_Tp>(*this).cshift(__n); > return __v; > } > > template<class _Clos, typename _Tp> > inline valarray<_Tp> > _Expr<_Clos, _Tp>::apply(_Tp __f(const _Tp&)) const > { > valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f); > return __v; > } > > template<class _Clos, typename _Tp> > inline valarray<_Tp> > _Expr<_Clos, _Tp>::apply(_Tp __f(_Tp)) const > { > valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f); > return __v; > } > > > template<class _Clos, typename _Tp> > inline _Tp > _Expr<_Clos, _Tp>::sum() const > { > size_t __n = _M_closure.size(); > if (__n == 0) > return _Tp(); > else > { > _Tp __s = _M_closure[--__n]; > while (__n != 0) > __s += _M_closure[--__n]; > return __s; > } > } > > template<class _Clos, typename _Tp> > inline _Tp > _Expr<_Clos, _Tp>::min() const > { return __valarray_min(_M_closure); } > > template<class _Clos, typename _Tp> > inline _Tp > _Expr<_Clos, _Tp>::max() const > { return __valarray_max(_M_closure); } > > template<class _Dom, typename _Tp> > inline _Expr<_UnClos<__logical_not, _Expr, _Dom>, bool> > _Expr<_Dom, _Tp>::operator!() const > { > typedef _UnClos<__logical_not, std::_Expr, _Dom> _Closure; > return _Expr<_Closure, bool>(_Closure(this->_M_closure)); > } ># 334 "/usr/include/c++/13/bits/valarray_after.h" 3 > template<class _Dom, typename _Tp> inline _Expr<_UnClos<struct std::__unary_plus, std::_Expr, _Dom>, _Tp> _Expr<_Dom, _Tp>::operator +() const { typedef _UnClos<struct std::__unary_plus, std::_Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(this->_M_closure)); } > template<class _Dom, typename _Tp> inline _Expr<_UnClos<struct std::__negate, std::_Expr, _Dom>, _Tp> _Expr<_Dom, _Tp>::operator -() const { typedef _UnClos<struct std::__negate, std::_Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(this->_M_closure)); } > template<class _Dom, typename _Tp> inline _Expr<_UnClos<struct std::__bitwise_not, std::_Expr, _Dom>, _Tp> _Expr<_Dom, _Tp>::operator ~() const { typedef _UnClos<struct std::__bitwise_not, std::_Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(this->_M_closure)); } ># 405 "/usr/include/c++/13/bits/valarray_after.h" 3 > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__plus, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__plus, typename _Dom1::value_type>::result_type> operator +(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__plus, _Arg>::result_type _Value; typedef _BinClos<struct std::__plus, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__plus, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__plus, typename _Dom::value_type>::result_type> operator +(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__plus, _Arg>::result_type _Value; typedef _BinClos<struct std::__plus, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__plus, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__plus, typename _Dom::value_type>::result_type> operator +(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__plus, _Arg>::result_type _Value; typedef _BinClos<struct std::__plus, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__plus, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__plus, typename _Dom::value_type>::result_type> operator +(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__plus, _Arg>::result_type _Value; typedef _BinClos<struct std::__plus, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__plus, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__plus, typename _Dom::value_type>::result_type> operator +(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__plus, _Tp>::result_type _Value; typedef _BinClos<struct std::__plus, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__minus, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__minus, typename _Dom1::value_type>::result_type> operator -(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__minus, _Arg>::result_type _Value; typedef _BinClos<struct std::__minus, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__minus, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__minus, typename _Dom::value_type>::result_type> operator -(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__minus, _Arg>::result_type _Value; typedef _BinClos<struct std::__minus, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__minus, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__minus, typename _Dom::value_type>::result_type> operator -(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__minus, _Arg>::result_type _Value; typedef _BinClos<struct std::__minus, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__minus, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__minus, typename _Dom::value_type>::result_type> operator -(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__minus, _Arg>::result_type _Value; typedef _BinClos<struct std::__minus, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__minus, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__minus, typename _Dom::value_type>::result_type> operator -(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__minus, _Tp>::result_type _Value; typedef _BinClos<struct std::__minus, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__multiplies, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__multiplies, typename _Dom1::value_type>::result_type> operator *(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__multiplies, _Arg>::result_type _Value; typedef _BinClos<struct std::__multiplies, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__multiplies, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__multiplies, typename _Dom::value_type>::result_type> operator *(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__multiplies, _Arg>::result_type _Value; typedef _BinClos<struct std::__multiplies, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__multiplies, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__multiplies, typename _Dom::value_type>::result_type> operator *(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__multiplies, _Arg>::result_type _Value; typedef _BinClos<struct std::__multiplies, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__multiplies, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__multiplies, typename _Dom::value_type>::result_type> operator *(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__multiplies, _Arg>::result_type _Value; typedef _BinClos<struct std::__multiplies, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__multiplies, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__multiplies, typename _Dom::value_type>::result_type> operator *(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__multiplies, _Tp>::result_type _Value; typedef _BinClos<struct std::__multiplies, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__divides, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__divides, typename _Dom1::value_type>::result_type> operator /(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__divides, _Arg>::result_type _Value; typedef _BinClos<struct std::__divides, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__divides, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__divides, typename _Dom::value_type>::result_type> operator /(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__divides, _Arg>::result_type _Value; typedef _BinClos<struct std::__divides, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__divides, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__divides, typename _Dom::value_type>::result_type> operator /(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__divides, _Arg>::result_type _Value; typedef _BinClos<struct std::__divides, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__divides, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__divides, typename _Dom::value_type>::result_type> operator /(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__divides, _Arg>::result_type _Value; typedef _BinClos<struct std::__divides, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__divides, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__divides, typename _Dom::value_type>::result_type> operator /(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__divides, _Tp>::result_type _Value; typedef _BinClos<struct std::__divides, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__modulus, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__modulus, typename _Dom1::value_type>::result_type> operator %(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__modulus, _Arg>::result_type _Value; typedef _BinClos<struct std::__modulus, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__modulus, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__modulus, typename _Dom::value_type>::result_type> operator %(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__modulus, _Arg>::result_type _Value; typedef _BinClos<struct std::__modulus, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__modulus, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__modulus, typename _Dom::value_type>::result_type> operator %(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__modulus, _Arg>::result_type _Value; typedef _BinClos<struct std::__modulus, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__modulus, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__modulus, typename _Dom::value_type>::result_type> operator %(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__modulus, _Arg>::result_type _Value; typedef _BinClos<struct std::__modulus, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__modulus, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__modulus, typename _Dom::value_type>::result_type> operator %(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__modulus, _Tp>::result_type _Value; typedef _BinClos<struct std::__modulus, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__bitwise_xor, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__bitwise_xor, typename _Dom1::value_type>::result_type> operator ^(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__bitwise_xor, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_xor, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_xor, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__bitwise_xor, typename _Dom::value_type>::result_type> operator ^(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_xor, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_xor, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_xor, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__bitwise_xor, typename _Dom::value_type>::result_type> operator ^(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_xor, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_xor, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_xor, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__bitwise_xor, typename _Dom::value_type>::result_type> operator ^(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_xor, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_xor, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_xor, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__bitwise_xor, typename _Dom::value_type>::result_type> operator ^(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__bitwise_xor, _Tp>::result_type _Value; typedef _BinClos<struct std::__bitwise_xor, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__bitwise_and, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__bitwise_and, typename _Dom1::value_type>::result_type> operator &(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__bitwise_and, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_and, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_and, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__bitwise_and, typename _Dom::value_type>::result_type> operator &(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_and, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_and, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_and, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__bitwise_and, typename _Dom::value_type>::result_type> operator &(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_and, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_and, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_and, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__bitwise_and, typename _Dom::value_type>::result_type> operator &(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_and, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_and, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_and, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__bitwise_and, typename _Dom::value_type>::result_type> operator &(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__bitwise_and, _Tp>::result_type _Value; typedef _BinClos<struct std::__bitwise_and, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__bitwise_or, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__bitwise_or, typename _Dom1::value_type>::result_type> operator |(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__bitwise_or, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_or, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_or, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__bitwise_or, typename _Dom::value_type>::result_type> operator |(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_or, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_or, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_or, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__bitwise_or, typename _Dom::value_type>::result_type> operator |(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_or, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_or, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_or, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__bitwise_or, typename _Dom::value_type>::result_type> operator |(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__bitwise_or, _Arg>::result_type _Value; typedef _BinClos<struct std::__bitwise_or, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__bitwise_or, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__bitwise_or, typename _Dom::value_type>::result_type> operator |(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__bitwise_or, _Tp>::result_type _Value; typedef _BinClos<struct std::__bitwise_or, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__shift_left, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__shift_left, typename _Dom1::value_type>::result_type> operator <<(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__shift_left, _Arg>::result_type _Value; typedef _BinClos<struct std::__shift_left, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__shift_left, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__shift_left, typename _Dom::value_type>::result_type> operator <<(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__shift_left, _Arg>::result_type _Value; typedef _BinClos<struct std::__shift_left, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__shift_left, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__shift_left, typename _Dom::value_type>::result_type> operator <<(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__shift_left, _Arg>::result_type _Value; typedef _BinClos<struct std::__shift_left, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__shift_left, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__shift_left, typename _Dom::value_type>::result_type> operator <<(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__shift_left, _Arg>::result_type _Value; typedef _BinClos<struct std::__shift_left, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__shift_left, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__shift_left, typename _Dom::value_type>::result_type> operator <<(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__shift_left, _Tp>::result_type _Value; typedef _BinClos<struct std::__shift_left, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__shift_right, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__shift_right, typename _Dom1::value_type>::result_type> operator >>(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__shift_right, _Arg>::result_type _Value; typedef _BinClos<struct std::__shift_right, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__shift_right, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__shift_right, typename _Dom::value_type>::result_type> operator >>(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__shift_right, _Arg>::result_type _Value; typedef _BinClos<struct std::__shift_right, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__shift_right, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__shift_right, typename _Dom::value_type>::result_type> operator >>(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__shift_right, _Arg>::result_type _Value; typedef _BinClos<struct std::__shift_right, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__shift_right, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__shift_right, typename _Dom::value_type>::result_type> operator >>(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__shift_right, _Arg>::result_type _Value; typedef _BinClos<struct std::__shift_right, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__shift_right, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__shift_right, typename _Dom::value_type>::result_type> operator >>(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__shift_right, _Tp>::result_type _Value; typedef _BinClos<struct std::__shift_right, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__logical_and, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__logical_and, typename _Dom1::value_type>::result_type> operator &&(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__logical_and, _Arg>::result_type _Value; typedef _BinClos<struct std::__logical_and, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__logical_and, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__logical_and, typename _Dom::value_type>::result_type> operator &&(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__logical_and, _Arg>::result_type _Value; typedef _BinClos<struct std::__logical_and, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__logical_and, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__logical_and, typename _Dom::value_type>::result_type> operator &&(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__logical_and, _Arg>::result_type _Value; typedef _BinClos<struct std::__logical_and, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__logical_and, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__logical_and, typename _Dom::value_type>::result_type> operator &&(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__logical_and, _Arg>::result_type _Value; typedef _BinClos<struct std::__logical_and, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__logical_and, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__logical_and, typename _Dom::value_type>::result_type> operator &&(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__logical_and, _Tp>::result_type _Value; typedef _BinClos<struct std::__logical_and, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__logical_or, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__logical_or, typename _Dom1::value_type>::result_type> operator ||(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__logical_or, _Arg>::result_type _Value; typedef _BinClos<struct std::__logical_or, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__logical_or, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__logical_or, typename _Dom::value_type>::result_type> operator ||(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__logical_or, _Arg>::result_type _Value; typedef _BinClos<struct std::__logical_or, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__logical_or, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__logical_or, typename _Dom::value_type>::result_type> operator ||(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__logical_or, _Arg>::result_type _Value; typedef _BinClos<struct std::__logical_or, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__logical_or, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__logical_or, typename _Dom::value_type>::result_type> operator ||(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__logical_or, _Arg>::result_type _Value; typedef _BinClos<struct std::__logical_or, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__logical_or, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__logical_or, typename _Dom::value_type>::result_type> operator ||(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__logical_or, _Tp>::result_type _Value; typedef _BinClos<struct std::__logical_or, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__equal_to, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__equal_to, typename _Dom1::value_type>::result_type> operator ==(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__equal_to, _Arg>::result_type _Value; typedef _BinClos<struct std::__equal_to, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__equal_to, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__equal_to, typename _Dom::value_type>::result_type> operator ==(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__equal_to, _Arg>::result_type _Value; typedef _BinClos<struct std::__equal_to, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__equal_to, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__equal_to, typename _Dom::value_type>::result_type> operator ==(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__equal_to, _Arg>::result_type _Value; typedef _BinClos<struct std::__equal_to, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__equal_to, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__equal_to, typename _Dom::value_type>::result_type> operator ==(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__equal_to, _Arg>::result_type _Value; typedef _BinClos<struct std::__equal_to, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__equal_to, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__equal_to, typename _Dom::value_type>::result_type> operator ==(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__equal_to, _Tp>::result_type _Value; typedef _BinClos<struct std::__equal_to, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__not_equal_to, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__not_equal_to, typename _Dom1::value_type>::result_type> operator !=(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__not_equal_to, _Arg>::result_type _Value; typedef _BinClos<struct std::__not_equal_to, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__not_equal_to, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__not_equal_to, typename _Dom::value_type>::result_type> operator !=(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__not_equal_to, _Arg>::result_type _Value; typedef _BinClos<struct std::__not_equal_to, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__not_equal_to, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__not_equal_to, typename _Dom::value_type>::result_type> operator !=(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__not_equal_to, _Arg>::result_type _Value; typedef _BinClos<struct std::__not_equal_to, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__not_equal_to, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__not_equal_to, typename _Dom::value_type>::result_type> operator !=(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__not_equal_to, _Arg>::result_type _Value; typedef _BinClos<struct std::__not_equal_to, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__not_equal_to, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__not_equal_to, typename _Dom::value_type>::result_type> operator !=(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__not_equal_to, _Tp>::result_type _Value; typedef _BinClos<struct std::__not_equal_to, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__less, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__less, typename _Dom1::value_type>::result_type> operator <(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__less, _Arg>::result_type _Value; typedef _BinClos<struct std::__less, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__less, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__less, typename _Dom::value_type>::result_type> operator <(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__less, _Arg>::result_type _Value; typedef _BinClos<struct std::__less, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__less, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__less, typename _Dom::value_type>::result_type> operator <(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__less, _Arg>::result_type _Value; typedef _BinClos<struct std::__less, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__less, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__less, typename _Dom::value_type>::result_type> operator <(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__less, _Arg>::result_type _Value; typedef _BinClos<struct std::__less, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__less, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__less, typename _Dom::value_type>::result_type> operator <(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__less, _Tp>::result_type _Value; typedef _BinClos<struct std::__less, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__greater, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__greater, typename _Dom1::value_type>::result_type> operator >(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__greater, _Arg>::result_type _Value; typedef _BinClos<struct std::__greater, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__greater, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__greater, typename _Dom::value_type>::result_type> operator >(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__greater, _Arg>::result_type _Value; typedef _BinClos<struct std::__greater, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__greater, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__greater, typename _Dom::value_type>::result_type> operator >(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__greater, _Arg>::result_type _Value; typedef _BinClos<struct std::__greater, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__greater, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__greater, typename _Dom::value_type>::result_type> operator >(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__greater, _Arg>::result_type _Value; typedef _BinClos<struct std::__greater, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__greater, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__greater, typename _Dom::value_type>::result_type> operator >(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__greater, _Tp>::result_type _Value; typedef _BinClos<struct std::__greater, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__less_equal, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__less_equal, typename _Dom1::value_type>::result_type> operator <=(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__less_equal, _Arg>::result_type _Value; typedef _BinClos<struct std::__less_equal, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__less_equal, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__less_equal, typename _Dom::value_type>::result_type> operator <=(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__less_equal, _Arg>::result_type _Value; typedef _BinClos<struct std::__less_equal, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__less_equal, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__less_equal, typename _Dom::value_type>::result_type> operator <=(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__less_equal, _Arg>::result_type _Value; typedef _BinClos<struct std::__less_equal, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__less_equal, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__less_equal, typename _Dom::value_type>::result_type> operator <=(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__less_equal, _Arg>::result_type _Value; typedef _BinClos<struct std::__less_equal, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__less_equal, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__less_equal, typename _Dom::value_type>::result_type> operator <=(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__less_equal, _Tp>::result_type _Value; typedef _BinClos<struct std::__less_equal, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } > template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::__greater_equal, _Expr, _Expr, _Dom1, _Dom2>, typename __fun<struct std::__greater_equal, typename _Dom1::value_type>::result_type> operator >=(const _Expr<_Dom1, typename _Dom1::value_type>& __v, const _Expr<_Dom2, typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename __fun<struct std::__greater_equal, _Arg>::result_type _Value; typedef _BinClos<struct std::__greater_equal, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __w())); } template<class _Dom> inline _Expr<_BinClos<struct std::__greater_equal, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename __fun<struct std::__greater_equal, typename _Dom::value_type>::result_type> operator >=(const _Expr<_Dom, typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__greater_equal, _Arg>::result_type _Value; typedef _BinClos<struct std::__greater_equal, _Expr, _Constant, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__v(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::__greater_equal, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__greater_equal, typename _Dom::value_type>::result_type> operator >=(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__greater_equal, _Arg>::result_type _Value; typedef _BinClos<struct std::__greater_equal, _Constant, _Expr, _Arg, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__t, __v())); } template<class _Dom> inline _Expr<_BinClos<struct std::__greater_equal, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename __fun<struct std::__greater_equal, typename _Dom::value_type>::result_type> operator >=(const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename __fun<struct std::__greater_equal, _Arg>::result_type _Value; typedef _BinClos<struct std::__greater_equal, _Expr, _ValArray, _Dom, _Arg> _Closure; return _Expr<_Closure, _Value>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::__greater_equal, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename __fun<struct std::__greater_equal, typename _Dom::value_type>::result_type> operator >=(const valarray<typename _Dom::value_type>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename __fun<struct std::__greater_equal, _Tp>::result_type _Value; typedef _BinClos<struct std::__greater_equal, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Value>(_Closure(__v, __e ())); } ># 445 "/usr/include/c++/13/bits/valarray_after.h" 3 > template<class _Dom> inline _Expr<_UnClos<struct std::_Abs, _Expr, _Dom>, typename _Dom::value_type> abs(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Abs, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Abs, _ValArray, _Tp>, _Tp> abs(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Abs, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Cos, _Expr, _Dom>, typename _Dom::value_type> cos(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Cos, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Cos, _ValArray, _Tp>, _Tp> cos(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Cos, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Acos, _Expr, _Dom>, typename _Dom::value_type> acos(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Acos, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Acos, _ValArray, _Tp>, _Tp> acos(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Acos, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Cosh, _Expr, _Dom>, typename _Dom::value_type> cosh(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Cosh, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Cosh, _ValArray, _Tp>, _Tp> cosh(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Cosh, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Sin, _Expr, _Dom>, typename _Dom::value_type> sin(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Sin, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Sin, _ValArray, _Tp>, _Tp> sin(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Sin, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Asin, _Expr, _Dom>, typename _Dom::value_type> asin(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Asin, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Asin, _ValArray, _Tp>, _Tp> asin(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Asin, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Sinh, _Expr, _Dom>, typename _Dom::value_type> sinh(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Sinh, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Sinh, _ValArray, _Tp>, _Tp> sinh(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Sinh, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Tan, _Expr, _Dom>, typename _Dom::value_type> tan(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Tan, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Tan, _ValArray, _Tp>, _Tp> tan(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Tan, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Tanh, _Expr, _Dom>, typename _Dom::value_type> tanh(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Tanh, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Tanh, _ValArray, _Tp>, _Tp> tanh(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Tanh, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Atan, _Expr, _Dom>, typename _Dom::value_type> atan(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Atan, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Atan, _ValArray, _Tp>, _Tp> atan(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Atan, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Exp, _Expr, _Dom>, typename _Dom::value_type> exp(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Exp, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Exp, _ValArray, _Tp>, _Tp> exp(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Exp, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Log, _Expr, _Dom>, typename _Dom::value_type> log(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Log, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Log, _ValArray, _Tp>, _Tp> log(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Log, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Log10, _Expr, _Dom>, typename _Dom::value_type> log10(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Log10, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Log10, _ValArray, _Tp>, _Tp> log10(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Log10, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } > template<class _Dom> inline _Expr<_UnClos<struct std::_Sqrt, _Expr, _Dom>, typename _Dom::value_type> sqrt(const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnClos<struct std::_Sqrt, _Expr, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e())); } template<typename _Tp> inline _Expr<_UnClos<struct std::_Sqrt, _ValArray, _Tp>, _Tp> sqrt(const valarray<_Tp>& __v) { typedef _UnClos<struct std::_Sqrt, _ValArray, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v)); } ># 548 "/usr/include/c++/13/bits/valarray_after.h" 3 >template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::_Atan2, _Expr, _Expr, _Dom1, _Dom2>, typename _Dom1::value_type> atan2(const _Expr<_Dom1, typename _Dom1::value_type>& __e1, const _Expr<_Dom2, typename _Dom2::value_type>& __e2) { typedef typename _Dom1::value_type _Tp; typedef _BinClos<struct std::_Atan2, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e1(), __e2())); } template<class _Dom> inline _Expr<_BinClos<struct std::_Atan2, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename _Dom::value_type> atan2(const _Expr<_Dom, typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos<struct std::_Atan2, _Expr, _ValArray, _Dom, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::_Atan2, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename _Dom::value_type> atan2(const valarray<typename _Dom::valarray>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos<struct std::_Atan2, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v, __e())); } template<class _Dom> inline _Expr<_BinClos<struct std::_Atan2, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename _Dom::value_type> atan2(const _Expr<_Dom, typename _Dom::value_type>& __e, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Tp; typedef _BinClos<struct std::_Atan2, _Expr, _Constant, _Dom, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::_Atan2, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename _Dom::value_type> atan2(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos<struct std::_Atan2, _Constant, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__t, __e())); } template<typename _Tp> inline _Expr<_BinClos<struct std::_Atan2, _ValArray, _ValArray, _Tp, _Tp>, _Tp> atan2(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { typedef _BinClos<struct std::_Atan2, _ValArray, _ValArray, _Tp, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<struct std::_Atan2, _ValArray, _Constant, _Tp, _Tp>, _Tp> atan2(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<struct std::_Atan2, _ValArray, _Constant, _Tp, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<struct std::_Atan2, _Constant, _ValArray, _Tp, _Tp>, _Tp> atan2(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<struct std::_Atan2, _Constant, _ValArray, _Tp, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__t, __v)); } >template<class _Dom1, class _Dom2> inline _Expr<_BinClos<struct std::_Pow, _Expr, _Expr, _Dom1, _Dom2>, typename _Dom1::value_type> pow(const _Expr<_Dom1, typename _Dom1::value_type>& __e1, const _Expr<_Dom2, typename _Dom2::value_type>& __e2) { typedef typename _Dom1::value_type _Tp; typedef _BinClos<struct std::_Pow, _Expr, _Expr, _Dom1, _Dom2> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e1(), __e2())); } template<class _Dom> inline _Expr<_BinClos<struct std::_Pow, _Expr, _ValArray, _Dom, typename _Dom::value_type>, typename _Dom::value_type> pow(const _Expr<_Dom, typename _Dom::value_type>& __e, const valarray<typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos<struct std::_Pow, _Expr, _ValArray, _Dom, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e(), __v)); } template<class _Dom> inline _Expr<_BinClos<struct std::_Pow, _ValArray, _Expr, typename _Dom::value_type, _Dom>, typename _Dom::value_type> pow(const valarray<typename _Dom::valarray>& __v, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos<struct std::_Pow, _ValArray, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v, __e())); } template<class _Dom> inline _Expr<_BinClos<struct std::_Pow, _Expr, _Constant, _Dom, typename _Dom::value_type>, typename _Dom::value_type> pow(const _Expr<_Dom, typename _Dom::value_type>& __e, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Tp; typedef _BinClos<struct std::_Pow, _Expr, _Constant, _Dom, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__e(), __t)); } template<class _Dom> inline _Expr<_BinClos<struct std::_Pow, _Constant, _Expr, typename _Dom::value_type, _Dom>, typename _Dom::value_type> pow(const typename _Dom::value_type& __t, const _Expr<_Dom, typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos<struct std::_Pow, _Constant, _Expr, _Tp, _Dom> _Closure; return _Expr<_Closure, _Tp>(_Closure(__t, __e())); } template<typename _Tp> inline _Expr<_BinClos<struct std::_Pow, _ValArray, _ValArray, _Tp, _Tp>, _Tp> pow(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { typedef _BinClos<struct std::_Pow, _ValArray, _ValArray, _Tp, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<struct std::_Pow, _ValArray, _Constant, _Tp, _Tp>, _Tp> pow(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<struct std::_Pow, _ValArray, _Constant, _Tp, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<struct std::_Pow, _Constant, _ValArray, _Tp, _Tp>, _Tp> pow(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<struct std::_Pow, _Constant, _ValArray, _Tp, _Tp> _Closure; return _Expr<_Closure, _Tp>(_Closure(__t, __v)); } > > > > >} ># 606 "/usr/include/c++/13/valarray" 2 3 > ># 1 "/usr/include/c++/13/bits/gslice.h" 1 3 ># 35 "/usr/include/c++/13/bits/gslice.h" 3 > ># 36 "/usr/include/c++/13/bits/gslice.h" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 64 "/usr/include/c++/13/bits/gslice.h" 3 > class gslice > { > public: > > gslice(); ># 80 "/usr/include/c++/13/bits/gslice.h" 3 > gslice(size_t __o, const valarray<size_t>& __l, > const valarray<size_t>& __s); > > > > > > gslice(const gslice&); > > > ~gslice(); > > > > gslice& operator=(const gslice&); > > > size_t start() const; > > > valarray<size_t> size() const; > > > valarray<size_t> stride() const; > > private: > struct _Indexer > { > size_t _M_count; > size_t _M_start; > valarray<size_t> _M_size; > valarray<size_t> _M_stride; > valarray<size_t> _M_index; > > _Indexer() > : _M_count(1), _M_start(0), _M_size(), _M_stride(), _M_index() {} > > _Indexer(size_t, const valarray<size_t>&, > const valarray<size_t>&); > > void > _M_increment_use() > { ++_M_count; } > > size_t > _M_decrement_use() > { return --_M_count; } > }; > > _Indexer* _M_index; > > template<typename _Tp> friend class valarray; > }; > > inline size_t > gslice::start() const > { return _M_index ? _M_index->_M_start : 0; } > > inline valarray<size_t> > gslice::size() const > { return _M_index ? _M_index->_M_size : valarray<size_t>(); } > > inline valarray<size_t> > gslice::stride() const > { return _M_index ? _M_index->_M_stride : valarray<size_t>(); } > > > > inline > gslice::gslice() > : _M_index(new gslice::_Indexer()) {} > > inline > gslice::gslice(size_t __o, const valarray<size_t>& __l, > const valarray<size_t>& __s) > : _M_index(new gslice::_Indexer(__o, __l, __s)) {} > > inline > gslice::gslice(const gslice& __g) > : _M_index(__g._M_index) > { if (_M_index) _M_index->_M_increment_use(); } > > inline > gslice::~gslice() > { > if (_M_index && _M_index->_M_decrement_use() == 0) > delete _M_index; > } > > inline gslice& > gslice::operator=(const gslice& __g) > { > if (__g._M_index) > __g._M_index->_M_increment_use(); > if (_M_index && _M_index->_M_decrement_use() == 0) > delete _M_index; > _M_index = __g._M_index; > return *this; > } > > > > >} ># 608 "/usr/include/c++/13/valarray" 2 3 ># 1 "/usr/include/c++/13/bits/gslice_array.h" 1 3 ># 35 "/usr/include/c++/13/bits/gslice_array.h" 3 > ># 36 "/usr/include/c++/13/bits/gslice_array.h" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 59 "/usr/include/c++/13/bits/gslice_array.h" 3 > template<typename _Tp> > class gslice_array > { > public: > typedef _Tp value_type; > > > > > > gslice_array(const gslice_array&); > > > > gslice_array& operator=(const gslice_array&); > > > void operator=(const valarray<_Tp>&) const; > > void operator*=(const valarray<_Tp>&) const; > > void operator/=(const valarray<_Tp>&) const; > > void operator%=(const valarray<_Tp>&) const; > > void operator+=(const valarray<_Tp>&) const; > > void operator-=(const valarray<_Tp>&) const; > > void operator^=(const valarray<_Tp>&) const; > > void operator&=(const valarray<_Tp>&) const; > > void operator|=(const valarray<_Tp>&) const; > > void operator<<=(const valarray<_Tp>&) const; > > void operator>>=(const valarray<_Tp>&) const; > > void operator=(const _Tp&) const; > > template<class _Dom> > void operator=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator*=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator/=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator%=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator+=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator-=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator^=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator&=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator|=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator<<=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator>>=(const _Expr<_Dom, _Tp>&) const; > > private: > _Array<_Tp> _M_array; > const valarray<size_t>& _M_index; > > friend class valarray<_Tp>; > > gslice_array(_Array<_Tp>, const valarray<size_t>&); > > > > > > public: > gslice_array() = delete; > > }; > > template<typename _Tp> > inline > gslice_array<_Tp>::gslice_array(_Array<_Tp> __a, > const valarray<size_t>& __i) > : _M_array(__a), _M_index(__i) {} > > template<typename _Tp> > inline > gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a) > : _M_array(__a._M_array), _M_index(__a._M_index) {} > > template<typename _Tp> > inline gslice_array<_Tp>& > gslice_array<_Tp>::operator=(const gslice_array<_Tp>& __a) > { > std::__valarray_copy(_Array<_Tp>(__a._M_array), > _Array<size_t>(__a._M_index), _M_index.size(), > _M_array, _Array<size_t>(_M_index)); > return *this; > } > > template<typename _Tp> > inline void > gslice_array<_Tp>::operator=(const _Tp& __t) const > { > std::__valarray_fill(_M_array, _Array<size_t>(_M_index), > _M_index.size(), __t); > } > > template<typename _Tp> > inline void > gslice_array<_Tp>::operator=(const valarray<_Tp>& __v) const > { > std::__valarray_copy(_Array<_Tp>(__v), __v.size(), > _M_array, _Array<size_t>(_M_index)); > } > > template<typename _Tp> > template<class _Dom> > inline void > gslice_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const > { > std::__valarray_copy (__e, _M_index.size(), _M_array, > _Array<size_t>(_M_index)); > } ># 205 "/usr/include/c++/13/bits/gslice_array.h" 3 >template<typename _Tp> inline void gslice_array<_Tp>::operator *=(const valarray<_Tp>& __v) const { _Array_augmented___multiplies(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator *= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___multiplies(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator /=(const valarray<_Tp>& __v) const { _Array_augmented___divides(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator /= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___divides(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator %=(const valarray<_Tp>& __v) const { _Array_augmented___modulus(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator %= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___modulus(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator +=(const valarray<_Tp>& __v) const { _Array_augmented___plus(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator += (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___plus(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator -=(const valarray<_Tp>& __v) const { _Array_augmented___minus(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator -= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___minus(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator ^=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_xor(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator ^= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___bitwise_xor(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator &=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_and(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator &= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___bitwise_and(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator |=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_or(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator |= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___bitwise_or(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator <<=(const valarray<_Tp>& __v) const { _Array_augmented___shift_left(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator <<= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___shift_left(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } >template<typename _Tp> inline void gslice_array<_Tp>::operator >>=(const valarray<_Tp>& __v) const { _Array_augmented___shift_right(_M_array, _Array<size_t>(_M_index), _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void gslice_array<_Tp>::operator >>= (const _Expr<_Dom, _Tp>& __e) const { _Array_augmented___shift_right(_M_array, _Array<size_t>(_M_index), __e, _M_index.size()); } > > > > > > >} ># 609 "/usr/include/c++/13/valarray" 2 3 ># 1 "/usr/include/c++/13/bits/mask_array.h" 1 3 ># 35 "/usr/include/c++/13/bits/mask_array.h" 3 > ># 36 "/usr/include/c++/13/bits/mask_array.h" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 61 "/usr/include/c++/13/bits/mask_array.h" 3 > template <class _Tp> > class mask_array > { > public: > typedef _Tp value_type; > > > > > > mask_array (const mask_array&); > > > > mask_array& operator=(const mask_array&); > > void operator=(const valarray<_Tp>&) const; > > void operator*=(const valarray<_Tp>&) const; > > void operator/=(const valarray<_Tp>&) const; > > void operator%=(const valarray<_Tp>&) const; > > void operator+=(const valarray<_Tp>&) const; > > void operator-=(const valarray<_Tp>&) const; > > void operator^=(const valarray<_Tp>&) const; > > void operator&=(const valarray<_Tp>&) const; > > void operator|=(const valarray<_Tp>&) const; > > void operator<<=(const valarray<_Tp>&) const; > > void operator>>=(const valarray<_Tp>&) const; > > void operator=(const _Tp&) const; > > > > template<class _Dom> > void operator=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator*=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator/=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator%=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator+=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator-=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator^=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator&=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator|=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator<<=(const _Expr<_Dom,_Tp>&) const; > template<class _Dom> > void operator>>=(const _Expr<_Dom,_Tp>&) const; > > private: > mask_array(_Array<_Tp>, size_t, _Array<bool>); > friend class valarray<_Tp>; > > const size_t _M_sz; > const _Array<bool> _M_mask; > const _Array<_Tp> _M_array; > > > > > > public: > mask_array() = delete; > > }; > > template<typename _Tp> > inline mask_array<_Tp>::mask_array(const mask_array<_Tp>& __a) > : _M_sz(__a._M_sz), _M_mask(__a._M_mask), _M_array(__a._M_array) {} > > template<typename _Tp> > inline > mask_array<_Tp>::mask_array(_Array<_Tp> __a, size_t __s, _Array<bool> __m) > : _M_sz(__s), _M_mask(__m), _M_array(__a) {} > > template<typename _Tp> > inline mask_array<_Tp>& > mask_array<_Tp>::operator=(const mask_array<_Tp>& __a) > { > do { if (std::__is_constant_evaluated() && !bool(__a._M_sz == _M_sz)) __builtin_unreachable(); } while (false); > std::__valarray_copy(__a._M_array, __a._M_mask, > _M_sz, _M_array, _M_mask); > return *this; > } > > template<typename _Tp> > inline void > mask_array<_Tp>::operator=(const _Tp& __t) const > { std::__valarray_fill(_M_array, _M_sz, _M_mask, __t); } > > template<typename _Tp> > inline void > mask_array<_Tp>::operator=(const valarray<_Tp>& __v) const > { > do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); > std::__valarray_copy(_Array<_Tp>(__v), __v.size(), _M_array, _M_mask); > } > > template<typename _Tp> > template<class _Ex> > inline void > mask_array<_Tp>::operator=(const _Expr<_Ex, _Tp>& __e) const > { > do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); > std::__valarray_copy(__e, __e.size(), _M_array, _M_mask); > } ># 204 "/usr/include/c++/13/bits/mask_array.h" 3 >template<typename _Tp> inline void mask_array<_Tp>::operator *=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___multiplies(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator *=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___multiplies(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator /=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___divides(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator /=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___divides(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator %=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___modulus(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator %=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___modulus(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator +=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___plus(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator +=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___plus(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator -=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___minus(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator -=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___minus(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator ^=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_xor(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator ^=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_xor(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator &=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_and(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator &=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_and(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator |=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_or(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator |=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_or(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator <<=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___shift_left(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator <<=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___shift_left(_M_array, _M_mask, __e, __e.size()); } >template<typename _Tp> inline void mask_array<_Tp>::operator >>=(const valarray<_Tp>& __v) const { do { if (std::__is_constant_evaluated() && !bool(__v.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___shift_right(_M_array, _M_mask, _Array<_Tp>(__v), __v.size()); } template<typename _Tp> template<class _Dom> inline void mask_array<_Tp>::operator >>=(const _Expr<_Dom, _Tp>& __e) const { do { if (std::__is_constant_evaluated() && !bool(__e.size() == _M_sz)) __builtin_unreachable(); } while (false); _Array_augmented___shift_right(_M_array, _M_mask, __e, __e.size()); } > > > > > > >} ># 610 "/usr/include/c++/13/valarray" 2 3 ># 1 "/usr/include/c++/13/bits/indirect_array.h" 1 3 ># 35 "/usr/include/c++/13/bits/indirect_array.h" 3 > ># 36 "/usr/include/c++/13/bits/indirect_array.h" 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 61 "/usr/include/c++/13/bits/indirect_array.h" 3 > template <class _Tp> > class indirect_array > { > public: > typedef _Tp value_type; > > > > > > indirect_array(const indirect_array&); > > > > indirect_array& operator=(const indirect_array&); > > > void operator=(const valarray<_Tp>&) const; > > void operator*=(const valarray<_Tp>&) const; > > void operator/=(const valarray<_Tp>&) const; > > void operator%=(const valarray<_Tp>&) const; > > void operator+=(const valarray<_Tp>&) const; > > void operator-=(const valarray<_Tp>&) const; > > void operator^=(const valarray<_Tp>&) const; > > void operator&=(const valarray<_Tp>&) const; > > void operator|=(const valarray<_Tp>&) const; > > void operator<<=(const valarray<_Tp>&) const; > > void operator>>=(const valarray<_Tp>&) const; > > void operator= (const _Tp&) const; > > > template<class _Dom> > void operator=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator*=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator/=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator%=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator+=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator-=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator^=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator&=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator|=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator<<=(const _Expr<_Dom, _Tp>&) const; > template<class _Dom> > void operator>>=(const _Expr<_Dom, _Tp>&) const; > > private: > > indirect_array(_Array<_Tp>, size_t, _Array<size_t>); > > friend class valarray<_Tp>; > friend class gslice_array<_Tp>; > > const size_t _M_sz; > const _Array<size_t> _M_index; > const _Array<_Tp> _M_array; > > > indirect_array(); > }; > > template<typename _Tp> > inline > indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a) > : _M_sz(__a._M_sz), _M_index(__a._M_index), _M_array(__a._M_array) {} > > template<typename _Tp> > inline > indirect_array<_Tp>::indirect_array(_Array<_Tp> __a, size_t __s, > _Array<size_t> __i) > : _M_sz(__s), _M_index(__i), _M_array(__a) {} > > template<typename _Tp> > inline indirect_array<_Tp>& > indirect_array<_Tp>::operator=(const indirect_array<_Tp>& __a) > { > std::__valarray_copy(__a._M_array, _M_sz, __a._M_index, _M_array, > _M_index); > return *this; > } > > template<typename _Tp> > inline void > indirect_array<_Tp>::operator=(const _Tp& __t) const > { std::__valarray_fill(_M_array, _M_index, _M_sz, __t); } > > template<typename _Tp> > inline void > indirect_array<_Tp>::operator=(const valarray<_Tp>& __v) const > { std::__valarray_copy(_Array<_Tp>(__v), _M_sz, _M_array, _M_index); } > > template<typename _Tp> > template<class _Dom> > inline void > indirect_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const > { std::__valarray_copy(__e, _M_sz, _M_array, _M_index); } ># 194 "/usr/include/c++/13/bits/indirect_array.h" 3 >template<typename _Tp> inline void indirect_array<_Tp>::operator *=(const valarray<_Tp>& __v) const { _Array_augmented___multiplies(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator *=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___multiplies(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator /=(const valarray<_Tp>& __v) const { _Array_augmented___divides(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator /=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___divides(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator %=(const valarray<_Tp>& __v) const { _Array_augmented___modulus(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator %=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___modulus(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator +=(const valarray<_Tp>& __v) const { _Array_augmented___plus(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator +=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___plus(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator -=(const valarray<_Tp>& __v) const { _Array_augmented___minus(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator -=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___minus(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator ^=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_xor(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator ^=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___bitwise_xor(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator &=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_and(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator &=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___bitwise_and(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator |=(const valarray<_Tp>& __v) const { _Array_augmented___bitwise_or(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator |=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___bitwise_or(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator <<=(const valarray<_Tp>& __v) const { _Array_augmented___shift_left(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator <<=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___shift_left(_M_array, _M_index, __e, _M_sz); } >template<typename _Tp> inline void indirect_array<_Tp>::operator >>=(const valarray<_Tp>& __v) const { _Array_augmented___shift_right(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); } template<typename _Tp> template<class _Dom> inline void indirect_array<_Tp>::operator >>=(const _Expr<_Dom,_Tp>& __e) const { _Array_augmented___shift_right(_M_array, _M_index, __e, _M_sz); } > > > > > > >} ># 611 "/usr/include/c++/13/valarray" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > template<typename _Tp> > inline > valarray<_Tp>::valarray() noexcept : _M_size(0), _M_data(0) {} > > template<typename _Tp> > inline > valarray<_Tp>::valarray(size_t __n) > : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n)) > { std::__valarray_default_construct(_M_data, _M_data + __n); } > > template<typename _Tp> > inline > valarray<_Tp>::valarray(const _Tp& __t, size_t __n) > : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n)) > { std::__valarray_fill_construct(_M_data, _M_data + __n, __t); } > > template<typename _Tp> > inline > valarray<_Tp>::valarray(const _Tp* __restrict__ __p, size_t __n) > : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n)) > { > do { if (std::__is_constant_evaluated() && !bool(__p != 0 || __n == 0)) __builtin_unreachable(); } while (false); > std::__valarray_copy_construct(__p, __p + __n, _M_data); > } > > template<typename _Tp> > inline > valarray<_Tp>::valarray(const valarray<_Tp>& __v) > : _M_size(__v._M_size), _M_data(__valarray_get_storage<_Tp>(__v._M_size)) > { std::__valarray_copy_construct(__v._M_data, __v._M_data + _M_size, > _M_data); } > > > template<typename _Tp> > inline > valarray<_Tp>::valarray(valarray<_Tp>&& __v) noexcept > : _M_size(__v._M_size), _M_data(__v._M_data) > { > __v._M_size = 0; > __v._M_data = 0; > } > > > template<typename _Tp> > inline > valarray<_Tp>::valarray(const slice_array<_Tp>& __sa) > : _M_size(__sa._M_sz), _M_data(__valarray_get_storage<_Tp>(__sa._M_sz)) > { > std::__valarray_copy_construct > (__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data)); > } > > template<typename _Tp> > inline > valarray<_Tp>::valarray(const gslice_array<_Tp>& __ga) > : _M_size(__ga._M_index.size()), > _M_data(__valarray_get_storage<_Tp>(_M_size)) > { > std::__valarray_copy_construct > (__ga._M_array, _Array<size_t>(__ga._M_index), > _Array<_Tp>(_M_data), _M_size); > } > > template<typename _Tp> > inline > valarray<_Tp>::valarray(const mask_array<_Tp>& __ma) > : _M_size(__ma._M_sz), _M_data(__valarray_get_storage<_Tp>(__ma._M_sz)) > { > std::__valarray_copy_construct > (__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size); > } > > template<typename _Tp> > inline > valarray<_Tp>::valarray(const indirect_array<_Tp>& __ia) > : _M_size(__ia._M_sz), _M_data(__valarray_get_storage<_Tp>(__ia._M_sz)) > { > std::__valarray_copy_construct > (__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size); > } > > > template<typename _Tp> > inline > valarray<_Tp>::valarray(initializer_list<_Tp> __l) > : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size())) > { std::__valarray_copy_construct(__l.begin(), __l.end(), _M_data); } > > > template<typename _Tp> template<class _Dom> > inline > valarray<_Tp>::valarray(const _Expr<_Dom, _Tp>& __e) > : _M_size(__e.size()), _M_data(__valarray_get_storage<_Tp>(_M_size)) > { std::__valarray_copy_construct(__e, _M_size, _Array<_Tp>(_M_data)); } > > template<typename _Tp> > inline > valarray<_Tp>::~valarray() noexcept > { > std::__valarray_destroy_elements(_M_data, _M_data + _M_size); > std::__valarray_release_memory(_M_data); > } > > template<typename _Tp> > inline valarray<_Tp>& > valarray<_Tp>::operator=(const valarray<_Tp>& __v) > { > > > if (_M_size == __v._M_size) > std::__valarray_copy(__v._M_data, _M_size, _M_data); > else > { > if (_M_data) > { > std::__valarray_destroy_elements(_M_data, _M_data + _M_size); > std::__valarray_release_memory(_M_data); > } > _M_size = __v._M_size; > _M_data = __valarray_get_storage<_Tp>(_M_size); > std::__valarray_copy_construct(__v._M_data, __v._M_data + _M_size, > _M_data); > } > return *this; > } > > > template<typename _Tp> > inline valarray<_Tp>& > valarray<_Tp>::operator=(valarray<_Tp>&& __v) noexcept > { > if (_M_data) > { > std::__valarray_destroy_elements(_M_data, _M_data + _M_size); > std::__valarray_release_memory(_M_data); > } > _M_size = __v._M_size; > _M_data = __v._M_data; > __v._M_size = 0; > __v._M_data = 0; > return *this; > } > > template<typename _Tp> > inline valarray<_Tp>& > valarray<_Tp>::operator=(initializer_list<_Tp> __l) > { > > > if (_M_size == __l.size()) > std::__valarray_copy(__l.begin(), __l.size(), _M_data); > else > { > if (_M_data) > { > std::__valarray_destroy_elements(_M_data, _M_data + _M_size); > std::__valarray_release_memory(_M_data); > } > _M_size = __l.size(); > _M_data = __valarray_get_storage<_Tp>(_M_size); > std::__valarray_copy_construct(__l.begin(), __l.begin() + _M_size, > _M_data); > } > return *this; > } > > > template<typename _Tp> > inline valarray<_Tp>& > valarray<_Tp>::operator=(const _Tp& __t) > { > std::__valarray_fill(_M_data, _M_size, __t); > return *this; > } > > template<typename _Tp> > inline valarray<_Tp>& > valarray<_Tp>::operator=(const slice_array<_Tp>& __sa) > { > do { if (std::__is_constant_evaluated() && !bool(_M_size == __sa._M_sz)) __builtin_unreachable(); } while (false); > std::__valarray_copy(__sa._M_array, __sa._M_sz, > __sa._M_stride, _Array<_Tp>(_M_data)); > return *this; > } > > template<typename _Tp> > inline valarray<_Tp>& > valarray<_Tp>::operator=(const gslice_array<_Tp>& __ga) > { > do { if (std::__is_constant_evaluated() && !bool(_M_size == __ga._M_index.size())) __builtin_unreachable(); } while (false); > std::__valarray_copy(__ga._M_array, _Array<size_t>(__ga._M_index), > _Array<_Tp>(_M_data), _M_size); > return *this; > } > > template<typename _Tp> > inline valarray<_Tp>& > valarray<_Tp>::operator=(const mask_array<_Tp>& __ma) > { > do { if (std::__is_constant_evaluated() && !bool(_M_size == __ma._M_sz)) __builtin_unreachable(); } while (false); > std::__valarray_copy(__ma._M_array, __ma._M_mask, > _Array<_Tp>(_M_data), _M_size); > return *this; > } > > template<typename _Tp> > inline valarray<_Tp>& > valarray<_Tp>::operator=(const indirect_array<_Tp>& __ia) > { > do { if (std::__is_constant_evaluated() && !bool(_M_size == __ia._M_sz)) __builtin_unreachable(); } while (false); > std::__valarray_copy(__ia._M_array, __ia._M_index, > _Array<_Tp>(_M_data), _M_size); > return *this; > } > > template<typename _Tp> template<class _Dom> > inline valarray<_Tp>& > valarray<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) > { > > > if (_M_size == __e.size()) > std::__valarray_copy(__e, _M_size, _Array<_Tp>(_M_data)); > else > { > if (_M_data) > { > std::__valarray_destroy_elements(_M_data, _M_data + _M_size); > std::__valarray_release_memory(_M_data); > } > _M_size = __e.size(); > _M_data = __valarray_get_storage<_Tp>(_M_size); > std::__valarray_copy_construct(__e, _M_size, _Array<_Tp>(_M_data)); > } > return *this; > } > > template<typename _Tp> > inline _Expr<_SClos<_ValArray,_Tp>, _Tp> > valarray<_Tp>::operator[](slice __s) const > { > typedef _SClos<_ValArray,_Tp> _Closure; > return _Expr<_Closure, _Tp>(_Closure (_Array<_Tp>(_M_data), __s)); > } > > template<typename _Tp> > inline slice_array<_Tp> > valarray<_Tp>::operator[](slice __s) > { return slice_array<_Tp>(_Array<_Tp>(_M_data), __s); } > > template<typename _Tp> > inline _Expr<_GClos<_ValArray,_Tp>, _Tp> > valarray<_Tp>::operator[](const gslice& __gs) const > { > typedef _GClos<_ValArray,_Tp> _Closure; > return _Expr<_Closure, _Tp> > (_Closure(_Array<_Tp>(_M_data), __gs._M_index->_M_index)); > } > > template<typename _Tp> > inline gslice_array<_Tp> > valarray<_Tp>::operator[](const gslice& __gs) > { > return gslice_array<_Tp> > (_Array<_Tp>(_M_data), __gs._M_index->_M_index); > } > > template<typename _Tp> > inline valarray<_Tp> > valarray<_Tp>::operator[](const valarray<bool>& __m) const > { > size_t __s = 0; > size_t __e = __m.size(); > for (size_t __i=0; __i<__e; ++__i) > if (__m[__i]) ++__s; > do { if (std::__is_constant_evaluated() && !bool(__s <= _M_size)) __builtin_unreachable(); } while (false); > return valarray<_Tp>(mask_array<_Tp>(_Array<_Tp>(_M_data), __s, > _Array<bool> (__m))); > } > > template<typename _Tp> > inline mask_array<_Tp> > valarray<_Tp>::operator[](const valarray<bool>& __m) > { > size_t __s = 0; > size_t __e = __m.size(); > for (size_t __i=0; __i<__e; ++__i) > if (__m[__i]) ++__s; > do { if (std::__is_constant_evaluated() && !bool(__s <= _M_size)) __builtin_unreachable(); } while (false); > return mask_array<_Tp>(_Array<_Tp>(_M_data), __s, _Array<bool>(__m)); > } > > template<typename _Tp> > inline _Expr<_IClos<_ValArray,_Tp>, _Tp> > valarray<_Tp>::operator[](const valarray<size_t>& __i) const > { > typedef _IClos<_ValArray,_Tp> _Closure; > return _Expr<_Closure, _Tp>(_Closure(*this, __i)); > } > > template<typename _Tp> > inline indirect_array<_Tp> > valarray<_Tp>::operator[](const valarray<size_t>& __i) > { > return indirect_array<_Tp>(_Array<_Tp>(_M_data), __i.size(), > _Array<size_t>(__i)); > } > > > template<class _Tp> > inline void > valarray<_Tp>::swap(valarray<_Tp>& __v) noexcept > { > std::swap(_M_size, __v._M_size); > std::swap(_M_data, __v._M_data); > } > > > template<class _Tp> > inline size_t > valarray<_Tp>::size() const > { return _M_size; } > > template<class _Tp> > inline _Tp > valarray<_Tp>::sum() const > { > do { if (std::__is_constant_evaluated() && !bool(_M_size > 0)) __builtin_unreachable(); } while (false); > return std::__valarray_sum(_M_data, _M_data + _M_size); > } > > template<class _Tp> > inline valarray<_Tp> > valarray<_Tp>::shift(int __n) const > { > valarray<_Tp> __ret; > > if (_M_size == 0) > return __ret; > > _Tp* __restrict__ __tmp_M_data = > std::__valarray_get_storage<_Tp>(_M_size); > > if (__n == 0) > std::__valarray_copy_construct(_M_data, > _M_data + _M_size, __tmp_M_data); > else if (__n > 0) > { > if (size_t(__n) > _M_size) > __n = int(_M_size); > > std::__valarray_copy_construct(_M_data + __n, > _M_data + _M_size, __tmp_M_data); > std::__valarray_default_construct(__tmp_M_data + _M_size - __n, > __tmp_M_data + _M_size); > } > else > { > if (-size_t(__n) > _M_size) > __n = -int(_M_size); > > std::__valarray_copy_construct(_M_data, _M_data + _M_size + __n, > __tmp_M_data - __n); > std::__valarray_default_construct(__tmp_M_data, > __tmp_M_data - __n); > } > > __ret._M_size = _M_size; > __ret._M_data = __tmp_M_data; > return __ret; > } > > template<class _Tp> > inline valarray<_Tp> > valarray<_Tp>::cshift(int __n) const > { > valarray<_Tp> __ret; > > if (_M_size == 0) > return __ret; > > _Tp* __restrict__ __tmp_M_data = > std::__valarray_get_storage<_Tp>(_M_size); > > if (__n == 0) > std::__valarray_copy_construct(_M_data, > _M_data + _M_size, __tmp_M_data); > else if (__n > 0) > { > if (size_t(__n) > _M_size) > __n = int(__n % _M_size); > > std::__valarray_copy_construct(_M_data, _M_data + __n, > __tmp_M_data + _M_size - __n); > std::__valarray_copy_construct(_M_data + __n, _M_data + _M_size, > __tmp_M_data); > } > else > { > if (-size_t(__n) > _M_size) > __n = -int(-size_t(__n) % _M_size); > > std::__valarray_copy_construct(_M_data + _M_size + __n, > _M_data + _M_size, __tmp_M_data); > std::__valarray_copy_construct(_M_data, _M_data + _M_size + __n, > __tmp_M_data - __n); > } > > __ret._M_size = _M_size; > __ret._M_data = __tmp_M_data; > return __ret; > } > > template<class _Tp> > inline void > valarray<_Tp>::resize(size_t __n, _Tp __c) > { > > > > std::__valarray_destroy_elements(_M_data, _M_data + _M_size); > if (_M_size != __n) > { > std::__valarray_release_memory(_M_data); > _M_size = __n; > _M_data = __valarray_get_storage<_Tp>(__n); > } > std::__valarray_fill_construct(_M_data, _M_data + __n, __c); > } > > template<typename _Tp> > inline _Tp > valarray<_Tp>::min() const > { > do { if (std::__is_constant_evaluated() && !bool(_M_size > 0)) __builtin_unreachable(); } while (false); > return *std::min_element(_M_data, _M_data + _M_size); > } > > template<typename _Tp> > inline _Tp > valarray<_Tp>::max() const > { > do { if (std::__is_constant_evaluated() && !bool(_M_size > 0)) __builtin_unreachable(); } while (false); > return *std::max_element(_M_data, _M_data + _M_size); > } > > template<class _Tp> > inline _Expr<_ValFunClos<_ValArray, _Tp>, _Tp> > valarray<_Tp>::apply(_Tp __func(_Tp)) const > { > typedef _ValFunClos<_ValArray, _Tp> _Closure; > return _Expr<_Closure, _Tp>(_Closure(*this, __func)); > } > > template<class _Tp> > inline _Expr<_RefFunClos<_ValArray, _Tp>, _Tp> > valarray<_Tp>::apply(_Tp __func(const _Tp &)) const > { > typedef _RefFunClos<_ValArray, _Tp> _Closure; > return _Expr<_Closure, _Tp>(_Closure(*this, __func)); > } ># 1093 "/usr/include/c++/13/valarray" 3 > template<typename _Tp> inline typename valarray<_Tp>::template _UnaryOp<__unary_plus>::_Rt valarray<_Tp>::operator +() const { typedef _UnClos<__unary_plus, _ValArray, _Tp> _Closure; typedef typename __fun<__unary_plus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(*this)); } > template<typename _Tp> inline typename valarray<_Tp>::template _UnaryOp<__negate>::_Rt valarray<_Tp>::operator -() const { typedef _UnClos<__negate, _ValArray, _Tp> _Closure; typedef typename __fun<__negate, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(*this)); } > template<typename _Tp> inline typename valarray<_Tp>::template _UnaryOp<__bitwise_not>::_Rt valarray<_Tp>::operator ~() const { typedef _UnClos<__bitwise_not, _ValArray, _Tp> _Closure; typedef typename __fun<__bitwise_not, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(*this)); } > template<typename _Tp> inline typename valarray<_Tp>::template _UnaryOp<__logical_not>::_Rt valarray<_Tp>::operator !() const { typedef _UnClos<__logical_not, _ValArray, _Tp> _Closure; typedef typename __fun<__logical_not, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(*this)); } ># 1119 "/usr/include/c++/13/valarray" 3 >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator +=(const _Tp &__t) { _Array_augmented___plus(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator +=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___plus(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator -=(const _Tp &__t) { _Array_augmented___minus(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator -=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___minus(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator *=(const _Tp &__t) { _Array_augmented___multiplies(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator *=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___multiplies(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator /=(const _Tp &__t) { _Array_augmented___divides(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator /=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___divides(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator %=(const _Tp &__t) { _Array_augmented___modulus(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator %=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___modulus(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator ^=(const _Tp &__t) { _Array_augmented___bitwise_xor(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator ^=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_xor(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator &=(const _Tp &__t) { _Array_augmented___bitwise_and(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator &=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_and(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator |=(const _Tp &__t) { _Array_augmented___bitwise_or(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator |=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___bitwise_or(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator <<=(const _Tp &__t) { _Array_augmented___shift_left(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator <<=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___shift_left(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } >template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator >>=(const _Tp &__t) { _Array_augmented___shift_right(_Array<_Tp>(_M_data), _M_size, __t); return *this; } template<class _Tp> inline valarray<_Tp>& valarray<_Tp>::operator >>=(const valarray<_Tp> &__v) { do { if (std::__is_constant_evaluated() && !bool(_M_size == __v._M_size)) __builtin_unreachable(); } while (false); _Array_augmented___shift_right(_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } ># 1141 "/usr/include/c++/13/valarray" 3 >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator +=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___plus(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator -=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___minus(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator *=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___multiplies(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator /=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___divides(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator %=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___modulus(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator ^=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___bitwise_xor(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator &=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___bitwise_and(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator |=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___bitwise_or(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator <<=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___shift_left(_Array<_Tp>(_M_data), __e, _M_size); return *this; } >template<class _Tp> template<class _Dom> inline valarray<_Tp>& valarray<_Tp>::operator >>=(const _Expr<_Dom, _Tp>& __e) { _Array_augmented___shift_right(_Array<_Tp>(_M_data), __e, _M_size); return *this; } ># 1189 "/usr/include/c++/13/valarray" 3 >template<typename _Tp> inline _Expr<_BinClos<__plus, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__plus, _Tp>::result_type> operator +(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__plus, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__plus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__plus, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__plus, _Tp>::result_type> operator +(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__plus, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__plus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__plus, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__plus, _Tp>::result_type> operator +(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__plus, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__plus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__minus, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__minus, _Tp>::result_type> operator -(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__minus, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__minus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__minus, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__minus, _Tp>::result_type> operator -(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__minus, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__minus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__minus, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__minus, _Tp>::result_type> operator -(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__minus, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__minus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__multiplies, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__multiplies, _Tp>::result_type> operator *(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__multiplies, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__multiplies, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__multiplies, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__multiplies, _Tp>::result_type> operator *(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__multiplies, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__multiplies, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__multiplies, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__multiplies, _Tp>::result_type> operator *(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__multiplies, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__multiplies, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__divides, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__divides, _Tp>::result_type> operator /(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__divides, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__divides, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__divides, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__divides, _Tp>::result_type> operator /(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__divides, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__divides, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__divides, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__divides, _Tp>::result_type> operator /(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__divides, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__divides, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__modulus, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__modulus, _Tp>::result_type> operator %(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__modulus, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__modulus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__modulus, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__modulus, _Tp>::result_type> operator %(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__modulus, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__modulus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__modulus, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__modulus, _Tp>::result_type> operator %(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__modulus, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__modulus, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__bitwise_xor, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__bitwise_xor, _Tp>::result_type> operator ^(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__bitwise_xor, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_xor, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__bitwise_xor, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__bitwise_xor, _Tp>::result_type> operator ^(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__bitwise_xor, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_xor, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__bitwise_xor, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__bitwise_xor, _Tp>::result_type> operator ^(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__bitwise_xor, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_xor, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__bitwise_and, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__bitwise_and, _Tp>::result_type> operator &(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__bitwise_and, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_and, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__bitwise_and, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__bitwise_and, _Tp>::result_type> operator &(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__bitwise_and, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_and, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__bitwise_and, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__bitwise_and, _Tp>::result_type> operator &(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__bitwise_and, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_and, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__bitwise_or, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__bitwise_or, _Tp>::result_type> operator |(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__bitwise_or, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_or, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__bitwise_or, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__bitwise_or, _Tp>::result_type> operator |(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__bitwise_or, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_or, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__bitwise_or, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__bitwise_or, _Tp>::result_type> operator |(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__bitwise_or, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__bitwise_or, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__shift_left, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__shift_left, _Tp>::result_type> operator <<(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__shift_left, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__shift_left, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__shift_left, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__shift_left, _Tp>::result_type> operator <<(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__shift_left, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__shift_left, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__shift_left, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__shift_left, _Tp>::result_type> operator <<(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__shift_left, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__shift_left, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__shift_right, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__shift_right, _Tp>::result_type> operator >>(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__shift_right, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__shift_right, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__shift_right, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__shift_right, _Tp>::result_type> operator >>(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__shift_right, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__shift_right, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__shift_right, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__shift_right, _Tp>::result_type> operator >>(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__shift_right, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__shift_right, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__logical_and, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__logical_and, _Tp>::result_type> operator &&(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__logical_and, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__logical_and, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__logical_and, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__logical_and, _Tp>::result_type> operator &&(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__logical_and, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__logical_and, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__logical_and, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__logical_and, _Tp>::result_type> operator &&(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__logical_and, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__logical_and, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__logical_or, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__logical_or, _Tp>::result_type> operator ||(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__logical_or, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__logical_or, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__logical_or, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__logical_or, _Tp>::result_type> operator ||(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__logical_or, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__logical_or, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__logical_or, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__logical_or, _Tp>::result_type> operator ||(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__logical_or, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__logical_or, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__equal_to, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__equal_to, _Tp>::result_type> operator ==(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__equal_to, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__equal_to, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__equal_to, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__equal_to, _Tp>::result_type> operator ==(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__equal_to, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__equal_to, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__equal_to, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__equal_to, _Tp>::result_type> operator ==(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__equal_to, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__equal_to, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__not_equal_to, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__not_equal_to, _Tp>::result_type> operator !=(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__not_equal_to, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__not_equal_to, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__not_equal_to, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__not_equal_to, _Tp>::result_type> operator !=(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__not_equal_to, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__not_equal_to, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__not_equal_to, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__not_equal_to, _Tp>::result_type> operator !=(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__not_equal_to, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__not_equal_to, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__less, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__less, _Tp>::result_type> operator <(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__less, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__less, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__less, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__less, _Tp>::result_type> operator <(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__less, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__less, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__less, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__less, _Tp>::result_type> operator <(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__less, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__less, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__greater, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__greater, _Tp>::result_type> operator >(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__greater, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__greater, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__greater, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__greater, _Tp>::result_type> operator >(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__greater, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__greater, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__greater, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__greater, _Tp>::result_type> operator >(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__greater, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__greater, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__less_equal, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__less_equal, _Tp>::result_type> operator <=(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__less_equal, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__less_equal, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__less_equal, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__less_equal, _Tp>::result_type> operator <=(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__less_equal, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__less_equal, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__less_equal, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__less_equal, _Tp>::result_type> operator <=(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__less_equal, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__less_equal, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } >template<typename _Tp> inline _Expr<_BinClos<__greater_equal, _ValArray, _ValArray, _Tp, _Tp>, typename __fun<__greater_equal, _Tp>::result_type> operator >=(const valarray<_Tp>& __v, const valarray<_Tp>& __w) { do { if (std::__is_constant_evaluated() && !bool(__v.size() == __w.size())) __builtin_unreachable(); } while (false); typedef _BinClos<__greater_equal, _ValArray, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__greater_equal, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __w)); } template<typename _Tp> inline _Expr<_BinClos<__greater_equal, _ValArray,_Constant, _Tp, _Tp>, typename __fun<__greater_equal, _Tp>::result_type> operator >=(const valarray<_Tp>& __v, const typename valarray<_Tp>::value_type& __t) { typedef _BinClos<__greater_equal, _ValArray, _Constant, _Tp, _Tp> _Closure; typedef typename __fun<__greater_equal, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__v, __t)); } template<typename _Tp> inline _Expr<_BinClos<__greater_equal, _Constant, _ValArray, _Tp, _Tp>, typename __fun<__greater_equal, _Tp>::result_type> operator >=(const typename valarray<_Tp>::value_type& __t, const valarray<_Tp>& __v) { typedef _BinClos<__greater_equal, _Constant, _ValArray, _Tp, _Tp> _Closure; typedef typename __fun<__greater_equal, _Tp>::result_type _Rt; return _Expr<_Closure, _Rt>(_Closure(__t, __v)); } ># 1216 "/usr/include/c++/13/valarray" 3 > template<class _Tp> > [[__nodiscard__]] > inline _Tp* > begin(valarray<_Tp>& __va) noexcept > { return __va.size() ? std::__addressof(__va[0]) : nullptr; } > > > > > > > template<class _Tp> > [[__nodiscard__]] > inline const _Tp* > begin(const valarray<_Tp>& __va) noexcept > { return __va.size() ? std::__addressof(__va[0]) : nullptr; } > > > > > > > template<class _Tp> > [[__nodiscard__]] > inline _Tp* > end(valarray<_Tp>& __va) noexcept > { > if (auto __n = __va.size()) > return std::__addressof(__va[0]) + __n; > else > return nullptr; > } > > > > > > > template<class _Tp> > [[__nodiscard__]] > inline const _Tp* > end(const valarray<_Tp>& __va) noexcept > { > if (auto __n = __va.size()) > return std::__addressof(__va[0]) + __n; > else > return nullptr; > } > > > > > >} ># 22 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 3 > > > > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/value_t.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/value_t.hpp" 3 > > > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_scope.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_scope.hpp" 3 > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/detected.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/detected.hpp" 3 > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/void_t.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/void_t.hpp" 3 > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > >template<typename ...Ts> struct make_void >{ > using type = void; >}; >template<typename ...Ts> using void_t = typename make_void<Ts...>::type; > >} >} } ># 14 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/detected.hpp" 2 3 > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > >struct nonesuch >{ > nonesuch() = delete; > ~nonesuch() = delete; > nonesuch(nonesuch const&) = delete; > nonesuch(nonesuch const&&) = delete; > void operator=(nonesuch const&) = delete; > void operator=(nonesuch&&) = delete; >}; > >template<class Default, > class AlwaysVoid, > template<class...> class Op, > class... Args> >struct detector >{ > using value_t = std::false_type; > using type = Default; >}; > >template<class Default, template<class...> class Op, class... Args> >struct detector<Default, void_t<Op<Args...>>, Op, Args...> >{ > using value_t = std::true_type; > using type = Op<Args...>; >}; > >template<template<class...> class Op, class... Args> >using is_detected = typename detector<nonesuch, void, Op, Args...>::value_t; > >template<template<class...> class Op, class... Args> >struct is_detected_lazy : is_detected<Op, Args...> { }; > >template<template<class...> class Op, class... Args> >using detected_t = typename detector<nonesuch, void, Op, Args...>::type; > >template<class Default, template<class...> class Op, class... Args> >using detected_or = detector<Default, void, Op, Args...>; > >template<class Default, template<class...> class Op, class... Args> >using detected_or_t = typename detected_or<Default, Op, Args...>::type; > >template<class Expected, template<class...> class Op, class... Args> >using is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>; > >template<class To, template<class...> class Op, class... Args> >using is_detected_convertible = > std::is_convertible<detected_t<Op, Args...>, To>; > >} >} } ># 13 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_scope.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley.hpp" 1 3 > ># 1264 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley.hpp" 3 > ># 1264 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley.hpp" 3 >#pragma GCC diagnostic push ># 1275 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley.hpp" 3 > ># 1275 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley.hpp" 3 >#pragma GCC diagnostic ignored "-Wvariadic-macros" ># 1290 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley.hpp" 3 > ># 1290 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley.hpp" 3 >#pragma GCC diagnostic pop ># 14 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_scope.hpp" 2 3 ># 191 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_scope.hpp" 3 ># 1 "/usr/include/c++/13/cassert" 1 3 ># 41 "/usr/include/c++/13/cassert" 3 > ># 42 "/usr/include/c++/13/cassert" 3 > > ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 45 "/usr/include/c++/13/cassert" 2 3 ># 192 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_scope.hpp" 2 3 ># 17 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/value_t.hpp" 2 3 > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ ># 53 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/value_t.hpp" 3 >enum class value_t : std::uint8_t >{ > null, > object, > array, > string, > boolean, > number_integer, > number_unsigned, > number_float, > binary, > discarded >}; ># 83 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/value_t.hpp" 3 > inline bool operator<(const value_t lhs, const value_t rhs) noexcept > >{ > static constexpr std::array<std::uint8_t, 9> order = {{ > 0 , 3 , 4 , 5 , > 1 , 2 , 2 , 2 , > 6 > } > }; > > const auto l_index = static_cast<std::size_t>(lhs); > const auto r_index = static_cast<std::size_t>(rhs); > > > > > > > > return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; > >} ># 117 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/value_t.hpp" 3 >} >} } ># 18 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_escape.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_escape.hpp" 3 > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ ># 30 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_escape.hpp" 3 >template<typename StringType> >inline void replace_substring(StringType& s, const StringType& f, > const StringType& t) >{ > (static_cast <bool> (!f.empty()) ? void (0) : __assert_fail ("!f.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_escape.hpp", 34, __extension__ __PRETTY_FUNCTION__)); > for (auto pos = s.find(f); > pos != StringType::npos; > s.replace(pos, f.size(), t), > pos = s.find(f, pos + t.size())) > {} >} ># 49 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_escape.hpp" 3 >template<typename StringType> >inline StringType escape(StringType s) >{ > replace_substring(s, StringType{"~"}, StringType{"~0"}); > replace_substring(s, StringType{"/"}, StringType{"~1"}); > return s; >} ># 64 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_escape.hpp" 3 >template<typename StringType> >static void unescape(StringType& s) >{ > replace_substring(s, StringType{"~1"}, StringType{"/"}); > replace_substring(s, StringType{"~0"}, StringType{"~"}); >} > >} >} } ># 19 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/position_t.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/position_t.hpp" 3 > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > >struct position_t >{ > > std::size_t chars_read_total = 0; > > std::size_t chars_read_current_line = 0; > > std::size_t lines_read = 0; > > > constexpr operator size_t() const > { > return chars_read_total; > } >}; > >} >} } ># 20 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/cpp_future.hpp" 1 3 ># 10 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/cpp_future.hpp" 3 > ># 19 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/cpp_future.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > >template<typename T> >using uncvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type; > > > > >using std::enable_if_t; >using std::index_sequence; >using std::make_index_sequence; >using std::index_sequence_for; ># 149 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/cpp_future.hpp" 3 >template<unsigned N> struct priority_tag : priority_tag < N - 1 > {}; >template<> struct priority_tag<0> {}; > > >template<typename T> >struct static_const >{ > static inline constexpr T value{}; >}; > > > > > > >template<typename T, typename... Args> >inline constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args) >{ > return std::array<T, sizeof...(Args)> {{static_cast<T>(std::forward<Args>(args))...}}; >} > >} >} } ># 22 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/type_traits.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/type_traits.hpp" 3 > > > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iterator_traits.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iterator_traits.hpp" 3 > > > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > >template<typename It, typename = void> >struct iterator_types {}; > >template<typename It> >struct iterator_types < > It, > void_t<typename It::difference_type, typename It::value_type, typename It::pointer, > typename It::reference, typename It::iterator_category >> >{ > using difference_type = typename It::difference_type; > using value_type = typename It::value_type; > using pointer = typename It::pointer; > using reference = typename It::reference; > using iterator_category = typename It::iterator_category; >}; > > > >template<typename T, typename = void> >struct iterator_traits >{ >}; > >template<typename T> >struct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >> > : iterator_types<T> >{ >}; > >template<typename T> >struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>> >{ > using iterator_category = std::random_access_iterator_tag; > using value_type = T; > using difference_type = ptrdiff_t; > using pointer = T*; > using reference = T&; >}; > >} >} } ># 17 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/type_traits.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/call_std/begin.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/call_std/begin.hpp" 3 > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { > >namespace detail { using std::begin; template<typename... T> using result_of_begin = decltype(begin(std::declval<T>()...)); } namespace detail2 { struct begin_tag { }; template<typename... T> begin_tag begin(T&&...); template<typename... T> using result_of_begin = decltype(begin(std::declval<T>()...)); template<typename... T> struct would_call_std_begin { static constexpr auto const value = ::nlohmann::detail:: is_detected_exact<begin_tag, result_of_begin, T...>::value; }; } template<typename... T> struct would_call_std_begin : detail2::would_call_std_begin<T...> { }; > >} } ># 19 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/type_traits.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/call_std/end.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/call_std/end.hpp" 3 > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { > >namespace detail { using std::end; template<typename... T> using result_of_end = decltype(end(std::declval<T>()...)); } namespace detail2 { struct end_tag { }; template<typename... T> end_tag end(T&&...); template<typename... T> using result_of_end = decltype(end(std::declval<T>()...)); template<typename... T> struct would_call_std_end { static constexpr auto const value = ::nlohmann::detail:: is_detected_exact<end_tag, result_of_end, T...>::value; }; } template<typename... T> struct would_call_std_end : detail2::would_call_std_end<T...> { }; > >} } ># 20 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/type_traits.hpp" 2 3 > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json_fwd.hpp" 1 3 ># 25 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json_fwd.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { ># 34 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json_fwd.hpp" 3 >template<typename T = void, typename SFINAE = void> >struct adl_serializer; > > > >template<template<typename U, typename V, typename... Args> class ObjectType = > std::map, > template<typename U, typename... Args> class ArrayType = std::vector, > class StringType = std::string, class BooleanType = bool, > class NumberIntegerType = std::int64_t, > class NumberUnsignedType = std::uint64_t, > class NumberFloatType = double, > template<typename U> class AllocatorType = std::allocator, > template<typename T, typename SFINAE = void> class JSONSerializer = > adl_serializer, > class BinaryType = std::vector<std::uint8_t>> >class basic_json; > > > >template<typename RefStringType> >class json_pointer; > > > > > >using json = basic_json<>; > > > >template<class Key, class T, class IgnoredLess, class Allocator> >struct ordered_map; > > > >using ordered_json = basic_json<nlohmann::ordered_map>; > >} } ># 23 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/type_traits.hpp" 2 3 > >namespace nlohmann { inline namespace json_abi_v3_11_2 { ># 33 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/type_traits.hpp" 3 >namespace detail >{ ># 49 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/type_traits.hpp" 3 >template<typename> struct is_basic_json : std::false_type {}; > >template<template<typename, typename, typename...> class ObjectType, template<typename, typename...> class ArrayType, class StringType, class BooleanType, class NumberIntegerType, class NumberUnsignedType, class NumberFloatType, template<typename> class AllocatorType, template<typename, typename = void> class JSONSerializer, class BinaryType> >struct is_basic_json<basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType> > : std::true_type {}; > > > > >template<typename BasicJsonContext> >struct is_basic_json_context : > std::integral_constant < bool, > is_basic_json<typename std::remove_cv<typename std::remove_pointer<BasicJsonContext>::type>::type>::value > || std::is_same<BasicJsonContext, std::nullptr_t>::value > >{}; > > > > > >template<typename> >class json_ref; > >template<typename> >struct is_json_ref : std::false_type {}; > >template<typename T> >struct is_json_ref<json_ref<T>> : std::true_type {}; > > > > > >template<typename T> >using mapped_type_t = typename T::mapped_type; > >template<typename T> >using key_type_t = typename T::key_type; > >template<typename T> >using value_type_t = typename T::value_type; > >template<typename T> >using difference_type_t = typename T::difference_type; > >template<typename T> >using pointer_t = typename T::pointer; > >template<typename T> >using reference_t = typename T::reference; > >template<typename T> >using iterator_category_t = typename T::iterator_category; > >template<typename T, typename... Args> >using to_json_function = decltype(T::to_json(std::declval<Args>()...)); > >template<typename T, typename... Args> >using from_json_function = decltype(T::from_json(std::declval<Args>()...)); > >template<typename T, typename U> >using get_template_function = decltype(std::declval<T>().template get<U>()); > > >template<typename BasicJsonType, typename T, typename = void> >struct has_from_json : std::false_type {}; > > > > > >template <typename BasicJsonType, typename T> >struct is_getable >{ > static constexpr bool value = is_detected<get_template_function, const BasicJsonType&, T>::value; >}; > >template<typename BasicJsonType, typename T> >struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >> >{ > using serializer = typename BasicJsonType::template json_serializer<T, void>; > > static constexpr bool value = > is_detected_exact<void, from_json_function, serializer, > const BasicJsonType&, T&>::value; >}; > > > >template<typename BasicJsonType, typename T, typename = void> >struct has_non_default_from_json : std::false_type {}; > >template<typename BasicJsonType, typename T> >struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >> >{ > using serializer = typename BasicJsonType::template json_serializer<T, void>; > > static constexpr bool value = > is_detected_exact<T, from_json_function, serializer, > const BasicJsonType&>::value; >}; > > > >template<typename BasicJsonType, typename T, typename = void> >struct has_to_json : std::false_type {}; > >template<typename BasicJsonType, typename T> >struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >> >{ > using serializer = typename BasicJsonType::template json_serializer<T, void>; > > static constexpr bool value = > is_detected_exact<void, to_json_function, serializer, BasicJsonType&, > T>::value; >}; > >template<typename T> >using detect_key_compare = typename T::key_compare; > >template<typename T> >struct has_key_compare : std::integral_constant<bool, is_detected<detect_key_compare, T>::value> {}; > > >template<typename BasicJsonType> >struct actual_object_comparator >{ > using object_t = typename BasicJsonType::object_t; > using object_comparator_t = typename BasicJsonType::default_object_comparator_t; > using type = typename std::conditional < has_key_compare<object_t>::value, > typename object_t::key_compare, object_comparator_t>::type; >}; > >template<typename BasicJsonType> >using actual_object_comparator_t = typename actual_object_comparator<BasicJsonType>::type; > > > > > > >template<class...> struct conjunction : std::true_type { }; >template<class B> struct conjunction<B> : B { }; >template<class B, class... Bn> >struct conjunction<B, Bn...> >: std::conditional<static_cast<bool>(B::value), conjunction<Bn...>, B>::type {}; > > >template<class B> struct negation : std::integral_constant < bool, !B::value > { }; > > > > >template <typename T> >struct is_default_constructible : std::is_default_constructible<T> {}; > >template <typename T1, typename T2> >struct is_default_constructible<std::pair<T1, T2>> > : conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {}; > >template <typename T1, typename T2> >struct is_default_constructible<const std::pair<T1, T2>> > : conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {}; > >template <typename... Ts> >struct is_default_constructible<std::tuple<Ts...>> > : conjunction<is_default_constructible<Ts>...> {}; > >template <typename... Ts> >struct is_default_constructible<const std::tuple<Ts...>> > : conjunction<is_default_constructible<Ts>...> {}; > > >template <typename T, typename... Args> >struct is_constructible : std::is_constructible<T, Args...> {}; > >template <typename T1, typename T2> >struct is_constructible<std::pair<T1, T2>> : is_default_constructible<std::pair<T1, T2>> {}; > >template <typename T1, typename T2> >struct is_constructible<const std::pair<T1, T2>> : is_default_constructible<const std::pair<T1, T2>> {}; > >template <typename... Ts> >struct is_constructible<std::tuple<Ts...>> : is_default_constructible<std::tuple<Ts...>> {}; > >template <typename... Ts> >struct is_constructible<const std::tuple<Ts...>> : is_default_constructible<const std::tuple<Ts...>> {}; > > >template<typename T, typename = void> >struct is_iterator_traits : std::false_type {}; > >template<typename T> >struct is_iterator_traits<iterator_traits<T>> >{ > private: > using traits = iterator_traits<T>; > > public: > static constexpr auto value = > is_detected<value_type_t, traits>::value && > is_detected<difference_type_t, traits>::value && > is_detected<pointer_t, traits>::value && > is_detected<iterator_category_t, traits>::value && > is_detected<reference_t, traits>::value; >}; > >template<typename T> >struct is_range >{ > private: > using t_ref = typename std::add_lvalue_reference<T>::type; > > using iterator = detected_t<result_of_begin, t_ref>; > using sentinel = detected_t<result_of_end, t_ref>; > > > > > static constexpr auto is_iterator_begin = > is_iterator_traits<iterator_traits<iterator>>::value; > > public: > static constexpr bool value = !std::is_same<iterator, nonesuch>::value && !std::is_same<sentinel, nonesuch>::value && is_iterator_begin; >}; > >template<typename R> >using iterator_t = enable_if_t<is_range<R>::value, result_of_begin<decltype(std::declval<R&>())>>; > >template<typename T> >using range_value_t = value_type_t<iterator_traits<iterator_t<T>>>; > > > > > >template<typename T, typename = void> >struct is_complete_type : std::false_type {}; > >template<typename T> >struct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {}; > >template<typename BasicJsonType, typename CompatibleObjectType, > typename = void> >struct is_compatible_object_type_impl : std::false_type {}; > >template<typename BasicJsonType, typename CompatibleObjectType> >struct is_compatible_object_type_impl < > BasicJsonType, CompatibleObjectType, > enable_if_t < is_detected<mapped_type_t, CompatibleObjectType>::value&& > is_detected<key_type_t, CompatibleObjectType>::value >> >{ > using object_t = typename BasicJsonType::object_t; > > > static constexpr bool value = > is_constructible<typename object_t::key_type, > typename CompatibleObjectType::key_type>::value && > is_constructible<typename object_t::mapped_type, > typename CompatibleObjectType::mapped_type>::value; >}; > >template<typename BasicJsonType, typename CompatibleObjectType> >struct is_compatible_object_type > : is_compatible_object_type_impl<BasicJsonType, CompatibleObjectType> {}; > >template<typename BasicJsonType, typename ConstructibleObjectType, > typename = void> >struct is_constructible_object_type_impl : std::false_type {}; > >template<typename BasicJsonType, typename ConstructibleObjectType> >struct is_constructible_object_type_impl < > BasicJsonType, ConstructibleObjectType, > enable_if_t < is_detected<mapped_type_t, ConstructibleObjectType>::value&& > is_detected<key_type_t, ConstructibleObjectType>::value >> >{ > using object_t = typename BasicJsonType::object_t; > > static constexpr bool value = > (is_default_constructible<ConstructibleObjectType>::value && > (std::is_move_assignable<ConstructibleObjectType>::value || > std::is_copy_assignable<ConstructibleObjectType>::value) && > (is_constructible<typename ConstructibleObjectType::key_type, > typename object_t::key_type>::value && > std::is_same < > typename object_t::mapped_type, > typename ConstructibleObjectType::mapped_type >::value)) || > (has_from_json<BasicJsonType, > typename ConstructibleObjectType::mapped_type>::value || > has_non_default_from_json < > BasicJsonType, > typename ConstructibleObjectType::mapped_type >::value); >}; > >template<typename BasicJsonType, typename ConstructibleObjectType> >struct is_constructible_object_type > : is_constructible_object_type_impl<BasicJsonType, > ConstructibleObjectType> {}; > >template<typename BasicJsonType, typename CompatibleStringType> >struct is_compatible_string_type >{ > static constexpr auto value = > is_constructible<typename BasicJsonType::string_t, CompatibleStringType>::value; >}; > >template<typename BasicJsonType, typename ConstructibleStringType> >struct is_constructible_string_type >{ > > > > > using laundered_type = ConstructibleStringType; > > > static constexpr auto value = > conjunction < > is_constructible<laundered_type, typename BasicJsonType::string_t>, > is_detected_exact<typename BasicJsonType::string_t::value_type, > value_type_t, laundered_type >>::value; >}; > >template<typename BasicJsonType, typename CompatibleArrayType, typename = void> >struct is_compatible_array_type_impl : std::false_type {}; > >template<typename BasicJsonType, typename CompatibleArrayType> >struct is_compatible_array_type_impl < > BasicJsonType, CompatibleArrayType, > enable_if_t < > is_detected<iterator_t, CompatibleArrayType>::value&& > is_iterator_traits<iterator_traits<detected_t<iterator_t, CompatibleArrayType>>>::value&& > > > !std::is_same<CompatibleArrayType, detected_t<range_value_t, CompatibleArrayType>>::value >> >{ > static constexpr bool value = > is_constructible<BasicJsonType, > range_value_t<CompatibleArrayType>>::value; >}; > >template<typename BasicJsonType, typename CompatibleArrayType> >struct is_compatible_array_type > : is_compatible_array_type_impl<BasicJsonType, CompatibleArrayType> {}; > >template<typename BasicJsonType, typename ConstructibleArrayType, typename = void> >struct is_constructible_array_type_impl : std::false_type {}; > >template<typename BasicJsonType, typename ConstructibleArrayType> >struct is_constructible_array_type_impl < > BasicJsonType, ConstructibleArrayType, > enable_if_t<std::is_same<ConstructibleArrayType, > typename BasicJsonType::value_type>::value >> > : std::true_type {}; > >template<typename BasicJsonType, typename ConstructibleArrayType> >struct is_constructible_array_type_impl < > BasicJsonType, ConstructibleArrayType, > enable_if_t < !std::is_same<ConstructibleArrayType, > typename BasicJsonType::value_type>::value&& > !is_compatible_string_type<BasicJsonType, ConstructibleArrayType>::value&& > is_default_constructible<ConstructibleArrayType>::value&& >(std::is_move_assignable<ConstructibleArrayType>::value || > std::is_copy_assignable<ConstructibleArrayType>::value)&& >is_detected<iterator_t, ConstructibleArrayType>::value&& >is_iterator_traits<iterator_traits<detected_t<iterator_t, ConstructibleArrayType>>>::value&& >is_detected<range_value_t, ConstructibleArrayType>::value&& > > >!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&& > is_complete_type < > detected_t<range_value_t, ConstructibleArrayType >>::value >> >{ > using value_type = range_value_t<ConstructibleArrayType>; > > static constexpr bool value = > std::is_same<value_type, > typename BasicJsonType::array_t::value_type>::value || > has_from_json<BasicJsonType, > value_type>::value || > has_non_default_from_json < > BasicJsonType, > value_type >::value; >}; > >template<typename BasicJsonType, typename ConstructibleArrayType> >struct is_constructible_array_type > : is_constructible_array_type_impl<BasicJsonType, ConstructibleArrayType> {}; > >template<typename RealIntegerType, typename CompatibleNumberIntegerType, > typename = void> >struct is_compatible_integer_type_impl : std::false_type {}; > >template<typename RealIntegerType, typename CompatibleNumberIntegerType> >struct is_compatible_integer_type_impl < > RealIntegerType, CompatibleNumberIntegerType, > enable_if_t < std::is_integral<RealIntegerType>::value&& > std::is_integral<CompatibleNumberIntegerType>::value&& > !std::is_same<bool, CompatibleNumberIntegerType>::value >> >{ > > using RealLimits = std::numeric_limits<RealIntegerType>; > using CompatibleLimits = std::numeric_limits<CompatibleNumberIntegerType>; > > static constexpr auto value = > is_constructible<RealIntegerType, > CompatibleNumberIntegerType>::value && > CompatibleLimits::is_integer && > RealLimits::is_signed == CompatibleLimits::is_signed; >}; > >template<typename RealIntegerType, typename CompatibleNumberIntegerType> >struct is_compatible_integer_type > : is_compatible_integer_type_impl<RealIntegerType, > CompatibleNumberIntegerType> {}; > >template<typename BasicJsonType, typename CompatibleType, typename = void> >struct is_compatible_type_impl: std::false_type {}; > >template<typename BasicJsonType, typename CompatibleType> >struct is_compatible_type_impl < > BasicJsonType, CompatibleType, > enable_if_t<is_complete_type<CompatibleType>::value >> >{ > static constexpr bool value = > has_to_json<BasicJsonType, CompatibleType>::value; >}; > >template<typename BasicJsonType, typename CompatibleType> >struct is_compatible_type > : is_compatible_type_impl<BasicJsonType, CompatibleType> {}; > >template<typename T1, typename T2> >struct is_constructible_tuple : std::false_type {}; > >template<typename T1, typename... Args> >struct is_constructible_tuple<T1, std::tuple<Args...>> : conjunction<is_constructible<T1, Args>...> {}; > >template<typename BasicJsonType, typename T> >struct is_json_iterator_of : std::false_type {}; > >template<typename BasicJsonType> >struct is_json_iterator_of<BasicJsonType, typename BasicJsonType::iterator> : std::true_type {}; > >template<typename BasicJsonType> >struct is_json_iterator_of<BasicJsonType, typename BasicJsonType::const_iterator> : std::true_type >{}; > > >template<template <typename...> class Primary, typename T> >struct is_specialization_of : std::false_type {}; > >template<template <typename...> class Primary, typename... Args> >struct is_specialization_of<Primary, Primary<Args...>> : std::true_type {}; > >template<typename T> >using is_json_pointer = is_specialization_of<::nlohmann::json_pointer, uncvref_t<T>>; > > >template<typename Compare, typename A, typename B, typename = void> >struct is_comparable : std::false_type {}; > >template<typename Compare, typename A, typename B> >struct is_comparable<Compare, A, B, void_t< >decltype(std::declval<Compare>()(std::declval<A>(), std::declval<B>())), >decltype(std::declval<Compare>()(std::declval<B>(), std::declval<A>())) >>> : std::true_type {}; > >template<typename T> >using detect_is_transparent = typename T::is_transparent; > > > >template<typename Comparator, typename ObjectKeyType, typename KeyTypeCVRef, bool RequireTransparentComparator = true, > bool ExcludeObjectKeyType = RequireTransparentComparator, typename KeyType = uncvref_t<KeyTypeCVRef>> >using is_usable_as_key_type = typename std::conditional < > is_comparable<Comparator, ObjectKeyType, KeyTypeCVRef>::value > && !(ExcludeObjectKeyType && std::is_same<KeyType, > ObjectKeyType>::value) > && (!RequireTransparentComparator > || is_detected <detect_is_transparent, Comparator>::value) > && !is_json_pointer<KeyType>::value, > std::true_type, > std::false_type >::type; > > > > > > > >template<typename BasicJsonType, typename KeyTypeCVRef, bool RequireTransparentComparator = true, > bool ExcludeObjectKeyType = RequireTransparentComparator, typename KeyType = uncvref_t<KeyTypeCVRef>> >using is_usable_as_basic_json_key_type = typename std::conditional < > is_usable_as_key_type<typename BasicJsonType::object_comparator_t, > typename BasicJsonType::object_t::key_type, KeyTypeCVRef, > RequireTransparentComparator, ExcludeObjectKeyType>::value > && !is_json_iterator_of<BasicJsonType, KeyType>::value, > std::true_type, > std::false_type >::type; > >template<typename ObjectType, typename KeyType> >using detect_erase_with_key_type = decltype(std::declval<ObjectType&>().erase(std::declval<KeyType>())); > > >template<typename BasicJsonType, typename KeyType> >using has_erase_with_key_type = typename std::conditional < > is_detected < > detect_erase_with_key_type, > typename BasicJsonType::object_t, KeyType >::value, > std::true_type, > std::false_type >::type; > > > >template <typename T> >struct is_ordered_map >{ > using one = char; > > struct two > { > char x[2]; > }; > > template <typename C> static one test( decltype(&C::capacity) ) ; > template <typename C> static two test(...); > > enum { value = sizeof(test<T>(nullptr)) == sizeof(char) }; >}; > > >template < typename T, typename U, enable_if_t < !std::is_same<T, U>::value, int > = 0 > >T conditional_static_cast(U value) >{ > return static_cast<T>(value); >} > >template<typename T, typename U, enable_if_t<std::is_same<T, U>::value, int> = 0> >T conditional_static_cast(U value) >{ > return value; >} > >template<typename... Types> >using all_integral = conjunction<std::is_integral<Types>...>; > >template<typename... Types> >using all_signed = conjunction<std::is_signed<Types>...>; > >template<typename... Types> >using all_unsigned = conjunction<std::is_unsigned<Types>...>; > > >template<typename... Types> >using same_sign = std::integral_constant < bool, > all_signed<Types...>::value || all_unsigned<Types...>::value >; > >template<typename OfType, typename T> >using never_out_of_range = std::integral_constant < bool, > (std::is_signed<OfType>::value && (sizeof(T) < sizeof(OfType))) > || (same_sign<OfType, T>::value && sizeof(OfType) == sizeof(T)) >; > >template<typename OfType, typename T, > bool OfTypeSigned = std::is_signed<OfType>::value, > bool TSigned = std::is_signed<T>::value> >struct value_in_range_of_impl2; > >template<typename OfType, typename T> >struct value_in_range_of_impl2<OfType, T, false, false> >{ > static constexpr bool test(T val) > { > using CommonType = typename std::common_type<OfType, T>::type; > return static_cast<CommonType>(val) <= static_cast<CommonType>((std::numeric_limits<OfType>::max)()); > } >}; > >template<typename OfType, typename T> >struct value_in_range_of_impl2<OfType, T, true, false> >{ > static constexpr bool test(T val) > { > using CommonType = typename std::common_type<OfType, T>::type; > return static_cast<CommonType>(val) <= static_cast<CommonType>((std::numeric_limits<OfType>::max)()); > } >}; > >template<typename OfType, typename T> >struct value_in_range_of_impl2<OfType, T, false, true> >{ > static constexpr bool test(T val) > { > using CommonType = typename std::common_type<OfType, T>::type; > return val >= 0 && static_cast<CommonType>(val) <= static_cast<CommonType>((std::numeric_limits<OfType>::max)()); > } >}; > > >template<typename OfType, typename T> >struct value_in_range_of_impl2<OfType, T, true, true> >{ > static constexpr bool test(T val) > { > using CommonType = typename std::common_type<OfType, T>::type; > return static_cast<CommonType>(val) >= static_cast<CommonType>((std::numeric_limits<OfType>::min)()) > && static_cast<CommonType>(val) <= static_cast<CommonType>((std::numeric_limits<OfType>::max)()); > } >}; > >template<typename OfType, typename T, > bool NeverOutOfRange = never_out_of_range<OfType, T>::value, > typename = detail::enable_if_t<all_integral<OfType, T>::value>> >struct value_in_range_of_impl1; > >template<typename OfType, typename T> >struct value_in_range_of_impl1<OfType, T, false> >{ > static constexpr bool test(T val) > { > return value_in_range_of_impl2<OfType, T>::test(val); > } >}; > >template<typename OfType, typename T> >struct value_in_range_of_impl1<OfType, T, true> >{ > static constexpr bool test(T ) > { > return true; > } >}; > >template<typename OfType, typename T> >inline constexpr bool value_in_range_of(T val) >{ > return value_in_range_of_impl1<OfType, T>::test(val); >} > >template<bool Value> >using bool_constant = std::integral_constant<bool, Value>; > > > > > >namespace impl >{ > >template<typename T> >inline constexpr bool is_c_string() >{ > using TUnExt = typename std::remove_extent<T>::type; > using TUnCVExt = typename std::remove_cv<TUnExt>::type; > using TUnPtr = typename std::remove_pointer<T>::type; > using TUnCVPtr = typename std::remove_cv<TUnPtr>::type; > return > (std::is_array<T>::value && std::is_same<TUnCVExt, char>::value) > || (std::is_pointer<T>::value && std::is_same<TUnCVPtr, char>::value); >} > >} > > >template<typename T> >struct is_c_string : bool_constant<impl::is_c_string<T>()> {}; > >template<typename T> >using is_c_string_uncvref = is_c_string<uncvref_t<T>>; > > > > > >namespace impl >{ > >template<typename T> >inline constexpr bool is_transparent() >{ > return is_detected<detect_is_transparent, T>::value; >} > >} > > >template<typename T> >struct is_transparent : bool_constant<impl::is_transparent<T>()> {}; > > > >} >} } ># 23 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_concat.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_concat.hpp" 3 > > ># 1 "/usr/include/c++/13/cstring" 1 3 ># 39 "/usr/include/c++/13/cstring" 3 > ># 40 "/usr/include/c++/13/cstring" 3 ># 12 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/string_concat.hpp" 2 3 > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > >inline std::size_t concat_length() >{ > return 0; >} > >template<typename... Args> >inline std::size_t concat_length(const char* cstr, Args&& ... rest); > >template<typename StringType, typename... Args> >inline std::size_t concat_length(const StringType& str, Args&& ... rest); > >template<typename... Args> >inline std::size_t concat_length(const char , Args&& ... rest) >{ > return 1 + concat_length(std::forward<Args>(rest)...); >} > >template<typename... Args> >inline std::size_t concat_length(const char* cstr, Args&& ... rest) >{ > > return ::strlen(cstr) + concat_length(std::forward<Args>(rest)...); >} > >template<typename StringType, typename... Args> >inline std::size_t concat_length(const StringType& str, Args&& ... rest) >{ > return str.size() + concat_length(std::forward<Args>(rest)...); >} > >template<typename OutStringType> >inline void concat_into(OutStringType& ) >{} > >template<typename StringType, typename Arg> >using string_can_append = decltype(std::declval<StringType&>().append(std::declval < Arg && > ())); > >template<typename StringType, typename Arg> >using detect_string_can_append = is_detected<string_can_append, StringType, Arg>; > >template<typename StringType, typename Arg> >using string_can_append_op = decltype(std::declval<StringType&>() += std::declval < Arg && > ()); > >template<typename StringType, typename Arg> >using detect_string_can_append_op = is_detected<string_can_append_op, StringType, Arg>; > >template<typename StringType, typename Arg> >using string_can_append_iter = decltype(std::declval<StringType&>().append(std::declval<const Arg&>().begin(), std::declval<const Arg&>().end())); > >template<typename StringType, typename Arg> >using detect_string_can_append_iter = is_detected<string_can_append_iter, StringType, Arg>; > >template<typename StringType, typename Arg> >using string_can_append_data = decltype(std::declval<StringType&>().append(std::declval<const Arg&>().data(), std::declval<const Arg&>().size())); > >template<typename StringType, typename Arg> >using detect_string_can_append_data = is_detected<string_can_append_data, StringType, Arg>; > >template < typename OutStringType, typename Arg, typename... Args, > enable_if_t < !detect_string_can_append<OutStringType, Arg>::value > && detect_string_can_append_op<OutStringType, Arg>::value, int > = 0 > >inline void concat_into(OutStringType& out, Arg && arg, Args && ... rest); > >template < typename OutStringType, typename Arg, typename... Args, > enable_if_t < !detect_string_can_append<OutStringType, Arg>::value > && !detect_string_can_append_op<OutStringType, Arg>::value > && detect_string_can_append_iter<OutStringType, Arg>::value, int > = 0 > >inline void concat_into(OutStringType& out, const Arg& arg, Args && ... rest); > >template < typename OutStringType, typename Arg, typename... Args, > enable_if_t < !detect_string_can_append<OutStringType, Arg>::value > && !detect_string_can_append_op<OutStringType, Arg>::value > && !detect_string_can_append_iter<OutStringType, Arg>::value > && detect_string_can_append_data<OutStringType, Arg>::value, int > = 0 > >inline void concat_into(OutStringType& out, const Arg& arg, Args && ... rest); > >template<typename OutStringType, typename Arg, typename... Args, > enable_if_t<detect_string_can_append<OutStringType, Arg>::value, int> = 0> >inline void concat_into(OutStringType& out, Arg && arg, Args && ... rest) >{ > out.append(std::forward<Arg>(arg)); > concat_into(out, std::forward<Args>(rest)...); >} > >template < typename OutStringType, typename Arg, typename... Args, > enable_if_t < !detect_string_can_append<OutStringType, Arg>::value > && detect_string_can_append_op<OutStringType, Arg>::value, int > > >inline void concat_into(OutStringType& out, Arg&& arg, Args&& ... rest) >{ > out += std::forward<Arg>(arg); > concat_into(out, std::forward<Args>(rest)...); >} > >template < typename OutStringType, typename Arg, typename... Args, > enable_if_t < !detect_string_can_append<OutStringType, Arg>::value > && !detect_string_can_append_op<OutStringType, Arg>::value > && detect_string_can_append_iter<OutStringType, Arg>::value, int > > >inline void concat_into(OutStringType& out, const Arg& arg, Args&& ... rest) >{ > out.append(arg.begin(), arg.end()); > concat_into(out, std::forward<Args>(rest)...); >} > >template < typename OutStringType, typename Arg, typename... Args, > enable_if_t < !detect_string_can_append<OutStringType, Arg>::value > && !detect_string_can_append_op<OutStringType, Arg>::value > && !detect_string_can_append_iter<OutStringType, Arg>::value > && detect_string_can_append_data<OutStringType, Arg>::value, int > > >inline void concat_into(OutStringType& out, const Arg& arg, Args&& ... rest) >{ > out.append(arg.data(), arg.size()); > concat_into(out, std::forward<Args>(rest)...); >} > >template<typename OutStringType = std::string, typename... Args> >inline OutStringType concat(Args && ... args) >{ > OutStringType str; > str.reserve(concat_length(std::forward<Args>(args)...)); > concat_into(str, std::forward<Args>(args)...); > return str; >} > >} >} } ># 24 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 2 3 > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > > > > > > >class exception : public std::exception >{ > public: > > const char* what() const noexcept override > { > return m.what(); > } > > > const int id; > > protected: > __attribute__((__nonnull__(3))) > exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} > > static std::string name(const std::string& ename, int id_) > { > return concat("[json.exception.", ename, '.', std::to_string(id_), "] "); > } > > static std::string diagnostics(std::nullptr_t ) > { > return ""; > } > > template<typename BasicJsonType> > static std::string diagnostics(const BasicJsonType* leaf_element) > { ># 122 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 3 > static_cast<void>(leaf_element); > return ""; > > } > > private: > > std::runtime_error m; >}; > > > >class parse_error : public exception >{ > public: ># 146 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 3 > template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> > static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context) > { > std::string w = concat(exception::name("parse_error", id_), "parse error", > position_string(pos), ": ", exception::diagnostics(context), what_arg); > return {id_, pos.chars_read_total, w.c_str()}; > } > > template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> > static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, BasicJsonContext context) > { > std::string w = concat(exception::name("parse_error", id_), "parse error", > (byte_ != 0 ? (concat(" at byte ", std::to_string(byte_))) : ""), > ": ", exception::diagnostics(context), what_arg); > return {id_, byte_, w.c_str()}; > } ># 172 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/exceptions.hpp" 3 > const std::size_t byte; > > private: > parse_error(int id_, std::size_t byte_, const char* what_arg) > : exception(id_, what_arg), byte(byte_) {} > > static std::string position_string(const position_t& pos) > { > return concat(" at line ", std::to_string(pos.lines_read + 1), > ", column ", std::to_string(pos.chars_read_current_line)); > } >}; > > > >class invalid_iterator : public exception >{ > public: > template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> > static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) > { > std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); > return {id_, w.c_str()}; > } > > private: > __attribute__((__nonnull__(3))) > invalid_iterator(int id_, const char* what_arg) > : exception(id_, what_arg) {} >}; > > > >class type_error : public exception >{ > public: > template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> > static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) > { > std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); > return {id_, w.c_str()}; > } > > private: > __attribute__((__nonnull__(3))) > type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} >}; > > > >class out_of_range : public exception >{ > public: > template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> > static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context) > { > std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg); > return {id_, w.c_str()}; > } > > private: > __attribute__((__nonnull__(3))) > out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} >}; > > > >class other_error : public exception >{ > public: > template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> > static other_error create(int id_, const std::string& what_arg, BasicJsonContext context) > { > std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg); > return {id_, w.c_str()}; > } > > private: > __attribute__((__nonnull__(3))) > other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} >}; > >} >} } ># 24 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 2 3 > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/identity_tag.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/identity_tag.hpp" 3 > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > >template <class T> struct identity_tag {}; > >} >} } ># 27 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/std_fs.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/std_fs.hpp" 3 > ># 22 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/std_fs.hpp" 3 ># 1 "/usr/include/c++/13/filesystem" 1 3 ># 33 "/usr/include/c++/13/filesystem" 3 > ># 34 "/usr/include/c++/13/filesystem" 3 ># 46 "/usr/include/c++/13/filesystem" 3 ># 1 "/usr/include/c++/13/bits/fs_fwd.h" 1 3 ># 39 "/usr/include/c++/13/bits/fs_fwd.h" 3 >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 > }; > > > > constexpr copy_options > operator&(copy_options __x, copy_options __y) noexcept > { > using __utype = typename std::underlying_type<copy_options>::type; > return static_cast<copy_options>( > static_cast<__utype>(__x) & static_cast<__utype>(__y)); > } > > constexpr copy_options > operator|(copy_options __x, copy_options __y) noexcept > { > using __utype = typename std::underlying_type<copy_options>::type; > return static_cast<copy_options>( > static_cast<__utype>(__x) | static_cast<__utype>(__y)); > } > > constexpr copy_options > operator^(copy_options __x, copy_options __y) noexcept > { > using __utype = typename std::underlying_type<copy_options>::type; > return static_cast<copy_options>( > static_cast<__utype>(__x) ^ static_cast<__utype>(__y)); > } > > constexpr copy_options > operator~(copy_options __x) noexcept > { > using __utype = typename std::underlying_type<copy_options>::type; > return static_cast<copy_options>(~static_cast<__utype>(__x)); > } > > inline copy_options& > operator&=(copy_options& __x, copy_options __y) noexcept > { return __x = __x & __y; } > > inline copy_options& > operator|=(copy_options& __x, copy_options __y) noexcept > { return __x = __x | __y; } > > inline copy_options& > operator^=(copy_options& __x, copy_options __y) noexcept > { return __x = __x ^ __y; } > > > > > 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, > }; > > > > constexpr perms > operator&(perms __x, perms __y) noexcept > { > using __utype = typename std::underlying_type<perms>::type; > return static_cast<perms>( > static_cast<__utype>(__x) & static_cast<__utype>(__y)); > } > > constexpr perms > operator|(perms __x, perms __y) noexcept > { > using __utype = typename std::underlying_type<perms>::type; > return static_cast<perms>( > static_cast<__utype>(__x) | static_cast<__utype>(__y)); > } > > constexpr perms > operator^(perms __x, perms __y) noexcept > { > using __utype = typename std::underlying_type<perms>::type; > return static_cast<perms>( > static_cast<__utype>(__x) ^ static_cast<__utype>(__y)); > } > > constexpr perms > operator~(perms __x) noexcept > { > using __utype = typename std::underlying_type<perms>::type; > return static_cast<perms>(~static_cast<__utype>(__x)); > } > > inline perms& > operator&=(perms& __x, perms __y) noexcept > { return __x = __x & __y; } > > inline perms& > operator|=(perms& __x, perms __y) noexcept > { return __x = __x | __y; } > > inline perms& > operator^=(perms& __x, perms __y) noexcept > { return __x = __x ^ __y; } > > > > enum class perm_options : unsigned { > replace = 0x1, > add = 0x2, > remove = 0x4, > nofollow = 0x8 > }; > > > > constexpr perm_options > operator&(perm_options __x, perm_options __y) noexcept > { > using __utype = typename std::underlying_type<perm_options>::type; > return static_cast<perm_options>( > static_cast<__utype>(__x) & static_cast<__utype>(__y)); > } > > constexpr perm_options > operator|(perm_options __x, perm_options __y) noexcept > { > using __utype = typename std::underlying_type<perm_options>::type; > return static_cast<perm_options>( > static_cast<__utype>(__x) | static_cast<__utype>(__y)); > } > > constexpr perm_options > operator^(perm_options __x, perm_options __y) noexcept > { > using __utype = typename std::underlying_type<perm_options>::type; > return static_cast<perm_options>( > static_cast<__utype>(__x) ^ static_cast<__utype>(__y)); > } > > constexpr perm_options > operator~(perm_options __x) noexcept > { > using __utype = typename std::underlying_type<perm_options>::type; > return static_cast<perm_options>(~static_cast<__utype>(__x)); > } > > inline perm_options& > operator&=(perm_options& __x, perm_options __y) noexcept > { return __x = __x & __y; } > > inline perm_options& > operator|=(perm_options& __x, perm_options __y) noexcept > { return __x = __x | __y; } > > inline perm_options& > operator^=(perm_options& __x, perm_options __y) noexcept > { return __x = __x ^ __y; } > > > > enum class directory_options : unsigned char { > none = 0, follow_directory_symlink = 1, skip_permission_denied = 2 > }; > > > > constexpr directory_options > operator&(directory_options __x, directory_options __y) noexcept > { > using __utype = typename std::underlying_type<directory_options>::type; > return static_cast<directory_options>( > static_cast<__utype>(__x) & static_cast<__utype>(__y)); > } > > constexpr directory_options > operator|(directory_options __x, directory_options __y) noexcept > { > using __utype = typename std::underlying_type<directory_options>::type; > return static_cast<directory_options>( > static_cast<__utype>(__x) | static_cast<__utype>(__y)); > } > > constexpr directory_options > operator^(directory_options __x, directory_options __y) noexcept > { > using __utype = typename std::underlying_type<directory_options>::type; > return static_cast<directory_options>( > static_cast<__utype>(__x) ^ static_cast<__utype>(__y)); > } > > constexpr directory_options > operator~(directory_options __x) noexcept > { > using __utype = typename std::underlying_type<directory_options>::type; > return static_cast<directory_options>(~static_cast<__utype>(__x)); > } > > inline directory_options& > operator&=(directory_options& __x, directory_options __y) noexcept > { return __x = __x & __y; } > > inline directory_options& > operator|=(directory_options& __x, directory_options __y) noexcept > { return __x = __x | __y; } > > inline directory_options& > operator^=(directory_options& __x, directory_options __y) noexcept > { return __x = __x ^ __y; } > > > > using file_time_type = __file_clock::time_point; > > > > void copy(const path& __from, const path& __to, copy_options __options); > void copy(const path& __from, const path& __to, copy_options __options, > error_code&); > > bool copy_file(const path& __from, const path& __to, copy_options __option); > bool copy_file(const path& __from, const path& __to, copy_options __option, > error_code&); > > path current_path(); > > bool exists(file_status) noexcept; > > bool is_other(file_status) noexcept; > > uintmax_t file_size(const path&); > uintmax_t file_size(const path&, error_code&) noexcept; > uintmax_t hard_link_count(const path&); > uintmax_t hard_link_count(const path&, error_code&) noexcept; > file_time_type last_write_time(const path&); > file_time_type last_write_time(const path&, error_code&) 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; > > bool status_known(file_status) 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; > > bool remove(const path&, error_code&) noexcept; > uintmax_t remove_all(const path&); > uintmax_t remove_all(const path&, error_code&); > > >} > >} ># 47 "/usr/include/c++/13/filesystem" 2 3 ># 1 "/usr/include/c++/13/bits/fs_path.h" 1 3 ># 39 "/usr/include/c++/13/bits/fs_path.h" 3 ># 1 "/usr/include/c++/13/codecvt" 1 3 ># 34 "/usr/include/c++/13/codecvt" 3 > ># 35 "/usr/include/c++/13/codecvt" 3 ># 43 "/usr/include/c++/13/codecvt" 3 >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: > explicit > codecvt_utf8(size_t __refs = 0); > > ~codecvt_utf8(); > }; > > template<typename _Elem, unsigned long _Maxcode = 0x10ffff, > codecvt_mode _Mode = (codecvt_mode)0> > class codecvt_utf16 : public codecvt<_Elem, char, mbstate_t> > { > public: > explicit > codecvt_utf16(size_t __refs = 0); > > ~codecvt_utf16(); > }; > > template<typename _Elem, unsigned long _Maxcode = 0x10ffff, > codecvt_mode _Mode = (codecvt_mode)0> > class codecvt_utf8_utf16 : public codecvt<_Elem, char, mbstate_t> > { > public: > explicit > codecvt_utf8_utf16(size_t __refs = 0); > > ~codecvt_utf8_utf16(); > }; ># 154 "/usr/include/c++/13/codecvt" 3 > 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: __codecvt_utf8_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf8_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; 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(); 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: explicit codecvt_utf8(size_t __refs = 0) : __codecvt_utf8_base<char16_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > 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: __codecvt_utf16_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf16_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; 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(); 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: explicit codecvt_utf16(size_t __refs = 0) : __codecvt_utf16_base<char16_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > 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: __codecvt_utf8_utf16_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf8_utf16_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; 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(); 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: explicit codecvt_utf8_utf16(size_t __refs = 0) : __codecvt_utf8_utf16_base<char16_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > > 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: __codecvt_utf8_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf8_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; 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(); 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: explicit codecvt_utf8(size_t __refs = 0) : __codecvt_utf8_base<char32_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > 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: __codecvt_utf16_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf16_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; 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(); 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: explicit codecvt_utf16(size_t __refs = 0) : __codecvt_utf16_base<char32_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > 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: __codecvt_utf8_utf16_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf8_utf16_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; 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(); 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: explicit codecvt_utf8_utf16(size_t __refs = 0) : __codecvt_utf8_utf16_base<char32_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > > > 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: __codecvt_utf8_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf8_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; 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(); 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: explicit codecvt_utf8(size_t __refs = 0) : __codecvt_utf8_base<wchar_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > 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: __codecvt_utf16_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf16_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; 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(); 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: explicit codecvt_utf16(size_t __refs = 0) : __codecvt_utf16_base<wchar_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > 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: __codecvt_utf8_utf16_base(unsigned long __maxcode, codecvt_mode __mode, size_t __refs) : codecvt(__refs), _M_maxcode(__maxcode), _M_mode(__mode) { } virtual ~__codecvt_utf8_utf16_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; 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(); 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: explicit codecvt_utf8_utf16(size_t __refs = 0) : __codecvt_utf8_utf16_base<wchar_t>(std::min(_Maxcode, 0x10fffful), _Mode, __refs) { } }; > > > >} ># 40 "/usr/include/c++/13/bits/fs_path.h" 2 3 ># 57 "/usr/include/c++/13/bits/fs_path.h" 3 >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<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> > struct __safe_iterator_traits : std::iterator_traits<_Iter> > { }; > > > template<> struct __safe_iterator_traits<void*> { }; > template<> struct __safe_iterator_traits<const void*> { }; > template<> struct __safe_iterator_traits<volatile void*> { }; > template<> struct __safe_iterator_traits<const volatile void*> { }; > > > 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 = false; > > > 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 = _EcharT; > > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > inline basic_string_view<_CharT> > __effective_range(const basic_string<_CharT, _Traits, _Alloc>& __source) > noexcept > { return __source; } > > template<typename _CharT, typename _Traits> > inline basic_string_view<_CharT> > __effective_range(const basic_string_view<_CharT, _Traits>& __source) > noexcept > { return __source; } > > > template<typename _Source> > auto > __effective_range(const _Source& __source) > { > > using _Iter = decltype(std::__niter_base(__source)); > using value_type = typename iterator_traits<_Iter>::value_type; > > if constexpr (__is_contiguous<_Iter>) > return basic_string_view<value_type>{&*__source}; > else > { > > > basic_string<__unified_u8_t<value_type>> __str; > _Source __it = __source; > for (value_type __ch = *__it; __ch != value_type(); __ch = *++__it) > __str.push_back(__ch); > return __str; > } > } > > > 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> > > > > , _Val>; > > > template<typename _InputIterator> > inline auto > __string_from_range(_InputIterator __first, _InputIterator __last) > { > using _EcharT > = typename std::iterator_traits<_InputIterator>::value_type; > static_assert(__is_encoded_char<_EcharT>); > > if constexpr (__is_contiguous<_InputIterator>) > { > > if (auto __len = __last - __first) [[__likely__]] > return basic_string_view<_EcharT>(&*__first, __len); > return basic_string_view<_EcharT>(); > } > else > { > > return basic_string<__unified_u8_t<_EcharT>>(__first, __last); > } > } > > >} > > > > > > > > class path > { > public: ># 300 "/usr/include/c++/13/bits/fs_path.h" 3 > 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(const path& __p) = default; > > path(path&& __p) noexcept > : _M_pathname(std::move(__p._M_pathname)), > _M_cmpts(std::move(__p._M_cmpts)) > { __p.clear(); } > > path(string_type&& __source, format = auto_format) > : _M_pathname(std::move(__source)) > { _M_split_cmpts(); } > > template<typename _Source, > typename _Require = __detail::_Path<_Source>> > path(_Source const& __source, format = auto_format) > : _M_pathname(_S_convert(__detail::__effective_range(__source))) > { _M_split_cmpts(); } > > template<typename _InputIterator, > typename _Require = __detail::_Path2<_InputIterator>> > path(_InputIterator __first, _InputIterator __last, format = auto_format) > : _M_pathname(_S_convert(__detail::__string_from_range(__first, __last))) > { _M_split_cmpts(); } > > template<typename _Source, > typename _Require = __detail::_Path<_Source>, > typename _Require2 = __detail::__value_type_is_char<_Source>> > path(_Source const& __src, const locale& __loc, format = auto_format) > : _M_pathname(_S_convert_loc(__detail::__effective_range(__src), __loc)) > { _M_split_cmpts(); } > > template<typename _InputIterator, > typename _Require = __detail::_Path2<_InputIterator>, > typename _Req2 = __detail::__value_type_is_char<_InputIterator>> > path(_InputIterator __first, _InputIterator __last, const locale& __loc, > format = auto_format) > : _M_pathname(_S_convert_loc(__first, __last, __loc)) > { _M_split_cmpts(); } > > ~path() = default; > > > > path& operator=(const path&); > path& operator=(path&&) noexcept; > path& operator=(string_type&& __source); > path& assign(string_type&& __source); > > template<typename _Source> > __detail::_Path<_Source>& > operator=(_Source const& __source) > { return *this = path(__source); } > > template<typename _Source> > __detail::_Path<_Source>& > assign(_Source const& __source) > { return *this = path(__source); } > > template<typename _InputIterator> > __detail::_Path2<_InputIterator>& > assign(_InputIterator __first, _InputIterator __last) > { return *this = path(__first, __last); } > > > > path& operator/=(const path& __p); > > template<typename _Source> > __detail::_Path<_Source>& > operator/=(_Source const& __source) > { > _M_append(_S_convert(__detail::__effective_range(__source))); > return *this; > } > > template<typename _Source> > __detail::_Path<_Source>& > append(_Source const& __source) > { > _M_append(_S_convert(__detail::__effective_range(__source))); > return *this; > } > > template<typename _InputIterator> > __detail::_Path2<_InputIterator>& > append(_InputIterator __first, _InputIterator __last) > { > _M_append(_S_convert(__detail::__string_from_range(__first, __last))); > return *this; > } > > > > path& operator+=(const path& __x); > path& operator+=(const string_type& __x); > path& operator+=(const value_type* __x); > path& operator+=(value_type __x); > path& operator+=(basic_string_view<value_type> __x); > > template<typename _Source> > __detail::_Path<_Source>& > operator+=(_Source const& __x) { return concat(__x); } > > template<typename _CharT> > __detail::_Path2<_CharT*>& > operator+=(_CharT __x); > > template<typename _Source> > __detail::_Path<_Source>& > concat(_Source const& __x) > { > _M_concat(_S_convert(__detail::__effective_range(__x))); > return *this; > } > > template<typename _InputIterator> > __detail::_Path2<_InputIterator>& > concat(_InputIterator __first, _InputIterator __last) > { > _M_concat(_S_convert(__detail::__string_from_range(__first, __last))); > return *this; > } > > > > void clear() noexcept { _M_pathname.clear(); _M_split_cmpts(); } > > path& make_preferred(); > path& remove_filename(); > path& replace_filename(const path& __replacement); > path& replace_extension(const path& __replacement = path()); > > void swap(path& __rhs) noexcept; > > > > const string_type& native() const noexcept { return _M_pathname; } > const value_type* c_str() const noexcept { return _M_pathname.c_str(); } > operator string_type() const { return _M_pathname; } > > template<typename _CharT, typename _Traits = std::char_traits<_CharT>, > typename _Allocator = std::allocator<_CharT>> > std::basic_string<_CharT, _Traits, _Allocator> > string(const _Allocator& __a = _Allocator()) const; > > std::string string() const; > > std::wstring wstring() const; > > > > > > std::string u8string() const; > > std::u16string u16string() const; > std::u32string u32string() const; > > > template<typename _CharT, typename _Traits = std::char_traits<_CharT>, > typename _Allocator = std::allocator<_CharT>> > std::basic_string<_CharT, _Traits, _Allocator> > generic_string(const _Allocator& __a = _Allocator()) const; > > std::string generic_string() const; > > std::wstring generic_wstring() const; > > > > > > std::string generic_u8string() const; > > std::u16string generic_u16string() const; > std::u32string generic_u32string() const; > > > > int compare(const path& __p) const noexcept; > int compare(const string_type& __s) const noexcept; > int compare(const value_type* __s) const noexcept; > int compare(basic_string_view<value_type> __s) const noexcept; > > > > path root_name() const; > path root_directory() const; > path root_path() const; > path relative_path() const; > path parent_path() const; > path filename() const; > path stem() const; > path extension() const; > > > > [[nodiscard]] bool empty() const noexcept { return _M_pathname.empty(); } > bool has_root_name() const noexcept; > bool has_root_directory() const noexcept; > bool has_root_path() const noexcept; > bool has_relative_path() const noexcept; > bool has_parent_path() const noexcept; > bool has_filename() const noexcept; > bool has_stem() const noexcept; > bool has_extension() const noexcept; > bool is_absolute() const noexcept; > bool is_relative() const noexcept { return !is_absolute(); } > > > path lexically_normal() const; > path lexically_relative(const path& base) const; > path lexically_proximate(const path& base) const; > > > 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) > { > __os << std::quoted(__p.string<_CharT, _Traits>()); > return __os; > } > > > template<typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, path& __p) > { > std::basic_string<_CharT, _Traits> __tmp; > if (__is >> std::quoted(__tmp)) > __p = std::move(__tmp); > return __is; > } > > > > > friend bool operator==(const path& __lhs, const path& __rhs) noexcept > { return path::_S_compare(__lhs, __rhs) == 0; } ># 566 "/usr/include/c++/13/bits/fs_path.h" 3 > friend bool operator!=(const path& __lhs, const path& __rhs) noexcept > { return !(__lhs == __rhs); } > > > friend bool operator<(const path& __lhs, const path& __rhs) noexcept > { return __lhs.compare(__rhs) < 0; } > > > friend bool operator<=(const path& __lhs, const path& __rhs) noexcept > { return !(__rhs < __lhs); } > > > friend bool operator>(const path& __lhs, const path& __rhs) noexcept > { return __rhs < __lhs; } > > > friend bool operator>=(const path& __lhs, const path& __rhs) noexcept > { return !(__lhs < __rhs); } > > > > friend path operator/(const path& __lhs, const path& __rhs) > { > path __result(__lhs); > __result /= __rhs; > return __result; > } > > private: > enum class _Type : unsigned char { > _Multi = 0, _Root_name, _Root_dir, _Filename > }; > > path(basic_string_view<value_type> __str, _Type __type); > > enum class _Split { _Stem, _Extension }; > > void _M_append(basic_string_view<value_type>); > 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>) > { > if constexpr (is_same_v<typename _Tp::value_type, value_type>) > return __str; ># 627 "/usr/include/c++/13/bits/fs_path.h" 3 > else > return _S_convert(__str.data(), __str.data() + __str.size()); > } > > 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) > { > const auto __s = __detail::__string_from_range(__first, __last); > return _S_convert_loc(__s.data(), __s.data() + __s.size(), __loc); > } > > template<typename _Tp> > static string_type > _S_convert_loc(const _Tp& __s, const std::locale& __loc) > { > return _S_convert_loc(__s.data(), __s.data() + __s.size(), __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 { return _M_cmpts.type(); } > > 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 > { return _Type(reinterpret_cast<uintptr_t>(_M_impl.get()) & 0x3); } > > void type(_Type) noexcept; > > int size() const noexcept; > bool empty() const noexcept; > void clear(); > void swap(_List& __l) noexcept { _M_impl.swap(__l._M_impl); } > 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; > }; > > > > > inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); } > > 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]] inline void > __throw_conversion_error() > { > (throw (filesystem_error( "Cannot convert character sequence", std::make_error_code(errc::illegal_byte_sequence)))) > > ; > } ># 794 "/usr/include/c++/13/bits/fs_path.h" 3 >} > > > > > > > > template<typename _InputIterator, > typename _Require = __detail::_Path2<_InputIterator>, > typename _CharT > = __detail::__value_type_is_char_or_char8_t<_InputIterator>> > > inline path > u8path(_InputIterator __first, _InputIterator __last) > { ># 818 "/usr/include/c++/13/bits/fs_path.h" 3 > return path{ __first, __last }; > > } > > > > > > template<typename _Source, > typename _Require = __detail::_Path<_Source>, > typename _CharT = __detail::__value_type_is_char_or_char8_t<_Source>> > > inline path > u8path(const _Source& __source) > { ># 841 "/usr/include/c++/13/bits/fs_path.h" 3 > return path{ __source }; > > } > > > > struct path::_Cmpt : path > { > _Cmpt(basic_string_view<value_type> __s, _Type __t, size_t __pos); > > _Cmpt() : _M_pos(-1) { } > > size_t _M_pos; > }; > > > > > > > > template<typename _EcharT> > struct path::_Codecvt > > : std::codecvt<_EcharT, char, mbstate_t> > { }; ># 875 "/usr/include/c++/13/bits/fs_path.h" 3 > 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>> > { }; > > template<typename _EcharT> > auto > path::_S_convert(const _EcharT* __f, const _EcharT* __l) > { > static_assert(__detail::__is_encoded_char<_EcharT>); > > > > > > > > if constexpr (is_same_v<_EcharT, value_type>) > return basic_string_view<value_type>(__f, __l - __f); ># 912 "/usr/include/c++/13/bits/fs_path.h" 3 > else > { > path::_Codecvt<_EcharT> __cvt; > std::string __str; > if (__str_codecvt_out_all(__f, __l, __str, __cvt)) > return __str; > } > __detail::__throw_conversion_error(); > } > > > > > > 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() noexcept : _M_path(nullptr), _M_cur(), _M_at_end() { } > > iterator(const iterator&) = default; > iterator& operator=(const iterator&) = default; > > reference operator*() const noexcept; > pointer operator->() const noexcept { return std::__addressof(**this); } > > iterator& operator++() noexcept; > > iterator operator++(int) noexcept > { auto __tmp = *this; ++*this; return __tmp; } > > iterator& operator--() noexcept; > > iterator operator--(int) noexcept > { auto __tmp = *this; --*this; return __tmp; } > > friend bool > operator==(const iterator& __lhs, const iterator& __rhs) noexcept > { return __lhs._M_equals(__rhs); } > > friend bool > operator!=(const iterator& __lhs, const iterator& __rhs) noexcept > { return !__lhs._M_equals(__rhs); } > > private: > friend class path; > > bool > _M_is_multi() const noexcept > { return _M_path->_M_type() == _Type::_Multi; } > > friend difference_type > __path_iter_distance(const iterator& __first, const iterator& __last) > noexcept > { > do { if (std::__is_constant_evaluated() && !bool(__first._M_path != nullptr)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__first._M_path == __last._M_path)) __builtin_unreachable(); } while (false); > if (__first._M_is_multi()) > return std::distance(__first._M_cur, __last._M_cur); > else if (__first._M_at_end == __last._M_at_end) > return 0; > else > return __first._M_at_end ? -1 : 1; > } > > friend void > __path_iter_advance(iterator& __i, difference_type __n) noexcept > { > if (__n == 1) > ++__i; > else if (__n == -1) > --__i; > else if (__n != 0) > { > do { if (std::__is_constant_evaluated() && !bool(__i._M_path != nullptr)) __builtin_unreachable(); } while (false); > do { if (std::__is_constant_evaluated() && !bool(__i._M_is_multi())) __builtin_unreachable(); } while (false); > > __i._M_cur += __n; > } > } > > iterator(const path* __path, path::_List::const_iterator __iter) noexcept > : _M_path(__path), _M_cur(__iter), _M_at_end() > { } > > iterator(const path* __path, bool __at_end) noexcept > : _M_path(__path), _M_cur(), _M_at_end(__at_end) > { } > > bool _M_equals(iterator) const noexcept; > > const path* _M_path; > path::_List::const_iterator _M_cur; > bool _M_at_end; > }; > > > inline path& > path::operator=(path&& __p) noexcept > { > if (&__p == this) [[__unlikely__]] > return *this; > > _M_pathname = std::move(__p._M_pathname); > _M_cmpts = std::move(__p._M_cmpts); > __p.clear(); > return *this; > } > > inline path& > path::operator=(string_type&& __source) > { return *this = path(std::move(__source)); } > > inline path& > path::assign(string_type&& __source) > { return *this = path(std::move(__source)); } > > inline path& > path::operator+=(const string_type& __x) > { > _M_concat(__x); > return *this; > } > > inline path& > path::operator+=(const value_type* __x) > { > _M_concat(__x); > return *this; > } > > inline path& > path::operator+=(value_type __x) > { > _M_concat(basic_string_view<value_type>(&__x, 1)); > return *this; > } > > inline path& > path::operator+=(basic_string_view<value_type> __x) > { > _M_concat(__x); > return *this; > } > > template<typename _CharT> > inline __detail::_Path2<_CharT*>& > path::operator+=(const _CharT __x) > { > _M_concat(_S_convert(&__x, &__x + 1)); > return *this; > } > > inline path& > path::make_preferred() > { ># 1081 "/usr/include/c++/13/bits/fs_path.h" 3 > return *this; > } > > inline void path::swap(path& __rhs) noexcept > { > _M_pathname.swap(__rhs._M_pathname); > _M_cmpts.swap(__rhs._M_cmpts); > } > > > template<typename _CharT, typename _Traits, typename _Allocator> > std::basic_string<_CharT, _Traits, _Allocator> > path::_S_str_convert(basic_string_view<value_type> __str, > const _Allocator& __a) > { > static_assert(!is_same_v<_CharT, value_type>); > > using _WString = basic_string<_CharT, _Traits, _Allocator>; > > if (__str.size() == 0) > return _WString(__a); > > > string_view __u8str = __str; ># 1121 "/usr/include/c++/13/bits/fs_path.h" 3 > { > const char* __first = __u8str.data(); > const char* __last = __first + __u8str.size(); > > > > > > > > { > > _WString __wstr(__a); > path::_Codecvt<_CharT> __cvt; > if (__str_codecvt_in_all(__first, __last, __wstr, __cvt)) > return __wstr; > } > } > __detail::__throw_conversion_error(); > } > > > template<typename _CharT, typename _Traits, typename _Allocator> > inline basic_string<_CharT, _Traits, _Allocator> > path::string(const _Allocator& __a) const > { > if constexpr (is_same_v<_CharT, value_type>) > return { _M_pathname.c_str(), _M_pathname.length(), __a }; > else > return _S_str_convert<_CharT, _Traits>(_M_pathname, __a); > } > > inline std::string > path::string() const { return string<char>(); } > > > inline std::wstring > path::wstring() const { return string<wchar_t>(); } > > > > > > > inline std::string > path::u8string() const > { ># 1178 "/usr/include/c++/13/bits/fs_path.h" 3 > return _M_pathname; > > } > > > inline std::u16string > path::u16string() const { return string<char16_t>(); } > > inline std::u32string > path::u32string() const { return string<char32_t>(); } > > template<typename _CharT, typename _Traits, typename _Allocator> > inline std::basic_string<_CharT, _Traits, _Allocator> > path::generic_string(const _Allocator& __a) const > { > > > > const value_type __slash = '/'; > > using _Alloc2 = typename allocator_traits<_Allocator>::template > rebind_alloc<value_type>; > basic_string<value_type, char_traits<value_type>, _Alloc2> __str(__a); > > if (_M_type() == _Type::_Root_dir) > __str.assign(1, __slash); > else > { > __str.reserve(_M_pathname.size()); > bool __add_slash = false; > for (auto& __elem : *this) > { > > > > > > > > if (__add_slash) > __str += __slash; > __str += basic_string_view<value_type>(__elem._M_pathname); > __add_slash = __elem._M_type() == _Type::_Filename; > } > } > > if constexpr (is_same_v<_CharT, value_type>) > return __str; > else > return _S_str_convert<_CharT, _Traits>(__str, __a); > } > > inline std::string > path::generic_string() const > { return generic_string<char>(); } > > > inline std::wstring > path::generic_wstring() const > { return generic_string<wchar_t>(); } > > > > > > > > inline std::string > path::generic_u8string() const > { return generic_string(); } > > > inline std::u16string > path::generic_u16string() const > { return generic_string<char16_t>(); } > > inline std::u32string > path::generic_u32string() const > { return generic_string<char32_t>(); } > > inline int > path::compare(const string_type& __s) const noexcept > { return compare(basic_string_view<value_type>(__s)); } > > inline int > path::compare(const value_type* __s) const noexcept > { return compare(basic_string_view<value_type>(__s)); } > > inline path > path::filename() const > { > if (empty()) > return {}; > else if (_M_type() == _Type::_Filename) > return *this; > else if (_M_type() == _Type::_Multi) > { > if (_M_pathname.back() == preferred_separator) > return {}; > auto __last = --end(); > if (__last->_M_type() == _Type::_Filename) > return *__last; > } > return {}; > } > > inline path > path::stem() const > { > auto ext = _M_find_extension(); > if (ext.first && ext.second != 0) > return path{ext.first->substr(0, ext.second)}; > return {}; > } > > inline path > path::extension() const > { > auto ext = _M_find_extension(); > if (ext.first && ext.second != string_type::npos) > return path{ext.first->substr(ext.second)}; > return {}; > } > > inline bool > path::has_stem() const noexcept > { > auto ext = _M_find_extension(); > return ext.first && ext.second != 0; > } > > inline bool > path::has_extension() const noexcept > { > auto ext = _M_find_extension(); > return ext.first && ext.second != string_type::npos; > } > > inline bool > path::is_absolute() const noexcept > { > > > > return has_root_directory(); > > } > > inline path::iterator > path::begin() const noexcept > { > if (_M_type() == _Type::_Multi) > return iterator(this, _M_cmpts.begin()); > return iterator(this, empty()); > } > > inline path::iterator > path::end() const noexcept > { > if (_M_type() == _Type::_Multi) > return iterator(this, _M_cmpts.end()); > return iterator(this, true); > } > > inline path::iterator& > path::iterator::operator++() noexcept > { > do { if (std::__is_constant_evaluated() && !bool(_M_path != nullptr)) __builtin_unreachable(); } while (false); > if (_M_is_multi()) > { > do { if (std::__is_constant_evaluated() && !bool(_M_cur != _M_path->_M_cmpts.end())) __builtin_unreachable(); } while (false); > ++_M_cur; > } > else > { > do { if (std::__is_constant_evaluated() && !bool(!_M_at_end)) __builtin_unreachable(); } while (false); > _M_at_end = true; > } > return *this; > } > > inline path::iterator& > path::iterator::operator--() noexcept > { > do { if (std::__is_constant_evaluated() && !bool(_M_path != nullptr)) __builtin_unreachable(); } while (false); > if (_M_is_multi()) > { > do { if (std::__is_constant_evaluated() && !bool(_M_cur != _M_path->_M_cmpts.begin())) __builtin_unreachable(); } while (false); > --_M_cur; > } > else > { > do { if (std::__is_constant_evaluated() && !bool(_M_at_end)) __builtin_unreachable(); } while (false); > _M_at_end = false; > } > return *this; > } > > inline path::iterator::reference > path::iterator::operator*() const noexcept > { > do { if (std::__is_constant_evaluated() && !bool(_M_path != nullptr)) __builtin_unreachable(); } while (false); > if (_M_is_multi()) > { > do { if (std::__is_constant_evaluated() && !bool(_M_cur != _M_path->_M_cmpts.end())) __builtin_unreachable(); } while (false); > return *_M_cur; > } > return *_M_path; > } > > inline bool > path::iterator::_M_equals(iterator __rhs) const noexcept > { > if (_M_path != __rhs._M_path) > return false; > if (_M_path == nullptr) > return true; > if (_M_is_multi()) > return _M_cur == __rhs._M_cur; > return _M_at_end == __rhs._M_at_end; > } > > > > > > inline int > path::_S_compare(const path& __lhs, const path& __rhs) noexcept > { return __lhs.compare(__rhs); } > > >} >} > > > >inline ptrdiff_t >distance(filesystem::path::iterator __first, filesystem::path::iterator __last) >noexcept >{ return __path_iter_distance(__first, __last); } > >template<typename _Distance> > inline void > advance(filesystem::path::iterator& __i, _Distance __n) noexcept > { __path_iter_advance(__i, static_cast<ptrdiff_t>(__n)); } > >extern template class __shared_ptr<const filesystem::filesystem_error::_Impl>; > > > > > >template<> > struct hash<filesystem::path> > { > size_t > operator()(const filesystem::path& __p) const noexcept > { return filesystem::hash_value(__p); } > }; > > >} ># 48 "/usr/include/c++/13/filesystem" 2 3 ># 1 "/usr/include/c++/13/bits/fs_dir.h" 1 3 ># 44 "/usr/include/c++/13/bits/fs_dir.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >namespace filesystem >{ > > > > > > class file_status > { > public: > > file_status() noexcept : file_status(file_type::none) {} > > explicit > file_status(file_type __ft, perms __prms = perms::unknown) noexcept > : _M_type(__ft), _M_perms(__prms) { } > > 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 { return _M_type; } > perms permissions() const noexcept { return _M_perms; } > > > void type(file_type __ft) noexcept { _M_type = __ft; } > void permissions(perms __prms) noexcept { _M_perms = __prms; } > > > > > > > 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) > : _M_path(__p) > { refresh(); } > > directory_entry(const filesystem::path& __p, error_code& __ec) > : _M_path(__p) > { > refresh(__ec); > if (__ec) > _M_path.clear(); > } > > ~directory_entry() = default; > > > directory_entry& operator=(const directory_entry&) = default; > directory_entry& operator=(directory_entry&&) noexcept = default; > > void > assign(const filesystem::path& __p) > { > _M_path = __p; > refresh(); > } > > void > assign(const filesystem::path& __p, error_code& __ec) > { > _M_path = __p; > refresh(__ec); > } > > void > replace_filename(const filesystem::path& __p) > { > _M_path.replace_filename(__p); > refresh(); > } > > void > replace_filename(const filesystem::path& __p, error_code& __ec) > { > _M_path.replace_filename(__p); > refresh(__ec); > } > > void > refresh() > { _M_type = symlink_status().type(); } > > void > refresh(error_code& __ec) noexcept > { _M_type = symlink_status(__ec).type(); } > > > const filesystem::path& path() const noexcept { return _M_path; } > operator const filesystem::path& () const noexcept { return _M_path; } > > bool > exists() const > { return filesystem::exists(file_status{_M_file_type()}); } > > bool > exists(error_code& __ec) const noexcept > { return filesystem::exists(file_status{_M_file_type(__ec)}); } > > bool > is_block_file() const > { return _M_file_type() == file_type::block; } > > bool > is_block_file(error_code& __ec) const noexcept > { return _M_file_type(__ec) == file_type::block; } > > bool > is_character_file() const > { return _M_file_type() == file_type::character; } > > bool > is_character_file(error_code& __ec) const noexcept > { return _M_file_type(__ec) == file_type::character; } > > bool > is_directory() const > { return _M_file_type() == file_type::directory; } > > bool > is_directory(error_code& __ec) const noexcept > { return _M_file_type(__ec) == file_type::directory; } > > bool > is_fifo() const > { return _M_file_type() == file_type::fifo; } > > bool > is_fifo(error_code& __ec) const noexcept > { return _M_file_type(__ec) == file_type::fifo; } > > bool > is_other() const > { return filesystem::is_other(file_status{_M_file_type()}); } > > bool > is_other(error_code& __ec) const noexcept > { return filesystem::is_other(file_status{_M_file_type(__ec)}); } > > bool > is_regular_file() const > { return _M_file_type() == file_type::regular; } > > bool > is_regular_file(error_code& __ec) const noexcept > { return _M_file_type(__ec) == file_type::regular; } > > bool > is_socket() const > { return _M_file_type() == file_type::socket; } > > bool > is_socket(error_code& __ec) const noexcept > { return _M_file_type(__ec) == file_type::socket; } > > bool > is_symlink() const > { > if (_M_type != file_type::none) > return _M_type == file_type::symlink; > return symlink_status().type() == file_type::symlink; > } > > bool > is_symlink(error_code& __ec) const noexcept > { > if (_M_type != file_type::none) > return _M_type == file_type::symlink; > return symlink_status(__ec).type() == file_type::symlink; > } > > uintmax_t > file_size() const > { return filesystem::file_size(_M_path); } > > uintmax_t > file_size(error_code& __ec) const noexcept > { return filesystem::file_size(_M_path, __ec); } > > uintmax_t > hard_link_count() const > { return filesystem::hard_link_count(_M_path); } > > uintmax_t > hard_link_count(error_code& __ec) const noexcept > { return filesystem::hard_link_count(_M_path, __ec); } > > file_time_type > last_write_time() const > { return filesystem::last_write_time(_M_path); } > > > file_time_type > last_write_time(error_code& __ec) const noexcept > { return filesystem::last_write_time(_M_path, __ec); } > > file_status > status() const > { return filesystem::status(_M_path); } > > file_status > status(error_code& __ec) const noexcept > { return filesystem::status(_M_path, __ec); } > > file_status > symlink_status() const > { return filesystem::symlink_status(_M_path); } > > file_status > symlink_status(error_code& __ec) const noexcept > { return filesystem::symlink_status(_M_path, __ec); } > > bool > operator==(const directory_entry& __rhs) const noexcept > { return _M_path == __rhs._M_path; } > > > > > > > bool > operator!=(const directory_entry& __rhs) const noexcept > { return _M_path != __rhs._M_path; } > > bool > operator< (const directory_entry& __rhs) const noexcept > { return _M_path < __rhs._M_path; } > > bool > operator<=(const directory_entry& __rhs) const noexcept > { return _M_path <= __rhs._M_path; } > > bool > operator> (const directory_entry& __rhs) const noexcept > { return _M_path > __rhs._M_path; } > > bool > operator>=(const directory_entry& __rhs) const noexcept > { return _M_path >= __rhs._M_path; } > > > 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) > { return __os << __d.path(); } > > directory_entry(const filesystem::path& __p, file_type __t) > : _M_path(__p), _M_type(__t) > { } > > > file_type > _M_file_type() const > { > if (_M_type != file_type::none && _M_type != file_type::symlink) > return _M_type; > return status().type(); > } > > > file_type > _M_file_type(error_code& __ec) const noexcept > { > if (_M_type != file_type::none && _M_type != file_type::symlink) > { > __ec.clear(); > return _M_type; > } > return status(__ec).type(); > } > > filesystem::path _M_path; > file_type _M_type = file_type::none; > }; > > > struct __directory_iterator_proxy > { > const directory_entry& operator*() const& noexcept { return _M_entry; } > > directory_entry operator*() && noexcept { return std::move(_M_entry); } > > private: > friend class directory_iterator; > friend class recursive_directory_iterator; > > explicit > __directory_iterator_proxy(const directory_entry& __e) : _M_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(__p, directory_options::none, nullptr) { } > > directory_iterator(const path& __p, directory_options __options) > : directory_iterator(__p, __options, nullptr) { } > > directory_iterator(const path& __p, error_code& __ec) > : directory_iterator(__p, directory_options::none, __ec) { } > > directory_iterator(const path& __p, directory_options __options, > error_code& __ec) > : directory_iterator(__p, __options, &__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 { return &**this; } > directory_iterator& operator++(); > directory_iterator& increment(error_code& __ec); > > __directory_iterator_proxy operator++(int) > { > __directory_iterator_proxy __pr{**this}; > ++*this; > return __pr; > } > > friend bool > operator==(const directory_iterator& __lhs, > const directory_iterator& __rhs) noexcept > { > return !__rhs._M_dir.owner_before(__lhs._M_dir) > && !__lhs._M_dir.owner_before(__rhs._M_dir); > } ># 440 "/usr/include/c++/13/bits/fs_dir.h" 3 > friend bool > operator!=(const directory_iterator& __lhs, > const directory_iterator& __rhs) noexcept > { return !(__lhs == __rhs); } > > > private: > directory_iterator(const path&, directory_options, error_code*); > > friend class recursive_directory_iterator; > > std::__shared_ptr<_Dir> _M_dir; > }; > > > > > > > > inline directory_iterator > begin(directory_iterator __iter) noexcept > { return __iter; } > > > inline directory_iterator > end(directory_iterator) noexcept > { return directory_iterator(); } > > > > 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(__p, directory_options::none, nullptr) { } > > recursive_directory_iterator(const path& __p, directory_options __options) > : recursive_directory_iterator(__p, __options, nullptr) { } > > recursive_directory_iterator(const path& __p, directory_options __options, > error_code& __ec) > : recursive_directory_iterator(__p, __options, &__ec) { } > > recursive_directory_iterator(const path& __p, error_code& __ec) > : recursive_directory_iterator(__p, directory_options::none, &__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 { return &**this; } > > > 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) > { > __directory_iterator_proxy __pr{**this}; > ++*this; > return __pr; > } > > 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 > { > return !__rhs._M_dirs.owner_before(__lhs._M_dirs) > && !__lhs._M_dirs.owner_before(__rhs._M_dirs); > } ># 548 "/usr/include/c++/13/bits/fs_dir.h" 3 > friend bool > operator!=(const recursive_directory_iterator& __lhs, > const recursive_directory_iterator& __rhs) noexcept > { return !(__lhs == __rhs); } > > > 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); > > friend uintmax_t > filesystem::remove_all(const path&, error_code&); > friend uintmax_t > filesystem::remove_all(const path&); > }; > > > > > > > > inline recursive_directory_iterator > begin(recursive_directory_iterator __iter) noexcept > { return __iter; } > > > inline recursive_directory_iterator > end(recursive_directory_iterator) noexcept > { return recursive_directory_iterator(); } > > >} > > >} > > > > > extern template class > __shared_ptr<filesystem::_Dir>; > extern template class > __shared_ptr<filesystem::recursive_directory_iterator::_Dir_stack>; > > >} ># 49 "/usr/include/c++/13/filesystem" 2 3 ># 1 "/usr/include/c++/13/bits/fs_ops.h" 1 3 ># 37 "/usr/include/c++/13/bits/fs_ops.h" 3 >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); > > inline void > copy(const path& __from, const path& __to) > { copy(__from, __to, copy_options::none); } > > inline void > copy(const path& __from, const path& __to, error_code& __ec) > { copy(__from, __to, copy_options::none, __ec); } > > void copy(const path& __from, const path& __to, copy_options __options); > void copy(const path& __from, const path& __to, copy_options __options, > error_code& __ec); > > inline bool > copy_file(const path& __from, const path& __to) > { return copy_file(__from, __to, copy_options::none); } > > inline bool > copy_file(const path& __from, const path& __to, error_code& __ec) > { return copy_file(__from, __to, copy_options::none, __ec); } > > bool copy_file(const path& __from, const path& __to, copy_options __option); > bool copy_file(const path& __from, const path& __to, copy_options __option, > 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]] > inline bool > exists(file_status __s) noexcept > { return status_known(__s) && __s.type() != file_type::not_found; } > > [[nodiscard]] > inline bool > exists(const path& __p) > { return exists(status(__p)); } > > [[nodiscard]] > inline bool > exists(const path& __p, error_code& __ec) noexcept > { > auto __s = status(__p, __ec); > if (status_known(__s)) > { > __ec.clear(); > return __s.type() != file_type::not_found; > } > return false; > } > > [[nodiscard]] > uintmax_t file_size(const path& __p); > > [[nodiscard]] > uintmax_t file_size(const path& __p, error_code& __ec) noexcept; > > [[nodiscard]] > uintmax_t hard_link_count(const path& __p); > > [[nodiscard]] > uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept; > > [[nodiscard]] > inline bool > is_block_file(file_status __s) noexcept > { return __s.type() == file_type::block; } > > [[nodiscard]] > inline bool > is_block_file(const path& __p) > { return is_block_file(status(__p)); } > > [[nodiscard]] > inline bool > is_block_file(const path& __p, error_code& __ec) noexcept > { return is_block_file(status(__p, __ec)); } > > [[nodiscard]] > inline bool > is_character_file(file_status __s) noexcept > { return __s.type() == file_type::character; } > > [[nodiscard]] > inline bool > is_character_file(const path& __p) > { return is_character_file(status(__p)); } > > [[nodiscard]] > inline bool > is_character_file(const path& __p, error_code& __ec) noexcept > { return is_character_file(status(__p, __ec)); } > > [[nodiscard]] > inline bool > is_directory(file_status __s) noexcept > { return __s.type() == file_type::directory; } > > [[nodiscard]] > inline bool > is_directory(const path& __p) > { return is_directory(status(__p)); } > > [[nodiscard]] > inline bool > is_directory(const path& __p, error_code& __ec) noexcept > { return is_directory(status(__p, __ec)); } > > [[nodiscard]] > bool is_empty(const path& __p); > > [[nodiscard]] > bool is_empty(const path& __p, error_code& __ec); > > [[nodiscard]] > inline bool > is_fifo(file_status __s) noexcept > { return __s.type() == file_type::fifo; } > > [[nodiscard]] > inline bool > is_fifo(const path& __p) > { return is_fifo(status(__p)); } > > [[nodiscard]] > inline bool > is_fifo(const path& __p, error_code& __ec) noexcept > { return is_fifo(status(__p, __ec)); } > > [[nodiscard]] > inline bool > is_other(file_status __s) noexcept > { > return exists(__s) && !is_regular_file(__s) && !is_directory(__s) > && !is_symlink(__s); > } > > [[nodiscard]] > inline bool > is_other(const path& __p) > { return is_other(status(__p)); } > > [[nodiscard]] > inline bool > is_other(const path& __p, error_code& __ec) noexcept > { return is_other(status(__p, __ec)); } > > [[nodiscard]] > inline bool > is_regular_file(file_status __s) noexcept > { return __s.type() == file_type::regular; } > > [[nodiscard]] > inline bool > is_regular_file(const path& __p) > { return is_regular_file(status(__p)); } > > [[nodiscard]] > inline bool > is_regular_file(const path& __p, error_code& __ec) noexcept > { return is_regular_file(status(__p, __ec)); } > > [[nodiscard]] > inline bool > is_socket(file_status __s) noexcept > { return __s.type() == file_type::socket; } > > [[nodiscard]] > inline bool > is_socket(const path& __p) > { return is_socket(status(__p)); } > > [[nodiscard]] > inline bool > is_socket(const path& __p, error_code& __ec) noexcept > { return is_socket(status(__p, __ec)); } > > [[nodiscard]] > inline bool > is_symlink(file_status __s) noexcept > { return __s.type() == file_type::symlink; } > > [[nodiscard]] > inline bool > is_symlink(const path& __p) > { return is_symlink(symlink_status(__p)); } > > [[nodiscard]] > inline bool > is_symlink(const path& __p, error_code& __ec) noexcept > { return is_symlink(symlink_status(__p, __ec)); } > > [[nodiscard]] > file_time_type last_write_time(const path& __p); > > [[nodiscard]] > file_time_type last_write_time(const path& __p, error_code& __ec) noexcept; > > 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); > > inline void > permissions(const path& __p, perms __prms, error_code& __ec) noexcept > { permissions(__p, __prms, perm_options::replace, __ec); } > > void > permissions(const path& __p, perms __prms, perm_options __opts, > error_code& __ec) noexcept; > > [[nodiscard]] > inline path proximate(const path& __p, error_code& __ec) > { return proximate(__p, current_path(), __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]] > inline path relative(const path& __p, error_code& __ec) > { return relative(__p, current_path(), __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); > bool remove(const path& __p, error_code& __ec) noexcept; > > uintmax_t remove_all(const path& __p); > uintmax_t remove_all(const path& __p, error_code& __ec); > > 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]] > inline bool status_known(file_status __s) noexcept > { return __s.type() != file_type::none; } > > [[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); > > >} > > >} ># 50 "/usr/include/c++/13/filesystem" 2 3 ># 23 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/std_fs.hpp" 2 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ >namespace std_fs = std::filesystem; >} >} } ># 28 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 2 3 > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > >template<typename BasicJsonType> >inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n) >{ > if (__builtin_expect (!!(!j.is_null()), 0 )) > { > throw type_error::create(302, concat("type must be null, but is ", j.type_name()), &j); > } > n = nullptr; >} > > >template < typename BasicJsonType, typename ArithmeticType, > enable_if_t < std::is_arithmetic<ArithmeticType>::value&& > !std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, > int > = 0 > >void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) >{ > switch (static_cast<value_t>(j)) > { > case value_t::number_unsigned: > { > val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); > break; > } > case value_t::number_integer: > { > val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); > break; > } > case value_t::number_float: > { > val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); > break; > } > > case value_t::null: > case value_t::object: > case value_t::array: > case value_t::string: > case value_t::boolean: > case value_t::binary: > case value_t::discarded: > default: > throw type_error::create(302, concat("type must be number, but is ", j.type_name()), &j); > } >} > >template<typename BasicJsonType> >inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) >{ > if (__builtin_expect (!!(!j.is_boolean()), 0 )) > { > throw type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j); > } > b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(); >} > >template<typename BasicJsonType> >inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) >{ > if (__builtin_expect (!!(!j.is_string()), 0 )) > { > throw type_error::create(302, concat("type must be string, but is ", j.type_name()), &j); > } > s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); >} > >template < > typename BasicJsonType, typename StringType, > enable_if_t < > std::is_assignable<StringType&, const typename BasicJsonType::string_t>::value > && is_detected_exact<typename BasicJsonType::string_t::value_type, value_type_t, StringType>::value > && !std::is_same<typename BasicJsonType::string_t, StringType>::value > && !is_json_ref<StringType>::value, int > = 0 > >inline void from_json(const BasicJsonType& j, StringType& s) >{ > if (__builtin_expect (!!(!j.is_string()), 0 )) > { > throw type_error::create(302, concat("type must be string, but is ", j.type_name()), &j); > } > > s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); >} > >template<typename BasicJsonType> >inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) >{ > get_arithmetic_value(j, val); >} > >template<typename BasicJsonType> >inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) >{ > get_arithmetic_value(j, val); >} > >template<typename BasicJsonType> >inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) >{ > get_arithmetic_value(j, val); >} > > >template<typename BasicJsonType, typename EnumType, > enable_if_t<std::is_enum<EnumType>::value, int> = 0> >inline void from_json(const BasicJsonType& j, EnumType& e) >{ > typename std::underlying_type<EnumType>::type val; > get_arithmetic_value(j, val); > e = static_cast<EnumType>(val); >} > > > >template<typename BasicJsonType, typename T, typename Allocator, > enable_if_t<is_getable<BasicJsonType, T>::value, int> = 0> >inline void from_json(const BasicJsonType& j, std::forward_list<T, Allocator>& l) >{ > if (__builtin_expect (!!(!j.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", j.type_name()), &j); > } > l.clear(); > std::transform(j.rbegin(), j.rend(), > std::front_inserter(l), [](const BasicJsonType & i) > { > return i.template get<T>(); > }); >} > > >template<typename BasicJsonType, typename T, > enable_if_t<is_getable<BasicJsonType, T>::value, int> = 0> >inline void from_json(const BasicJsonType& j, std::valarray<T>& l) >{ > if (__builtin_expect (!!(!j.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", j.type_name()), &j); > } > l.resize(j.size()); > std::transform(j.begin(), j.end(), std::begin(l), > [](const BasicJsonType & elem) > { > return elem.template get<T>(); > }); >} > >template<typename BasicJsonType, typename T, std::size_t N> >auto from_json(const BasicJsonType& j, T (&arr)[N]) >-> decltype(j.template get<T>(), void()) >{ > for (std::size_t i = 0; i < N; ++i) > { > arr[i] = j.at(i).template get<T>(); > } >} > >template<typename BasicJsonType> >inline void from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> ) >{ > arr = *j.template get_ptr<const typename BasicJsonType::array_t*>(); >} > >template<typename BasicJsonType, typename T, std::size_t N> >auto from_json_array_impl(const BasicJsonType& j, std::array<T, N>& arr, > priority_tag<2> ) >-> decltype(j.template get<T>(), void()) >{ > for (std::size_t i = 0; i < N; ++i) > { > arr[i] = j.at(i).template get<T>(); > } >} > >template<typename BasicJsonType, typename ConstructibleArrayType, > enable_if_t< > std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value, > int> = 0> >auto from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, priority_tag<1> ) >-> decltype( > arr.reserve(std::declval<typename ConstructibleArrayType::size_type>()), > j.template get<typename ConstructibleArrayType::value_type>(), > void()) >{ > using std::end; > > ConstructibleArrayType ret; > ret.reserve(j.size()); > std::transform(j.begin(), j.end(), > std::inserter(ret, end(ret)), [](const BasicJsonType & i) > { > > > return i.template get<typename ConstructibleArrayType::value_type>(); > }); > arr = std::move(ret); >} > >template<typename BasicJsonType, typename ConstructibleArrayType, > enable_if_t< > std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value, > int> = 0> >inline void from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, > priority_tag<0> ) >{ > using std::end; > > ConstructibleArrayType ret; > std::transform( > j.begin(), j.end(), std::inserter(ret, end(ret)), > [](const BasicJsonType & i) > { > > > return i.template get<typename ConstructibleArrayType::value_type>(); > }); > arr = std::move(ret); >} > >template < typename BasicJsonType, typename ConstructibleArrayType, > enable_if_t < > is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value&& > !is_constructible_object_type<BasicJsonType, ConstructibleArrayType>::value&& > !is_constructible_string_type<BasicJsonType, ConstructibleArrayType>::value&& > !std::is_same<ConstructibleArrayType, typename BasicJsonType::binary_t>::value&& > !is_basic_json<ConstructibleArrayType>::value, > int > = 0 > >auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) >-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), >j.template get<typename ConstructibleArrayType::value_type>(), >void()) >{ > if (__builtin_expect (!!(!j.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", j.type_name()), &j); > } > > from_json_array_impl(j, arr, priority_tag<3> {}); >} > >template < typename BasicJsonType, typename T, std::size_t... Idx > >std::array<T, sizeof...(Idx)> from_json_inplace_array_impl(BasicJsonType&& j, > identity_tag<std::array<T, sizeof...(Idx)>> , index_sequence<Idx...> ) >{ > return { { std::forward<BasicJsonType>(j).at(Idx).template get<T>()... } }; >} > >template < typename BasicJsonType, typename T, std::size_t N > >auto from_json(BasicJsonType&& j, identity_tag<std::array<T, N>> tag) >-> decltype(from_json_inplace_array_impl(std::forward<BasicJsonType>(j), tag, make_index_sequence<N> {})) >{ > if (__builtin_expect (!!(!j.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", j.type_name()), &j); > } > > return from_json_inplace_array_impl(std::forward<BasicJsonType>(j), tag, make_index_sequence<N> {}); >} > >template<typename BasicJsonType> >inline void from_json(const BasicJsonType& j, typename BasicJsonType::binary_t& bin) >{ > if (__builtin_expect (!!(!j.is_binary()), 0 )) > { > throw type_error::create(302, concat("type must be binary, but is ", j.type_name()), &j); > } > > bin = *j.template get_ptr<const typename BasicJsonType::binary_t*>(); >} > >template<typename BasicJsonType, typename ConstructibleObjectType, > enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value, int> = 0> >inline void from_json(const BasicJsonType& j, ConstructibleObjectType& obj) >{ > if (__builtin_expect (!!(!j.is_object()), 0 )) > { > throw type_error::create(302, concat("type must be object, but is ", j.type_name()), &j); > } > > ConstructibleObjectType ret; > const auto* inner_object = j.template get_ptr<const typename BasicJsonType::object_t*>(); > using value_type = typename ConstructibleObjectType::value_type; > std::transform( > inner_object->begin(), inner_object->end(), > std::inserter(ret, ret.begin()), > [](typename BasicJsonType::object_t::value_type const & p) > { > return value_type(p.first, p.second.template get<typename ConstructibleObjectType::mapped_type>()); > }); > obj = std::move(ret); >} > > > > > >template < typename BasicJsonType, typename ArithmeticType, > enable_if_t < > std::is_arithmetic<ArithmeticType>::value&& > !std::is_same<ArithmeticType, typename BasicJsonType::number_unsigned_t>::value&& > !std::is_same<ArithmeticType, typename BasicJsonType::number_integer_t>::value&& > !std::is_same<ArithmeticType, typename BasicJsonType::number_float_t>::value&& > !std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, > int > = 0 > >inline void from_json(const BasicJsonType& j, ArithmeticType& val) >{ > switch (static_cast<value_t>(j)) > { > case value_t::number_unsigned: > { > val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); > break; > } > case value_t::number_integer: > { > val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); > break; > } > case value_t::number_float: > { > val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); > break; > } > case value_t::boolean: > { > val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>()); > break; > } > > case value_t::null: > case value_t::object: > case value_t::array: > case value_t::string: > case value_t::binary: > case value_t::discarded: > default: > throw type_error::create(302, concat("type must be number, but is ", j.type_name()), &j); > } >} > >template<typename BasicJsonType, typename... Args, std::size_t... Idx> >std::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> ) >{ > return std::make_tuple(std::forward<BasicJsonType>(j).at(Idx).template get<Args>()...); >} > >template < typename BasicJsonType, class A1, class A2 > >std::pair<A1, A2> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::pair<A1, A2>> , priority_tag<0> ) >{ > return {std::forward<BasicJsonType>(j).at(0).template get<A1>(), > std::forward<BasicJsonType>(j).at(1).template get<A2>()}; >} > >template<typename BasicJsonType, typename A1, typename A2> >inline void from_json_tuple_impl(BasicJsonType&& j, std::pair<A1, A2>& p, priority_tag<1> ) >{ > p = from_json_tuple_impl(std::forward<BasicJsonType>(j), identity_tag<std::pair<A1, A2>> {}, priority_tag<0> {}); >} > >template<typename BasicJsonType, typename... Args> >std::tuple<Args...> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::tuple<Args...>> , priority_tag<2> ) >{ > return from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {}); >} > >template<typename BasicJsonType, typename... Args> >inline void from_json_tuple_impl(BasicJsonType&& j, std::tuple<Args...>& t, priority_tag<3> ) >{ > t = from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {}); >} > >template<typename BasicJsonType, typename TupleRelated> >auto from_json(BasicJsonType&& j, TupleRelated&& t) >-> decltype(from_json_tuple_impl(std::forward<BasicJsonType>(j), std::forward<TupleRelated>(t), priority_tag<3> {})) >{ > if (__builtin_expect (!!(!j.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", j.type_name()), &j); > } > > return from_json_tuple_impl(std::forward<BasicJsonType>(j), std::forward<TupleRelated>(t), priority_tag<3> {}); >} > >template < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator, > typename = enable_if_t < !std::is_constructible < > typename BasicJsonType::string_t, Key >::value >> >inline void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m) >{ > if (__builtin_expect (!!(!j.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", j.type_name()), &j); > } > m.clear(); > for (const auto& p : j) > { > if (__builtin_expect (!!(!p.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", p.type_name()), &j); > } > m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>()); > } >} > >template < typename BasicJsonType, typename Key, typename Value, typename Hash, typename KeyEqual, typename Allocator, > typename = enable_if_t < !std::is_constructible < > typename BasicJsonType::string_t, Key >::value >> >inline void from_json(const BasicJsonType& j, std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>& m) >{ > if (__builtin_expect (!!(!j.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", j.type_name()), &j); > } > m.clear(); > for (const auto& p : j) > { > if (__builtin_expect (!!(!p.is_array()), 0 )) > { > throw type_error::create(302, concat("type must be array, but is ", p.type_name()), &j); > } > m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>()); > } >} > > >template<typename BasicJsonType> >inline void from_json(const BasicJsonType& j, std_fs::path& p) >{ > if (__builtin_expect (!!(!j.is_string()), 0 )) > { > throw type_error::create(302, concat("type must be string, but is ", j.type_name()), &j); > } > p = *j.template get_ptr<const typename BasicJsonType::string_t*>(); >} > > >struct from_json_fn >{ > template<typename BasicJsonType, typename T> > auto operator()(const BasicJsonType& j, T&& val) const > noexcept(noexcept(from_json(j, std::forward<T>(val)))) > -> decltype(from_json(j, std::forward<T>(val))) > { > return from_json(j, std::forward<T>(val)); > } >}; > >} ># 491 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/from_json.hpp" 3 >inline constexpr const auto& from_json = > detail::static_const<detail::from_json_fn>::value; > > > > >} } ># 15 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/adl_serializer.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_json.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_json.hpp" 3 > ># 20 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_json.hpp" 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iteration_proxy.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iteration_proxy.hpp" 3 > ># 25 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iteration_proxy.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > >template<typename string_type> >void int_to_string( string_type& target, std::size_t value ) >{ > > using std::to_string; > target = to_string(value); >} >template<typename IteratorType> class iteration_proxy_value >{ > public: > using difference_type = std::ptrdiff_t; > using value_type = iteration_proxy_value; > using pointer = value_type *; > using reference = value_type &; > using iterator_category = std::input_iterator_tag; > using string_type = typename std::remove_cv< typename std::remove_reference<decltype( std::declval<IteratorType>().key() ) >::type >::type; > > private: > > IteratorType anchor{}; > > std::size_t array_index = 0; > > mutable std::size_t array_index_last = 0; > > mutable string_type array_index_str = "0"; > > string_type empty_str{}; > > public: > explicit iteration_proxy_value() = default; > explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) > noexcept(std::is_nothrow_move_constructible<IteratorType>::value > && std::is_nothrow_default_constructible<string_type>::value) > : anchor(std::move(it)) > , array_index(array_index_) > {} > > iteration_proxy_value(iteration_proxy_value const&) = default; > iteration_proxy_value& operator=(iteration_proxy_value const&) = default; > > iteration_proxy_value(iteration_proxy_value&&) > noexcept(std::is_nothrow_move_constructible<IteratorType>::value > && std::is_nothrow_move_constructible<string_type>::value) = default; > iteration_proxy_value& operator=(iteration_proxy_value&&) > noexcept(std::is_nothrow_move_assignable<IteratorType>::value > && std::is_nothrow_move_assignable<string_type>::value) = default; > ~iteration_proxy_value() = default; > > > const iteration_proxy_value& operator*() const > { > return *this; > } > > > iteration_proxy_value& operator++() > { > ++anchor; > ++array_index; > > return *this; > } > > iteration_proxy_value operator++(int)& > { > auto tmp = iteration_proxy_value(anchor, array_index); > ++anchor; > ++array_index; > return tmp; > } > > > bool operator==(const iteration_proxy_value& o) const > { > return anchor == o.anchor; > } > > > bool operator!=(const iteration_proxy_value& o) const > { > return anchor != o.anchor; > } > > > const string_type& key() const > { > (static_cast <bool> (anchor.m_object != nullptr) ? void (0) : __assert_fail ("anchor.m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iteration_proxy.hpp", 116, __extension__ __PRETTY_FUNCTION__)); > > switch (anchor.m_object->type()) > { > > case value_t::array: > { > if (array_index != array_index_last) > { > int_to_string( array_index_str, array_index ); > array_index_last = array_index; > } > return array_index_str; > } > > > case value_t::object: > return anchor.key(); > > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > return empty_str; > } > } > > > typename IteratorType::reference value() const > { > return anchor.value(); > } >}; > > >template<typename IteratorType> class iteration_proxy >{ > private: > > typename IteratorType::pointer container = nullptr; > > public: > explicit iteration_proxy() = default; > > > explicit iteration_proxy(typename IteratorType::reference cont) noexcept > : container(&cont) {} > > iteration_proxy(iteration_proxy const&) = default; > iteration_proxy& operator=(iteration_proxy const&) = default; > iteration_proxy(iteration_proxy&&) noexcept = default; > iteration_proxy& operator=(iteration_proxy&&) noexcept = default; > ~iteration_proxy() = default; > > > iteration_proxy_value<IteratorType> begin() const noexcept > { > return iteration_proxy_value<IteratorType>(container->begin()); > } > > > iteration_proxy_value<IteratorType> end() const noexcept > { > return iteration_proxy_value<IteratorType>(container->end()); > } >}; > > > > >template<std::size_t N, typename IteratorType, enable_if_t<N == 0, int> = 0> >auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.key()) >{ > return i.key(); >} > > > >template<std::size_t N, typename IteratorType, enable_if_t<N == 1, int> = 0> >auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.value()) >{ > return i.value(); >} > >} >} } > > > > > >namespace std >{ > > > > > > >template<typename IteratorType> >class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>> > : public std::integral_constant<std::size_t, 2> {}; > >template<std::size_t N, typename IteratorType> >class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >> >{ > public: > using type = decltype( > get<N>(std::declval < > ::nlohmann::detail::iteration_proxy_value<IteratorType >> ())); >}; > > > > >} ># 21 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_json.hpp" 2 3 > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ ># 42 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_json.hpp" 3 >template<value_t> struct external_constructor; > >template<> >struct external_constructor<value_t::boolean> >{ > template<typename BasicJsonType> > static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::boolean; > j.m_value = b; > j.assert_invariant(); > } >}; > >template<> >struct external_constructor<value_t::string> >{ > template<typename BasicJsonType> > static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::string; > j.m_value = s; > j.assert_invariant(); > } > > template<typename BasicJsonType> > static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::string; > j.m_value = std::move(s); > j.assert_invariant(); > } > > template < typename BasicJsonType, typename CompatibleStringType, > enable_if_t < !std::is_same<CompatibleStringType, typename BasicJsonType::string_t>::value, > int > = 0 > > static void construct(BasicJsonType& j, const CompatibleStringType& str) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::string; > j.m_value.string = j.template create<typename BasicJsonType::string_t>(str); > j.assert_invariant(); > } >}; > >template<> >struct external_constructor<value_t::binary> >{ > template<typename BasicJsonType> > static void construct(BasicJsonType& j, const typename BasicJsonType::binary_t& b) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::binary; > j.m_value = typename BasicJsonType::binary_t(b); > j.assert_invariant(); > } > > template<typename BasicJsonType> > static void construct(BasicJsonType& j, typename BasicJsonType::binary_t&& b) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::binary; > j.m_value = typename BasicJsonType::binary_t(std::move(b)); > j.assert_invariant(); > } >}; > >template<> >struct external_constructor<value_t::number_float> >{ > template<typename BasicJsonType> > static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::number_float; > j.m_value = val; > j.assert_invariant(); > } >}; > >template<> >struct external_constructor<value_t::number_unsigned> >{ > template<typename BasicJsonType> > static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::number_unsigned; > j.m_value = val; > j.assert_invariant(); > } >}; > >template<> >struct external_constructor<value_t::number_integer> >{ > template<typename BasicJsonType> > static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::number_integer; > j.m_value = val; > j.assert_invariant(); > } >}; > >template<> >struct external_constructor<value_t::array> >{ > template<typename BasicJsonType> > static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::array; > j.m_value = arr; > j.set_parents(); > j.assert_invariant(); > } > > template<typename BasicJsonType> > static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::array; > j.m_value = std::move(arr); > j.set_parents(); > j.assert_invariant(); > } > > template < typename BasicJsonType, typename CompatibleArrayType, > enable_if_t < !std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value, > int > = 0 > > static void construct(BasicJsonType& j, const CompatibleArrayType& arr) > { > using std::begin; > using std::end; > > j.m_value.destroy(j.m_type); > j.m_type = value_t::array; > j.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr)); > j.set_parents(); > j.assert_invariant(); > } > > template<typename BasicJsonType> > static void construct(BasicJsonType& j, const std::vector<bool>& arr) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::array; > j.m_value = value_t::array; > j.m_value.array->reserve(arr.size()); > for (const bool x : arr) > { > j.m_value.array->push_back(x); > j.set_parent(j.m_value.array->back()); > } > j.assert_invariant(); > } > > template<typename BasicJsonType, typename T, > enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> > static void construct(BasicJsonType& j, const std::valarray<T>& arr) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::array; > j.m_value = value_t::array; > j.m_value.array->resize(arr.size()); > if (arr.size() > 0) > { > std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin()); > } > j.set_parents(); > j.assert_invariant(); > } >}; > >template<> >struct external_constructor<value_t::object> >{ > template<typename BasicJsonType> > static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::object; > j.m_value = obj; > j.set_parents(); > j.assert_invariant(); > } > > template<typename BasicJsonType> > static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) > { > j.m_value.destroy(j.m_type); > j.m_type = value_t::object; > j.m_value = std::move(obj); > j.set_parents(); > j.assert_invariant(); > } > > template < typename BasicJsonType, typename CompatibleObjectType, > enable_if_t < !std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value, int > = 0 > > static void construct(BasicJsonType& j, const CompatibleObjectType& obj) > { > using std::begin; > using std::end; > > j.m_value.destroy(j.m_type); > j.m_type = value_t::object; > j.m_value.object = j.template create<typename BasicJsonType::object_t>(begin(obj), end(obj)); > j.set_parents(); > j.assert_invariant(); > } >}; > > > > > >template<typename BasicJsonType, typename T, > enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value, int> = 0> >inline void to_json(BasicJsonType& j, T b) noexcept >{ > external_constructor<value_t::boolean>::construct(j, b); >} > >template < typename BasicJsonType, typename BoolRef, > enable_if_t < > ((std::is_same<std::vector<bool>::reference, BoolRef>::value > && !std::is_same <std::vector<bool>::reference, typename BasicJsonType::boolean_t&>::value) > || (std::is_same<std::vector<bool>::const_reference, BoolRef>::value > && !std::is_same <detail::uncvref_t<std::vector<bool>::const_reference>, > typename BasicJsonType::boolean_t >::value)) > && std::is_convertible<const BoolRef&, typename BasicJsonType::boolean_t>::value, int > = 0 > >inline void to_json(BasicJsonType& j, const BoolRef& b) noexcept >{ > external_constructor<value_t::boolean>::construct(j, static_cast<typename BasicJsonType::boolean_t>(b)); >} > >template<typename BasicJsonType, typename CompatibleString, > enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value, int> = 0> >inline void to_json(BasicJsonType& j, const CompatibleString& s) >{ > external_constructor<value_t::string>::construct(j, s); >} > >template<typename BasicJsonType> >inline void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) >{ > external_constructor<value_t::string>::construct(j, std::move(s)); >} > >template<typename BasicJsonType, typename FloatType, > enable_if_t<std::is_floating_point<FloatType>::value, int> = 0> >inline void to_json(BasicJsonType& j, FloatType val) noexcept >{ > external_constructor<value_t::number_float>::construct(j, static_cast<typename BasicJsonType::number_float_t>(val)); >} > >template<typename BasicJsonType, typename CompatibleNumberUnsignedType, > enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value, int> = 0> >inline void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept >{ > external_constructor<value_t::number_unsigned>::construct(j, static_cast<typename BasicJsonType::number_unsigned_t>(val)); >} > >template<typename BasicJsonType, typename CompatibleNumberIntegerType, > enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value, int> = 0> >inline void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept >{ > external_constructor<value_t::number_integer>::construct(j, static_cast<typename BasicJsonType::number_integer_t>(val)); >} > > >template<typename BasicJsonType, typename EnumType, > enable_if_t<std::is_enum<EnumType>::value, int> = 0> >inline void to_json(BasicJsonType& j, EnumType e) noexcept >{ > using underlying_type = typename std::underlying_type<EnumType>::type; > external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e)); >} > > >template<typename BasicJsonType> >inline void to_json(BasicJsonType& j, const std::vector<bool>& e) >{ > external_constructor<value_t::array>::construct(j, e); >} > >template < typename BasicJsonType, typename CompatibleArrayType, > enable_if_t < is_compatible_array_type<BasicJsonType, > CompatibleArrayType>::value&& > !is_compatible_object_type<BasicJsonType, CompatibleArrayType>::value&& > !is_compatible_string_type<BasicJsonType, CompatibleArrayType>::value&& > !std::is_same<typename BasicJsonType::binary_t, CompatibleArrayType>::value&& > !is_basic_json<CompatibleArrayType>::value, > int > = 0 > >inline void to_json(BasicJsonType& j, const CompatibleArrayType& arr) >{ > external_constructor<value_t::array>::construct(j, arr); >} > >template<typename BasicJsonType> >inline void to_json(BasicJsonType& j, const typename BasicJsonType::binary_t& bin) >{ > external_constructor<value_t::binary>::construct(j, bin); >} > >template<typename BasicJsonType, typename T, > enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> >inline void to_json(BasicJsonType& j, const std::valarray<T>& arr) >{ > external_constructor<value_t::array>::construct(j, std::move(arr)); >} > >template<typename BasicJsonType> >inline void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) >{ > external_constructor<value_t::array>::construct(j, std::move(arr)); >} > >template < typename BasicJsonType, typename CompatibleObjectType, > enable_if_t < is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value&& !is_basic_json<CompatibleObjectType>::value, int > = 0 > >inline void to_json(BasicJsonType& j, const CompatibleObjectType& obj) >{ > external_constructor<value_t::object>::construct(j, obj); >} > >template<typename BasicJsonType> >inline void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) >{ > external_constructor<value_t::object>::construct(j, std::move(obj)); >} > >template < > typename BasicJsonType, typename T, std::size_t N, > enable_if_t < !std::is_constructible<typename BasicJsonType::string_t, > const T(&)[N]>::value, > int > = 0 > >inline void to_json(BasicJsonType& j, const T(&arr)[N]) >{ > external_constructor<value_t::array>::construct(j, arr); >} > >template < typename BasicJsonType, typename T1, typename T2, enable_if_t < std::is_constructible<BasicJsonType, T1>::value&& std::is_constructible<BasicJsonType, T2>::value, int > = 0 > >inline void to_json(BasicJsonType& j, const std::pair<T1, T2>& p) >{ > j = { p.first, p.second }; >} > > >template<typename BasicJsonType, typename T, > enable_if_t<std::is_same<T, iteration_proxy_value<typename BasicJsonType::iterator>>::value, int> = 0> >inline void to_json(BasicJsonType& j, const T& b) >{ > j = { {b.key(), b.value()} }; >} > >template<typename BasicJsonType, typename Tuple, std::size_t... Idx> >inline void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...> ) >{ > j = { std::get<Idx>(t)... }; >} > >template<typename BasicJsonType, typename T, enable_if_t<is_constructible_tuple<BasicJsonType, T>::value, int > = 0> >inline void to_json(BasicJsonType& j, const T& t) >{ > to_json_tuple_impl(j, t, make_index_sequence<std::tuple_size<T>::value> {}); >} > > >template<typename BasicJsonType> >inline void to_json(BasicJsonType& j, const std_fs::path& p) >{ > j = p.string(); >} > > >struct to_json_fn >{ > template<typename BasicJsonType, typename T> > auto operator()(BasicJsonType& j, T&& val) const noexcept(noexcept(to_json(j, std::forward<T>(val)))) > -> decltype(to_json(j, std::forward<T>(val)), void()) > { > return to_json(j, std::forward<T>(val)); > } >}; >} ># 440 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_json.hpp" 3 >inline constexpr const auto& to_json = > detail::static_const<detail::to_json_fn>::value; > > > > >} } ># 16 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/adl_serializer.hpp" 2 3 > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { > > >template<typename ValueType, typename> >struct adl_serializer >{ > > > template<typename BasicJsonType, typename TargetType = ValueType> > static auto from_json(BasicJsonType && j, TargetType& val) noexcept( > noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val))) > -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void()) > { > ::nlohmann::from_json(std::forward<BasicJsonType>(j), val); > } > > > > template<typename BasicJsonType, typename TargetType = ValueType> > static auto from_json(BasicJsonType && j) noexcept( > noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))) > -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {})) > { > return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}); > } > > > > template<typename BasicJsonType, typename TargetType = ValueType> > static auto to_json(BasicJsonType& j, TargetType && val) noexcept( > noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val)))) > -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void()) > { > ::nlohmann::to_json(j, std::forward<TargetType>(val)); > } >}; > >} } ># 36 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/byte_container_with_subtype.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/byte_container_with_subtype.hpp" 3 > > > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { > > > >template<typename BinaryType> >class byte_container_with_subtype : public BinaryType >{ > public: > using container_type = BinaryType; > using subtype_type = std::uint64_t; > > > byte_container_with_subtype() noexcept(noexcept(container_type())) > : container_type() > {} > > > byte_container_with_subtype(const container_type& b) noexcept(noexcept(container_type(b))) > : container_type(b) > {} > > > byte_container_with_subtype(container_type&& b) noexcept(noexcept(container_type(std::move(b)))) > : container_type(std::move(b)) > {} > > > byte_container_with_subtype(const container_type& b, subtype_type subtype_) noexcept(noexcept(container_type(b))) > : container_type(b) > , m_subtype(subtype_) > , m_has_subtype(true) > {} > > > byte_container_with_subtype(container_type&& b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b)))) > : container_type(std::move(b)) > , m_subtype(subtype_) > , m_has_subtype(true) > {} > > bool operator==(const byte_container_with_subtype& rhs) const > { > return std::tie(static_cast<const BinaryType&>(*this), m_subtype, m_has_subtype) == > std::tie(static_cast<const BinaryType&>(rhs), rhs.m_subtype, rhs.m_has_subtype); > } > > bool operator!=(const byte_container_with_subtype& rhs) const > { > return !(rhs == *this); > } > > > > void set_subtype(subtype_type subtype_) noexcept > { > m_subtype = subtype_; > m_has_subtype = true; > } > > > > constexpr subtype_type subtype() const noexcept > { > return m_has_subtype ? m_subtype : static_cast<subtype_type>(-1); > } > > > > constexpr bool has_subtype() const noexcept > { > return m_has_subtype; > } > > > > void clear_subtype() noexcept > { > m_subtype = 0; > m_has_subtype = false; > } > > private: > subtype_type m_subtype = 0; > bool m_has_subtype = false; >}; > >} } ># 37 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/hash.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/hash.hpp" 3 > ># 18 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/hash.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > >inline std::size_t combine(std::size_t seed, std::size_t h) noexcept >{ > seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U); > return seed; >} ># 40 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/hash.hpp" 3 >template<typename BasicJsonType> >std::size_t hash(const BasicJsonType& j) >{ > using string_t = typename BasicJsonType::string_t; > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > > const auto type = static_cast<std::size_t>(j.type()); > switch (j.type()) > { > case BasicJsonType::value_t::null: > case BasicJsonType::value_t::discarded: > { > return combine(type, 0); > } > > case BasicJsonType::value_t::object: > { > auto seed = combine(type, j.size()); > for (const auto& element : j.items()) > { > const auto h = std::hash<string_t> {}(element.key()); > seed = combine(seed, h); > seed = combine(seed, hash(element.value())); > } > return seed; > } > > case BasicJsonType::value_t::array: > { > auto seed = combine(type, j.size()); > for (const auto& element : j) > { > seed = combine(seed, hash(element)); > } > return seed; > } > > case BasicJsonType::value_t::string: > { > const auto h = std::hash<string_t> {}(j.template get_ref<const string_t&>()); > return combine(type, h); > } > > case BasicJsonType::value_t::boolean: > { > const auto h = std::hash<bool> {}(j.template get<bool>()); > return combine(type, h); > } > > case BasicJsonType::value_t::number_integer: > { > const auto h = std::hash<number_integer_t> {}(j.template get<number_integer_t>()); > return combine(type, h); > } > > case BasicJsonType::value_t::number_unsigned: > { > const auto h = std::hash<number_unsigned_t> {}(j.template get<number_unsigned_t>()); > return combine(type, h); > } > > case BasicJsonType::value_t::number_float: > { > const auto h = std::hash<number_float_t> {}(j.template get<number_float_t>()); > return combine(type, h); > } > > case BasicJsonType::value_t::binary: > { > auto seed = combine(type, j.get_binary().size()); > const auto h = std::hash<bool> {}(j.get_binary().has_subtype()); > seed = combine(seed, h); > seed = combine(seed, static_cast<std::size_t>(j.get_binary().subtype())); > for (const auto byte : j.get_binary()) > { > seed = combine(seed, std::hash<std::uint8_t> {}(byte)); > } > return seed; > } > > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/hash.hpp", 123, __extension__ __PRETTY_FUNCTION__)); > return 0; > } >} > >} >} } ># 41 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > > > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 14 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 2 3 > > ># 1 "/usr/include/c++/13/cstdio" 1 3 ># 39 "/usr/include/c++/13/cstdio" 3 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 17 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 2 3 ># 1 "/usr/include/c++/13/cstring" 1 3 ># 39 "/usr/include/c++/13/cstring" 3 > ># 40 "/usr/include/c++/13/cstring" 3 ># 18 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 2 3 > > > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp" 3 > > > > ># 1 "/usr/include/c++/13/cstring" 1 3 ># 39 "/usr/include/c++/13/cstring" 3 > ># 40 "/usr/include/c++/13/cstring" 3 ># 14 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp" 2 3 ># 22 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp" 3 ># 1 "/usr/include/c++/13/cstdio" 1 3 ># 39 "/usr/include/c++/13/cstdio" 3 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 23 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp" 2 3 > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > >enum class input_format_t { json, cbor, msgpack, ubjson, bson, bjdata }; ># 45 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp" 3 >class file_input_adapter >{ > public: > using char_type = char; > > __attribute__((__nonnull__(2))) > explicit file_input_adapter(std::FILE* f) noexcept > : m_file(f) > { > (static_cast <bool> (m_file != nullptr) ? void (0) : __assert_fail ("m_file != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp", 54, __extension__ __PRETTY_FUNCTION__)); > } > > > file_input_adapter(const file_input_adapter&) = delete; > file_input_adapter(file_input_adapter&&) noexcept = default; > file_input_adapter& operator=(const file_input_adapter&) = delete; > file_input_adapter& operator=(file_input_adapter&&) = delete; > ~file_input_adapter() = default; > > std::char_traits<char>::int_type get_character() noexcept > { > return std::fgetc(m_file); > } > > private: > > std::FILE* m_file; >}; ># 84 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp" 3 >class input_stream_adapter >{ > public: > using char_type = char; > > ~input_stream_adapter() > { > > > if (is != nullptr) > { > is->clear(is->rdstate() & std::ios::eofbit); > } > } > > explicit input_stream_adapter(std::istream& i) > : is(&i), sb(i.rdbuf()) > {} > > > input_stream_adapter(const input_stream_adapter&) = delete; > input_stream_adapter& operator=(input_stream_adapter&) = delete; > input_stream_adapter& operator=(input_stream_adapter&&) = delete; > > input_stream_adapter(input_stream_adapter&& rhs) noexcept > : is(rhs.is), sb(rhs.sb) > { > rhs.is = nullptr; > rhs.sb = nullptr; > } > > > > > std::char_traits<char>::int_type get_character() > { > auto res = sb->sbumpc(); > > if (__builtin_expect (!!(res == std::char_traits<char>::eof()), 0 )) > { > is->clear(is->rdstate() | std::ios::eofbit); > } > return res; > } > > private: > > std::istream* is = nullptr; > std::streambuf* sb = nullptr; >}; > > > > >template<typename IteratorType> >class iterator_input_adapter >{ > public: > using char_type = typename std::iterator_traits<IteratorType>::value_type; > > iterator_input_adapter(IteratorType first, IteratorType last) > : current(std::move(first)), end(std::move(last)) > {} > > typename std::char_traits<char_type>::int_type get_character() > { > if (__builtin_expect (!!(current != end), 1 )) > { > auto result = std::char_traits<char_type>::to_int_type(*current); > std::advance(current, 1); > return result; > } > > return std::char_traits<char_type>::eof(); > } > > private: > IteratorType current; > IteratorType end; > > template<typename BaseInputAdapter, size_t T> > friend struct wide_string_input_helper; > > bool empty() const > { > return current == end; > } >}; > > >template<typename BaseInputAdapter, size_t T> >struct wide_string_input_helper; > >template<typename BaseInputAdapter> >struct wide_string_input_helper<BaseInputAdapter, 4> >{ > > static void fill_buffer(BaseInputAdapter& input, > std::array<std::char_traits<char>::int_type, 4>& utf8_bytes, > size_t& utf8_bytes_index, > size_t& utf8_bytes_filled) > { > utf8_bytes_index = 0; > > if (__builtin_expect (!!(input.empty()), 0 )) > { > utf8_bytes[0] = std::char_traits<char>::eof(); > utf8_bytes_filled = 1; > } > else > { > > const auto wc = input.get_character(); > > > if (wc < 0x80) > { > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); > utf8_bytes_filled = 1; > } > else if (wc <= 0x7FF) > { > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((static_cast<unsigned int>(wc) >> 6u) & 0x1Fu)); > utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); > utf8_bytes_filled = 2; > } > else if (wc <= 0xFFFF) > { > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((static_cast<unsigned int>(wc) >> 12u) & 0x0Fu)); > utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu)); > utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); > utf8_bytes_filled = 3; > } > else if (wc <= 0x10FFFF) > { > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | ((static_cast<unsigned int>(wc) >> 18u) & 0x07u)); > utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 12u) & 0x3Fu)); > utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu)); > utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); > utf8_bytes_filled = 4; > } > else > { > > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); > utf8_bytes_filled = 1; > } > } > } >}; > >template<typename BaseInputAdapter> >struct wide_string_input_helper<BaseInputAdapter, 2> >{ > > static void fill_buffer(BaseInputAdapter& input, > std::array<std::char_traits<char>::int_type, 4>& utf8_bytes, > size_t& utf8_bytes_index, > size_t& utf8_bytes_filled) > { > utf8_bytes_index = 0; > > if (__builtin_expect (!!(input.empty()), 0 )) > { > utf8_bytes[0] = std::char_traits<char>::eof(); > utf8_bytes_filled = 1; > } > else > { > > const auto wc = input.get_character(); > > > if (wc < 0x80) > { > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); > utf8_bytes_filled = 1; > } > else if (wc <= 0x7FF) > { > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((static_cast<unsigned int>(wc) >> 6u))); > utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); > utf8_bytes_filled = 2; > } > else if (0xD800 > wc || wc >= 0xE000) > { > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((static_cast<unsigned int>(wc) >> 12u))); > utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu)); > utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); > utf8_bytes_filled = 3; > } > else > { > if (__builtin_expect (!!(!input.empty()), 0 )) > { > const auto wc2 = static_cast<unsigned int>(input.get_character()); > const auto charcode = 0x10000u + (((static_cast<unsigned int>(wc) & 0x3FFu) << 10u) | (wc2 & 0x3FFu)); > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | (charcode >> 18u)); > utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 12u) & 0x3Fu)); > utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 6u) & 0x3Fu)); > utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (charcode & 0x3Fu)); > utf8_bytes_filled = 4; > } > else > { > utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); > utf8_bytes_filled = 1; > } > } > } > } >}; > > >template<typename BaseInputAdapter, typename WideCharType> >class wide_string_input_adapter >{ > public: > using char_type = char; > > wide_string_input_adapter(BaseInputAdapter base) > : base_adapter(base) {} > > typename std::char_traits<char>::int_type get_character() noexcept > { > > if (utf8_bytes_index == utf8_bytes_filled) > { > fill_buffer<sizeof(WideCharType)>(); > > (static_cast <bool> (utf8_bytes_filled > 0) ? void (0) : __assert_fail ("utf8_bytes_filled > 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp", 314, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (utf8_bytes_index == 0) ? void (0) : __assert_fail ("utf8_bytes_index == 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp", 315, __extension__ __PRETTY_FUNCTION__)); > } > > > (static_cast <bool> (utf8_bytes_filled > 0) ? void (0) : __assert_fail ("utf8_bytes_filled > 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp", 319, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (utf8_bytes_index < utf8_bytes_filled) ? void (0) : __assert_fail ("utf8_bytes_index < utf8_bytes_filled", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/input_adapters.hpp", 320, __extension__ __PRETTY_FUNCTION__)); > return utf8_bytes[utf8_bytes_index++]; > } > > private: > BaseInputAdapter base_adapter; > > template<size_t T> > void fill_buffer() > { > wide_string_input_helper<BaseInputAdapter, T>::fill_buffer(base_adapter, utf8_bytes, utf8_bytes_index, utf8_bytes_filled); > } > > > std::array<std::char_traits<char>::int_type, 4> utf8_bytes = {{0, 0, 0, 0}}; > > > std::size_t utf8_bytes_index = 0; > > std::size_t utf8_bytes_filled = 0; >}; > > >template<typename IteratorType, typename Enable = void> >struct iterator_input_adapter_factory >{ > using iterator_type = IteratorType; > using char_type = typename std::iterator_traits<iterator_type>::value_type; > using adapter_type = iterator_input_adapter<iterator_type>; > > static adapter_type create(IteratorType first, IteratorType last) > { > return adapter_type(std::move(first), std::move(last)); > } >}; > >template<typename T> >struct is_iterator_of_multibyte >{ > using value_type = typename std::iterator_traits<T>::value_type; > enum > { > value = sizeof(value_type) > 1 > }; >}; > >template<typename IteratorType> >struct iterator_input_adapter_factory<IteratorType, enable_if_t<is_iterator_of_multibyte<IteratorType>::value>> >{ > using iterator_type = IteratorType; > using char_type = typename std::iterator_traits<iterator_type>::value_type; > using base_adapter_type = iterator_input_adapter<iterator_type>; > using adapter_type = wide_string_input_adapter<base_adapter_type, char_type>; > > static adapter_type create(IteratorType first, IteratorType last) > { > return adapter_type(base_adapter_type(std::move(first), std::move(last))); > } >}; > > >template<typename IteratorType> >typename iterator_input_adapter_factory<IteratorType>::adapter_type input_adapter(IteratorType first, IteratorType last) >{ > using factory_type = iterator_input_adapter_factory<IteratorType>; > return factory_type::create(first, last); >} > > > > > >namespace container_input_adapter_factory_impl >{ > >using std::begin; >using std::end; > >template<typename ContainerType, typename Enable = void> >struct container_input_adapter_factory {}; > >template<typename ContainerType> >struct container_input_adapter_factory< ContainerType, > void_t<decltype(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>()))>> > { > using adapter_type = decltype(input_adapter(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>()))); > > static adapter_type create(const ContainerType& container) >{ > return input_adapter(begin(container), end(container)); >} > }; > >} > >template<typename ContainerType> >typename container_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::adapter_type input_adapter(const ContainerType& container) >{ > return container_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::create(container); >} > > > >inline file_input_adapter input_adapter(std::FILE* file) >{ > return file_input_adapter(file); >} > >inline input_stream_adapter input_adapter(std::istream& stream) >{ > return input_stream_adapter(stream); >} > >inline input_stream_adapter input_adapter(std::istream&& stream) >{ > return input_stream_adapter(stream); >} > > >using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval<const char*>(), std::declval<const char*>())); > > >template < typename CharT, > typename std::enable_if < > std::is_pointer<CharT>::value&& > !std::is_array<CharT>::value&& > std::is_integral<typename std::remove_pointer<CharT>::type>::value&& > sizeof(typename std::remove_pointer<CharT>::type) == 1, > int >::type = 0 > >contiguous_bytes_input_adapter input_adapter(CharT b) >{ > auto length = std::strlen(reinterpret_cast<const char*>(b)); > const auto* ptr = reinterpret_cast<const char*>(b); > return input_adapter(ptr, ptr + length); >} > >template<typename T, std::size_t N> >auto input_adapter(T (&array)[N]) -> decltype(input_adapter(array, array + N)) >{ > return input_adapter(array, array + N); >} > > > > >class span_input_adapter >{ > public: > template < typename CharT, > typename std::enable_if < > std::is_pointer<CharT>::value&& > std::is_integral<typename std::remove_pointer<CharT>::type>::value&& > sizeof(typename std::remove_pointer<CharT>::type) == 1, > int >::type = 0 > > span_input_adapter(CharT b, std::size_t l) > : ia(reinterpret_cast<const char*>(b), reinterpret_cast<const char*>(b) + l) {} > > template<class IteratorType, > typename std::enable_if< > std::is_same<typename iterator_traits<IteratorType>::iterator_category, std::random_access_iterator_tag>::value, > int>::type = 0> > span_input_adapter(IteratorType first, IteratorType last) > : ia(input_adapter(first, last)) {} > > contiguous_bytes_input_adapter&& get() > { > return std::move(ia); > } > > private: > contiguous_bytes_input_adapter ia; >}; > >} >} } ># 26 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp" 3 > ># 20 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { ># 30 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp" 3 >template<typename BasicJsonType> >struct json_sax >{ > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using binary_t = typename BasicJsonType::binary_t; > > > > > > virtual bool null() = 0; > > > > > > > virtual bool boolean(bool val) = 0; > > > > > > > virtual bool number_integer(number_integer_t val) = 0; > > > > > > > virtual bool number_unsigned(number_unsigned_t val) = 0; > > > > > > > > virtual bool number_float(number_float_t val, const string_t& s) = 0; > > > > > > > > virtual bool string(string_t& val) = 0; > > > > > > > > virtual bool binary(binary_t& val) = 0; > > > > > > > > virtual bool start_object(std::size_t elements) = 0; > > > > > > > > virtual bool key(string_t& val) = 0; > > > > > > virtual bool end_object() = 0; > > > > > > > > virtual bool start_array(std::size_t elements) = 0; > > > > > > virtual bool end_array() = 0; ># 133 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp" 3 > virtual bool parse_error(std::size_t position, > const std::string& last_token, > const detail::exception& ex) = 0; > > json_sax() = default; > json_sax(const json_sax&) = default; > json_sax(json_sax&&) noexcept = default; > json_sax& operator=(const json_sax&) = default; > json_sax& operator=(json_sax&&) noexcept = default; > virtual ~json_sax() = default; >}; > > >namespace detail >{ ># 161 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp" 3 >template<typename BasicJsonType> >class json_sax_dom_parser >{ > public: > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using binary_t = typename BasicJsonType::binary_t; > > > > > > > explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true) > : root(r), allow_exceptions(allow_exceptions_) > {} > > > json_sax_dom_parser(const json_sax_dom_parser&) = delete; > json_sax_dom_parser(json_sax_dom_parser&&) = default; > json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete; > json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; > ~json_sax_dom_parser() = default; > > bool null() > { > handle_value(nullptr); > return true; > } > > bool boolean(bool val) > { > handle_value(val); > return true; > } > > bool number_integer(number_integer_t val) > { > handle_value(val); > return true; > } > > bool number_unsigned(number_unsigned_t val) > { > handle_value(val); > return true; > } > > bool number_float(number_float_t val, const string_t& ) > { > handle_value(val); > return true; > } > > bool string(string_t& val) > { > handle_value(val); > return true; > } > > bool binary(binary_t& val) > { > handle_value(std::move(val)); > return true; > } > > bool start_object(std::size_t len) > { > ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); > > if (__builtin_expect (!!(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()), 0 )) > { > throw out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back()); > } > > return true; > } > > bool key(string_t& val) > { > (static_cast <bool> (!ref_stack.empty()) ? void (0) : __assert_fail ("!ref_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 243, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (ref_stack.back()->is_object()) ? void (0) : __assert_fail ("ref_stack.back()->is_object()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 244, __extension__ __PRETTY_FUNCTION__)); > > > object_element = &(ref_stack.back()->m_value.object->operator[](val)); > return true; > } > > bool end_object() > { > (static_cast <bool> (!ref_stack.empty()) ? void (0) : __assert_fail ("!ref_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 253, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (ref_stack.back()->is_object()) ? void (0) : __assert_fail ("ref_stack.back()->is_object()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 254, __extension__ __PRETTY_FUNCTION__)); > > ref_stack.back()->set_parents(); > ref_stack.pop_back(); > return true; > } > > bool start_array(std::size_t len) > { > ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); > > if (__builtin_expect (!!(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()), 0 )) > { > throw out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()); > } > > return true; > } > > bool end_array() > { > (static_cast <bool> (!ref_stack.empty()) ? void (0) : __assert_fail ("!ref_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 275, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (ref_stack.back()->is_array()) ? void (0) : __assert_fail ("ref_stack.back()->is_array()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 276, __extension__ __PRETTY_FUNCTION__)); > > ref_stack.back()->set_parents(); > ref_stack.pop_back(); > return true; > } > > template<class Exception> > bool parse_error(std::size_t , const std::string& , > const Exception& ex) > { > errored = true; > static_cast<void>(ex); > if (allow_exceptions) > { > throw ex; > } > return false; > } > > constexpr bool is_errored() const > { > return errored; > } > > private: > > > > > > > template<typename Value> > __attribute__((__returns_nonnull__)) > BasicJsonType* handle_value(Value&& v) > { > if (ref_stack.empty()) > { > root = BasicJsonType(std::forward<Value>(v)); > return &root; > } > > (static_cast <bool> (ref_stack.back()->is_array() || ref_stack.back()->is_object()) ? void (0) : __assert_fail ("ref_stack.back()->is_array() || ref_stack.back()->is_object()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 318, __extension__ __PRETTY_FUNCTION__)); > > if (ref_stack.back()->is_array()) > { > ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v)); > return &(ref_stack.back()->m_value.array->back()); > } > > (static_cast <bool> (ref_stack.back()->is_object()) ? void (0) : __assert_fail ("ref_stack.back()->is_object()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 326, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (object_element) ? void (0) : __assert_fail ("object_element", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 327, __extension__ __PRETTY_FUNCTION__)); > *object_element = BasicJsonType(std::forward<Value>(v)); > return object_element; > } > > > BasicJsonType& root; > > std::vector<BasicJsonType*> ref_stack {}; > > BasicJsonType* object_element = nullptr; > > bool errored = false; > > const bool allow_exceptions = true; >}; > >template<typename BasicJsonType> >class json_sax_dom_callback_parser >{ > public: > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using binary_t = typename BasicJsonType::binary_t; > using parser_callback_t = typename BasicJsonType::parser_callback_t; > using parse_event_t = typename BasicJsonType::parse_event_t; > > json_sax_dom_callback_parser(BasicJsonType& r, > const parser_callback_t cb, > const bool allow_exceptions_ = true) > : root(r), callback(cb), allow_exceptions(allow_exceptions_) > { > keep_stack.push_back(true); > } > > > json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete; > json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default; > json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete; > json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; > ~json_sax_dom_callback_parser() = default; > > bool null() > { > handle_value(nullptr); > return true; > } > > bool boolean(bool val) > { > handle_value(val); > return true; > } > > bool number_integer(number_integer_t val) > { > handle_value(val); > return true; > } > > bool number_unsigned(number_unsigned_t val) > { > handle_value(val); > return true; > } > > bool number_float(number_float_t val, const string_t& ) > { > handle_value(val); > return true; > } > > bool string(string_t& val) > { > handle_value(val); > return true; > } > > bool binary(binary_t& val) > { > handle_value(std::move(val)); > return true; > } > > bool start_object(std::size_t len) > { > > const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded); > keep_stack.push_back(keep); > > auto val = handle_value(BasicJsonType::value_t::object, true); > ref_stack.push_back(val.second); > > > if (ref_stack.back() && __builtin_expect (!!(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()), 0 )) > { > throw out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back()); > } > > return true; > } > > bool key(string_t& val) > { > BasicJsonType k = BasicJsonType(val); > > > const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k); > key_keep_stack.push_back(keep); > > > if (keep && ref_stack.back()) > { > object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded); > } > > return true; > } > > bool end_object() > { > if (ref_stack.back()) > { > if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) > { > > *ref_stack.back() = discarded; > } > else > { > ref_stack.back()->set_parents(); > } > } > > (static_cast <bool> (!ref_stack.empty()) ? void (0) : __assert_fail ("!ref_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 463, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (!keep_stack.empty()) ? void (0) : __assert_fail ("!keep_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 464, __extension__ __PRETTY_FUNCTION__)); > ref_stack.pop_back(); > keep_stack.pop_back(); > > if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) > { > > for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) > { > if (it->is_discarded()) > { > ref_stack.back()->erase(it); > break; > } > } > } > > return true; > } > > bool start_array(std::size_t len) > { > const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded); > keep_stack.push_back(keep); > > auto val = handle_value(BasicJsonType::value_t::array, true); > ref_stack.push_back(val.second); > > > if (ref_stack.back() && __builtin_expect (!!(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()), 0 )) > { > throw out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()); > } > > return true; > } > > bool end_array() > { > bool keep = true; > > if (ref_stack.back()) > { > keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); > if (keep) > { > ref_stack.back()->set_parents(); > } > else > { > > *ref_stack.back() = discarded; > } > } > > (static_cast <bool> (!ref_stack.empty()) ? void (0) : __assert_fail ("!ref_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 519, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (!keep_stack.empty()) ? void (0) : __assert_fail ("!keep_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 520, __extension__ __PRETTY_FUNCTION__)); > ref_stack.pop_back(); > keep_stack.pop_back(); > > > if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) > { > ref_stack.back()->m_value.array->pop_back(); > } > > return true; > } > > template<class Exception> > bool parse_error(std::size_t , const std::string& , > const Exception& ex) > { > errored = true; > static_cast<void>(ex); > if (allow_exceptions) > { > throw ex; > } > return false; > } > > constexpr bool is_errored() const > { > return errored; > } > > private: ># 567 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp" 3 > template<typename Value> > std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) > { > (static_cast <bool> (!keep_stack.empty()) ? void (0) : __assert_fail ("!keep_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 570, __extension__ __PRETTY_FUNCTION__)); > > > > if (!keep_stack.back()) > { > return {false, nullptr}; > } > > > auto value = BasicJsonType(std::forward<Value>(v)); > > > const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); > > > if (!keep) > { > return {false, nullptr}; > } > > if (ref_stack.empty()) > { > root = std::move(value); > return {true, &root}; > } > > > > if (!ref_stack.back()) > { > return {false, nullptr}; > } > > > (static_cast <bool> (ref_stack.back()->is_array() || ref_stack.back()->is_object()) ? void (0) : __assert_fail ("ref_stack.back()->is_array() || ref_stack.back()->is_object()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 605, __extension__ __PRETTY_FUNCTION__)); > > > if (ref_stack.back()->is_array()) > { > ref_stack.back()->m_value.array->emplace_back(std::move(value)); > return {true, &(ref_stack.back()->m_value.array->back())}; > } > > > (static_cast <bool> (ref_stack.back()->is_object()) ? void (0) : __assert_fail ("ref_stack.back()->is_object()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 615, __extension__ __PRETTY_FUNCTION__)); > > (static_cast <bool> (!key_keep_stack.empty()) ? void (0) : __assert_fail ("!key_keep_stack.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 617, __extension__ __PRETTY_FUNCTION__)); > const bool store_element = key_keep_stack.back(); > key_keep_stack.pop_back(); > > if (!store_element) > { > return {false, nullptr}; > } > > (static_cast <bool> (object_element) ? void (0) : __assert_fail ("object_element", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/json_sax.hpp", 626, __extension__ __PRETTY_FUNCTION__)); > *object_element = std::move(value); > return {true, object_element}; > } > > > BasicJsonType& root; > > std::vector<BasicJsonType*> ref_stack {}; > > std::vector<bool> keep_stack {}; > > std::vector<bool> key_keep_stack {}; > > BasicJsonType* object_element = nullptr; > > bool errored = false; > > const parser_callback_t callback = nullptr; > > const bool allow_exceptions = true; > > BasicJsonType discarded = BasicJsonType::value_t::discarded; >}; > >template<typename BasicJsonType> >class json_sax_acceptor >{ > public: > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using binary_t = typename BasicJsonType::binary_t; > > bool null() > { > return true; > } > > bool boolean(bool ) > { > return true; > } > > bool number_integer(number_integer_t ) > { > return true; > } > > bool number_unsigned(number_unsigned_t ) > { > return true; > } > > bool number_float(number_float_t , const string_t& ) > { > return true; > } > > bool string(string_t& ) > { > return true; > } > > bool binary(binary_t& ) > { > return true; > } > > bool start_object(std::size_t = static_cast<std::size_t>(-1)) > { > return true; > } > > bool key(string_t& ) > { > return true; > } > > bool end_object() > { > return true; > } > > bool start_array(std::size_t = static_cast<std::size_t>(-1)) > { > return true; > } > > bool end_array() > { > return true; > } > > bool parse_error(std::size_t , const std::string& , const detail::exception& ) > { > return false; > } >}; > >} >} } ># 27 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 > > > ># 1 "/usr/include/c++/13/clocale" 1 3 ># 39 "/usr/include/c++/13/clocale" 3 > ># 40 "/usr/include/c++/13/clocale" 3 ># 13 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 2 3 > ># 1 "/usr/include/c++/13/cstdio" 1 3 ># 39 "/usr/include/c++/13/cstdio" 3 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 15 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 2 3 ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 16 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 2 3 ># 25 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > > > > >template<typename BasicJsonType> >class lexer_base >{ > public: > > enum class token_type > { > uninitialized, > literal_true, > literal_false, > literal_null, > value_string, > value_unsigned, > value_integer, > value_float, > begin_array, > begin_object, > end_array, > end_object, > name_separator, > value_separator, > parse_error, > end_of_input, > literal_or_value > }; > > > __attribute__((__returns_nonnull__)) > __attribute__((__const__)) > static const char* token_type_name(const token_type t) noexcept > { > switch (t) > { > case token_type::uninitialized: > return "<uninitialized>"; > case token_type::literal_true: > return "true literal"; > case token_type::literal_false: > return "false literal"; > case token_type::literal_null: > return "null literal"; > case token_type::value_string: > return "string literal"; > case token_type::value_unsigned: > case token_type::value_integer: > case token_type::value_float: > return "number literal"; > case token_type::begin_array: > return "'['"; > case token_type::begin_object: > return "'{'"; > case token_type::end_array: > return "']'"; > case token_type::end_object: > return "'}'"; > case token_type::name_separator: > return "':'"; > case token_type::value_separator: > return "','"; > case token_type::parse_error: > return "<parse error>"; > case token_type::end_of_input: > return "end of input"; > case token_type::literal_or_value: > return "'[', '{', or a literal"; > > default: > return "unknown token"; > > } > } >}; > > > > > >template<typename BasicJsonType, typename InputAdapterType> >class lexer : public lexer_base<BasicJsonType> >{ > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using char_type = typename InputAdapterType::char_type; > using char_int_type = typename std::char_traits<char_type>::int_type; > > public: > using token_type = typename lexer_base<BasicJsonType>::token_type; > > explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept > : ia(std::move(adapter)) > , ignore_comments(ignore_comments_) > , decimal_point_char(static_cast<char_int_type>(get_decimal_point())) > {} > > > lexer(const lexer&) = delete; > lexer(lexer&&) = default; > lexer& operator=(lexer&) = delete; > lexer& operator=(lexer&&) = default; > ~lexer() = default; > > private: > > > > > > __attribute__((__pure__)) > static char get_decimal_point() noexcept > { > const auto* loc = localeconv(); > (static_cast <bool> (loc != nullptr) ? void (0) : __assert_fail ("loc != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 146, __extension__ __PRETTY_FUNCTION__)); > return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); > } ># 169 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 > int get_codepoint() > { > > (static_cast <bool> (current == 'u') ? void (0) : __assert_fail ("current == 'u'", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 172, __extension__ __PRETTY_FUNCTION__)); > int codepoint = 0; > > const auto factors = { 12u, 8u, 4u, 0u }; > for (const auto factor : factors) > { > get(); > > if (current >= '0' && current <= '9') > { > codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); > } > else if (current >= 'A' && current <= 'F') > { > codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); > } > else if (current >= 'a' && current <= 'f') > { > codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); > } > else > { > return -1; > } > } > > (static_cast <bool> (0x0000 <= codepoint && codepoint <= 0xFFFF) ? void (0) : __assert_fail ("0x0000 <= codepoint && codepoint <= 0xFFFF", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 198, __extension__ __PRETTY_FUNCTION__)); > return codepoint; > } ># 217 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 > bool next_byte_in_range(std::initializer_list<char_int_type> ranges) > { > (static_cast <bool> (ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6) ? void (0) : __assert_fail ("ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 219, __extension__ __PRETTY_FUNCTION__)); > add(current); > > for (auto range = ranges.begin(); range != ranges.end(); ++range) > { > get(); > if (__builtin_expect (!!(*range <= current && current <= *(++range)), 1 )) > { > add(current); > } > else > { > error_message = "invalid string: ill-formed UTF-8 byte"; > return false; > } > } > > return true; > } ># 254 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 > token_type scan_string() > { > > reset(); > > > (static_cast <bool> (current == '\"') ? void (0) : __assert_fail ("current == '\\\"'", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 260, __extension__ __PRETTY_FUNCTION__)); > > while (true) > { > > switch (get()) > { > > case std::char_traits<char_type>::eof(): > { > error_message = "invalid string: missing closing quote"; > return token_type::parse_error; > } > > > case '\"': > { > return token_type::value_string; > } > > > case '\\': > { > switch (get()) > { > > case '\"': > add('\"'); > break; > > case '\\': > add('\\'); > break; > > case '/': > add('/'); > break; > > case 'b': > add('\b'); > break; > > case 'f': > add('\f'); > break; > > case 'n': > add('\n'); > break; > > case 'r': > add('\r'); > break; > > case 't': > add('\t'); > break; > > > case 'u': > { > const int codepoint1 = get_codepoint(); > int codepoint = codepoint1; > > if (__builtin_expect (!!(codepoint1 == -1), 0 )) > { > error_message = "invalid string: '\\u' must be followed by 4 hex digits"; > return token_type::parse_error; > } > > > if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF) > { > > if (__builtin_expect (!!(get() == '\\' && get() == 'u'), 1 )) > { > const int codepoint2 = get_codepoint(); > > if (__builtin_expect (!!(codepoint2 == -1), 0 )) > { > error_message = "invalid string: '\\u' must be followed by 4 hex digits"; > return token_type::parse_error; > } > > > if (__builtin_expect (!!(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF), 1 )) > { > > codepoint = static_cast<int>( > > (static_cast<unsigned int>(codepoint1) << 10u) > > + static_cast<unsigned int>(codepoint2) > > > > - 0x35FDC00u); > } > else > { > error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; > return token_type::parse_error; > } > } > else > { > error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; > return token_type::parse_error; > } > } > else > { > if (__builtin_expect (!!(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF), 0 )) > { > error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; > return token_type::parse_error; > } > } > > > (static_cast <bool> (0x00 <= codepoint && codepoint <= 0x10FFFF) ? void (0) : __assert_fail ("0x00 <= codepoint && codepoint <= 0x10FFFF", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 380, __extension__ __PRETTY_FUNCTION__)); > > > if (codepoint < 0x80) > { > > add(static_cast<char_int_type>(codepoint)); > } > else if (codepoint <= 0x7FF) > { > > add(static_cast<char_int_type>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u))); > add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); > } > else if (codepoint <= 0xFFFF) > { > > add(static_cast<char_int_type>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u))); > add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu))); > add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); > } > else > { > > add(static_cast<char_int_type>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u))); > add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu))); > add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu))); > add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); > } > > break; > } > > > default: > error_message = "invalid string: forbidden character after backslash"; > return token_type::parse_error; > } > > break; > } > > > case 0x00: > { > error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000"; > return token_type::parse_error; > } > > case 0x01: > { > error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001"; > return token_type::parse_error; > } > > case 0x02: > { > error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002"; > return token_type::parse_error; > } > > case 0x03: > { > error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003"; > return token_type::parse_error; > } > > case 0x04: > { > error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004"; > return token_type::parse_error; > } > > case 0x05: > { > error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005"; > return token_type::parse_error; > } > > case 0x06: > { > error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006"; > return token_type::parse_error; > } > > case 0x07: > { > error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007"; > return token_type::parse_error; > } > > case 0x08: > { > error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b"; > return token_type::parse_error; > } > > case 0x09: > { > error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t"; > return token_type::parse_error; > } > > case 0x0A: > { > error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n"; > return token_type::parse_error; > } > > case 0x0B: > { > error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B"; > return token_type::parse_error; > } > > case 0x0C: > { > error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f"; > return token_type::parse_error; > } > > case 0x0D: > { > error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r"; > return token_type::parse_error; > } > > case 0x0E: > { > error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E"; > return token_type::parse_error; > } > > case 0x0F: > { > error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F"; > return token_type::parse_error; > } > > case 0x10: > { > error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010"; > return token_type::parse_error; > } > > case 0x11: > { > error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011"; > return token_type::parse_error; > } > > case 0x12: > { > error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012"; > return token_type::parse_error; > } > > case 0x13: > { > error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013"; > return token_type::parse_error; > } > > case 0x14: > { > error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014"; > return token_type::parse_error; > } > > case 0x15: > { > error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015"; > return token_type::parse_error; > } > > case 0x16: > { > error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016"; > return token_type::parse_error; > } > > case 0x17: > { > error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017"; > return token_type::parse_error; > } > > case 0x18: > { > error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018"; > return token_type::parse_error; > } > > case 0x19: > { > error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019"; > return token_type::parse_error; > } > > case 0x1A: > { > error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A"; > return token_type::parse_error; > } > > case 0x1B: > { > error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B"; > return token_type::parse_error; > } > > case 0x1C: > { > error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C"; > return token_type::parse_error; > } > > case 0x1D: > { > error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D"; > return token_type::parse_error; > } > > case 0x1E: > { > error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E"; > return token_type::parse_error; > } > > case 0x1F: > { > error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F"; > return token_type::parse_error; > } > > > case 0x20: > case 0x21: > case 0x23: > case 0x24: > case 0x25: > case 0x26: > case 0x27: > case 0x28: > case 0x29: > case 0x2A: > case 0x2B: > case 0x2C: > case 0x2D: > case 0x2E: > case 0x2F: > case 0x30: > case 0x31: > case 0x32: > case 0x33: > case 0x34: > case 0x35: > case 0x36: > case 0x37: > case 0x38: > case 0x39: > case 0x3A: > case 0x3B: > case 0x3C: > case 0x3D: > case 0x3E: > case 0x3F: > case 0x40: > case 0x41: > case 0x42: > case 0x43: > case 0x44: > case 0x45: > case 0x46: > case 0x47: > case 0x48: > case 0x49: > case 0x4A: > case 0x4B: > case 0x4C: > case 0x4D: > case 0x4E: > case 0x4F: > case 0x50: > case 0x51: > case 0x52: > case 0x53: > case 0x54: > case 0x55: > case 0x56: > case 0x57: > case 0x58: > case 0x59: > case 0x5A: > case 0x5B: > case 0x5D: > case 0x5E: > case 0x5F: > case 0x60: > case 0x61: > case 0x62: > case 0x63: > case 0x64: > case 0x65: > case 0x66: > case 0x67: > case 0x68: > case 0x69: > case 0x6A: > case 0x6B: > case 0x6C: > case 0x6D: > case 0x6E: > case 0x6F: > case 0x70: > case 0x71: > case 0x72: > case 0x73: > case 0x74: > case 0x75: > case 0x76: > case 0x77: > case 0x78: > case 0x79: > case 0x7A: > case 0x7B: > case 0x7C: > case 0x7D: > case 0x7E: > case 0x7F: > { > add(current); > break; > } > > > case 0xC2: > case 0xC3: > case 0xC4: > case 0xC5: > case 0xC6: > case 0xC7: > case 0xC8: > case 0xC9: > case 0xCA: > case 0xCB: > case 0xCC: > case 0xCD: > case 0xCE: > case 0xCF: > case 0xD0: > case 0xD1: > case 0xD2: > case 0xD3: > case 0xD4: > case 0xD5: > case 0xD6: > case 0xD7: > case 0xD8: > case 0xD9: > case 0xDA: > case 0xDB: > case 0xDC: > case 0xDD: > case 0xDE: > case 0xDF: > { > if (__builtin_expect (!!(!next_byte_in_range({0x80, 0xBF})), 0 )) > { > return token_type::parse_error; > } > break; > } > > > case 0xE0: > { > if (__builtin_expect (!!(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF}))), 0 )) > { > return token_type::parse_error; > } > break; > } > > > > case 0xE1: > case 0xE2: > case 0xE3: > case 0xE4: > case 0xE5: > case 0xE6: > case 0xE7: > case 0xE8: > case 0xE9: > case 0xEA: > case 0xEB: > case 0xEC: > case 0xEE: > case 0xEF: > { > if (__builtin_expect (!!(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF}))), 0 )) > { > return token_type::parse_error; > } > break; > } > > > case 0xED: > { > if (__builtin_expect (!!(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF}))), 0 )) > { > return token_type::parse_error; > } > break; > } > > > case 0xF0: > { > if (__builtin_expect (!!(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))), 0 )) > { > return token_type::parse_error; > } > break; > } > > > case 0xF1: > case 0xF2: > case 0xF3: > { > if (__builtin_expect (!!(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))), 0 )) > { > return token_type::parse_error; > } > break; > } > > > case 0xF4: > { > if (__builtin_expect (!!(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF}))), 0 )) > { > return token_type::parse_error; > } > break; > } > > > default: > { > error_message = "invalid string: ill-formed UTF-8 byte"; > return token_type::parse_error; > } > } > } > } > > > > > > bool scan_comment() > { > switch (get()) > { > > case '/': > { > while (true) > { > switch (get()) > { > case '\n': > case '\r': > case std::char_traits<char_type>::eof(): > case '\0': > return true; > > default: > break; > } > } > } > > > case '*': > { > while (true) > { > switch (get()) > { > case std::char_traits<char_type>::eof(): > case '\0': > { > error_message = "invalid comment; missing closing '*/'"; > return false; > } > > case '*': > { > switch (get()) > { > case '/': > return true; > > default: > { > unget(); > continue; > } > } > } > > default: > continue; > } > } > } > > > default: > { > error_message = "invalid comment; expecting '/' or '*' after '/'"; > return false; > } > } > } > > __attribute__((__nonnull__(2))) > static void strtof(float& f, const char* str, char** endptr) noexcept > { > f = std::strtof(str, endptr); > } > > __attribute__((__nonnull__(2))) > static void strtof(double& f, const char* str, char** endptr) noexcept > { > f = std::strtod(str, endptr); > } > > __attribute__((__nonnull__(2))) > static void strtof(long double& f, const char* str, char** endptr) noexcept > { > f = std::strtold(str, endptr); > } ># 969 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 > token_type scan_number() > { > > reset(); > > > > token_type number_type = token_type::value_unsigned; > > > switch (current) > { > case '-': > { > add(current); > goto scan_number_minus; > } > > case '0': > { > add(current); > goto scan_number_zero; > } > > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > { > add(current); > goto scan_number_any1; > } > > > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 1009, __extension__ __PRETTY_FUNCTION__)); > } > >scan_number_minus: > > number_type = token_type::value_integer; > switch (get()) > { > case '0': > { > add(current); > goto scan_number_zero; > } > > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > { > add(current); > goto scan_number_any1; > } > > default: > { > error_message = "invalid number; expected digit after '-'"; > return token_type::parse_error; > } > } > >scan_number_zero: > > switch (get()) > { > case '.': > { > add(decimal_point_char); > goto scan_number_decimal1; > } > > case 'e': > case 'E': > { > add(current); > goto scan_number_exponent; > } > > default: > goto scan_number_done; > } > >scan_number_any1: > > switch (get()) > { > case '0': > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > { > add(current); > goto scan_number_any1; > } > > case '.': > { > add(decimal_point_char); > goto scan_number_decimal1; > } > > case 'e': > case 'E': > { > add(current); > goto scan_number_exponent; > } > > default: > goto scan_number_done; > } > >scan_number_decimal1: > > number_type = token_type::value_float; > switch (get()) > { > case '0': > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > { > add(current); > goto scan_number_decimal2; > } > > default: > { > error_message = "invalid number; expected digit after '.'"; > return token_type::parse_error; > } > } > >scan_number_decimal2: > > switch (get()) > { > case '0': > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > { > add(current); > goto scan_number_decimal2; > } > > case 'e': > case 'E': > { > add(current); > goto scan_number_exponent; > } > > default: > goto scan_number_done; > } > >scan_number_exponent: > > number_type = token_type::value_float; > switch (get()) > { > case '+': > case '-': > { > add(current); > goto scan_number_sign; > } > > case '0': > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > { > add(current); > goto scan_number_any2; > } > > default: > { > error_message = > "invalid number; expected '+', '-', or digit after exponent"; > return token_type::parse_error; > } > } > >scan_number_sign: > > switch (get()) > { > case '0': > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > { > add(current); > goto scan_number_any2; > } > > default: > { > error_message = "invalid number; expected digit after exponent sign"; > return token_type::parse_error; > } > } > >scan_number_any2: > > switch (get()) > { > case '0': > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > { > add(current); > goto scan_number_any2; > } > > default: > goto scan_number_done; > } > >scan_number_done: > > > unget(); > > char* endptr = nullptr; > (*__errno_location ()) = 0; > > > if (number_type == token_type::value_unsigned) > { > const auto x = std::strtoull(token_buffer.data(), &endptr, 10); > > > (static_cast <bool> (endptr == token_buffer.data() + token_buffer.size()) ? void (0) : __assert_fail ("endptr == token_buffer.data() + token_buffer.size()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 1256, __extension__ __PRETTY_FUNCTION__)); > > if ((*__errno_location ()) == 0) > { > value_unsigned = static_cast<number_unsigned_t>(x); > if (value_unsigned == x) > { > return token_type::value_unsigned; > } > } > } > else if (number_type == token_type::value_integer) > { > const auto x = std::strtoll(token_buffer.data(), &endptr, 10); > > > (static_cast <bool> (endptr == token_buffer.data() + token_buffer.size()) ? void (0) : __assert_fail ("endptr == token_buffer.data() + token_buffer.size()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 1272, __extension__ __PRETTY_FUNCTION__)); > > if ((*__errno_location ()) == 0) > { > value_integer = static_cast<number_integer_t>(x); > if (value_integer == x) > { > return token_type::value_integer; > } > } > } > > > > strtof(value_float, token_buffer.data(), &endptr); > > > (static_cast <bool> (endptr == token_buffer.data() + token_buffer.size()) ? void (0) : __assert_fail ("endptr == token_buffer.data() + token_buffer.size()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 1289, __extension__ __PRETTY_FUNCTION__)); > > return token_type::value_float; > } > > > > > > > __attribute__((__nonnull__(2))) > token_type scan_literal(const char_type* literal_text, const std::size_t length, > token_type return_type) > { > (static_cast <bool> (std::char_traits<char_type>::to_char_type(current) == literal_text[0]) ? void (0) : __assert_fail ("std::char_traits<char_type>::to_char_type(current) == literal_text[0]", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 1303, __extension__ __PRETTY_FUNCTION__)); > for (std::size_t i = 1; i < length; ++i) > { > if (__builtin_expect (!!(std::char_traits<char_type>::to_char_type(get()) != literal_text[i]), 0 )) > { > error_message = "invalid literal"; > return token_type::parse_error; > } > } > return return_type; > } > > > > > > > void reset() noexcept > { > token_buffer.clear(); > token_string.clear(); > token_string.push_back(std::char_traits<char_type>::to_char_type(current)); > } ># 1337 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 > char_int_type get() > { > ++position.chars_read_total; > ++position.chars_read_current_line; > > if (next_unget) > { > > next_unget = false; > } > else > { > current = ia.get_character(); > } > > if (__builtin_expect (!!(current != std::char_traits<char_type>::eof()), 1 )) > { > token_string.push_back(std::char_traits<char_type>::to_char_type(current)); > } > > if (current == '\n') > { > ++position.lines_read; > position.chars_read_current_line = 0; > } > > return current; > } ># 1374 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 > void unget() > { > next_unget = true; > > --position.chars_read_total; > > > if (position.chars_read_current_line == 0) > { > if (position.lines_read > 0) > { > --position.lines_read; > } > } > else > { > --position.chars_read_current_line; > } > > if (__builtin_expect (!!(current != std::char_traits<char_type>::eof()), 1 )) > { > (static_cast <bool> (!token_string.empty()) ? void (0) : __assert_fail ("!token_string.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp", 1395, __extension__ __PRETTY_FUNCTION__)); > token_string.pop_back(); > } > } > > > void add(char_int_type c) > { > token_buffer.push_back(static_cast<typename string_t::value_type>(c)); > } > > public: > > > > > > constexpr number_integer_t get_number_integer() const noexcept > { > return value_integer; > } > > > constexpr number_unsigned_t get_number_unsigned() const noexcept > { > return value_unsigned; > } > > > constexpr number_float_t get_number_float() const noexcept > { > return value_float; > } > > > string_t& get_string() > { > return token_buffer; > } > > > > > > > constexpr position_t get_position() const noexcept > { > return position; > } > > > > > std::string get_token_string() const > { > > std::string result; > for (const auto c : token_string) > { > if (static_cast<unsigned char>(c) <= '\x1F') > { > > std::array<char, 9> cs{{}}; > static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); > result += cs.data(); > } > else > { > > result.push_back(static_cast<std::string::value_type>(c)); > } > } > > return result; > } > > > __attribute__((__returns_nonnull__)) > constexpr const char* get_error_message() const noexcept > { > return error_message; > } ># 1486 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/lexer.hpp" 3 > bool skip_bom() > { > if (get() == 0xEF) > { > > return get() == 0xBB && get() == 0xBF; > } > > > > unget(); > return true; > } > > void skip_whitespace() > { > do > { > get(); > } > while (current == ' ' || current == '\t' || current == '\n' || current == '\r'); > } > > token_type scan() > { > > if (position.chars_read_total == 0 && !skip_bom()) > { > error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; > return token_type::parse_error; > } > > > skip_whitespace(); > > > while (ignore_comments && current == '/') > { > if (!scan_comment()) > { > return token_type::parse_error; > } > > > skip_whitespace(); > } > > switch (current) > { > > case '[': > return token_type::begin_array; > case ']': > return token_type::end_array; > case '{': > return token_type::begin_object; > case '}': > return token_type::end_object; > case ':': > return token_type::name_separator; > case ',': > return token_type::value_separator; > > > case 't': > { > std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; > return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); > } > case 'f': > { > std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; > return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); > } > case 'n': > { > std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; > return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); > } > > > case '\"': > return scan_string(); > > > case '-': > case '0': > case '1': > case '2': > case '3': > case '4': > case '5': > case '6': > case '7': > case '8': > case '9': > return scan_number(); > > > > case '\0': > case std::char_traits<char_type>::eof(): > return token_type::end_of_input; > > > default: > error_message = "invalid literal"; > return token_type::parse_error; > } > } > > private: > > InputAdapterType ia; > > > const bool ignore_comments = false; > > > char_int_type current = std::char_traits<char_type>::eof(); > > > bool next_unget = false; > > > position_t position {}; > > > std::vector<char_type> token_string {}; > > > string_t token_buffer {}; > > > const char* error_message = ""; > > > number_integer_t value_integer = 0; > number_unsigned_t value_unsigned = 0; > number_float_t value_float = 0; > > > const char_int_type decimal_point_char = '.'; >}; > >} >} } ># 28 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/is_sax.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/is_sax.hpp" 3 > ># 19 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/meta/is_sax.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > >template<typename T> >using null_function_t = decltype(std::declval<T&>().null()); > >template<typename T> >using boolean_function_t = > decltype(std::declval<T&>().boolean(std::declval<bool>())); > >template<typename T, typename Integer> >using number_integer_function_t = > decltype(std::declval<T&>().number_integer(std::declval<Integer>())); > >template<typename T, typename Unsigned> >using number_unsigned_function_t = > decltype(std::declval<T&>().number_unsigned(std::declval<Unsigned>())); > >template<typename T, typename Float, typename String> >using number_float_function_t = decltype(std::declval<T&>().number_float( > std::declval<Float>(), std::declval<const String&>())); > >template<typename T, typename String> >using string_function_t = > decltype(std::declval<T&>().string(std::declval<String&>())); > >template<typename T, typename Binary> >using binary_function_t = > decltype(std::declval<T&>().binary(std::declval<Binary&>())); > >template<typename T> >using start_object_function_t = > decltype(std::declval<T&>().start_object(std::declval<std::size_t>())); > >template<typename T, typename String> >using key_function_t = > decltype(std::declval<T&>().key(std::declval<String&>())); > >template<typename T> >using end_object_function_t = decltype(std::declval<T&>().end_object()); > >template<typename T> >using start_array_function_t = > decltype(std::declval<T&>().start_array(std::declval<std::size_t>())); > >template<typename T> >using end_array_function_t = decltype(std::declval<T&>().end_array()); > >template<typename T, typename Exception> >using parse_error_function_t = decltype(std::declval<T&>().parse_error( > std::declval<std::size_t>(), std::declval<const std::string&>(), > std::declval<const Exception&>())); > >template<typename SAX, typename BasicJsonType> >struct is_sax >{ > private: > static_assert(is_basic_json<BasicJsonType>::value, > "BasicJsonType must be of type basic_json<...>"); > > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using binary_t = typename BasicJsonType::binary_t; > using exception_t = typename BasicJsonType::exception; > > public: > static constexpr bool value = > is_detected_exact<bool, null_function_t, SAX>::value && > is_detected_exact<bool, boolean_function_t, SAX>::value && > is_detected_exact<bool, number_integer_function_t, SAX, number_integer_t>::value && > is_detected_exact<bool, number_unsigned_function_t, SAX, number_unsigned_t>::value && > is_detected_exact<bool, number_float_function_t, SAX, number_float_t, string_t>::value && > is_detected_exact<bool, string_function_t, SAX, string_t>::value && > is_detected_exact<bool, binary_function_t, SAX, binary_t>::value && > is_detected_exact<bool, start_object_function_t, SAX>::value && > is_detected_exact<bool, key_function_t, SAX, string_t>::value && > is_detected_exact<bool, end_object_function_t, SAX>::value && > is_detected_exact<bool, start_array_function_t, SAX>::value && > is_detected_exact<bool, end_array_function_t, SAX>::value && > is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value; >}; > >template<typename SAX, typename BasicJsonType> >struct is_sax_static_asserts >{ > private: > static_assert(is_basic_json<BasicJsonType>::value, > "BasicJsonType must be of type basic_json<...>"); > > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using binary_t = typename BasicJsonType::binary_t; > using exception_t = typename BasicJsonType::exception; > > public: > static_assert(is_detected_exact<bool, null_function_t, SAX>::value, > "Missing/invalid function: bool null()"); > static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value, > "Missing/invalid function: bool boolean(bool)"); > static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value, > "Missing/invalid function: bool boolean(bool)"); > static_assert( > is_detected_exact<bool, number_integer_function_t, SAX, > number_integer_t>::value, > "Missing/invalid function: bool number_integer(number_integer_t)"); > static_assert( > is_detected_exact<bool, number_unsigned_function_t, SAX, > number_unsigned_t>::value, > "Missing/invalid function: bool number_unsigned(number_unsigned_t)"); > static_assert(is_detected_exact<bool, number_float_function_t, SAX, > number_float_t, string_t>::value, > "Missing/invalid function: bool number_float(number_float_t, const string_t&)"); > static_assert( > is_detected_exact<bool, string_function_t, SAX, string_t>::value, > "Missing/invalid function: bool string(string_t&)"); > static_assert( > is_detected_exact<bool, binary_function_t, SAX, binary_t>::value, > "Missing/invalid function: bool binary(binary_t&)"); > static_assert(is_detected_exact<bool, start_object_function_t, SAX>::value, > "Missing/invalid function: bool start_object(std::size_t)"); > static_assert(is_detected_exact<bool, key_function_t, SAX, string_t>::value, > "Missing/invalid function: bool key(string_t&)"); > static_assert(is_detected_exact<bool, end_object_function_t, SAX>::value, > "Missing/invalid function: bool end_object()"); > static_assert(is_detected_exact<bool, start_array_function_t, SAX>::value, > "Missing/invalid function: bool start_array(std::size_t)"); > static_assert(is_detected_exact<bool, end_array_function_t, SAX>::value, > "Missing/invalid function: bool end_array()"); > static_assert( > is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value, > "Missing/invalid function: bool parse_error(std::size_t, const " > "std::string&, const exception&)"); >}; > >} >} } ># 30 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 2 3 > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > >enum class cbor_tag_handler_t >{ > error, > ignore, > store >}; ># 53 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 >static inline bool little_endianness(int num = 1) noexcept >{ > return *reinterpret_cast<char*>(&num) == 1; >} ># 66 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 >template<typename BasicJsonType, typename InputAdapterType, typename SAX = json_sax_dom_parser<BasicJsonType>> >class binary_reader >{ > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using binary_t = typename BasicJsonType::binary_t; > using json_sax_t = SAX; > using char_type = typename InputAdapterType::char_type; > using char_int_type = typename std::char_traits<char_type>::int_type; > > public: > > > > > > explicit binary_reader(InputAdapterType&& adapter, const input_format_t format = input_format_t::json) noexcept : ia(std::move(adapter)), input_format(format) > { > (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; > } > > > binary_reader(const binary_reader&) = delete; > binary_reader(binary_reader&&) = default; > binary_reader& operator=(const binary_reader&) = delete; > binary_reader& operator=(binary_reader&&) = default; > ~binary_reader() = default; ># 104 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > __attribute__((__nonnull__(3))) > bool sax_parse(const input_format_t format, > json_sax_t* sax_, > const bool strict = true, > const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) > { > sax = sax_; > bool result = false; > > switch (format) > { > case input_format_t::bson: > result = parse_bson_internal(); > break; > > case input_format_t::cbor: > result = parse_cbor_internal(true, tag_handler); > break; > > case input_format_t::msgpack: > result = parse_msgpack_internal(); > break; > > case input_format_t::ubjson: > case input_format_t::bjdata: > result = parse_ubjson_internal(); > break; > > case input_format_t::json: > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp", 134, __extension__ __PRETTY_FUNCTION__)); > } > > > if (result && strict) > { > if (input_format == input_format_t::ubjson || input_format == input_format_t::bjdata) > { > get_ignore_noop(); > } > else > { > get(); > } > > if (__builtin_expect (!!(current != std::char_traits<char_type>::eof()), 0 )) > { > return sax->parse_error(chars_read, get_token_string(), parse_error::create(110, chars_read, > exception_message(input_format, concat("expected end of input; last byte: 0x", get_token_string()), "value"), nullptr)); > } > } > > return result; > } > > private: ># 168 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool parse_bson_internal() > { > std::int32_t document_size{}; > get_number<std::int32_t, true>(input_format_t::bson, document_size); > > if (__builtin_expect (!!(!sax->start_object(static_cast<std::size_t>(-1))), 0 )) > { > return false; > } > > if (__builtin_expect (!!(!parse_bson_element_list( false)), 0 )) > { > return false; > } > > return sax->end_object(); > } ># 193 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool get_bson_cstr(string_t& result) > { > auto out = std::back_inserter(result); > while (true) > { > get(); > if (__builtin_expect (!!(!unexpect_eof(input_format_t::bson, "cstring")), 0 )) > { > return false; > } > if (current == 0x00) > { > return true; > } > *out++ = static_cast<typename string_t::value_type>(current); > } > } ># 222 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > template<typename NumberType> > bool get_bson_string(const NumberType len, string_t& result) > { > if (__builtin_expect (!!(len < 1), 0 )) > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format_t::bson, concat("string length must be at least 1, is ", std::to_string(len)), "string"), nullptr)); > } > > return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != std::char_traits<char_type>::eof(); > } ># 244 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > template<typename NumberType> > bool get_bson_binary(const NumberType len, binary_t& result) > { > if (__builtin_expect (!!(len < 0), 0 )) > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format_t::bson, concat("byte array length cannot be negative, is ", std::to_string(len)), "binary"), nullptr)); > } > > > std::uint8_t subtype{}; > get_number<std::uint8_t>(input_format_t::bson, subtype); > result.set_subtype(subtype); > > return get_binary(input_format_t::bson, len, result); > } ># 272 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool parse_bson_element_internal(const char_int_type element_type, > const std::size_t element_type_parse_position) > { > switch (element_type) > { > case 0x01: > { > double number{}; > return get_number<double, true>(input_format_t::bson, number) && sax->number_float(static_cast<number_float_t>(number), ""); > } > > case 0x02: > { > std::int32_t len{}; > string_t value; > return get_number<std::int32_t, true>(input_format_t::bson, len) && get_bson_string(len, value) && sax->string(value); > } > > case 0x03: > { > return parse_bson_internal(); > } > > case 0x04: > { > return parse_bson_array(); > } > > case 0x05: > { > std::int32_t len{}; > binary_t value; > return get_number<std::int32_t, true>(input_format_t::bson, len) && get_bson_binary(len, value) && sax->binary(value); > } > > case 0x08: > { > return sax->boolean(get() != 0); > } > > case 0x0A: > { > return sax->null(); > } > > case 0x10: > { > std::int32_t value{}; > return get_number<std::int32_t, true>(input_format_t::bson, value) && sax->number_integer(value); > } > > case 0x12: > { > std::int64_t value{}; > return get_number<std::int64_t, true>(input_format_t::bson, value) && sax->number_integer(value); > } > > default: > { > std::array<char, 3> cr{{}}; > static_cast<void>((std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(element_type))); > std::string cr_str{cr.data()}; > return sax->parse_error(element_type_parse_position, cr_str, > parse_error::create(114, element_type_parse_position, concat("Unsupported BSON record type 0x", cr_str), nullptr)); > } > } > } ># 352 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool parse_bson_element_list(const bool is_array) > { > string_t key; > > while (auto element_type = get()) > { > if (__builtin_expect (!!(!unexpect_eof(input_format_t::bson, "element list")), 0 )) > { > return false; > } > > const std::size_t element_type_parse_position = chars_read; > if (__builtin_expect (!!(!get_bson_cstr(key)), 0 )) > { > return false; > } > > if (!is_array && !sax->key(key)) > { > return false; > } > > if (__builtin_expect (!!(!parse_bson_element_internal(element_type, element_type_parse_position)), 0 )) > { > return false; > } > > > key.clear(); > } > > return true; > } > > > > > > bool parse_bson_array() > { > std::int32_t document_size{}; > get_number<std::int32_t, true>(input_format_t::bson, document_size); > > if (__builtin_expect (!!(!sax->start_array(static_cast<std::size_t>(-1))), 0 )) > { > return false; > } > > if (__builtin_expect (!!(!parse_bson_element_list( true)), 0 )) > { > return false; > } > > return sax->end_array(); > } ># 420 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool parse_cbor_internal(const bool get_char, > const cbor_tag_handler_t tag_handler) > { > switch (get_char ? get() : current) > { > > case std::char_traits<char_type>::eof(): > return unexpect_eof(input_format_t::cbor, "value"); > > > case 0x00: > case 0x01: > case 0x02: > case 0x03: > case 0x04: > case 0x05: > case 0x06: > case 0x07: > case 0x08: > case 0x09: > case 0x0A: > case 0x0B: > case 0x0C: > case 0x0D: > case 0x0E: > case 0x0F: > case 0x10: > case 0x11: > case 0x12: > case 0x13: > case 0x14: > case 0x15: > case 0x16: > case 0x17: > return sax->number_unsigned(static_cast<number_unsigned_t>(current)); > > case 0x18: > { > std::uint8_t number{}; > return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); > } > > case 0x19: > { > std::uint16_t number{}; > return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); > } > > case 0x1A: > { > std::uint32_t number{}; > return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); > } > > case 0x1B: > { > std::uint64_t number{}; > return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); > } > > > case 0x20: > case 0x21: > case 0x22: > case 0x23: > case 0x24: > case 0x25: > case 0x26: > case 0x27: > case 0x28: > case 0x29: > case 0x2A: > case 0x2B: > case 0x2C: > case 0x2D: > case 0x2E: > case 0x2F: > case 0x30: > case 0x31: > case 0x32: > case 0x33: > case 0x34: > case 0x35: > case 0x36: > case 0x37: > return sax->number_integer(static_cast<std::int8_t>(0x20 - 1 - current)); > > case 0x38: > { > std::uint8_t number{}; > return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number); > } > > case 0x39: > { > std::uint16_t number{}; > return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number); > } > > case 0x3A: > { > std::uint32_t number{}; > return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number); > } > > case 0x3B: > { > std::uint64_t number{}; > return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) > - static_cast<number_integer_t>(number)); > } > > > case 0x40: > case 0x41: > case 0x42: > case 0x43: > case 0x44: > case 0x45: > case 0x46: > case 0x47: > case 0x48: > case 0x49: > case 0x4A: > case 0x4B: > case 0x4C: > case 0x4D: > case 0x4E: > case 0x4F: > case 0x50: > case 0x51: > case 0x52: > case 0x53: > case 0x54: > case 0x55: > case 0x56: > case 0x57: > case 0x58: > case 0x59: > case 0x5A: > case 0x5B: > case 0x5F: > { > binary_t b; > return get_cbor_binary(b) && sax->binary(b); > } > > > case 0x60: > case 0x61: > case 0x62: > case 0x63: > case 0x64: > case 0x65: > case 0x66: > case 0x67: > case 0x68: > case 0x69: > case 0x6A: > case 0x6B: > case 0x6C: > case 0x6D: > case 0x6E: > case 0x6F: > case 0x70: > case 0x71: > case 0x72: > case 0x73: > case 0x74: > case 0x75: > case 0x76: > case 0x77: > case 0x78: > case 0x79: > case 0x7A: > case 0x7B: > case 0x7F: > { > string_t s; > return get_cbor_string(s) && sax->string(s); > } > > > case 0x80: > case 0x81: > case 0x82: > case 0x83: > case 0x84: > case 0x85: > case 0x86: > case 0x87: > case 0x88: > case 0x89: > case 0x8A: > case 0x8B: > case 0x8C: > case 0x8D: > case 0x8E: > case 0x8F: > case 0x90: > case 0x91: > case 0x92: > case 0x93: > case 0x94: > case 0x95: > case 0x96: > case 0x97: > return get_cbor_array( > conditional_static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu), tag_handler); > > case 0x98: > { > std::uint8_t len{}; > return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast<std::size_t>(len), tag_handler); > } > > case 0x99: > { > std::uint16_t len{}; > return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast<std::size_t>(len), tag_handler); > } > > case 0x9A: > { > std::uint32_t len{}; > return get_number(input_format_t::cbor, len) && get_cbor_array(conditional_static_cast<std::size_t>(len), tag_handler); > } > > case 0x9B: > { > std::uint64_t len{}; > return get_number(input_format_t::cbor, len) && get_cbor_array(conditional_static_cast<std::size_t>(len), tag_handler); > } > > case 0x9F: > return get_cbor_array(static_cast<std::size_t>(-1), tag_handler); > > > case 0xA0: > case 0xA1: > case 0xA2: > case 0xA3: > case 0xA4: > case 0xA5: > case 0xA6: > case 0xA7: > case 0xA8: > case 0xA9: > case 0xAA: > case 0xAB: > case 0xAC: > case 0xAD: > case 0xAE: > case 0xAF: > case 0xB0: > case 0xB1: > case 0xB2: > case 0xB3: > case 0xB4: > case 0xB5: > case 0xB6: > case 0xB7: > return get_cbor_object(conditional_static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu), tag_handler); > > case 0xB8: > { > std::uint8_t len{}; > return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast<std::size_t>(len), tag_handler); > } > > case 0xB9: > { > std::uint16_t len{}; > return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast<std::size_t>(len), tag_handler); > } > > case 0xBA: > { > std::uint32_t len{}; > return get_number(input_format_t::cbor, len) && get_cbor_object(conditional_static_cast<std::size_t>(len), tag_handler); > } > > case 0xBB: > { > std::uint64_t len{}; > return get_number(input_format_t::cbor, len) && get_cbor_object(conditional_static_cast<std::size_t>(len), tag_handler); > } > > case 0xBF: > return get_cbor_object(static_cast<std::size_t>(-1), tag_handler); > > case 0xC6: > case 0xC7: > case 0xC8: > case 0xC9: > case 0xCA: > case 0xCB: > case 0xCC: > case 0xCD: > case 0xCE: > case 0xCF: > case 0xD0: > case 0xD1: > case 0xD2: > case 0xD3: > case 0xD4: > case 0xD8: > case 0xD9: > case 0xDA: > case 0xDB: > { > switch (tag_handler) > { > case cbor_tag_handler_t::error: > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format_t::cbor, concat("invalid byte: 0x", last_token), "value"), nullptr)); > } > > case cbor_tag_handler_t::ignore: > { > > switch (current) > { > case 0xD8: > { > std::uint8_t subtype_to_ignore{}; > get_number(input_format_t::cbor, subtype_to_ignore); > break; > } > case 0xD9: > { > std::uint16_t subtype_to_ignore{}; > get_number(input_format_t::cbor, subtype_to_ignore); > break; > } > case 0xDA: > { > std::uint32_t subtype_to_ignore{}; > get_number(input_format_t::cbor, subtype_to_ignore); > break; > } > case 0xDB: > { > std::uint64_t subtype_to_ignore{}; > get_number(input_format_t::cbor, subtype_to_ignore); > break; > } > default: > break; > } > return parse_cbor_internal(true, tag_handler); > } > > case cbor_tag_handler_t::store: > { > binary_t b; > > switch (current) > { > case 0xD8: > { > std::uint8_t subtype{}; > get_number(input_format_t::cbor, subtype); > b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype)); > break; > } > case 0xD9: > { > std::uint16_t subtype{}; > get_number(input_format_t::cbor, subtype); > b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype)); > break; > } > case 0xDA: > { > std::uint32_t subtype{}; > get_number(input_format_t::cbor, subtype); > b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype)); > break; > } > case 0xDB: > { > std::uint64_t subtype{}; > get_number(input_format_t::cbor, subtype); > b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype)); > break; > } > default: > return parse_cbor_internal(true, tag_handler); > } > get(); > return get_cbor_binary(b) && sax->binary(b); > } > > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp", 817, __extension__ __PRETTY_FUNCTION__)); > return false; > } > } > > case 0xF4: > return sax->boolean(false); > > case 0xF5: > return sax->boolean(true); > > case 0xF6: > return sax->null(); > > case 0xF9: > { > const auto byte1_raw = get(); > if (__builtin_expect (!!(!unexpect_eof(input_format_t::cbor, "number")), 0 )) > { > return false; > } > const auto byte2_raw = get(); > if (__builtin_expect (!!(!unexpect_eof(input_format_t::cbor, "number")), 0 )) > { > return false; > } > > const auto byte1 = static_cast<unsigned char>(byte1_raw); > const auto byte2 = static_cast<unsigned char>(byte2_raw); ># 855 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > const auto half = static_cast<unsigned int>((byte1 << 8u) + byte2); > const double val = [&half] > { > const int exp = (half >> 10u) & 0x1Fu; > const unsigned int mant = half & 0x3FFu; > (static_cast <bool> (0 <= exp&& exp <= 32) ? void (0) : __assert_fail ("0 <= exp&& exp <= 32", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp", 860, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (mant <= 1024) ? void (0) : __assert_fail ("mant <= 1024", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp", 861, __extension__ __PRETTY_FUNCTION__)); > switch (exp) > { > case 0: > return std::ldexp(mant, -24); > case 31: > return (mant == 0) > ? std::numeric_limits<double>::infinity() > : std::numeric_limits<double>::quiet_NaN(); > default: > return std::ldexp(mant + 1024, exp - 25); > } > }(); > return sax->number_float((half & 0x8000u) != 0 > ? static_cast<number_float_t>(-val) > : static_cast<number_float_t>(val), ""); > } > > case 0xFA: > { > float number{}; > return get_number(input_format_t::cbor, number) && sax->number_float(static_cast<number_float_t>(number), ""); > } > > case 0xFB: > { > double number{}; > return get_number(input_format_t::cbor, number) && sax->number_float(static_cast<number_float_t>(number), ""); > } > > default: > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format_t::cbor, concat("invalid byte: 0x", last_token), "value"), nullptr)); > } > } > } ># 911 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool get_cbor_string(string_t& result) > { > if (__builtin_expect (!!(!unexpect_eof(input_format_t::cbor, "string")), 0 )) > { > return false; > } > > switch (current) > { > > case 0x60: > case 0x61: > case 0x62: > case 0x63: > case 0x64: > case 0x65: > case 0x66: > case 0x67: > case 0x68: > case 0x69: > case 0x6A: > case 0x6B: > case 0x6C: > case 0x6D: > case 0x6E: > case 0x6F: > case 0x70: > case 0x71: > case 0x72: > case 0x73: > case 0x74: > case 0x75: > case 0x76: > case 0x77: > { > return get_string(input_format_t::cbor, static_cast<unsigned int>(current) & 0x1Fu, result); > } > > case 0x78: > { > std::uint8_t len{}; > return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); > } > > case 0x79: > { > std::uint16_t len{}; > return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); > } > > case 0x7A: > { > std::uint32_t len{}; > return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); > } > > case 0x7B: > { > std::uint64_t len{}; > return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); > } > > case 0x7F: > { > while (get() != 0xFF) > { > string_t chunk; > if (!get_cbor_string(chunk)) > { > return false; > } > result.append(chunk); > } > return true; > } > > default: > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, > exception_message(input_format_t::cbor, concat("expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x", last_token), "string"), nullptr)); > } > } > } ># 1007 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool get_cbor_binary(binary_t& result) > { > if (__builtin_expect (!!(!unexpect_eof(input_format_t::cbor, "binary")), 0 )) > { > return false; > } > > switch (current) > { > > case 0x40: > case 0x41: > case 0x42: > case 0x43: > case 0x44: > case 0x45: > case 0x46: > case 0x47: > case 0x48: > case 0x49: > case 0x4A: > case 0x4B: > case 0x4C: > case 0x4D: > case 0x4E: > case 0x4F: > case 0x50: > case 0x51: > case 0x52: > case 0x53: > case 0x54: > case 0x55: > case 0x56: > case 0x57: > { > return get_binary(input_format_t::cbor, static_cast<unsigned int>(current) & 0x1Fu, result); > } > > case 0x58: > { > std::uint8_t len{}; > return get_number(input_format_t::cbor, len) && > get_binary(input_format_t::cbor, len, result); > } > > case 0x59: > { > std::uint16_t len{}; > return get_number(input_format_t::cbor, len) && > get_binary(input_format_t::cbor, len, result); > } > > case 0x5A: > { > std::uint32_t len{}; > return get_number(input_format_t::cbor, len) && > get_binary(input_format_t::cbor, len, result); > } > > case 0x5B: > { > std::uint64_t len{}; > return get_number(input_format_t::cbor, len) && > get_binary(input_format_t::cbor, len, result); > } > > case 0x5F: > { > while (get() != 0xFF) > { > binary_t chunk; > if (!get_cbor_binary(chunk)) > { > return false; > } > result.insert(result.end(), chunk.begin(), chunk.end()); > } > return true; > } > > default: > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, > exception_message(input_format_t::cbor, concat("expected length specification (0x40-0x5B) or indefinite binary array type (0x5F); last byte: 0x", last_token), "binary"), nullptr)); > } > } > } > > > > > > > > bool get_cbor_array(const std::size_t len, > const cbor_tag_handler_t tag_handler) > { > if (__builtin_expect (!!(!sax->start_array(len)), 0 )) > { > return false; > } > > if (len != static_cast<std::size_t>(-1)) > { > for (std::size_t i = 0; i < len; ++i) > { > if (__builtin_expect (!!(!parse_cbor_internal(true, tag_handler)), 0 )) > { > return false; > } > } > } > else > { > while (get() != 0xFF) > { > if (__builtin_expect (!!(!parse_cbor_internal(false, tag_handler)), 0 )) > { > return false; > } > } > } > > return sax->end_array(); > } > > > > > > > > bool get_cbor_object(const std::size_t len, > const cbor_tag_handler_t tag_handler) > { > if (__builtin_expect (!!(!sax->start_object(len)), 0 )) > { > return false; > } > > if (len != 0) > { > string_t key; > if (len != static_cast<std::size_t>(-1)) > { > for (std::size_t i = 0; i < len; ++i) > { > get(); > if (__builtin_expect (!!(!get_cbor_string(key) || !sax->key(key)), 0 )) > { > return false; > } > > if (__builtin_expect (!!(!parse_cbor_internal(true, tag_handler)), 0 )) > { > return false; > } > key.clear(); > } > } > else > { > while (get() != 0xFF) > { > if (__builtin_expect (!!(!get_cbor_string(key) || !sax->key(key)), 0 )) > { > return false; > } > > if (__builtin_expect (!!(!parse_cbor_internal(true, tag_handler)), 0 )) > { > return false; > } > key.clear(); > } > } > } > > return sax->end_object(); > } ># 1196 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool parse_msgpack_internal() > { > switch (get()) > { > > case std::char_traits<char_type>::eof(): > return unexpect_eof(input_format_t::msgpack, "value"); > > > case 0x00: > case 0x01: > case 0x02: > case 0x03: > case 0x04: > case 0x05: > case 0x06: > case 0x07: > case 0x08: > case 0x09: > case 0x0A: > case 0x0B: > case 0x0C: > case 0x0D: > case 0x0E: > case 0x0F: > case 0x10: > case 0x11: > case 0x12: > case 0x13: > case 0x14: > case 0x15: > case 0x16: > case 0x17: > case 0x18: > case 0x19: > case 0x1A: > case 0x1B: > case 0x1C: > case 0x1D: > case 0x1E: > case 0x1F: > case 0x20: > case 0x21: > case 0x22: > case 0x23: > case 0x24: > case 0x25: > case 0x26: > case 0x27: > case 0x28: > case 0x29: > case 0x2A: > case 0x2B: > case 0x2C: > case 0x2D: > case 0x2E: > case 0x2F: > case 0x30: > case 0x31: > case 0x32: > case 0x33: > case 0x34: > case 0x35: > case 0x36: > case 0x37: > case 0x38: > case 0x39: > case 0x3A: > case 0x3B: > case 0x3C: > case 0x3D: > case 0x3E: > case 0x3F: > case 0x40: > case 0x41: > case 0x42: > case 0x43: > case 0x44: > case 0x45: > case 0x46: > case 0x47: > case 0x48: > case 0x49: > case 0x4A: > case 0x4B: > case 0x4C: > case 0x4D: > case 0x4E: > case 0x4F: > case 0x50: > case 0x51: > case 0x52: > case 0x53: > case 0x54: > case 0x55: > case 0x56: > case 0x57: > case 0x58: > case 0x59: > case 0x5A: > case 0x5B: > case 0x5C: > case 0x5D: > case 0x5E: > case 0x5F: > case 0x60: > case 0x61: > case 0x62: > case 0x63: > case 0x64: > case 0x65: > case 0x66: > case 0x67: > case 0x68: > case 0x69: > case 0x6A: > case 0x6B: > case 0x6C: > case 0x6D: > case 0x6E: > case 0x6F: > case 0x70: > case 0x71: > case 0x72: > case 0x73: > case 0x74: > case 0x75: > case 0x76: > case 0x77: > case 0x78: > case 0x79: > case 0x7A: > case 0x7B: > case 0x7C: > case 0x7D: > case 0x7E: > case 0x7F: > return sax->number_unsigned(static_cast<number_unsigned_t>(current)); > > > case 0x80: > case 0x81: > case 0x82: > case 0x83: > case 0x84: > case 0x85: > case 0x86: > case 0x87: > case 0x88: > case 0x89: > case 0x8A: > case 0x8B: > case 0x8C: > case 0x8D: > case 0x8E: > case 0x8F: > return get_msgpack_object(conditional_static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu)); > > > case 0x90: > case 0x91: > case 0x92: > case 0x93: > case 0x94: > case 0x95: > case 0x96: > case 0x97: > case 0x98: > case 0x99: > case 0x9A: > case 0x9B: > case 0x9C: > case 0x9D: > case 0x9E: > case 0x9F: > return get_msgpack_array(conditional_static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu)); > > > case 0xA0: > case 0xA1: > case 0xA2: > case 0xA3: > case 0xA4: > case 0xA5: > case 0xA6: > case 0xA7: > case 0xA8: > case 0xA9: > case 0xAA: > case 0xAB: > case 0xAC: > case 0xAD: > case 0xAE: > case 0xAF: > case 0xB0: > case 0xB1: > case 0xB2: > case 0xB3: > case 0xB4: > case 0xB5: > case 0xB6: > case 0xB7: > case 0xB8: > case 0xB9: > case 0xBA: > case 0xBB: > case 0xBC: > case 0xBD: > case 0xBE: > case 0xBF: > case 0xD9: > case 0xDA: > case 0xDB: > { > string_t s; > return get_msgpack_string(s) && sax->string(s); > } > > case 0xC0: > return sax->null(); > > case 0xC2: > return sax->boolean(false); > > case 0xC3: > return sax->boolean(true); > > case 0xC4: > case 0xC5: > case 0xC6: > case 0xC7: > case 0xC8: > case 0xC9: > case 0xD4: > case 0xD5: > case 0xD6: > case 0xD7: > case 0xD8: > { > binary_t b; > return get_msgpack_binary(b) && sax->binary(b); > } > > case 0xCA: > { > float number{}; > return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast<number_float_t>(number), ""); > } > > case 0xCB: > { > double number{}; > return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast<number_float_t>(number), ""); > } > > case 0xCC: > { > std::uint8_t number{}; > return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); > } > > case 0xCD: > { > std::uint16_t number{}; > return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); > } > > case 0xCE: > { > std::uint32_t number{}; > return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); > } > > case 0xCF: > { > std::uint64_t number{}; > return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); > } > > case 0xD0: > { > std::int8_t number{}; > return get_number(input_format_t::msgpack, number) && sax->number_integer(number); > } > > case 0xD1: > { > std::int16_t number{}; > return get_number(input_format_t::msgpack, number) && sax->number_integer(number); > } > > case 0xD2: > { > std::int32_t number{}; > return get_number(input_format_t::msgpack, number) && sax->number_integer(number); > } > > case 0xD3: > { > std::int64_t number{}; > return get_number(input_format_t::msgpack, number) && sax->number_integer(number); > } > > case 0xDC: > { > std::uint16_t len{}; > return get_number(input_format_t::msgpack, len) && get_msgpack_array(static_cast<std::size_t>(len)); > } > > case 0xDD: > { > std::uint32_t len{}; > return get_number(input_format_t::msgpack, len) && get_msgpack_array(conditional_static_cast<std::size_t>(len)); > } > > case 0xDE: > { > std::uint16_t len{}; > return get_number(input_format_t::msgpack, len) && get_msgpack_object(static_cast<std::size_t>(len)); > } > > case 0xDF: > { > std::uint32_t len{}; > return get_number(input_format_t::msgpack, len) && get_msgpack_object(conditional_static_cast<std::size_t>(len)); > } > > > case 0xE0: > case 0xE1: > case 0xE2: > case 0xE3: > case 0xE4: > case 0xE5: > case 0xE6: > case 0xE7: > case 0xE8: > case 0xE9: > case 0xEA: > case 0xEB: > case 0xEC: > case 0xED: > case 0xEE: > case 0xEF: > case 0xF0: > case 0xF1: > case 0xF2: > case 0xF3: > case 0xF4: > case 0xF5: > case 0xF6: > case 0xF7: > case 0xF8: > case 0xF9: > case 0xFA: > case 0xFB: > case 0xFC: > case 0xFD: > case 0xFE: > case 0xFF: > return sax->number_integer(static_cast<std::int8_t>(current)); > > default: > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format_t::msgpack, concat("invalid byte: 0x", last_token), "value"), nullptr)); > } > } > } ># 1577 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool get_msgpack_string(string_t& result) > { > if (__builtin_expect (!!(!unexpect_eof(input_format_t::msgpack, "string")), 0 )) > { > return false; > } > > switch (current) > { > > case 0xA0: > case 0xA1: > case 0xA2: > case 0xA3: > case 0xA4: > case 0xA5: > case 0xA6: > case 0xA7: > case 0xA8: > case 0xA9: > case 0xAA: > case 0xAB: > case 0xAC: > case 0xAD: > case 0xAE: > case 0xAF: > case 0xB0: > case 0xB1: > case 0xB2: > case 0xB3: > case 0xB4: > case 0xB5: > case 0xB6: > case 0xB7: > case 0xB8: > case 0xB9: > case 0xBA: > case 0xBB: > case 0xBC: > case 0xBD: > case 0xBE: > case 0xBF: > { > return get_string(input_format_t::msgpack, static_cast<unsigned int>(current) & 0x1Fu, result); > } > > case 0xD9: > { > std::uint8_t len{}; > return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); > } > > case 0xDA: > { > std::uint16_t len{}; > return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); > } > > case 0xDB: > { > std::uint32_t len{}; > return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); > } > > default: > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, > exception_message(input_format_t::msgpack, concat("expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x", last_token), "string"), nullptr)); > } > } > } ># 1660 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool get_msgpack_binary(binary_t& result) > { > > auto assign_and_return_true = [&result](std::int8_t subtype) > { > result.set_subtype(static_cast<std::uint8_t>(subtype)); > return true; > }; > > switch (current) > { > case 0xC4: > { > std::uint8_t len{}; > return get_number(input_format_t::msgpack, len) && > get_binary(input_format_t::msgpack, len, result); > } > > case 0xC5: > { > std::uint16_t len{}; > return get_number(input_format_t::msgpack, len) && > get_binary(input_format_t::msgpack, len, result); > } > > case 0xC6: > { > std::uint32_t len{}; > return get_number(input_format_t::msgpack, len) && > get_binary(input_format_t::msgpack, len, result); > } > > case 0xC7: > { > std::uint8_t len{}; > std::int8_t subtype{}; > return get_number(input_format_t::msgpack, len) && > get_number(input_format_t::msgpack, subtype) && > get_binary(input_format_t::msgpack, len, result) && > assign_and_return_true(subtype); > } > > case 0xC8: > { > std::uint16_t len{}; > std::int8_t subtype{}; > return get_number(input_format_t::msgpack, len) && > get_number(input_format_t::msgpack, subtype) && > get_binary(input_format_t::msgpack, len, result) && > assign_and_return_true(subtype); > } > > case 0xC9: > { > std::uint32_t len{}; > std::int8_t subtype{}; > return get_number(input_format_t::msgpack, len) && > get_number(input_format_t::msgpack, subtype) && > get_binary(input_format_t::msgpack, len, result) && > assign_and_return_true(subtype); > } > > case 0xD4: > { > std::int8_t subtype{}; > return get_number(input_format_t::msgpack, subtype) && > get_binary(input_format_t::msgpack, 1, result) && > assign_and_return_true(subtype); > } > > case 0xD5: > { > std::int8_t subtype{}; > return get_number(input_format_t::msgpack, subtype) && > get_binary(input_format_t::msgpack, 2, result) && > assign_and_return_true(subtype); > } > > case 0xD6: > { > std::int8_t subtype{}; > return get_number(input_format_t::msgpack, subtype) && > get_binary(input_format_t::msgpack, 4, result) && > assign_and_return_true(subtype); > } > > case 0xD7: > { > std::int8_t subtype{}; > return get_number(input_format_t::msgpack, subtype) && > get_binary(input_format_t::msgpack, 8, result) && > assign_and_return_true(subtype); > } > > case 0xD8: > { > std::int8_t subtype{}; > return get_number(input_format_t::msgpack, subtype) && > get_binary(input_format_t::msgpack, 16, result) && > assign_and_return_true(subtype); > } > > default: > return false; > } > } > > > > > > bool get_msgpack_array(const std::size_t len) > { > if (__builtin_expect (!!(!sax->start_array(len)), 0 )) > { > return false; > } > > for (std::size_t i = 0; i < len; ++i) > { > if (__builtin_expect (!!(!parse_msgpack_internal()), 0 )) > { > return false; > } > } > > return sax->end_array(); > } > > > > > > bool get_msgpack_object(const std::size_t len) > { > if (__builtin_expect (!!(!sax->start_object(len)), 0 )) > { > return false; > } > > string_t key; > for (std::size_t i = 0; i < len; ++i) > { > get(); > if (__builtin_expect (!!(!get_msgpack_string(key) || !sax->key(key)), 0 )) > { > return false; > } > > if (__builtin_expect (!!(!parse_msgpack_internal()), 0 )) > { > return false; > } > key.clear(); > } > > return sax->end_object(); > } ># 1830 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool parse_ubjson_internal(const bool get_char = true) > { > return get_ubjson_value(get_char ? get_ignore_noop() : current); > } ># 1849 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool get_ubjson_string(string_t& result, const bool get_char = true) > { > if (get_char) > { > get(); > } > > if (__builtin_expect (!!(!unexpect_eof(input_format, "value")), 0 )) > { > return false; > } > > switch (current) > { > case 'U': > { > std::uint8_t len{}; > return get_number(input_format, len) && get_string(input_format, len, result); > } > > case 'i': > { > std::int8_t len{}; > return get_number(input_format, len) && get_string(input_format, len, result); > } > > case 'I': > { > std::int16_t len{}; > return get_number(input_format, len) && get_string(input_format, len, result); > } > > case 'l': > { > std::int32_t len{}; > return get_number(input_format, len) && get_string(input_format, len, result); > } > > case 'L': > { > std::int64_t len{}; > return get_number(input_format, len) && get_string(input_format, len, result); > } > > case 'u': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint16_t len{}; > return get_number(input_format, len) && get_string(input_format, len, result); > } > > case 'm': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint32_t len{}; > return get_number(input_format, len) && get_string(input_format, len, result); > } > > case 'M': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint64_t len{}; > return get_number(input_format, len) && get_string(input_format, len, result); > } > > default: > break; > } > auto last_token = get_token_string(); > std::string message; > > if (input_format != input_format_t::bjdata) > { > message = "expected length type specification (U, i, I, l, L); last byte: 0x" + last_token; > } > else > { > message = "expected length type specification (U, i, u, I, m, l, M, L); last byte: 0x" + last_token; > } > return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format, message, "string"), nullptr)); > } > > > > > > bool get_ubjson_ndarray_size(std::vector<size_t>& dim) > { > std::pair<std::size_t, char_int_type> size_and_type; > size_t dimlen = 0; > bool no_ndarray = true; > > if (__builtin_expect (!!(!get_ubjson_size_type(size_and_type, no_ndarray)), 0 )) > { > return false; > } > > if (size_and_type.first != npos) > { > if (size_and_type.second != 0) > { > if (size_and_type.second != 'N') > { > for (std::size_t i = 0; i < size_and_type.first; ++i) > { > if (__builtin_expect (!!(!get_ubjson_size_value(dimlen, no_ndarray, size_and_type.second)), 0 )) > { > return false; > } > dim.push_back(dimlen); > } > } > } > else > { > for (std::size_t i = 0; i < size_and_type.first; ++i) > { > if (__builtin_expect (!!(!get_ubjson_size_value(dimlen, no_ndarray)), 0 )) > { > return false; > } > dim.push_back(dimlen); > } > } > } > else > { > while (current != ']') > { > if (__builtin_expect (!!(!get_ubjson_size_value(dimlen, no_ndarray, current)), 0 )) > { > return false; > } > dim.push_back(dimlen); > get_ignore_noop(); > } > } > return true; > } ># 2009 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool get_ubjson_size_value(std::size_t& result, bool& is_ndarray, char_int_type prefix = 0) > { > if (prefix == 0) > { > prefix = get_ignore_noop(); > } > > switch (prefix) > { > case 'U': > { > std::uint8_t number{}; > if (__builtin_expect (!!(!get_number(input_format, number)), 0 )) > { > return false; > } > result = static_cast<std::size_t>(number); > return true; > } > > case 'i': > { > std::int8_t number{}; > if (__builtin_expect (!!(!get_number(input_format, number)), 0 )) > { > return false; > } > if (number < 0) > { > return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, > exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); > } > result = static_cast<std::size_t>(number); > return true; > } > > case 'I': > { > std::int16_t number{}; > if (__builtin_expect (!!(!get_number(input_format, number)), 0 )) > { > return false; > } > if (number < 0) > { > return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, > exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); > } > result = static_cast<std::size_t>(number); > return true; > } > > case 'l': > { > std::int32_t number{}; > if (__builtin_expect (!!(!get_number(input_format, number)), 0 )) > { > return false; > } > if (number < 0) > { > return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, > exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); > } > result = static_cast<std::size_t>(number); > return true; > } > > case 'L': > { > std::int64_t number{}; > if (__builtin_expect (!!(!get_number(input_format, number)), 0 )) > { > return false; > } > if (number < 0) > { > return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, > exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); > } > if (!value_in_range_of<std::size_t>(number)) > { > return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, > exception_message(input_format, "integer value overflow", "size"), nullptr)); > } > result = static_cast<std::size_t>(number); > return true; > } > > case 'u': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint16_t number{}; > if (__builtin_expect (!!(!get_number(input_format, number)), 0 )) > { > return false; > } > result = static_cast<std::size_t>(number); > return true; > } > > case 'm': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint32_t number{}; > if (__builtin_expect (!!(!get_number(input_format, number)), 0 )) > { > return false; > } > result = conditional_static_cast<std::size_t>(number); > return true; > } > > case 'M': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint64_t number{}; > if (__builtin_expect (!!(!get_number(input_format, number)), 0 )) > { > return false; > } > if (!value_in_range_of<std::size_t>(number)) > { > return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, > exception_message(input_format, "integer value overflow", "size"), nullptr)); > } > result = detail::conditional_static_cast<std::size_t>(number); > return true; > } > > case '[': > { > if (input_format != input_format_t::bjdata) > { > break; > } > if (is_ndarray) > { > return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, exception_message(input_format, "ndarray dimentional vector is not allowed", "size"), nullptr)); > } > std::vector<size_t> dim; > if (__builtin_expect (!!(!get_ubjson_ndarray_size(dim)), 0 )) > { > return false; > } > if (dim.size() == 1 || (dim.size() == 2 && dim.at(0) == 1)) > { > result = dim.at(dim.size() - 1); > return true; > } > if (!dim.empty()) > { > for (auto i : dim) > { > if ( i == 0 ) > { > result = 0; > return true; > } > } > > string_t key = "_ArraySize_"; > if (__builtin_expect (!!(!sax->start_object(3) || !sax->key(key) || !sax->start_array(dim.size())), 0 )) > { > return false; > } > result = 1; > for (auto i : dim) > { > result *= i; > if (result == 0 || result == npos) > { > return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, exception_message(input_format, "excessive ndarray size caused overflow", "size"), nullptr)); > } > if (__builtin_expect (!!(!sax->number_unsigned(static_cast<number_unsigned_t>(i))), 0 )) > { > return false; > } > } > is_ndarray = true; > return sax->end_array(); > } > result = 0; > return true; > } > > default: > break; > } > auto last_token = get_token_string(); > std::string message; > > if (input_format != input_format_t::bjdata) > { > message = "expected length type specification (U, i, I, l, L) after '#'; last byte: 0x" + last_token; > } > else > { > message = "expected length type specification (U, i, u, I, m, l, M, L) after '#'; last byte: 0x" + last_token; > } > return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format, message, "size"), nullptr)); > } ># 2232 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > bool get_ubjson_size_type(std::pair<std::size_t, char_int_type>& result, bool inside_ndarray = false) > { > result.first = npos; > result.second = 0; > bool is_ndarray = false; > > get_ignore_noop(); > > if (current == '$') > { > result.second = get(); > if (input_format == input_format_t::bjdata > && __builtin_expect (!!(std::binary_search(bjd_optimized_type_markers.begin(), bjd_optimized_type_markers.end(), result.second)), 0 )) > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format, concat("marker 0x", last_token, " is not a permitted optimized array type"), "type"), nullptr)); > } > > if (__builtin_expect (!!(!unexpect_eof(input_format, "type")), 0 )) > { > return false; > } > > get_ignore_noop(); > if (__builtin_expect (!!(current != '#'), 0 )) > { > if (__builtin_expect (!!(!unexpect_eof(input_format, "value")), 0 )) > { > return false; > } > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format, concat("expected '#' after type information; last byte: 0x", last_token), "size"), nullptr)); > } > > bool is_error = get_ubjson_size_value(result.first, is_ndarray); > if (input_format == input_format_t::bjdata && is_ndarray) > { > if (inside_ndarray) > { > return sax->parse_error(chars_read, get_token_string(), parse_error::create(112, chars_read, > exception_message(input_format, "ndarray can not be recursive", "size"), nullptr)); > } > result.second |= (1 << 8); > } > return is_error; > } > > if (current == '#') > { > bool is_error = get_ubjson_size_value(result.first, is_ndarray); > if (input_format == input_format_t::bjdata && is_ndarray) > { > return sax->parse_error(chars_read, get_token_string(), parse_error::create(112, chars_read, > exception_message(input_format, "ndarray requires both type and size", "size"), nullptr)); > } > return is_error; > } > > return true; > } > > > > > > bool get_ubjson_value(const char_int_type prefix) > { > switch (prefix) > { > case std::char_traits<char_type>::eof(): > return unexpect_eof(input_format, "value"); > > case 'T': > return sax->boolean(true); > case 'F': > return sax->boolean(false); > > case 'Z': > return sax->null(); > > case 'U': > { > std::uint8_t number{}; > return get_number(input_format, number) && sax->number_unsigned(number); > } > > case 'i': > { > std::int8_t number{}; > return get_number(input_format, number) && sax->number_integer(number); > } > > case 'I': > { > std::int16_t number{}; > return get_number(input_format, number) && sax->number_integer(number); > } > > case 'l': > { > std::int32_t number{}; > return get_number(input_format, number) && sax->number_integer(number); > } > > case 'L': > { > std::int64_t number{}; > return get_number(input_format, number) && sax->number_integer(number); > } > > case 'u': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint16_t number{}; > return get_number(input_format, number) && sax->number_unsigned(number); > } > > case 'm': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint32_t number{}; > return get_number(input_format, number) && sax->number_unsigned(number); > } > > case 'M': > { > if (input_format != input_format_t::bjdata) > { > break; > } > std::uint64_t number{}; > return get_number(input_format, number) && sax->number_unsigned(number); > } > > case 'h': > { > if (input_format != input_format_t::bjdata) > { > break; > } > const auto byte1_raw = get(); > if (__builtin_expect (!!(!unexpect_eof(input_format, "number")), 0 )) > { > return false; > } > const auto byte2_raw = get(); > if (__builtin_expect (!!(!unexpect_eof(input_format, "number")), 0 )) > { > return false; > } > > const auto byte1 = static_cast<unsigned char>(byte1_raw); > const auto byte2 = static_cast<unsigned char>(byte2_raw); ># 2402 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > const auto half = static_cast<unsigned int>((byte2 << 8u) + byte1); > const double val = [&half] > { > const int exp = (half >> 10u) & 0x1Fu; > const unsigned int mant = half & 0x3FFu; > (static_cast <bool> (0 <= exp&& exp <= 32) ? void (0) : __assert_fail ("0 <= exp&& exp <= 32", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp", 2407, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (mant <= 1024) ? void (0) : __assert_fail ("mant <= 1024", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp", 2408, __extension__ __PRETTY_FUNCTION__)); > switch (exp) > { > case 0: > return std::ldexp(mant, -24); > case 31: > return (mant == 0) > ? std::numeric_limits<double>::infinity() > : std::numeric_limits<double>::quiet_NaN(); > default: > return std::ldexp(mant + 1024, exp - 25); > } > }(); > return sax->number_float((half & 0x8000u) != 0 > ? static_cast<number_float_t>(-val) > : static_cast<number_float_t>(val), ""); > } > > case 'd': > { > float number{}; > return get_number(input_format, number) && sax->number_float(static_cast<number_float_t>(number), ""); > } > > case 'D': > { > double number{}; > return get_number(input_format, number) && sax->number_float(static_cast<number_float_t>(number), ""); > } > > case 'H': > { > return get_ubjson_high_precision_number(); > } > > case 'C': > { > get(); > if (__builtin_expect (!!(!unexpect_eof(input_format, "char")), 0 )) > { > return false; > } > if (__builtin_expect (!!(current > 127), 0 )) > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, > exception_message(input_format, concat("byte after 'C' must be in range 0x00..0x7F; last byte: 0x", last_token), "char"), nullptr)); > } > string_t s(1, static_cast<typename string_t::value_type>(current)); > return sax->string(s); > } > > case 'S': > { > string_t s; > return get_ubjson_string(s) && sax->string(s); > } > > case '[': > return get_ubjson_array(); > > case '{': > return get_ubjson_object(); > > default: > break; > } > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format, "invalid byte: 0x" + last_token, "value"), nullptr)); > } > > > > > bool get_ubjson_array() > { > std::pair<std::size_t, char_int_type> size_and_type; > if (__builtin_expect (!!(!get_ubjson_size_type(size_and_type)), 0 )) > { > return false; > } > > > > > if (input_format == input_format_t::bjdata && size_and_type.first != npos && (size_and_type.second & (1 << 8)) != 0) > { > size_and_type.second &= ~(static_cast<char_int_type>(1) << 8); > auto it = std::lower_bound(bjd_types_map.begin(), bjd_types_map.end(), size_and_type.second, [](const bjd_type & p, char_int_type t) > { > return p.first < t; > }); > string_t key = "_ArrayType_"; > if (__builtin_expect (!!(it == bjd_types_map.end() || it->first != size_and_type.second), 0 )) > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format, "invalid byte: 0x" + last_token, "type"), nullptr)); > } > > string_t type = it->second; > if (__builtin_expect (!!(!sax->key(key) || !sax->string(type)), 0 )) > { > return false; > } > > if (size_and_type.second == 'C') > { > size_and_type.second = 'U'; > } > > key = "_ArrayData_"; > if (__builtin_expect (!!(!sax->key(key) || !sax->start_array(size_and_type.first)), 0 )) > { > return false; > } > > for (std::size_t i = 0; i < size_and_type.first; ++i) > { > if (__builtin_expect (!!(!get_ubjson_value(size_and_type.second)), 0 )) > { > return false; > } > } > > return (sax->end_array() && sax->end_object()); > } > > if (size_and_type.first != npos) > { > if (__builtin_expect (!!(!sax->start_array(size_and_type.first)), 0 )) > { > return false; > } > > if (size_and_type.second != 0) > { > if (size_and_type.second != 'N') > { > for (std::size_t i = 0; i < size_and_type.first; ++i) > { > if (__builtin_expect (!!(!get_ubjson_value(size_and_type.second)), 0 )) > { > return false; > } > } > } > } > else > { > for (std::size_t i = 0; i < size_and_type.first; ++i) > { > if (__builtin_expect (!!(!parse_ubjson_internal()), 0 )) > { > return false; > } > } > } > } > else > { > if (__builtin_expect (!!(!sax->start_array(static_cast<std::size_t>(-1))), 0 )) > { > return false; > } > > while (current != ']') > { > if (__builtin_expect (!!(!parse_ubjson_internal(false)), 0 )) > { > return false; > } > get_ignore_noop(); > } > } > > return sax->end_array(); > } > > > > > bool get_ubjson_object() > { > std::pair<std::size_t, char_int_type> size_and_type; > if (__builtin_expect (!!(!get_ubjson_size_type(size_and_type)), 0 )) > { > return false; > } > > > if (input_format == input_format_t::bjdata && size_and_type.first != npos && (size_and_type.second & (1 << 8)) != 0) > { > auto last_token = get_token_string(); > return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, > exception_message(input_format, "BJData object does not support ND-array size in optimized format", "object"), nullptr)); > } > > string_t key; > if (size_and_type.first != npos) > { > if (__builtin_expect (!!(!sax->start_object(size_and_type.first)), 0 )) > { > return false; > } > > if (size_and_type.second != 0) > { > for (std::size_t i = 0; i < size_and_type.first; ++i) > { > if (__builtin_expect (!!(!get_ubjson_string(key) || !sax->key(key)), 0 )) > { > return false; > } > if (__builtin_expect (!!(!get_ubjson_value(size_and_type.second)), 0 )) > { > return false; > } > key.clear(); > } > } > else > { > for (std::size_t i = 0; i < size_and_type.first; ++i) > { > if (__builtin_expect (!!(!get_ubjson_string(key) || !sax->key(key)), 0 )) > { > return false; > } > if (__builtin_expect (!!(!parse_ubjson_internal()), 0 )) > { > return false; > } > key.clear(); > } > } > } > else > { > if (__builtin_expect (!!(!sax->start_object(static_cast<std::size_t>(-1))), 0 )) > { > return false; > } > > while (current != '}') > { > if (__builtin_expect (!!(!get_ubjson_string(key, false) || !sax->key(key)), 0 )) > { > return false; > } > if (__builtin_expect (!!(!parse_ubjson_internal()), 0 )) > { > return false; > } > get_ignore_noop(); > key.clear(); > } > } > > return sax->end_object(); > } > > > > > bool get_ubjson_high_precision_number() > { > > std::size_t size{}; > bool no_ndarray = true; > auto res = get_ubjson_size_value(size, no_ndarray); > if (__builtin_expect (!!(!res), 0 )) > { > return res; > } > > > std::vector<char> number_vector; > for (std::size_t i = 0; i < size; ++i) > { > get(); > if (__builtin_expect (!!(!unexpect_eof(input_format, "number")), 0 )) > { > return false; > } > number_vector.push_back(static_cast<char>(current)); > } > > > using ia_type = decltype(detail::input_adapter(number_vector)); > auto number_lexer = detail::lexer<BasicJsonType, ia_type>(detail::input_adapter(number_vector), false); > const auto result_number = number_lexer.scan(); > const auto number_string = number_lexer.get_token_string(); > const auto result_remainder = number_lexer.scan(); > > using token_type = typename detail::lexer_base<BasicJsonType>::token_type; > > if (__builtin_expect (!!(result_remainder != token_type::end_of_input), 0 )) > { > return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, > exception_message(input_format, concat("invalid number text: ", number_lexer.get_token_string()), "high-precision number"), nullptr)); > } > > switch (result_number) > { > case token_type::value_integer: > return sax->number_integer(number_lexer.get_number_integer()); > case token_type::value_unsigned: > return sax->number_unsigned(number_lexer.get_number_unsigned()); > case token_type::value_float: > return sax->number_float(number_lexer.get_number_float(), std::move(number_string)); > case token_type::uninitialized: > case token_type::literal_true: > case token_type::literal_false: > case token_type::literal_null: > case token_type::value_string: > case token_type::begin_array: > case token_type::begin_object: > case token_type::end_array: > case token_type::end_object: > case token_type::name_separator: > case token_type::value_separator: > case token_type::parse_error: > case token_type::end_of_input: > case token_type::literal_or_value: > default: > return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, > exception_message(input_format, concat("invalid number text: ", number_lexer.get_token_string()), "high-precision number"), nullptr)); > } > } ># 2752 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > char_int_type get() > { > ++chars_read; > return current = ia.get_character(); > } > > > > > char_int_type get_ignore_noop() > { > do > { > get(); > } > while (current == 'N'); > > return current; > } ># 2787 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > template<typename NumberType, bool InputIsLittleEndian = false> > bool get_number(const input_format_t format, NumberType& result) > { > > std::array<std::uint8_t, sizeof(NumberType)> vec{}; > for (std::size_t i = 0; i < sizeof(NumberType); ++i) > { > get(); > if (__builtin_expect (!!(!unexpect_eof(format, "number")), 0 )) > { > return false; > } > > > if (is_little_endian != (InputIsLittleEndian || format == input_format_t::bjdata)) > { > vec[sizeof(NumberType) - i - 1] = static_cast<std::uint8_t>(current); > } > else > { > vec[i] = static_cast<std::uint8_t>(current); > } > } > > > std::memcpy(&result, vec.data(), sizeof(NumberType)); > return true; > } ># 2830 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > template<typename NumberType> > bool get_string(const input_format_t format, > const NumberType len, > string_t& result) > { > bool success = true; > for (NumberType i = 0; i < len; i++) > { > get(); > if (__builtin_expect (!!(!unexpect_eof(format, "string")), 0 )) > { > success = false; > break; > } > result.push_back(static_cast<typename string_t::value_type>(current)); > } > return success; > } ># 2863 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > template<typename NumberType> > bool get_binary(const input_format_t format, > const NumberType len, > binary_t& result) > { > bool success = true; > for (NumberType i = 0; i < len; i++) > { > get(); > if (__builtin_expect (!!(!unexpect_eof(format, "binary")), 0 )) > { > success = false; > break; > } > result.push_back(static_cast<std::uint8_t>(current)); > } > return success; > } > > > > > > > __attribute__((__nonnull__(3))) > bool unexpect_eof(const input_format_t format, const char* context) const > { > if (__builtin_expect (!!(current == std::char_traits<char_type>::eof()), 0 )) > { > return sax->parse_error(chars_read, "<end of file>", > parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), nullptr)); > } > return true; > } > > > > > std::string get_token_string() const > { > std::array<char, 3> cr{{}}; > static_cast<void>((std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(current))); > return std::string{cr.data()}; > } > > > > > > > > std::string exception_message(const input_format_t format, > const std::string& detail, > const std::string& context) const > { > std::string error_msg = "syntax error while parsing "; > > switch (format) > { > case input_format_t::cbor: > error_msg += "CBOR"; > break; > > case input_format_t::msgpack: > error_msg += "MessagePack"; > break; > > case input_format_t::ubjson: > error_msg += "UBJSON"; > break; > > case input_format_t::bson: > error_msg += "BSON"; > break; > > case input_format_t::bjdata: > error_msg += "BJData"; > break; > > case input_format_t::json: > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp", 2944, __extension__ __PRETTY_FUNCTION__)); > } > > return concat(error_msg, ' ', context, ": ", detail); > } > > private: > static inline constexpr std::size_t npos = static_cast<std::size_t>(-1); > > > InputAdapterType ia; > > > char_int_type current = std::char_traits<char_type>::eof(); > > > std::size_t chars_read = 0; > > > const bool is_little_endian = little_endianness(); > > > const input_format_t input_format = input_format_t::json; > > > json_sax_t* sax = nullptr; ># 2989 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/binary_reader.hpp" 3 > private: > > > const decltype(make_array<char_int_type>('F', 'H', 'N', 'S', 'T', 'Z', '[', '{')) bjd_optimized_type_markers = > make_array<char_int_type>('F', 'H', 'N', 'S', 'T', 'Z', '[', '{'); > > using bjd_type = std::pair<char_int_type, string_t>; > > const decltype(make_array<bjd_type>( bjd_type{'C', "char"}, bjd_type{'D', "double"}, bjd_type{'I', "int16"}, bjd_type{'L', "int64"}, bjd_type{'M', "uint64"}, bjd_type{'U', "uint8"}, bjd_type{'d', "single"}, bjd_type{'i', "int8"}, bjd_type{'l', "int32"}, bjd_type{'m', "uint32"}, bjd_type{'u', "uint16"})) bjd_types_map = > make_array<bjd_type>( bjd_type{'C', "char"}, bjd_type{'D', "double"}, bjd_type{'I', "int16"}, bjd_type{'L', "int64"}, bjd_type{'M', "uint64"}, bjd_type{'U', "uint8"}, bjd_type{'d', "single"}, bjd_type{'i', "int8"}, bjd_type{'l', "int32"}, bjd_type{'m', "uint32"}, bjd_type{'u', "uint16"}); > > > >}; > > > > > > >} >} } ># 42 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/parser.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/parser.hpp" 3 > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 12 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/parser.hpp" 2 3 ># 27 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/parser.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > > > >enum class parse_event_t : std::uint8_t >{ > > object_start, > > object_end, > > array_start, > > array_end, > > key, > > value >}; > >template<typename BasicJsonType> >using parser_callback_t = > std::function<bool(int , parse_event_t , BasicJsonType& )>; > > > > > > >template<typename BasicJsonType, typename InputAdapterType> >class parser >{ > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using number_float_t = typename BasicJsonType::number_float_t; > using string_t = typename BasicJsonType::string_t; > using lexer_t = lexer<BasicJsonType, InputAdapterType>; > using token_type = typename lexer_t::token_type; > > public: > > explicit parser(InputAdapterType&& adapter, > const parser_callback_t<BasicJsonType> cb = nullptr, > const bool allow_exceptions_ = true, > const bool skip_comments = false) > : callback(cb) > , m_lexer(std::move(adapter), skip_comments) > , allow_exceptions(allow_exceptions_) > { > > get_token(); > } ># 93 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/parser.hpp" 3 > void parse(const bool strict, BasicJsonType& result) > { > if (callback) > { > json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions); > sax_parse_internal(&sdp); > > > if (strict && (get_token() != token_type::end_of_input)) > { > sdp.parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), > exception_message(token_type::end_of_input, "value"), nullptr)); > } > > > if (sdp.is_errored()) > { > result = value_t::discarded; > return; > } > > > > if (result.is_discarded()) > { > result = nullptr; > } > } > else > { > json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions); > sax_parse_internal(&sdp); > > > if (strict && (get_token() != token_type::end_of_input)) > { > sdp.parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); > } > > > if (sdp.is_errored()) > { > result = value_t::discarded; > return; > } > } > > result.assert_invariant(); > } > > > > > > > > bool accept(const bool strict = true) > { > json_sax_acceptor<BasicJsonType> sax_acceptor; > return sax_parse(&sax_acceptor, strict); > } > > template<typename SAX> > __attribute__((__nonnull__(2))) > bool sax_parse(SAX* sax, const bool strict = true) > { > (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; > const bool result = sax_parse_internal(sax); > > > if (result && strict && (get_token() != token_type::end_of_input)) > { > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); > } > > return result; > } > > private: > template<typename SAX> > __attribute__((__nonnull__(2))) > bool sax_parse_internal(SAX* sax) > { > > > std::vector<bool> states; > > bool skip_to_state_evaluation = false; > > while (true) > { > if (!skip_to_state_evaluation) > { > > switch (last_token) > { > case token_type::begin_object: > { > if (__builtin_expect (!!(!sax->start_object(static_cast<std::size_t>(-1))), 0 )) > { > return false; > } > > > if (get_token() == token_type::end_object) > { > if (__builtin_expect (!!(!sax->end_object()), 0 )) > { > return false; > } > break; > } > > > if (__builtin_expect (!!(last_token != token_type::value_string), 0 )) > { > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), nullptr)); > } > if (__builtin_expect (!!(!sax->key(m_lexer.get_string())), 0 )) > { > return false; > } > > > if (__builtin_expect (!!(get_token() != token_type::name_separator), 0 )) > { > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), nullptr)); > } > > > states.push_back(false); > > > get_token(); > continue; > } > > case token_type::begin_array: > { > if (__builtin_expect (!!(!sax->start_array(static_cast<std::size_t>(-1))), 0 )) > { > return false; > } > > > if (get_token() == token_type::end_array) > { > if (__builtin_expect (!!(!sax->end_array()), 0 )) > { > return false; > } > break; > } > > > states.push_back(true); > > > continue; > } > > case token_type::value_float: > { > const auto res = m_lexer.get_number_float(); > > if (__builtin_expect (!!(!std::isfinite(res)), 0 )) > { > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > out_of_range::create(406, concat("number overflow parsing '", m_lexer.get_token_string(), '\''), nullptr)); > } > > if (__builtin_expect (!!(!sax->number_float(res, m_lexer.get_string())), 0 )) > { > return false; > } > > break; > } > > case token_type::literal_false: > { > if (__builtin_expect (!!(!sax->boolean(false)), 0 )) > { > return false; > } > break; > } > > case token_type::literal_null: > { > if (__builtin_expect (!!(!sax->null()), 0 )) > { > return false; > } > break; > } > > case token_type::literal_true: > { > if (__builtin_expect (!!(!sax->boolean(true)), 0 )) > { > return false; > } > break; > } > > case token_type::value_integer: > { > if (__builtin_expect (!!(!sax->number_integer(m_lexer.get_number_integer())), 0 )) > { > return false; > } > break; > } > > case token_type::value_string: > { > if (__builtin_expect (!!(!sax->string(m_lexer.get_string())), 0 )) > { > return false; > } > break; > } > > case token_type::value_unsigned: > { > if (__builtin_expect (!!(!sax->number_unsigned(m_lexer.get_number_unsigned())), 0 )) > { > return false; > } > break; > } > > case token_type::parse_error: > { > > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::uninitialized, "value"), nullptr)); > } > > case token_type::uninitialized: > case token_type::end_array: > case token_type::end_object: > case token_type::name_separator: > case token_type::value_separator: > case token_type::end_of_input: > case token_type::literal_or_value: > default: > { > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::literal_or_value, "value"), nullptr)); > } > } > } > else > { > skip_to_state_evaluation = false; > } > > > if (states.empty()) > { > > return true; > } > > if (states.back()) > { > > if (get_token() == token_type::value_separator) > { > > get_token(); > continue; > } > > > if (__builtin_expect (!!(last_token == token_type::end_array), 1 )) > { > if (__builtin_expect (!!(!sax->end_array()), 0 )) > { > return false; > } > > > > > > (static_cast <bool> (!states.empty()) ? void (0) : __assert_fail ("!states.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/parser.hpp", 394, __extension__ __PRETTY_FUNCTION__)); > states.pop_back(); > skip_to_state_evaluation = true; > continue; > } > > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_array, "array"), nullptr)); > } > > > > > if (get_token() == token_type::value_separator) > { > > if (__builtin_expect (!!(get_token() != token_type::value_string), 0 )) > { > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), nullptr)); > } > > if (__builtin_expect (!!(!sax->key(m_lexer.get_string())), 0 )) > { > return false; > } > > > if (__builtin_expect (!!(get_token() != token_type::name_separator), 0 )) > { > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), nullptr)); > } > > > get_token(); > continue; > } > > > if (__builtin_expect (!!(last_token == token_type::end_object), 1 )) > { > if (__builtin_expect (!!(!sax->end_object()), 0 )) > { > return false; > } > > > > > > (static_cast <bool> (!states.empty()) ? void (0) : __assert_fail ("!states.empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/input/parser.hpp", 448, __extension__ __PRETTY_FUNCTION__)); > states.pop_back(); > skip_to_state_evaluation = true; > continue; > } > > return sax->parse_error(m_lexer.get_position(), > m_lexer.get_token_string(), > parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_object, "object"), nullptr)); > } > } > > > token_type get_token() > { > return last_token = m_lexer.scan(); > } > > std::string exception_message(const token_type expected, const std::string& context) > { > std::string error_msg = "syntax error "; > > if (!context.empty()) > { > error_msg += concat("while parsing ", context, ' '); > } > > error_msg += "- "; > > if (last_token == token_type::parse_error) > { > error_msg += concat(m_lexer.get_error_message(), "; last read: '", > m_lexer.get_token_string(), '\''); > } > else > { > error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); > } > > if (expected != token_type::uninitialized) > { > error_msg += concat("; expected ", lexer_t::token_type_name(expected)); > } > > return error_msg; > } > > private: > > const parser_callback_t<BasicJsonType> callback = nullptr; > > token_type last_token = token_type::uninitialized; > > lexer_t m_lexer; > > const bool allow_exceptions = true; >}; > >} >} } ># 45 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/internal_iterator.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/internal_iterator.hpp" 3 > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/primitive_iterator.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/primitive_iterator.hpp" 3 > > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ ># 29 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/primitive_iterator.hpp" 3 >class primitive_iterator_t >{ > private: > using difference_type = std::ptrdiff_t; > static constexpr difference_type begin_value = 0; > static constexpr difference_type end_value = begin_value + 1; > > private: > > difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)(); > > public: > constexpr difference_type get_value() const noexcept > { > return m_it; > } > > > void set_begin() noexcept > { > m_it = begin_value; > } > > > void set_end() noexcept > { > m_it = end_value; > } > > > constexpr bool is_begin() const noexcept > { > return m_it == begin_value; > } > > > constexpr bool is_end() const noexcept > { > return m_it == end_value; > } > > friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept > { > return lhs.m_it == rhs.m_it; > } > > friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept > { > return lhs.m_it < rhs.m_it; > } > > primitive_iterator_t operator+(difference_type n) noexcept > { > auto result = *this; > result += n; > return result; > } > > friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept > { > return lhs.m_it - rhs.m_it; > } > > primitive_iterator_t& operator++() noexcept > { > ++m_it; > return *this; > } > > primitive_iterator_t operator++(int)& noexcept > { > auto result = *this; > ++m_it; > return result; > } > > primitive_iterator_t& operator--() noexcept > { > --m_it; > return *this; > } > > primitive_iterator_t operator--(int)& noexcept > { > auto result = *this; > --m_it; > return result; > } > > primitive_iterator_t& operator+=(difference_type n) noexcept > { > m_it += n; > return *this; > } > > primitive_iterator_t& operator-=(difference_type n) noexcept > { > m_it -= n; > return *this; > } >}; > >} >} } ># 13 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/internal_iterator.hpp" 2 3 > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > > > > > > >template<typename BasicJsonType> struct internal_iterator >{ > > typename BasicJsonType::object_t::iterator object_iterator {}; > > typename BasicJsonType::array_t::iterator array_iterator {}; > > primitive_iterator_t primitive_iterator {}; >}; > >} >} } ># 46 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp" 3 > ># 22 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > >template<typename IteratorType> class iteration_proxy; >template<typename IteratorType> class iteration_proxy_value; ># 46 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp" 3 >template<typename BasicJsonType> >class iter_impl >{ > > using other_iter_impl = iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>; > > friend other_iter_impl; > friend BasicJsonType; > friend iteration_proxy<iter_impl>; > friend iteration_proxy_value<iter_impl>; > > using object_t = typename BasicJsonType::object_t; > using array_t = typename BasicJsonType::array_t; > > static_assert(is_basic_json<typename std::remove_const<BasicJsonType>::type>::value, > "iter_impl only accepts (const) basic_json"); > > static_assert(std::is_base_of<std::bidirectional_iterator_tag, std::bidirectional_iterator_tag>::value > && std::is_base_of<std::bidirectional_iterator_tag, typename std::iterator_traits<typename array_t::iterator>::iterator_category>::value, > "basic_json iterator assumes array and object type iterators satisfy the LegacyBidirectionalIterator named requirement."); > > public: > > > > > > using iterator_category = std::bidirectional_iterator_tag; > > > using value_type = typename BasicJsonType::value_type; > > using difference_type = typename BasicJsonType::difference_type; > > using pointer = typename std::conditional<std::is_const<BasicJsonType>::value, > typename BasicJsonType::const_pointer, > typename BasicJsonType::pointer>::type; > > using reference = > typename std::conditional<std::is_const<BasicJsonType>::value, > typename BasicJsonType::const_reference, > typename BasicJsonType::reference>::type; > > iter_impl() = default; > ~iter_impl() = default; > iter_impl(iter_impl&&) noexcept = default; > iter_impl& operator=(iter_impl&&) noexcept = default; > > > > > > > > explicit iter_impl(pointer object) noexcept : m_object(object) > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 102, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > { > m_it.object_iterator = typename object_t::iterator(); > break; > } > > case value_t::array: > { > m_it.array_iterator = typename array_t::iterator(); > break; > } > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > m_it.primitive_iterator = primitive_iterator_t(); > break; > } > } > } ># 150 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp" 3 > iter_impl(const iter_impl<const BasicJsonType>& other) noexcept > : m_object(other.m_object), m_it(other.m_it) > {} > > > > > > > > iter_impl& operator=(const iter_impl<const BasicJsonType>& other) noexcept > { > if (&other != this) > { > m_object = other.m_object; > m_it = other.m_it; > } > return *this; > } > > > > > > > iter_impl(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept > : m_object(other.m_object), m_it(other.m_it) > {} > > > > > > > > iter_impl& operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept > { > m_object = other.m_object; > m_it = other.m_it; > return *this; > } > > private: > > > > > void set_begin() noexcept > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 199, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > { > m_it.object_iterator = m_object->m_value.object->begin(); > break; > } > > case value_t::array: > { > m_it.array_iterator = m_object->m_value.array->begin(); > break; > } > > case value_t::null: > { > > m_it.primitive_iterator.set_end(); > break; > } > > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > m_it.primitive_iterator.set_begin(); > break; > } > } > } > > > > > > void set_end() noexcept > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 243, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > { > m_it.object_iterator = m_object->m_value.object->end(); > break; > } > > case value_t::array: > { > m_it.array_iterator = m_object->m_value.array->end(); > break; > } > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > m_it.primitive_iterator.set_end(); > break; > } > } > } > > public: > > > > > reference operator*() const > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 282, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > { > (static_cast <bool> (m_it.object_iterator != m_object->m_value.object->end()) ? void (0) : __assert_fail ("m_it.object_iterator != m_object->m_value.object->end()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 288, __extension__ __PRETTY_FUNCTION__)); > return m_it.object_iterator->second; > } > > case value_t::array: > { > (static_cast <bool> (m_it.array_iterator != m_object->m_value.array->end()) ? void (0) : __assert_fail ("m_it.array_iterator != m_object->m_value.array->end()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 294, __extension__ __PRETTY_FUNCTION__)); > return *m_it.array_iterator; > } > > case value_t::null: > throw invalid_iterator::create(214, "cannot get value", m_object); > > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > if (__builtin_expect (!!(m_it.primitive_iterator.is_begin()), 1 )) > { > return *m_object; > } > > throw invalid_iterator::create(214, "cannot get value", m_object); > } > } > } > > > > > > pointer operator->() const > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 326, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > { > (static_cast <bool> (m_it.object_iterator != m_object->m_value.object->end()) ? void (0) : __assert_fail ("m_it.object_iterator != m_object->m_value.object->end()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 332, __extension__ __PRETTY_FUNCTION__)); > return &(m_it.object_iterator->second); > } > > case value_t::array: > { > (static_cast <bool> (m_it.array_iterator != m_object->m_value.array->end()) ? void (0) : __assert_fail ("m_it.array_iterator != m_object->m_value.array->end()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 338, __extension__ __PRETTY_FUNCTION__)); > return &*m_it.array_iterator; > } > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > if (__builtin_expect (!!(m_it.primitive_iterator.is_begin()), 1 )) > { > return m_object; > } > > throw invalid_iterator::create(214, "cannot get value", m_object); > } > } > } > > > > > > iter_impl operator++(int)& > { > auto result = *this; > ++(*this); > return result; > } > > > > > > iter_impl& operator++() > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 379, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > { > std::advance(m_it.object_iterator, 1); > break; > } > > case value_t::array: > { > std::advance(m_it.array_iterator, 1); > break; > } > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > ++m_it.primitive_iterator; > break; > } > } > > return *this; > } > > > > > > iter_impl operator--(int)& > { > auto result = *this; > --(*this); > return result; > } > > > > > > iter_impl& operator--() > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 430, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > { > std::advance(m_it.object_iterator, -1); > break; > } > > case value_t::array: > { > std::advance(m_it.array_iterator, -1); > break; > } > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > --m_it.primitive_iterator; > break; > } > } > > return *this; > } > > > > > > template < typename IterImpl, detail::enable_if_t < (std::is_same<IterImpl, iter_impl>::value || std::is_same<IterImpl, other_iter_impl>::value), std::nullptr_t > = nullptr > > bool operator==(const IterImpl& other) const > { > > if (__builtin_expect (!!(m_object != other.m_object), 0 )) > { > throw invalid_iterator::create(212, "cannot compare iterators of different containers", m_object); > } > > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 477, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > return (m_it.object_iterator == other.m_it.object_iterator); > > case value_t::array: > return (m_it.array_iterator == other.m_it.array_iterator); > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > return (m_it.primitive_iterator == other.m_it.primitive_iterator); > } > } > > > > > > template < typename IterImpl, detail::enable_if_t < (std::is_same<IterImpl, iter_impl>::value || std::is_same<IterImpl, other_iter_impl>::value), std::nullptr_t > = nullptr > > bool operator!=(const IterImpl& other) const > { > return !operator==(other); > } > > > > > > bool operator<(const iter_impl& other) const > { > > if (__builtin_expect (!!(m_object != other.m_object), 0 )) > { > throw invalid_iterator::create(212, "cannot compare iterators of different containers", m_object); > } > > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 522, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > throw invalid_iterator::create(213, "cannot compare order of object iterators", m_object); > > case value_t::array: > return (m_it.array_iterator < other.m_it.array_iterator); > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > return (m_it.primitive_iterator < other.m_it.primitive_iterator); > } > } > > > > > > bool operator<=(const iter_impl& other) const > { > return !other.operator < (*this); > } > > > > > > bool operator>(const iter_impl& other) const > { > return !operator<=(other); > } > > > > > > bool operator>=(const iter_impl& other) const > { > return !operator<(other); > } > > > > > > iter_impl& operator+=(difference_type i) > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 578, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > throw invalid_iterator::create(209, "cannot use offsets with object iterators", m_object); > > case value_t::array: > { > std::advance(m_it.array_iterator, i); > break; > } > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > m_it.primitive_iterator += i; > break; > } > } > > return *this; > } > > > > > > iter_impl& operator-=(difference_type i) > { > return operator+=(-i); > } > > > > > > iter_impl operator+(difference_type i) const > { > auto result = *this; > result += i; > return result; > } > > > > > > friend iter_impl operator+(difference_type i, const iter_impl& it) > { > auto result = it; > result += i; > return result; > } > > > > > > iter_impl operator-(difference_type i) const > { > auto result = *this; > result -= i; > return result; > } > > > > > > difference_type operator-(const iter_impl& other) const > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 657, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > throw invalid_iterator::create(209, "cannot use offsets with object iterators", m_object); > > case value_t::array: > return m_it.array_iterator - other.m_it.array_iterator; > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > return m_it.primitive_iterator - other.m_it.primitive_iterator; > } > } > > > > > > reference operator[](difference_type n) const > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 686, __extension__ __PRETTY_FUNCTION__)); > > switch (m_object->m_type) > { > case value_t::object: > throw invalid_iterator::create(208, "cannot use operator[] for object iterators", m_object); > > case value_t::array: > return *std::next(m_it.array_iterator, n); > > case value_t::null: > throw invalid_iterator::create(214, "cannot get value", m_object); > > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > if (__builtin_expect (!!(m_it.primitive_iterator.get_value() == -n), 1 )) > { > return *m_object; > } > > throw invalid_iterator::create(214, "cannot get value", m_object); > } > } > } > > > > > > const typename object_t::key_type& key() const > { > (static_cast <bool> (m_object != nullptr) ? void (0) : __assert_fail ("m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/iter_impl.hpp", 724, __extension__ __PRETTY_FUNCTION__)); > > if (__builtin_expect (!!(m_object->is_object()), 1 )) > { > return m_it.object_iterator->first; > } > > throw invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object); > } > > > > > > reference value() const > { > return operator*(); > } > > private: > > pointer m_object = nullptr; > > internal_iterator<typename std::remove_const<BasicJsonType>::type> m_it {}; >}; > >} >} } ># 47 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/json_reverse_iterator.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/json_reverse_iterator.hpp" 3 > > > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ ># 43 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/iterators/json_reverse_iterator.hpp" 3 >template<typename Base> >class json_reverse_iterator : public std::reverse_iterator<Base> >{ > public: > using difference_type = std::ptrdiff_t; > > using base_iterator = std::reverse_iterator<Base>; > > using reference = typename Base::reference; > > > explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept > : base_iterator(it) {} > > > explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} > > > json_reverse_iterator operator++(int)& > { > return static_cast<json_reverse_iterator>(base_iterator::operator++(1)); > } > > > json_reverse_iterator& operator++() > { > return static_cast<json_reverse_iterator&>(base_iterator::operator++()); > } > > > json_reverse_iterator operator--(int)& > { > return static_cast<json_reverse_iterator>(base_iterator::operator--(1)); > } > > > json_reverse_iterator& operator--() > { > return static_cast<json_reverse_iterator&>(base_iterator::operator--()); > } > > > json_reverse_iterator& operator+=(difference_type i) > { > return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i)); > } > > > json_reverse_iterator operator+(difference_type i) const > { > return static_cast<json_reverse_iterator>(base_iterator::operator+(i)); > } > > > json_reverse_iterator operator-(difference_type i) const > { > return static_cast<json_reverse_iterator>(base_iterator::operator-(i)); > } > > > difference_type operator-(const json_reverse_iterator& other) const > { > return base_iterator(*this) - base_iterator(other); > } > > > reference operator[](difference_type n) const > { > return *(this->operator+(n)); > } > > > auto key() const -> decltype(std::declval<Base>().key()) > { > auto it = --this->base(); > return it.key(); > } > > > reference value() const > { > auto it = --this->base(); > return it.operator * (); > } >}; > >} >} } ># 49 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 > > > ># 1 "/usr/include/c++/13/cctype" 1 3 ># 39 "/usr/include/c++/13/cctype" 3 > ># 40 "/usr/include/c++/13/cctype" 3 ># 13 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 2 3 ># 1 "/usr/include/c++/13/cerrno" 1 3 ># 39 "/usr/include/c++/13/cerrno" 3 > ># 40 "/usr/include/c++/13/cerrno" 3 ># 14 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 2 3 ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 15 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 2 3 ># 30 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { > > > >template<typename RefStringType> >class json_pointer >{ > > template<template<typename, typename, typename...> class ObjectType, template<typename, typename...> class ArrayType, class StringType, class BooleanType, class NumberIntegerType, class NumberUnsignedType, class NumberFloatType, template<typename> class AllocatorType, template<typename, typename = void> class JSONSerializer, class BinaryType> > friend class basic_json; > > template<typename> > friend class json_pointer; > > template<typename T> > struct string_t_helper > { > using type = T; > }; > > template<template<typename, typename, typename...> class ObjectType, template<typename, typename...> class ArrayType, class StringType, class BooleanType, class NumberIntegerType, class NumberUnsignedType, class NumberFloatType, template<typename> class AllocatorType, template<typename, typename = void> class JSONSerializer, class BinaryType> > struct string_t_helper<basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType> > > { > using type = StringType; > }; > > public: > > using string_t = typename string_t_helper<RefStringType>::type; > > > > explicit json_pointer(const string_t& s = "") > : reference_tokens(split(s)) > {} > > > > string_t to_string() const > { > return std::accumulate(reference_tokens.begin(), reference_tokens.end(), > string_t{}, > [](const string_t& a, const string_t& b) > { > return detail::concat(a, '/', detail::escape(b)); > }); > } > > > > __attribute__((__deprecated__("Since " "3.11.0" "; use " "to_string()"))) > operator string_t() const > { > return to_string(); > } > > > > > friend std::ostream& operator<<(std::ostream& o, const json_pointer& ptr) > { > o << ptr.to_string(); > return o; > } > > > > > json_pointer& operator/=(const json_pointer& ptr) > { > reference_tokens.insert(reference_tokens.end(), > ptr.reference_tokens.begin(), > ptr.reference_tokens.end()); > return *this; > } > > > > json_pointer& operator/=(string_t token) > { > push_back(std::move(token)); > return *this; > } > > > > json_pointer& operator/=(std::size_t array_idx) > { > return *this /= std::to_string(array_idx); > } > > > > friend json_pointer operator/(const json_pointer& lhs, > const json_pointer& rhs) > { > return json_pointer(lhs) /= rhs; > } > > > > friend json_pointer operator/(const json_pointer& lhs, string_t token) > { > return json_pointer(lhs) /= std::move(token); > } > > > > friend json_pointer operator/(const json_pointer& lhs, std::size_t array_idx) > { > return json_pointer(lhs) /= array_idx; > } > > > > json_pointer parent_pointer() const > { > if (empty()) > { > return *this; > } > > json_pointer res = *this; > res.pop_back(); > return res; > } > > > > void pop_back() > { > if (__builtin_expect (!!(empty()), 0 )) > { > throw detail::out_of_range::create(405, "JSON pointer has no parent", nullptr); > } > > reference_tokens.pop_back(); > } > > > > const string_t& back() const > { > if (__builtin_expect (!!(empty()), 0 )) > { > throw detail::out_of_range::create(405, "JSON pointer has no parent", nullptr); > } > > return reference_tokens.back(); > } > > > > void push_back(const string_t& token) > { > reference_tokens.push_back(token); > } > > > > void push_back(string_t&& token) > { > reference_tokens.push_back(std::move(token)); > } > > > > bool empty() const noexcept > { > return reference_tokens.empty(); > } > > private: ># 213 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 > template<typename BasicJsonType> > static typename BasicJsonType::size_type array_index(const string_t& s) > { > using size_type = typename BasicJsonType::size_type; > > > if (__builtin_expect (!!(s.size() > 1 && s[0] == '0'), 0 )) > { > throw detail::parse_error::create(106, 0, detail::concat("array index '", s, "' must not begin with '0'"), nullptr); > } > > > if (__builtin_expect (!!(s.size() > 1 && !(s[0] >= '1' && s[0] <= '9')), 0 )) > { > throw detail::parse_error::create(109, 0, detail::concat("array index '", s, "' is not a number"), nullptr); > } > > const char* p = s.c_str(); > char* p_end = nullptr; > (*__errno_location ()) = 0; > unsigned long long res = std::strtoull(p, &p_end, 10); > if (p == p_end > || (*__errno_location ()) == 34 > || __builtin_expect (!!(static_cast<std::size_t>(p_end - p) != s.size()), 0 )) > { > throw detail::out_of_range::create(404, detail::concat("unresolved reference token '", s, "'"), nullptr); > } > > > > if (res >= static_cast<unsigned long long>((std::numeric_limits<size_type>::max)())) > { > throw detail::out_of_range::create(410, detail::concat("array index ", s, " exceeds size_type"), nullptr); > } > > return static_cast<size_type>(res); > } > > private: > json_pointer top() const > { > if (__builtin_expect (!!(empty()), 0 )) > { > throw detail::out_of_range::create(405, "JSON pointer has no parent", nullptr); > } > > json_pointer result = *this; > result.reference_tokens = {reference_tokens[0]}; > return result; > } > > private: ># 273 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 > template<typename BasicJsonType> > BasicJsonType& get_and_create(BasicJsonType& j) const > { > auto* result = &j; > > > > for (const auto& reference_token : reference_tokens) > { > switch (result->type()) > { > case detail::value_t::null: > { > if (reference_token == "0") > { > > result = &result->operator[](0); > } > else > { > > result = &result->operator[](reference_token); > } > break; > } > > case detail::value_t::object: > { > > result = &result->operator[](reference_token); > break; > } > > case detail::value_t::array: > { > > result = &result->operator[](array_index<BasicJsonType>(reference_token)); > break; > } > > > > > > > > case detail::value_t::string: > case detail::value_t::boolean: > case detail::value_t::number_integer: > case detail::value_t::number_unsigned: > case detail::value_t::number_float: > case detail::value_t::binary: > case detail::value_t::discarded: > default: > throw detail::type_error::create(313, "invalid value to unflatten", &j); > } > } > > return *result; > } ># 353 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 > template<typename BasicJsonType> > BasicJsonType& get_unchecked(BasicJsonType* ptr) const > { > for (const auto& reference_token : reference_tokens) > { > > if (ptr->is_null()) > { > > const bool nums = > std::all_of(reference_token.begin(), reference_token.end(), > [](const unsigned char x) > { > return std::isdigit(x); > }); > > > *ptr = (nums || reference_token == "-") > ? detail::value_t::array > : detail::value_t::object; > } > > switch (ptr->type()) > { > case detail::value_t::object: > { > > ptr = &ptr->operator[](reference_token); > break; > } > > case detail::value_t::array: > { > if (reference_token == "-") > { > > ptr = &ptr->operator[](ptr->m_value.array->size()); > } > else > { > > ptr = &ptr->operator[](array_index<BasicJsonType>(reference_token)); > } > break; > } > > case detail::value_t::null: > case detail::value_t::string: > case detail::value_t::boolean: > case detail::value_t::number_integer: > case detail::value_t::number_unsigned: > case detail::value_t::number_float: > case detail::value_t::binary: > case detail::value_t::discarded: > default: > throw detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr); > } > } > > return *ptr; > } > > > > > > > > template<typename BasicJsonType> > BasicJsonType& get_checked(BasicJsonType* ptr) const > { > for (const auto& reference_token : reference_tokens) > { > switch (ptr->type()) > { > case detail::value_t::object: > { > > ptr = &ptr->at(reference_token); > break; > } > > case detail::value_t::array: > { > if (__builtin_expect (!!(reference_token == "-"), 0 )) > { > > throw detail::out_of_range::create(402, detail::concat( "array index '-' (", std::to_string(ptr->m_value.array->size()), ") is out of range"), ptr) > > ; > } > > > ptr = &ptr->at(array_index<BasicJsonType>(reference_token)); > break; > } > > case detail::value_t::null: > case detail::value_t::string: > case detail::value_t::boolean: > case detail::value_t::number_integer: > case detail::value_t::number_unsigned: > case detail::value_t::number_float: > case detail::value_t::binary: > case detail::value_t::discarded: > default: > throw detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr); > } > } > > return *ptr; > } ># 479 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 > template<typename BasicJsonType> > const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const > { > for (const auto& reference_token : reference_tokens) > { > switch (ptr->type()) > { > case detail::value_t::object: > { > > ptr = &ptr->operator[](reference_token); > break; > } > > case detail::value_t::array: > { > if (__builtin_expect (!!(reference_token == "-"), 0 )) > { > > throw detail::out_of_range::create(402, detail::concat("array index '-' (", std::to_string(ptr->m_value.array->size()), ") is out of range"), ptr); > } > > > ptr = &ptr->operator[](array_index<BasicJsonType>(reference_token)); > break; > } > > case detail::value_t::null: > case detail::value_t::string: > case detail::value_t::boolean: > case detail::value_t::number_integer: > case detail::value_t::number_unsigned: > case detail::value_t::number_float: > case detail::value_t::binary: > case detail::value_t::discarded: > default: > throw detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr); > } > } > > return *ptr; > } > > > > > > > > template<typename BasicJsonType> > const BasicJsonType& get_checked(const BasicJsonType* ptr) const > { > for (const auto& reference_token : reference_tokens) > { > switch (ptr->type()) > { > case detail::value_t::object: > { > > ptr = &ptr->at(reference_token); > break; > } > > case detail::value_t::array: > { > if (__builtin_expect (!!(reference_token == "-"), 0 )) > { > > throw detail::out_of_range::create(402, detail::concat( "array index '-' (", std::to_string(ptr->m_value.array->size()), ") is out of range"), ptr) > > ; > } > > > ptr = &ptr->at(array_index<BasicJsonType>(reference_token)); > break; > } > > case detail::value_t::null: > case detail::value_t::string: > case detail::value_t::boolean: > case detail::value_t::number_integer: > case detail::value_t::number_unsigned: > case detail::value_t::number_float: > case detail::value_t::binary: > case detail::value_t::discarded: > default: > throw detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr); > } > } > > return *ptr; > } > > > > > > template<typename BasicJsonType> > bool contains(const BasicJsonType* ptr) const > { > for (const auto& reference_token : reference_tokens) > { > switch (ptr->type()) > { > case detail::value_t::object: > { > if (!ptr->contains(reference_token)) > { > > return false; > } > > ptr = &ptr->operator[](reference_token); > break; > } > > case detail::value_t::array: > { > if (__builtin_expect (!!(reference_token == "-"), 0 )) > { > > return false; > } > if (__builtin_expect (!!(reference_token.size() == 1 && !("0" <= reference_token && reference_token <= "9")), 0 )) > { > > return false; > } > if (__builtin_expect (!!(reference_token.size() > 1), 0 )) > { > if (__builtin_expect (!!(!('1' <= reference_token[0] && reference_token[0] <= '9')), 0 )) > { > > return false; > } > for (std::size_t i = 1; i < reference_token.size(); i++) > { > if (__builtin_expect (!!(!('0' <= reference_token[i] && reference_token[i] <= '9')), 0 )) > { > > return false; > } > } > } > > const auto idx = array_index<BasicJsonType>(reference_token); > if (idx >= ptr->size()) > { > > return false; > } > > ptr = &ptr->operator[](idx); > break; > } > > case detail::value_t::null: > case detail::value_t::string: > case detail::value_t::boolean: > case detail::value_t::number_integer: > case detail::value_t::number_unsigned: > case detail::value_t::number_float: > case detail::value_t::binary: > case detail::value_t::discarded: > default: > { > > > return false; > } > } > } > > > return true; > } ># 666 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 > static std::vector<string_t> split(const string_t& reference_string) > { > std::vector<string_t> result; > > > if (reference_string.empty()) > { > return result; > } > > > if (__builtin_expect (!!(reference_string[0] != '/'), 0 )) > { > throw detail::parse_error::create(107, 1, detail::concat("JSON pointer must be empty or begin with '/' - was: '", reference_string, "'"), nullptr); > } > > > > > for ( > > std::size_t slash = reference_string.find_first_of('/', 1), > > start = 1; > > start != 0; > > > start = (slash == string_t::npos) ? 0 : slash + 1, > > slash = reference_string.find_first_of('/', start)) > { > > > auto reference_token = reference_string.substr(start, slash - start); > > > for (std::size_t pos = reference_token.find_first_of('~'); > pos != string_t::npos; > pos = reference_token.find_first_of('~', pos + 1)) > { > (static_cast <bool> (reference_token[pos] == '~') ? void (0) : __assert_fail ("reference_token[pos] == '~'", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp", 707, __extension__ __PRETTY_FUNCTION__)); > > > if (__builtin_expect (!!(pos == reference_token.size() - 1 || (reference_token[pos + 1] != '0' && reference_token[pos + 1] != '1')), 0 ) > > ) > { > throw detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'", nullptr); > } > } > > > detail::unescape(reference_token); > result.push_back(reference_token); > } > > return result; > } > > private: > > > > > > > > template<typename BasicJsonType> > static void flatten(const string_t& reference_string, > const BasicJsonType& value, > BasicJsonType& result) > { > switch (value.type()) > { > case detail::value_t::array: > { > if (value.m_value.array->empty()) > { > > result[reference_string] = nullptr; > } > else > { > > for (std::size_t i = 0; i < value.m_value.array->size(); ++i) > { > flatten(detail::concat(reference_string, '/', std::to_string(i)), > value.m_value.array->operator[](i), result); > } > } > break; > } > > case detail::value_t::object: > { > if (value.m_value.object->empty()) > { > > result[reference_string] = nullptr; > } > else > { > > for (const auto& element : *value.m_value.object) > { > flatten(detail::concat(reference_string, '/', detail::escape(element.first)), element.second, result); > } > } > break; > } > > case detail::value_t::null: > case detail::value_t::string: > case detail::value_t::boolean: > case detail::value_t::number_integer: > case detail::value_t::number_unsigned: > case detail::value_t::number_float: > case detail::value_t::binary: > case detail::value_t::discarded: > default: > { > > result[reference_string] = value; > break; > } > } > } ># 805 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 > template<typename BasicJsonType> > static BasicJsonType > unflatten(const BasicJsonType& value) > { > if (__builtin_expect (!!(!value.is_object()), 0 )) > { > throw detail::type_error::create(314, "only objects can be unflattened", &value); > } > > BasicJsonType result; > > > for (const auto& element : *value.m_value.object) > { > if (__builtin_expect (!!(!element.second.is_primitive()), 0 )) > { > throw detail::type_error::create(315, "values in object must be primitive", &element.second); > } > > > > > > json_pointer(element.first).get_and_create(result) = element.second; > } > > return result; > } > > > json_pointer<string_t> convert() const& > { > json_pointer<string_t> result; > result.reference_tokens = reference_tokens; > return result; > } > > json_pointer<string_t> convert()&& > { > json_pointer<string_t> result; > result.reference_tokens = std::move(reference_tokens); > return result; > } > > public: ># 876 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_pointer.hpp" 3 > template<typename RefStringTypeLhs, typename RefStringTypeRhs> > > friend bool operator==(const json_pointer<RefStringTypeLhs>& lhs, > const json_pointer<RefStringTypeRhs>& rhs) noexcept; > > > > template<typename RefStringTypeLhs, typename StringType> > > friend bool operator==(const json_pointer<RefStringTypeLhs>& lhs, > const StringType& rhs); > > > > template<typename RefStringTypeRhs, typename StringType> > > friend bool operator==(const StringType& lhs, > const json_pointer<RefStringTypeRhs>& rhs); > > > > template<typename RefStringTypeLhs, typename RefStringTypeRhs> > > friend bool operator!=(const json_pointer<RefStringTypeLhs>& lhs, > const json_pointer<RefStringTypeRhs>& rhs) noexcept; > > > > template<typename RefStringTypeLhs, typename StringType> > > friend bool operator!=(const json_pointer<RefStringTypeLhs>& lhs, > const StringType& rhs); > > > > template<typename RefStringTypeRhs, typename StringType> > > friend bool operator!=(const StringType& lhs, > const json_pointer<RefStringTypeRhs>& rhs); > > > template<typename RefStringTypeLhs, typename RefStringTypeRhs> > > friend bool operator<(const json_pointer<RefStringTypeLhs>& lhs, > const json_pointer<RefStringTypeRhs>& rhs) noexcept; > > > private: > > std::vector<string_t> reference_tokens; >}; > > > >template<typename RefStringTypeLhs, typename RefStringTypeRhs> >inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs, > const json_pointer<RefStringTypeRhs>& rhs) noexcept >{ > return lhs.reference_tokens == rhs.reference_tokens; >} > >template<typename RefStringTypeLhs, > typename StringType = typename json_pointer<RefStringTypeLhs>::string_t> >__attribute__((__deprecated__("Since " "3.11.2" "; use " "operator==(json_pointer, json_pointer)"))) >inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs, > const StringType& rhs) >{ > return lhs == json_pointer<RefStringTypeLhs>(rhs); >} > >template<typename RefStringTypeRhs, > typename StringType = typename json_pointer<RefStringTypeRhs>::string_t> >__attribute__((__deprecated__("Since " "3.11.2" "; use " "operator==(json_pointer, json_pointer)"))) >inline bool operator==(const StringType& lhs, > const json_pointer<RefStringTypeRhs>& rhs) >{ > return json_pointer<RefStringTypeRhs>(lhs) == rhs; >} > >template<typename RefStringTypeLhs, typename RefStringTypeRhs> >inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs, > const json_pointer<RefStringTypeRhs>& rhs) noexcept >{ > return !(lhs == rhs); >} > >template<typename RefStringTypeLhs, > typename StringType = typename json_pointer<RefStringTypeLhs>::string_t> >__attribute__((__deprecated__("Since " "3.11.2" "; use " "operator!=(json_pointer, json_pointer)"))) >inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs, > const StringType& rhs) >{ > return !(lhs == rhs); >} > >template<typename RefStringTypeRhs, > typename StringType = typename json_pointer<RefStringTypeRhs>::string_t> >__attribute__((__deprecated__("Since " "3.11.2" "; use " "operator!=(json_pointer, json_pointer)"))) >inline bool operator!=(const StringType& lhs, > const json_pointer<RefStringTypeRhs>& rhs) >{ > return !(lhs == rhs); >} > >template<typename RefStringTypeLhs, typename RefStringTypeRhs> >inline bool operator<(const json_pointer<RefStringTypeLhs>& lhs, > const json_pointer<RefStringTypeRhs>& rhs) noexcept >{ > return lhs.reference_tokens < rhs.reference_tokens; >} > > >} } ># 51 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_ref.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/json_ref.hpp" 3 > > > > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > >template<typename BasicJsonType> >class json_ref >{ > public: > using value_type = BasicJsonType; > > json_ref(value_type&& value) > : owned_value(std::move(value)) > {} > > json_ref(const value_type& value) > : value_ref(&value) > {} > > json_ref(std::initializer_list<json_ref> init) > : owned_value(init) > {} > > template < > class... Args, > enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 > > json_ref(Args && ... args) > : owned_value(std::forward<Args>(args)...) > {} > > > json_ref(json_ref&&) noexcept = default; > json_ref(const json_ref&) = delete; > json_ref& operator=(const json_ref&) = delete; > json_ref& operator=(json_ref&&) = delete; > ~json_ref() = default; > > value_type moved_or_copied() const > { > if (value_ref == nullptr) > { > return std::move(owned_value); > } > return *value_ref; > } > > value_type const& operator*() const > { > return value_ref ? *value_ref : owned_value; > } > > value_type const* operator->() const > { > return &** this; > } > > private: > mutable value_type owned_value = nullptr; > value_type const* value_ref = nullptr; >}; > >} >} } ># 52 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 3 > > > > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 15 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 2 3 > ># 1 "/usr/include/c++/13/cstring" 1 3 ># 39 "/usr/include/c++/13/cstring" 3 > ># 40 "/usr/include/c++/13/cstring" 3 ># 17 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 2 3 > > > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/output_adapters.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/output_adapters.hpp" 3 > ># 25 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/output_adapters.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > >template<typename CharType> struct output_adapter_protocol >{ > virtual void write_character(CharType c) = 0; > virtual void write_characters(const CharType* s, std::size_t length) = 0; > virtual ~output_adapter_protocol() = default; > > output_adapter_protocol() = default; > output_adapter_protocol(const output_adapter_protocol&) = default; > output_adapter_protocol(output_adapter_protocol&&) noexcept = default; > output_adapter_protocol& operator=(const output_adapter_protocol&) = default; > output_adapter_protocol& operator=(output_adapter_protocol&&) noexcept = default; >}; > > >template<typename CharType> >using output_adapter_t = std::shared_ptr<output_adapter_protocol<CharType>>; > > >template<typename CharType, typename AllocatorType = std::allocator<CharType>> >class output_vector_adapter : public output_adapter_protocol<CharType> >{ > public: > explicit output_vector_adapter(std::vector<CharType, AllocatorType>& vec) noexcept > : v(vec) > {} > > void write_character(CharType c) override > { > v.push_back(c); > } > > __attribute__((__nonnull__(2))) > void write_characters(const CharType* s, std::size_t length) override > { > v.insert(v.end(), s, s + length); > } > > private: > std::vector<CharType, AllocatorType>& v; >}; > > > >template<typename CharType> >class output_stream_adapter : public output_adapter_protocol<CharType> >{ > public: > explicit output_stream_adapter(std::basic_ostream<CharType>& s) noexcept > : stream(s) > {} > > void write_character(CharType c) override > { > stream.put(c); > } > > __attribute__((__nonnull__(2))) > void write_characters(const CharType* s, std::size_t length) override > { > stream.write(s, static_cast<std::streamsize>(length)); > } > > private: > std::basic_ostream<CharType>& stream; >}; > > > >template<typename CharType, typename StringType = std::basic_string<CharType>> >class output_string_adapter : public output_adapter_protocol<CharType> >{ > public: > explicit output_string_adapter(StringType& s) noexcept > : str(s) > {} > > void write_character(CharType c) override > { > str.push_back(c); > } > > __attribute__((__nonnull__(2))) > void write_characters(const CharType* s, std::size_t length) override > { > str.append(s, length); > } > > private: > StringType& str; >}; > >template<typename CharType, typename StringType = std::basic_string<CharType>> >class output_adapter >{ > public: > template<typename AllocatorType = std::allocator<CharType>> > output_adapter(std::vector<CharType, AllocatorType>& vec) > : oa(std::make_shared<output_vector_adapter<CharType, AllocatorType>>(vec)) {} > > > output_adapter(std::basic_ostream<CharType>& s) > : oa(std::make_shared<output_stream_adapter<CharType>>(s)) {} > > > output_adapter(StringType& s) > : oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {} > > operator output_adapter_t<CharType>() > { > return oa; > } > > private: > output_adapter_t<CharType> oa = nullptr; >}; > >} >} } ># 25 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 2 3 > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ ># 38 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 3 >template<typename BasicJsonType, typename CharType> >class binary_writer >{ > using string_t = typename BasicJsonType::string_t; > using binary_t = typename BasicJsonType::binary_t; > using number_float_t = typename BasicJsonType::number_float_t; > > public: > > > > > > explicit binary_writer(output_adapter_t<CharType> adapter) : oa(std::move(adapter)) > { > (static_cast <bool> (oa) ? void (0) : __assert_fail ("oa", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp", 53, __extension__ __PRETTY_FUNCTION__)); > } > > > > > > void write_bson(const BasicJsonType& j) > { > switch (j.type()) > { > case value_t::object: > { > write_bson_object(*j.m_value.object); > break; > } > > case value_t::null: > case value_t::array: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > throw type_error::create(317, concat("to serialize to BSON, top-level type must be object, but is ", j.type_name()), &j); > } > } > } > > > > > void write_cbor(const BasicJsonType& j) > { > switch (j.type()) > { > case value_t::null: > { > oa->write_character(to_char_type(0xF6)); > break; > } > > case value_t::boolean: > { > oa->write_character(j.m_value.boolean > ? to_char_type(0xF5) > : to_char_type(0xF4)); > break; > } > > case value_t::number_integer: > { > if (j.m_value.number_integer >= 0) > { > > > > if (j.m_value.number_integer <= 0x17) > { > write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)()) > { > oa->write_character(to_char_type(0x18)); > write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_integer <= (std::numeric_limits<std::uint16_t>::max)()) > { > oa->write_character(to_char_type(0x19)); > write_number(static_cast<std::uint16_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_integer <= (std::numeric_limits<std::uint32_t>::max)()) > { > oa->write_character(to_char_type(0x1A)); > write_number(static_cast<std::uint32_t>(j.m_value.number_integer)); > } > else > { > oa->write_character(to_char_type(0x1B)); > write_number(static_cast<std::uint64_t>(j.m_value.number_integer)); > } > } > else > { > > > const auto positive_number = -1 - j.m_value.number_integer; > if (j.m_value.number_integer >= -24) > { > write_number(static_cast<std::uint8_t>(0x20 + positive_number)); > } > else if (positive_number <= (std::numeric_limits<std::uint8_t>::max)()) > { > oa->write_character(to_char_type(0x38)); > write_number(static_cast<std::uint8_t>(positive_number)); > } > else if (positive_number <= (std::numeric_limits<std::uint16_t>::max)()) > { > oa->write_character(to_char_type(0x39)); > write_number(static_cast<std::uint16_t>(positive_number)); > } > else if (positive_number <= (std::numeric_limits<std::uint32_t>::max)()) > { > oa->write_character(to_char_type(0x3A)); > write_number(static_cast<std::uint32_t>(positive_number)); > } > else > { > oa->write_character(to_char_type(0x3B)); > write_number(static_cast<std::uint64_t>(positive_number)); > } > } > break; > } > > case value_t::number_unsigned: > { > if (j.m_value.number_unsigned <= 0x17) > { > write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) > { > oa->write_character(to_char_type(0x18)); > write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) > { > oa->write_character(to_char_type(0x19)); > write_number(static_cast<std::uint16_t>(j.m_value.number_unsigned)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) > { > oa->write_character(to_char_type(0x1A)); > write_number(static_cast<std::uint32_t>(j.m_value.number_unsigned)); > } > else > { > oa->write_character(to_char_type(0x1B)); > write_number(static_cast<std::uint64_t>(j.m_value.number_unsigned)); > } > break; > } > > case value_t::number_float: > { > if (std::isnan(j.m_value.number_float)) > { > > oa->write_character(to_char_type(0xF9)); > oa->write_character(to_char_type(0x7E)); > oa->write_character(to_char_type(0x00)); > } > else if (std::isinf(j.m_value.number_float)) > { > > oa->write_character(to_char_type(0xf9)); > oa->write_character(j.m_value.number_float > 0 ? to_char_type(0x7C) : to_char_type(0xFC)); > oa->write_character(to_char_type(0x00)); > } > else > { > write_compact_float(j.m_value.number_float, detail::input_format_t::cbor); > } > break; > } > > case value_t::string: > { > > const auto N = j.m_value.string->size(); > if (N <= 0x17) > { > write_number(static_cast<std::uint8_t>(0x60 + N)); > } > else if (N <= (std::numeric_limits<std::uint8_t>::max)()) > { > oa->write_character(to_char_type(0x78)); > write_number(static_cast<std::uint8_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint16_t>::max)()) > { > oa->write_character(to_char_type(0x79)); > write_number(static_cast<std::uint16_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint32_t>::max)()) > { > oa->write_character(to_char_type(0x7A)); > write_number(static_cast<std::uint32_t>(N)); > } > > else if (N <= (std::numeric_limits<std::uint64_t>::max)()) > { > oa->write_character(to_char_type(0x7B)); > write_number(static_cast<std::uint64_t>(N)); > } > > > > oa->write_characters( > reinterpret_cast<const CharType*>(j.m_value.string->c_str()), > j.m_value.string->size()); > break; > } > > case value_t::array: > { > > const auto N = j.m_value.array->size(); > if (N <= 0x17) > { > write_number(static_cast<std::uint8_t>(0x80 + N)); > } > else if (N <= (std::numeric_limits<std::uint8_t>::max)()) > { > oa->write_character(to_char_type(0x98)); > write_number(static_cast<std::uint8_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint16_t>::max)()) > { > oa->write_character(to_char_type(0x99)); > write_number(static_cast<std::uint16_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint32_t>::max)()) > { > oa->write_character(to_char_type(0x9A)); > write_number(static_cast<std::uint32_t>(N)); > } > > else if (N <= (std::numeric_limits<std::uint64_t>::max)()) > { > oa->write_character(to_char_type(0x9B)); > write_number(static_cast<std::uint64_t>(N)); > } > > > > for (const auto& el : *j.m_value.array) > { > write_cbor(el); > } > break; > } > > case value_t::binary: > { > if (j.m_value.binary->has_subtype()) > { > if (j.m_value.binary->subtype() <= (std::numeric_limits<std::uint8_t>::max)()) > { > write_number(static_cast<std::uint8_t>(0xd8)); > write_number(static_cast<std::uint8_t>(j.m_value.binary->subtype())); > } > else if (j.m_value.binary->subtype() <= (std::numeric_limits<std::uint16_t>::max)()) > { > write_number(static_cast<std::uint8_t>(0xd9)); > write_number(static_cast<std::uint16_t>(j.m_value.binary->subtype())); > } > else if (j.m_value.binary->subtype() <= (std::numeric_limits<std::uint32_t>::max)()) > { > write_number(static_cast<std::uint8_t>(0xda)); > write_number(static_cast<std::uint32_t>(j.m_value.binary->subtype())); > } > else if (j.m_value.binary->subtype() <= (std::numeric_limits<std::uint64_t>::max)()) > { > write_number(static_cast<std::uint8_t>(0xdb)); > write_number(static_cast<std::uint64_t>(j.m_value.binary->subtype())); > } > } > > > const auto N = j.m_value.binary->size(); > if (N <= 0x17) > { > write_number(static_cast<std::uint8_t>(0x40 + N)); > } > else if (N <= (std::numeric_limits<std::uint8_t>::max)()) > { > oa->write_character(to_char_type(0x58)); > write_number(static_cast<std::uint8_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint16_t>::max)()) > { > oa->write_character(to_char_type(0x59)); > write_number(static_cast<std::uint16_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint32_t>::max)()) > { > oa->write_character(to_char_type(0x5A)); > write_number(static_cast<std::uint32_t>(N)); > } > > else if (N <= (std::numeric_limits<std::uint64_t>::max)()) > { > oa->write_character(to_char_type(0x5B)); > write_number(static_cast<std::uint64_t>(N)); > } > > > > oa->write_characters( > reinterpret_cast<const CharType*>(j.m_value.binary->data()), > N); > > break; > } > > case value_t::object: > { > > const auto N = j.m_value.object->size(); > if (N <= 0x17) > { > write_number(static_cast<std::uint8_t>(0xA0 + N)); > } > else if (N <= (std::numeric_limits<std::uint8_t>::max)()) > { > oa->write_character(to_char_type(0xB8)); > write_number(static_cast<std::uint8_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint16_t>::max)()) > { > oa->write_character(to_char_type(0xB9)); > write_number(static_cast<std::uint16_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint32_t>::max)()) > { > oa->write_character(to_char_type(0xBA)); > write_number(static_cast<std::uint32_t>(N)); > } > > else if (N <= (std::numeric_limits<std::uint64_t>::max)()) > { > oa->write_character(to_char_type(0xBB)); > write_number(static_cast<std::uint64_t>(N)); > } > > > > for (const auto& el : *j.m_value.object) > { > write_cbor(el.first); > write_cbor(el.second); > } > break; > } > > case value_t::discarded: > default: > break; > } > } > > > > > void write_msgpack(const BasicJsonType& j) > { > switch (j.type()) > { > case value_t::null: > { > oa->write_character(to_char_type(0xC0)); > break; > } > > case value_t::boolean: > { > oa->write_character(j.m_value.boolean > ? to_char_type(0xC3) > : to_char_type(0xC2)); > break; > } > > case value_t::number_integer: > { > if (j.m_value.number_integer >= 0) > { > > > > if (j.m_value.number_unsigned < 128) > { > > write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) > { > > oa->write_character(to_char_type(0xCC)); > write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) > { > > oa->write_character(to_char_type(0xCD)); > write_number(static_cast<std::uint16_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) > { > > oa->write_character(to_char_type(0xCE)); > write_number(static_cast<std::uint32_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)()) > { > > oa->write_character(to_char_type(0xCF)); > write_number(static_cast<std::uint64_t>(j.m_value.number_integer)); > } > } > else > { > if (j.m_value.number_integer >= -32) > { > > write_number(static_cast<std::int8_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_integer >= (std::numeric_limits<std::int8_t>::min)() && > j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)()) > { > > oa->write_character(to_char_type(0xD0)); > write_number(static_cast<std::int8_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_integer >= (std::numeric_limits<std::int16_t>::min)() && > j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)()) > { > > oa->write_character(to_char_type(0xD1)); > write_number(static_cast<std::int16_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_integer >= (std::numeric_limits<std::int32_t>::min)() && > j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)()) > { > > oa->write_character(to_char_type(0xD2)); > write_number(static_cast<std::int32_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_integer >= (std::numeric_limits<std::int64_t>::min)() && > j.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)()) > { > > oa->write_character(to_char_type(0xD3)); > write_number(static_cast<std::int64_t>(j.m_value.number_integer)); > } > } > break; > } > > case value_t::number_unsigned: > { > if (j.m_value.number_unsigned < 128) > { > > write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) > { > > oa->write_character(to_char_type(0xCC)); > write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) > { > > oa->write_character(to_char_type(0xCD)); > write_number(static_cast<std::uint16_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) > { > > oa->write_character(to_char_type(0xCE)); > write_number(static_cast<std::uint32_t>(j.m_value.number_integer)); > } > else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)()) > { > > oa->write_character(to_char_type(0xCF)); > write_number(static_cast<std::uint64_t>(j.m_value.number_integer)); > } > break; > } > > case value_t::number_float: > { > write_compact_float(j.m_value.number_float, detail::input_format_t::msgpack); > break; > } > > case value_t::string: > { > > const auto N = j.m_value.string->size(); > if (N <= 31) > { > > write_number(static_cast<std::uint8_t>(0xA0 | N)); > } > else if (N <= (std::numeric_limits<std::uint8_t>::max)()) > { > > oa->write_character(to_char_type(0xD9)); > write_number(static_cast<std::uint8_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint16_t>::max)()) > { > > oa->write_character(to_char_type(0xDA)); > write_number(static_cast<std::uint16_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint32_t>::max)()) > { > > oa->write_character(to_char_type(0xDB)); > write_number(static_cast<std::uint32_t>(N)); > } > > > oa->write_characters( > reinterpret_cast<const CharType*>(j.m_value.string->c_str()), > j.m_value.string->size()); > break; > } > > case value_t::array: > { > > const auto N = j.m_value.array->size(); > if (N <= 15) > { > > write_number(static_cast<std::uint8_t>(0x90 | N)); > } > else if (N <= (std::numeric_limits<std::uint16_t>::max)()) > { > > oa->write_character(to_char_type(0xDC)); > write_number(static_cast<std::uint16_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint32_t>::max)()) > { > > oa->write_character(to_char_type(0xDD)); > write_number(static_cast<std::uint32_t>(N)); > } > > > for (const auto& el : *j.m_value.array) > { > write_msgpack(el); > } > break; > } > > case value_t::binary: > { > > > const bool use_ext = j.m_value.binary->has_subtype(); > > > const auto N = j.m_value.binary->size(); > if (N <= (std::numeric_limits<std::uint8_t>::max)()) > { > std::uint8_t output_type{}; > bool fixed = true; > if (use_ext) > { > switch (N) > { > case 1: > output_type = 0xD4; > break; > case 2: > output_type = 0xD5; > break; > case 4: > output_type = 0xD6; > break; > case 8: > output_type = 0xD7; > break; > case 16: > output_type = 0xD8; > break; > default: > output_type = 0xC7; > fixed = false; > break; > } > > } > else > { > output_type = 0xC4; > fixed = false; > } > > oa->write_character(to_char_type(output_type)); > if (!fixed) > { > write_number(static_cast<std::uint8_t>(N)); > } > } > else if (N <= (std::numeric_limits<std::uint16_t>::max)()) > { > std::uint8_t output_type = use_ext > ? 0xC8 > : 0xC5; > > oa->write_character(to_char_type(output_type)); > write_number(static_cast<std::uint16_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint32_t>::max)()) > { > std::uint8_t output_type = use_ext > ? 0xC9 > : 0xC6; > > oa->write_character(to_char_type(output_type)); > write_number(static_cast<std::uint32_t>(N)); > } > > > if (use_ext) > { > write_number(static_cast<std::int8_t>(j.m_value.binary->subtype())); > } > > > oa->write_characters( > reinterpret_cast<const CharType*>(j.m_value.binary->data()), > N); > > break; > } > > case value_t::object: > { > > const auto N = j.m_value.object->size(); > if (N <= 15) > { > > write_number(static_cast<std::uint8_t>(0x80 | (N & 0xF))); > } > else if (N <= (std::numeric_limits<std::uint16_t>::max)()) > { > > oa->write_character(to_char_type(0xDE)); > write_number(static_cast<std::uint16_t>(N)); > } > else if (N <= (std::numeric_limits<std::uint32_t>::max)()) > { > > oa->write_character(to_char_type(0xDF)); > write_number(static_cast<std::uint32_t>(N)); > } > > > for (const auto& el : *j.m_value.object) > { > write_msgpack(el.first); > write_msgpack(el.second); > } > break; > } > > case value_t::discarded: > default: > break; > } > } ># 739 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 3 > void write_ubjson(const BasicJsonType& j, const bool use_count, > const bool use_type, const bool add_prefix = true, > const bool use_bjdata = false) > { > switch (j.type()) > { > case value_t::null: > { > if (add_prefix) > { > oa->write_character(to_char_type('Z')); > } > break; > } > > case value_t::boolean: > { > if (add_prefix) > { > oa->write_character(j.m_value.boolean > ? to_char_type('T') > : to_char_type('F')); > } > break; > } > > case value_t::number_integer: > { > write_number_with_ubjson_prefix(j.m_value.number_integer, add_prefix, use_bjdata); > break; > } > > case value_t::number_unsigned: > { > write_number_with_ubjson_prefix(j.m_value.number_unsigned, add_prefix, use_bjdata); > break; > } > > case value_t::number_float: > { > write_number_with_ubjson_prefix(j.m_value.number_float, add_prefix, use_bjdata); > break; > } > > case value_t::string: > { > if (add_prefix) > { > oa->write_character(to_char_type('S')); > } > write_number_with_ubjson_prefix(j.m_value.string->size(), true, use_bjdata); > oa->write_characters( > reinterpret_cast<const CharType*>(j.m_value.string->c_str()), > j.m_value.string->size()); > break; > } > > case value_t::array: > { > if (add_prefix) > { > oa->write_character(to_char_type('[')); > } > > bool prefix_required = true; > if (use_type && !j.m_value.array->empty()) > { > (static_cast <bool> (use_count) ? void (0) : __assert_fail ("use_count", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp", 806, __extension__ __PRETTY_FUNCTION__)); > const CharType first_prefix = ubjson_prefix(j.front(), use_bjdata); > const bool same_prefix = std::all_of(j.begin() + 1, j.end(), > [this, first_prefix, use_bjdata](const BasicJsonType & v) > { > return ubjson_prefix(v, use_bjdata) == first_prefix; > }); > > std::vector<CharType> bjdx = {'[', '{', 'S', 'H', 'T', 'F', 'N', 'Z'}; > > if (same_prefix && !(use_bjdata && std::find(bjdx.begin(), bjdx.end(), first_prefix) != bjdx.end())) > { > prefix_required = false; > oa->write_character(to_char_type('$')); > oa->write_character(first_prefix); > } > } > > if (use_count) > { > oa->write_character(to_char_type('#')); > write_number_with_ubjson_prefix(j.m_value.array->size(), true, use_bjdata); > } > > for (const auto& el : *j.m_value.array) > { > write_ubjson(el, use_count, use_type, prefix_required, use_bjdata); > } > > if (!use_count) > { > oa->write_character(to_char_type(']')); > } > > break; > } > > case value_t::binary: > { > if (add_prefix) > { > oa->write_character(to_char_type('[')); > } > > if (use_type && !j.m_value.binary->empty()) > { > (static_cast <bool> (use_count) ? void (0) : __assert_fail ("use_count", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp", 852, __extension__ __PRETTY_FUNCTION__)); > oa->write_character(to_char_type('$')); > oa->write_character('U'); > } > > if (use_count) > { > oa->write_character(to_char_type('#')); > write_number_with_ubjson_prefix(j.m_value.binary->size(), true, use_bjdata); > } > > if (use_type) > { > oa->write_characters( > reinterpret_cast<const CharType*>(j.m_value.binary->data()), > j.m_value.binary->size()); > } > else > { > for (size_t i = 0; i < j.m_value.binary->size(); ++i) > { > oa->write_character(to_char_type('U')); > oa->write_character(j.m_value.binary->data()[i]); > } > } > > if (!use_count) > { > oa->write_character(to_char_type(']')); > } > > break; > } > > case value_t::object: > { > if (use_bjdata && j.m_value.object->size() == 3 && j.m_value.object->find("_ArrayType_") != j.m_value.object->end() && j.m_value.object->find("_ArraySize_") != j.m_value.object->end() && j.m_value.object->find("_ArrayData_") != j.m_value.object->end()) > { > if (!write_bjdata_ndarray(*j.m_value.object, use_count, use_type)) > { > break; > } > } > > if (add_prefix) > { > oa->write_character(to_char_type('{')); > } > > bool prefix_required = true; > if (use_type && !j.m_value.object->empty()) > { > (static_cast <bool> (use_count) ? void (0) : __assert_fail ("use_count", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp", 904, __extension__ __PRETTY_FUNCTION__)); > const CharType first_prefix = ubjson_prefix(j.front(), use_bjdata); > const bool same_prefix = std::all_of(j.begin(), j.end(), > [this, first_prefix, use_bjdata](const BasicJsonType & v) > { > return ubjson_prefix(v, use_bjdata) == first_prefix; > }); > > std::vector<CharType> bjdx = {'[', '{', 'S', 'H', 'T', 'F', 'N', 'Z'}; > > if (same_prefix && !(use_bjdata && std::find(bjdx.begin(), bjdx.end(), first_prefix) != bjdx.end())) > { > prefix_required = false; > oa->write_character(to_char_type('$')); > oa->write_character(first_prefix); > } > } > > if (use_count) > { > oa->write_character(to_char_type('#')); > write_number_with_ubjson_prefix(j.m_value.object->size(), true, use_bjdata); > } > > for (const auto& el : *j.m_value.object) > { > write_number_with_ubjson_prefix(el.first.size(), true, use_bjdata); > oa->write_characters( > reinterpret_cast<const CharType*>(el.first.c_str()), > el.first.size()); > write_ubjson(el.second, use_count, use_type, prefix_required, use_bjdata); > } > > if (!use_count) > { > oa->write_character(to_char_type('}')); > } > > break; > } > > case value_t::discarded: > default: > break; > } > } > > private: ># 960 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 3 > static std::size_t calc_bson_entry_header_size(const string_t& name, const BasicJsonType& j) > { > const auto it = name.find(static_cast<typename string_t::value_type>(0)); > if (__builtin_expect (!!(it != BasicJsonType::string_t::npos), 0 )) > { > throw out_of_range::create(409, concat("BSON key cannot contain code point U+0000 (at byte ", std::to_string(it), ")"), &j); > static_cast<void>(j); > } > > return 1ul + name.size() + 1u; > } > > > > > void write_bson_entry_header(const string_t& name, > const std::uint8_t element_type) > { > oa->write_character(to_char_type(element_type)); > oa->write_characters( > reinterpret_cast<const CharType*>(name.c_str()), > name.size() + 1u); > } > > > > > void write_bson_boolean(const string_t& name, > const bool value) > { > write_bson_entry_header(name, 0x08); > oa->write_character(value ? to_char_type(0x01) : to_char_type(0x00)); > } > > > > > void write_bson_double(const string_t& name, > const double value) > { > write_bson_entry_header(name, 0x01); > write_number<double>(value, true); > } > > > > > static std::size_t calc_bson_string_size(const string_t& value) > { > return sizeof(std::int32_t) + value.size() + 1ul; > } > > > > > void write_bson_string(const string_t& name, > const string_t& value) > { > write_bson_entry_header(name, 0x02); > > write_number<std::int32_t>(static_cast<std::int32_t>(value.size() + 1ul), true); > oa->write_characters( > reinterpret_cast<const CharType*>(value.c_str()), > value.size() + 1); > } > > > > > void write_bson_null(const string_t& name) > { > write_bson_entry_header(name, 0x0A); > } > > > > > static std::size_t calc_bson_integer_size(const std::int64_t value) > { > return (std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)() > ? sizeof(std::int32_t) > : sizeof(std::int64_t); > } > > > > > void write_bson_integer(const string_t& name, > const std::int64_t value) > { > if ((std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)()) > { > write_bson_entry_header(name, 0x10); > write_number<std::int32_t>(static_cast<std::int32_t>(value), true); > } > else > { > write_bson_entry_header(name, 0x12); > write_number<std::int64_t>(static_cast<std::int64_t>(value), true); > } > } > > > > > static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept > { > return (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) > ? sizeof(std::int32_t) > : sizeof(std::int64_t); > } > > > > > void write_bson_unsigned(const string_t& name, > const BasicJsonType& j) > { > if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) > { > write_bson_entry_header(name, 0x10 ); > write_number<std::int32_t>(static_cast<std::int32_t>(j.m_value.number_unsigned), true); > } > else if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)())) > { > write_bson_entry_header(name, 0x12 ); > write_number<std::int64_t>(static_cast<std::int64_t>(j.m_value.number_unsigned), true); > } > else > { > throw out_of_range::create(407, concat("integer number ", std::to_string(j.m_value.number_unsigned), " cannot be represented by BSON as it does not fit int64"), &j); > } > } > > > > > void write_bson_object_entry(const string_t& name, > const typename BasicJsonType::object_t& value) > { > write_bson_entry_header(name, 0x03); > write_bson_object(value); > } > > > > > static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t& value) > { > std::size_t array_index = 0ul; > > const std::size_t embedded_document_size = std::accumulate(std::begin(value), std::end(value), static_cast<std::size_t>(0), [&array_index](std::size_t result, const typename BasicJsonType::array_t::value_type & el) > { > return result + calc_bson_element_size(std::to_string(array_index++), el); > }); > > return sizeof(std::int32_t) + embedded_document_size + 1ul; > } > > > > > static std::size_t calc_bson_binary_size(const typename BasicJsonType::binary_t& value) > { > return sizeof(std::int32_t) + value.size() + 1ul; > } > > > > > void write_bson_array(const string_t& name, > const typename BasicJsonType::array_t& value) > { > write_bson_entry_header(name, 0x04); > write_number<std::int32_t>(static_cast<std::int32_t>(calc_bson_array_size(value)), true); > > std::size_t array_index = 0ul; > > for (const auto& el : value) > { > write_bson_element(std::to_string(array_index++), el); > } > > oa->write_character(to_char_type(0x00)); > } > > > > > void write_bson_binary(const string_t& name, > const binary_t& value) > { > write_bson_entry_header(name, 0x05); > > write_number<std::int32_t>(static_cast<std::int32_t>(value.size()), true); > write_number(value.has_subtype() ? static_cast<std::uint8_t>(value.subtype()) : static_cast<std::uint8_t>(0x00)); > > oa->write_characters(reinterpret_cast<const CharType*>(value.data()), value.size()); > } > > > > > > static std::size_t calc_bson_element_size(const string_t& name, > const BasicJsonType& j) > { > const auto header_size = calc_bson_entry_header_size(name, j); > switch (j.type()) > { > case value_t::object: > return header_size + calc_bson_object_size(*j.m_value.object); > > case value_t::array: > return header_size + calc_bson_array_size(*j.m_value.array); > > case value_t::binary: > return header_size + calc_bson_binary_size(*j.m_value.binary); > > case value_t::boolean: > return header_size + 1ul; > > case value_t::number_float: > return header_size + 8ul; > > case value_t::number_integer: > return header_size + calc_bson_integer_size(j.m_value.number_integer); > > case value_t::number_unsigned: > return header_size + calc_bson_unsigned_size(j.m_value.number_unsigned); > > case value_t::string: > return header_size + calc_bson_string_size(*j.m_value.string); > > case value_t::null: > return header_size + 0ul; > > > case value_t::discarded: > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp", 1200, __extension__ __PRETTY_FUNCTION__)); > return 0ul; > > } > } > > > > > > > > void write_bson_element(const string_t& name, > const BasicJsonType& j) > { > switch (j.type()) > { > case value_t::object: > return write_bson_object_entry(name, *j.m_value.object); > > case value_t::array: > return write_bson_array(name, *j.m_value.array); > > case value_t::binary: > return write_bson_binary(name, *j.m_value.binary); > > case value_t::boolean: > return write_bson_boolean(name, j.m_value.boolean); > > case value_t::number_float: > return write_bson_double(name, j.m_value.number_float); > > case value_t::number_integer: > return write_bson_integer(name, j.m_value.number_integer); > > case value_t::number_unsigned: > return write_bson_unsigned(name, j); > > case value_t::string: > return write_bson_string(name, *j.m_value.string); > > case value_t::null: > return write_bson_null(name); > > > case value_t::discarded: > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp", 1247, __extension__ __PRETTY_FUNCTION__)); > return; > > } > } > > > > > > > > static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t& value) > { > std::size_t document_size = std::accumulate(value.begin(), value.end(), static_cast<std::size_t>(0), > [](size_t result, const typename BasicJsonType::object_t::value_type & el) > { > return result += calc_bson_element_size(el.first, el.second); > }); > > return sizeof(std::int32_t) + document_size + 1ul; > } > > > > > > void write_bson_object(const typename BasicJsonType::object_t& value) > { > write_number<std::int32_t>(static_cast<std::int32_t>(calc_bson_object_size(value)), true); > > for (const auto& el : value) > { > write_bson_element(el.first, el.second); > } > > oa->write_character(to_char_type(0x00)); > } > > > > > > static constexpr CharType get_cbor_float_prefix(float ) > { > return to_char_type(0xFA); > } > > static constexpr CharType get_cbor_float_prefix(double ) > { > return to_char_type(0xFB); > } > > > > > > static constexpr CharType get_msgpack_float_prefix(float ) > { > return to_char_type(0xCA); > } > > static constexpr CharType get_msgpack_float_prefix(double ) > { > return to_char_type(0xCB); > } > > > > > > > template<typename NumberType, typename std::enable_if< > std::is_floating_point<NumberType>::value, int>::type = 0> > void write_number_with_ubjson_prefix(const NumberType n, > const bool add_prefix, > const bool use_bjdata) > { > if (add_prefix) > { > oa->write_character(get_ubjson_float_prefix(n)); > } > write_number(n, use_bjdata); > } > > > template<typename NumberType, typename std::enable_if< > std::is_unsigned<NumberType>::value, int>::type = 0> > void write_number_with_ubjson_prefix(const NumberType n, > const bool add_prefix, > const bool use_bjdata) > { > if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)())) > { > if (add_prefix) > { > oa->write_character(to_char_type('i')); > } > write_number(static_cast<std::uint8_t>(n), use_bjdata); > } > else if (n <= (std::numeric_limits<std::uint8_t>::max)()) > { > if (add_prefix) > { > oa->write_character(to_char_type('U')); > } > write_number(static_cast<std::uint8_t>(n), use_bjdata); > } > else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)())) > { > if (add_prefix) > { > oa->write_character(to_char_type('I')); > } > write_number(static_cast<std::int16_t>(n), use_bjdata); > } > else if (use_bjdata && n <= static_cast<uint64_t>((std::numeric_limits<uint16_t>::max)())) > { > if (add_prefix) > { > oa->write_character(to_char_type('u')); > } > write_number(static_cast<std::uint16_t>(n), use_bjdata); > } > else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) > { > if (add_prefix) > { > oa->write_character(to_char_type('l')); > } > write_number(static_cast<std::int32_t>(n), use_bjdata); > } > else if (use_bjdata && n <= static_cast<uint64_t>((std::numeric_limits<uint32_t>::max)())) > { > if (add_prefix) > { > oa->write_character(to_char_type('m')); > } > write_number(static_cast<std::uint32_t>(n), use_bjdata); > } > else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)())) > { > if (add_prefix) > { > oa->write_character(to_char_type('L')); > } > write_number(static_cast<std::int64_t>(n), use_bjdata); > } > else if (use_bjdata && n <= (std::numeric_limits<uint64_t>::max)()) > { > if (add_prefix) > { > oa->write_character(to_char_type('M')); > } > write_number(static_cast<std::uint64_t>(n), use_bjdata); > } > else > { > if (add_prefix) > { > oa->write_character(to_char_type('H')); > } > > const auto number = BasicJsonType(n).dump(); > write_number_with_ubjson_prefix(number.size(), true, use_bjdata); > for (std::size_t i = 0; i < number.size(); ++i) > { > oa->write_character(to_char_type(static_cast<std::uint8_t>(number[i]))); > } > } > } > > > template < typename NumberType, typename std::enable_if < > std::is_signed<NumberType>::value&& > !std::is_floating_point<NumberType>::value, int >::type = 0 > > void write_number_with_ubjson_prefix(const NumberType n, > const bool add_prefix, > const bool use_bjdata) > { > if ((std::numeric_limits<std::int8_t>::min)() <= n && n <= (std::numeric_limits<std::int8_t>::max)()) > { > if (add_prefix) > { > oa->write_character(to_char_type('i')); > } > write_number(static_cast<std::int8_t>(n), use_bjdata); > } > else if (static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::min)()) <= n && n <= static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::max)())) > { > if (add_prefix) > { > oa->write_character(to_char_type('U')); > } > write_number(static_cast<std::uint8_t>(n), use_bjdata); > } > else if ((std::numeric_limits<std::int16_t>::min)() <= n && n <= (std::numeric_limits<std::int16_t>::max)()) > { > if (add_prefix) > { > oa->write_character(to_char_type('I')); > } > write_number(static_cast<std::int16_t>(n), use_bjdata); > } > else if (use_bjdata && (static_cast<std::int64_t>((std::numeric_limits<std::uint16_t>::min)()) <= n && n <= static_cast<std::int64_t>((std::numeric_limits<std::uint16_t>::max)()))) > { > if (add_prefix) > { > oa->write_character(to_char_type('u')); > } > write_number(static_cast<uint16_t>(n), use_bjdata); > } > else if ((std::numeric_limits<std::int32_t>::min)() <= n && n <= (std::numeric_limits<std::int32_t>::max)()) > { > if (add_prefix) > { > oa->write_character(to_char_type('l')); > } > write_number(static_cast<std::int32_t>(n), use_bjdata); > } > else if (use_bjdata && (static_cast<std::int64_t>((std::numeric_limits<std::uint32_t>::min)()) <= n && n <= static_cast<std::int64_t>((std::numeric_limits<std::uint32_t>::max)()))) > { > if (add_prefix) > { > oa->write_character(to_char_type('m')); > } > write_number(static_cast<uint32_t>(n), use_bjdata); > } > else if ((std::numeric_limits<std::int64_t>::min)() <= n && n <= (std::numeric_limits<std::int64_t>::max)()) > { > if (add_prefix) > { > oa->write_character(to_char_type('L')); > } > write_number(static_cast<std::int64_t>(n), use_bjdata); > } > > else > { > if (add_prefix) > { > oa->write_character(to_char_type('H')); > } > > const auto number = BasicJsonType(n).dump(); > write_number_with_ubjson_prefix(number.size(), true, use_bjdata); > for (std::size_t i = 0; i < number.size(); ++i) > { > oa->write_character(to_char_type(static_cast<std::uint8_t>(number[i]))); > } > } > > } > > > > > CharType ubjson_prefix(const BasicJsonType& j, const bool use_bjdata) const noexcept > { > switch (j.type()) > { > case value_t::null: > return 'Z'; > > case value_t::boolean: > return j.m_value.boolean ? 'T' : 'F'; > > case value_t::number_integer: > { > if ((std::numeric_limits<std::int8_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)()) > { > return 'i'; > } > if ((std::numeric_limits<std::uint8_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)()) > { > return 'U'; > } > if ((std::numeric_limits<std::int16_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)()) > { > return 'I'; > } > if (use_bjdata && ((std::numeric_limits<std::uint16_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::uint16_t>::max)())) > { > return 'u'; > } > if ((std::numeric_limits<std::int32_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)()) > { > return 'l'; > } > if (use_bjdata && ((std::numeric_limits<std::uint32_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::uint32_t>::max)())) > { > return 'm'; > } > if ((std::numeric_limits<std::int64_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)()) > { > return 'L'; > } > > return 'H'; > } > > case value_t::number_unsigned: > { > if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)())) > { > return 'i'; > } > if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint8_t>::max)())) > { > return 'U'; > } > if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)())) > { > return 'I'; > } > if (use_bjdata && j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint16_t>::max)())) > { > return 'u'; > } > if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) > { > return 'l'; > } > if (use_bjdata && j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint32_t>::max)())) > { > return 'm'; > } > if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)())) > { > return 'L'; > } > if (use_bjdata && j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)()) > { > return 'M'; > } > > return 'H'; > } > > case value_t::number_float: > return get_ubjson_float_prefix(j.m_value.number_float); > > case value_t::string: > return 'S'; > > case value_t::array: > case value_t::binary: > return '['; > > case value_t::object: > return '{'; > > case value_t::discarded: > default: > return 'N'; > } > } > > static constexpr CharType get_ubjson_float_prefix(float ) > { > return 'd'; > } > > static constexpr CharType get_ubjson_float_prefix(double ) > { > return 'D'; > } > > > > > bool write_bjdata_ndarray(const typename BasicJsonType::object_t& value, const bool use_count, const bool use_type) > { > std::map<string_t, CharType> bjdtype = {{"uint8", 'U'}, {"int8", 'i'}, {"uint16", 'u'}, {"int16", 'I'}, > {"uint32", 'm'}, {"int32", 'l'}, {"uint64", 'M'}, {"int64", 'L'}, {"single", 'd'}, {"double", 'D'}, {"char", 'C'} > }; > > string_t key = "_ArrayType_"; > auto it = bjdtype.find(static_cast<string_t>(value.at(key))); > if (it == bjdtype.end()) > { > return true; > } > CharType dtype = it->second; > > key = "_ArraySize_"; > std::size_t len = (value.at(key).empty() ? 0 : 1); > for (const auto& el : value.at(key)) > { > len *= static_cast<std::size_t>(el.m_value.number_unsigned); > } > > key = "_ArrayData_"; > if (value.at(key).size() != len) > { > return true; > } > > oa->write_character('['); > oa->write_character('$'); > oa->write_character(dtype); > oa->write_character('#'); > > key = "_ArraySize_"; > write_ubjson(value.at(key), use_count, use_type, true, true); > > key = "_ArrayData_"; > if (dtype == 'U' || dtype == 'C') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<std::uint8_t>(el.m_value.number_unsigned), true); > } > } > else if (dtype == 'i') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<std::int8_t>(el.m_value.number_integer), true); > } > } > else if (dtype == 'u') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<std::uint16_t>(el.m_value.number_unsigned), true); > } > } > else if (dtype == 'I') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<std::int16_t>(el.m_value.number_integer), true); > } > } > else if (dtype == 'm') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<std::uint32_t>(el.m_value.number_unsigned), true); > } > } > else if (dtype == 'l') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<std::int32_t>(el.m_value.number_integer), true); > } > } > else if (dtype == 'M') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<std::uint64_t>(el.m_value.number_unsigned), true); > } > } > else if (dtype == 'L') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<std::int64_t>(el.m_value.number_integer), true); > } > } > else if (dtype == 'd') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<float>(el.m_value.number_float), true); > } > } > else if (dtype == 'D') > { > for (const auto& el : value.at(key)) > { > write_number(static_cast<double>(el.m_value.number_float), true); > } > } > return false; > } ># 1744 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/binary_writer.hpp" 3 > template<typename NumberType> > void write_number(const NumberType n, const bool OutputIsLittleEndian = false) > { > > std::array<CharType, sizeof(NumberType)> vec{}; > std::memcpy(vec.data(), &n, sizeof(NumberType)); > > > if (is_little_endian != OutputIsLittleEndian) > { > > std::reverse(vec.begin(), vec.end()); > } > > oa->write_characters(vec.data(), sizeof(NumberType)); > } > > void write_compact_float(const number_float_t n, detail::input_format_t format) > { > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wfloat-equal" > > if (static_cast<double>(n) >= static_cast<double>(std::numeric_limits<float>::lowest()) && > static_cast<double>(n) <= static_cast<double>((std::numeric_limits<float>::max)()) && > static_cast<double>(static_cast<float>(n)) == static_cast<double>(n)) > { > oa->write_character(format == detail::input_format_t::cbor > ? get_cbor_float_prefix(static_cast<float>(n)) > : get_msgpack_float_prefix(static_cast<float>(n))); > write_number(static_cast<float>(n)); > } > else > { > oa->write_character(format == detail::input_format_t::cbor > ? get_cbor_float_prefix(n) > : get_msgpack_float_prefix(n)); > write_number(n); > } > >#pragma GCC diagnostic pop > > } > > public: > > > > > template < typename C = CharType, > enable_if_t < std::is_signed<C>::value && std::is_signed<char>::value > * = nullptr > > static constexpr CharType to_char_type(std::uint8_t x) noexcept > { > return *reinterpret_cast<char*>(&x); > } > > template < typename C = CharType, > enable_if_t < std::is_signed<C>::value && std::is_unsigned<char>::value > * = nullptr > > static CharType to_char_type(std::uint8_t x) noexcept > { > static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t"); > static_assert(std::is_trivial<CharType>::value, "CharType must be trivial"); > CharType result; > std::memcpy(&result, &x, sizeof(x)); > return result; > } > > template<typename C = CharType, > enable_if_t<std::is_unsigned<C>::value>* = nullptr> > static constexpr CharType to_char_type(std::uint8_t x) noexcept > { > return x; > } > > template < typename InputCharType, typename C = CharType, > enable_if_t < > std::is_signed<C>::value && > std::is_signed<char>::value && > std::is_same<char, typename std::remove_cv<InputCharType>::type>::value > > * = nullptr > > static constexpr CharType to_char_type(InputCharType x) noexcept > { > return x; > } > > private: > > const bool is_little_endian = little_endianness(); > > > output_adapter_t<CharType> oa = nullptr; >}; > >} >} } ># 58 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 1 3 ># 10 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 > > > > ># 1 "/usr/include/c++/13/clocale" 1 3 ># 39 "/usr/include/c++/13/clocale" 3 > ># 40 "/usr/include/c++/13/clocale" 3 ># 15 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 2 3 ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 16 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 2 3 > > ># 1 "/usr/include/c++/13/cstdio" 1 3 ># 39 "/usr/include/c++/13/cstdio" 3 > ># 40 "/usr/include/c++/13/cstdio" 3 ># 19 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 2 3 > > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 1 3 ># 10 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 14 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 2 3 > ># 1 "/usr/include/c++/13/cstring" 1 3 ># 39 "/usr/include/c++/13/cstring" 3 > ># 40 "/usr/include/c++/13/cstring" 3 ># 16 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 2 3 > > > > > >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ ># 44 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 >namespace dtoa_impl >{ > >template<typename Target, typename Source> >Target reinterpret_bits(const Source source) >{ > static_assert(sizeof(Target) == sizeof(Source), "size mismatch"); > > Target target; > std::memcpy(&target, &source, sizeof(Source)); > return target; >} > >struct diyfp >{ > static constexpr int kPrecision = 64; > > std::uint64_t f = 0; > int e = 0; > > constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {} > > > > > > static diyfp sub(const diyfp& x, const diyfp& y) noexcept > { > (static_cast <bool> (x.e == y.e) ? void (0) : __assert_fail ("x.e == y.e", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 72, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (x.f >= y.f) ? void (0) : __assert_fail ("x.f >= y.f", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 73, __extension__ __PRETTY_FUNCTION__)); > > return {x.f - y.f, x.e}; > } > > > > > > static diyfp mul(const diyfp& x, const diyfp& y) noexcept > { > static_assert(kPrecision == 64, "internal error"); ># 109 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; > const std::uint64_t u_hi = x.f >> 32u; > const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; > const std::uint64_t v_hi = y.f >> 32u; > > const std::uint64_t p0 = u_lo * v_lo; > const std::uint64_t p1 = u_lo * v_hi; > const std::uint64_t p2 = u_hi * v_lo; > const std::uint64_t p3 = u_hi * v_hi; > > const std::uint64_t p0_hi = p0 >> 32u; > const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; > const std::uint64_t p1_hi = p1 >> 32u; > const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; > const std::uint64_t p2_hi = p2 >> 32u; > > std::uint64_t Q = p0_hi + p1_lo + p2_lo; ># 136 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > Q += std::uint64_t{1} << (64u - 32u - 1u); > > const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); > > return {h, x.e + y.e + 64}; > } > > > > > > static diyfp normalize(diyfp x) noexcept > { > (static_cast <bool> (x.f != 0) ? void (0) : __assert_fail ("x.f != 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 149, __extension__ __PRETTY_FUNCTION__)); > > while ((x.f >> 63u) == 0) > { > x.f <<= 1u; > x.e--; > } > > return x; > } > > > > > > static diyfp normalize_to(const diyfp& x, const int target_exponent) noexcept > { > const int delta = x.e - target_exponent; > > (static_cast <bool> (delta >= 0) ? void (0) : __assert_fail ("delta >= 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 168, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (((x.f << delta) >> delta) == x.f) ? void (0) : __assert_fail ("((x.f << delta) >> delta) == x.f", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 169, __extension__ __PRETTY_FUNCTION__)); > > return {x.f << delta, target_exponent}; > } >}; > >struct boundaries >{ > diyfp w; > diyfp minus; > diyfp plus; >}; > > > > > > > >template<typename FloatType> >boundaries compute_boundaries(FloatType value) >{ > (static_cast <bool> (std::isfinite(value)) ? void (0) : __assert_fail ("std::isfinite(value)", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 191, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (value > 0) ? void (0) : __assert_fail ("value > 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 192, __extension__ __PRETTY_FUNCTION__)); ># 201 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > static_assert(std::numeric_limits<FloatType>::is_iec559, > "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); > > constexpr int kPrecision = std::numeric_limits<FloatType>::digits; > constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1); > constexpr int kMinExp = 1 - kBias; > constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); > > using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type; > > const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value)); > const std::uint64_t E = bits >> (kPrecision - 1); > const std::uint64_t F = bits & (kHiddenBit - 1); > > const bool is_denormal = E == 0; > const diyfp v = is_denormal > ? diyfp(F, kMinExp) > : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias); ># 241 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > const bool lower_boundary_is_closer = F == 0 && E > 1; > const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); > const diyfp m_minus = lower_boundary_is_closer > ? diyfp(4 * v.f - 1, v.e - 2) > : diyfp(2 * v.f - 1, v.e - 1); > > > const diyfp w_plus = diyfp::normalize(m_plus); > > > const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); > > return {diyfp::normalize(v), w_minus, w_plus}; >} ># 311 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 >constexpr int kAlpha = -60; >constexpr int kGamma = -32; > >struct cached_power >{ > std::uint64_t f; > int e; > int k; >}; ># 328 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 >inline cached_power get_cached_power_for_binary_exponent(int e) >{ ># 380 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > constexpr int kCachedPowersMinDecExp = -300; > constexpr int kCachedPowersDecStep = 8; > > static constexpr std::array<cached_power, 79> kCachedPowers = > { > { > { 0xAB70FE17C79AC6CA, -1060, -300 }, > { 0xFF77B1FCBEBCDC4F, -1034, -292 }, > { 0xBE5691EF416BD60C, -1007, -284 }, > { 0x8DD01FAD907FFC3C, -980, -276 }, > { 0xD3515C2831559A83, -954, -268 }, > { 0x9D71AC8FADA6C9B5, -927, -260 }, > { 0xEA9C227723EE8BCB, -901, -252 }, > { 0xAECC49914078536D, -874, -244 }, > { 0x823C12795DB6CE57, -847, -236 }, > { 0xC21094364DFB5637, -821, -228 }, > { 0x9096EA6F3848984F, -794, -220 }, > { 0xD77485CB25823AC7, -768, -212 }, > { 0xA086CFCD97BF97F4, -741, -204 }, > { 0xEF340A98172AACE5, -715, -196 }, > { 0xB23867FB2A35B28E, -688, -188 }, > { 0x84C8D4DFD2C63F3B, -661, -180 }, > { 0xC5DD44271AD3CDBA, -635, -172 }, > { 0x936B9FCEBB25C996, -608, -164 }, > { 0xDBAC6C247D62A584, -582, -156 }, > { 0xA3AB66580D5FDAF6, -555, -148 }, > { 0xF3E2F893DEC3F126, -529, -140 }, > { 0xB5B5ADA8AAFF80B8, -502, -132 }, > { 0x87625F056C7C4A8B, -475, -124 }, > { 0xC9BCFF6034C13053, -449, -116 }, > { 0x964E858C91BA2655, -422, -108 }, > { 0xDFF9772470297EBD, -396, -100 }, > { 0xA6DFBD9FB8E5B88F, -369, -92 }, > { 0xF8A95FCF88747D94, -343, -84 }, > { 0xB94470938FA89BCF, -316, -76 }, > { 0x8A08F0F8BF0F156B, -289, -68 }, > { 0xCDB02555653131B6, -263, -60 }, > { 0x993FE2C6D07B7FAC, -236, -52 }, > { 0xE45C10C42A2B3B06, -210, -44 }, > { 0xAA242499697392D3, -183, -36 }, > { 0xFD87B5F28300CA0E, -157, -28 }, > { 0xBCE5086492111AEB, -130, -20 }, > { 0x8CBCCC096F5088CC, -103, -12 }, > { 0xD1B71758E219652C, -77, -4 }, > { 0x9C40000000000000, -50, 4 }, > { 0xE8D4A51000000000, -24, 12 }, > { 0xAD78EBC5AC620000, 3, 20 }, > { 0x813F3978F8940984, 30, 28 }, > { 0xC097CE7BC90715B3, 56, 36 }, > { 0x8F7E32CE7BEA5C70, 83, 44 }, > { 0xD5D238A4ABE98068, 109, 52 }, > { 0x9F4F2726179A2245, 136, 60 }, > { 0xED63A231D4C4FB27, 162, 68 }, > { 0xB0DE65388CC8ADA8, 189, 76 }, > { 0x83C7088E1AAB65DB, 216, 84 }, > { 0xC45D1DF942711D9A, 242, 92 }, > { 0x924D692CA61BE758, 269, 100 }, > { 0xDA01EE641A708DEA, 295, 108 }, > { 0xA26DA3999AEF774A, 322, 116 }, > { 0xF209787BB47D6B85, 348, 124 }, > { 0xB454E4A179DD1877, 375, 132 }, > { 0x865B86925B9BC5C2, 402, 140 }, > { 0xC83553C5C8965D3D, 428, 148 }, > { 0x952AB45CFA97A0B3, 455, 156 }, > { 0xDE469FBD99A05FE3, 481, 164 }, > { 0xA59BC234DB398C25, 508, 172 }, > { 0xF6C69A72A3989F5C, 534, 180 }, > { 0xB7DCBF5354E9BECE, 561, 188 }, > { 0x88FCF317F22241E2, 588, 196 }, > { 0xCC20CE9BD35C78A5, 614, 204 }, > { 0x98165AF37B2153DF, 641, 212 }, > { 0xE2A0B5DC971F303A, 667, 220 }, > { 0xA8D9D1535CE3B396, 694, 228 }, > { 0xFB9B7CD9A4A7443C, 720, 236 }, > { 0xBB764C4CA7A44410, 747, 244 }, > { 0x8BAB8EEFB6409C1A, 774, 252 }, > { 0xD01FEF10A657842C, 800, 260 }, > { 0x9B10A4E5E9913129, 827, 268 }, > { 0xE7109BFBA19C0C9D, 853, 276 }, > { 0xAC2820D9623BF429, 880, 284 }, > { 0x80444B5E7AA7CF85, 907, 292 }, > { 0xBF21E44003ACDD2D, 933, 300 }, > { 0x8E679C2F5E44FF8F, 960, 308 }, > { 0xD433179D9C8CB841, 986, 316 }, > { 0x9E19DB92B4E31BA9, 1013, 324 }, > } > }; > > > > > > (static_cast <bool> (e >= -1500) ? void (0) : __assert_fail ("e >= -1500", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 472, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (e <= 1500) ? void (0) : __assert_fail ("e <= 1500", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 473, __extension__ __PRETTY_FUNCTION__)); > const int f = kAlpha - e - 1; > const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0); > > const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; > (static_cast <bool> (index >= 0) ? void (0) : __assert_fail ("index >= 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 478, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (static_cast<std::size_t>(index) < kCachedPowers.size()) ? void (0) : __assert_fail ("static_cast<std::size_t>(index) < kCachedPowers.size()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 479, __extension__ __PRETTY_FUNCTION__)); > > const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)]; > (static_cast <bool> (kAlpha <= cached.e + e + 64) ? void (0) : __assert_fail ("kAlpha <= cached.e + e + 64", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 482, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (kGamma >= cached.e + e + 64) ? void (0) : __assert_fail ("kGamma >= cached.e + e + 64", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 483, __extension__ __PRETTY_FUNCTION__)); > > return cached; >} > > > > > >inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) >{ > > if (n >= 1000000000) > { > pow10 = 1000000000; > return 10; > } > > if (n >= 100000000) > { > pow10 = 100000000; > return 9; > } > if (n >= 10000000) > { > pow10 = 10000000; > return 8; > } > if (n >= 1000000) > { > pow10 = 1000000; > return 7; > } > if (n >= 100000) > { > pow10 = 100000; > return 6; > } > if (n >= 10000) > { > pow10 = 10000; > return 5; > } > if (n >= 1000) > { > pow10 = 1000; > return 4; > } > if (n >= 100) > { > pow10 = 100; > return 3; > } > if (n >= 10) > { > pow10 = 10; > return 2; > } > > pow10 = 1; > return 1; >} > >inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta, > std::uint64_t rest, std::uint64_t ten_k) >{ > (static_cast <bool> (len >= 1) ? void (0) : __assert_fail ("len >= 1", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 549, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (dist <= delta) ? void (0) : __assert_fail ("dist <= delta", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 550, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (rest <= delta) ? void (0) : __assert_fail ("rest <= delta", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 551, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (ten_k > 0) ? void (0) : __assert_fail ("ten_k > 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 552, __extension__ __PRETTY_FUNCTION__)); ># 573 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > while (rest < dist > && delta - rest >= ten_k > && (rest + ten_k < dist || dist - rest > rest + ten_k - dist)) > { > (static_cast <bool> (buf[len - 1] != '0') ? void (0) : __assert_fail ("buf[len - 1] != '0'", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 577, __extension__ __PRETTY_FUNCTION__)); > buf[len - 1]--; > rest += ten_k; > } >} > > > > > >inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, > diyfp M_minus, diyfp w, diyfp M_plus) >{ > static_assert(kAlpha >= -60, "internal error"); > static_assert(kGamma <= -32, "internal error"); ># 605 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > (static_cast <bool> (M_plus.e >= kAlpha) ? void (0) : __assert_fail ("M_plus.e >= kAlpha", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 605, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (M_plus.e <= kGamma) ? void (0) : __assert_fail ("M_plus.e <= kGamma", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 606, __extension__ __PRETTY_FUNCTION__)); > > std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; > std::uint64_t dist = diyfp::sub(M_plus, w ).f; ># 618 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); > > auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); > std::uint64_t p2 = M_plus.f & (one.f - 1); > > > > > > (static_cast <bool> (p1 > 0) ? void (0) : __assert_fail ("p1 > 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 627, __extension__ __PRETTY_FUNCTION__)); > > std::uint32_t pow10{}; > const int k = find_largest_pow10(p1, pow10); ># 650 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > int n = k; > while (n > 0) > { > > > > > const std::uint32_t d = p1 / pow10; > const std::uint32_t r = p1 % pow10; > > > > > (static_cast <bool> (d <= 9) ? void (0) : __assert_fail ("d <= 9", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 663, __extension__ __PRETTY_FUNCTION__)); > buffer[length++] = static_cast<char>('0' + d); > > > > p1 = r; > n--; ># 683 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; > if (rest <= delta) > { > > > decimal_exponent += n; ># 699 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; > grisu2_round(buffer, length, dist, delta, rest, ten_n); > > return; > } > > pow10 /= 10; > > > > } ># 750 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > (static_cast <bool> (p2 > delta) ? void (0) : __assert_fail ("p2 > delta", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 750, __extension__ __PRETTY_FUNCTION__)); > > int m = 0; > for (;;) > { > > > > > > > (static_cast <bool> (p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10) ? void (0) : __assert_fail ("p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 761, __extension__ __PRETTY_FUNCTION__)); > p2 *= 10; > const std::uint64_t d = p2 >> -one.e; > const std::uint64_t r = p2 & (one.f - 1); > > > > > > (static_cast <bool> (d <= 9) ? void (0) : __assert_fail ("d <= 9", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 770, __extension__ __PRETTY_FUNCTION__)); > buffer[length++] = static_cast<char>('0' + d); > > > > p2 = r; > m++; ># 786 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > delta *= 10; > dist *= 10; > if (p2 <= delta) > { > break; > } > } > > > > decimal_exponent -= m; > > > > > > > > const std::uint64_t ten_m = one.f; > grisu2_round(buffer, length, dist, delta, p2, ten_m); ># 820 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 >} > > > > > > >__attribute__((__nonnull__(1))) >inline void grisu2(char* buf, int& len, int& decimal_exponent, > diyfp m_minus, diyfp v, diyfp m_plus) >{ > (static_cast <bool> (m_plus.e == m_minus.e) ? void (0) : __assert_fail ("m_plus.e == m_minus.e", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 831, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (m_plus.e == v.e) ? void (0) : __assert_fail ("m_plus.e == v.e", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 832, __extension__ __PRETTY_FUNCTION__)); ># 843 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); > > const diyfp c_minus_k(cached.f, cached.e); > > > const diyfp w = diyfp::mul(v, c_minus_k); > const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); > const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); ># 873 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > const diyfp M_minus(w_minus.f + 1, w_minus.e); > const diyfp M_plus (w_plus.f - 1, w_plus.e ); > > decimal_exponent = -cached.k; > > grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); >} > > > > > > >template<typename FloatType> >__attribute__((__nonnull__(1))) >void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) >{ > static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3, > "internal error: not enough precision"); > > (static_cast <bool> (std::isfinite(value)) ? void (0) : __assert_fail ("std::isfinite(value)", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 893, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (value > 0) ? void (0) : __assert_fail ("value > 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 894, __extension__ __PRETTY_FUNCTION__)); ># 915 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 > const boundaries w = compute_boundaries(value); > > > grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); >} > > > > > > >__attribute__((__nonnull__(1))) >__attribute__((__returns_nonnull__)) >inline char* append_exponent(char* buf, int e) >{ > (static_cast <bool> (e > -1000) ? void (0) : __assert_fail ("e > -1000", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 930, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (e < 1000) ? void (0) : __assert_fail ("e < 1000", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 931, __extension__ __PRETTY_FUNCTION__)); > > if (e < 0) > { > e = -e; > *buf++ = '-'; > } > else > { > *buf++ = '+'; > } > > auto k = static_cast<std::uint32_t>(e); > if (k < 10) > { > > > *buf++ = '0'; > *buf++ = static_cast<char>('0' + k); > } > else if (k < 100) > { > *buf++ = static_cast<char>('0' + k / 10); > k %= 10; > *buf++ = static_cast<char>('0' + k); > } > else > { > *buf++ = static_cast<char>('0' + k / 100); > k %= 100; > *buf++ = static_cast<char>('0' + k / 10); > k %= 10; > *buf++ = static_cast<char>('0' + k); > } > > return buf; >} ># 978 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 >__attribute__((__nonnull__(1))) >__attribute__((__returns_nonnull__)) >inline char* format_buffer(char* buf, int len, int decimal_exponent, > int min_exp, int max_exp) >{ > (static_cast <bool> (min_exp < 0) ? void (0) : __assert_fail ("min_exp < 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 983, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (max_exp > 0) ? void (0) : __assert_fail ("max_exp > 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 984, __extension__ __PRETTY_FUNCTION__)); > > const int k = len; > const int n = len + decimal_exponent; > > > > > > if (k <= n && n <= max_exp) > { > > > > std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k)); > > buf[n + 0] = '.'; > buf[n + 1] = '0'; > return buf + (static_cast<size_t>(n) + 2); > } > > if (0 < n && n <= max_exp) > { > > > > (static_cast <bool> (k > n) ? void (0) : __assert_fail ("k > n", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 1010, __extension__ __PRETTY_FUNCTION__)); > > std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n)); > buf[n] = '.'; > return buf + (static_cast<size_t>(k) + 1U); > } > > if (min_exp < n && n <= 0) > { > > > > std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k)); > buf[0] = '0'; > buf[1] = '.'; > std::memset(buf + 2, '0', static_cast<size_t>(-n)); > return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k)); > } > > if (k == 1) > { > > > > buf += 1; > } > else > { > > > > std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1); > buf[1] = '.'; > buf += 1 + static_cast<size_t>(k); > } > > *buf++ = 'e'; > return append_exponent(buf, n - 1); >} > >} ># 1062 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp" 3 >template<typename FloatType> >__attribute__((__nonnull__(1, 2))) >__attribute__((__returns_nonnull__)) >char* to_chars(char* first, const char* last, FloatType value) >{ > static_cast<void>(last); > (static_cast <bool> (std::isfinite(value)) ? void (0) : __assert_fail ("std::isfinite(value)", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 1068, __extension__ __PRETTY_FUNCTION__)); > > > if (std::signbit(value)) > { > value = -value; > *first++ = '-'; > } > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wfloat-equal" > > if (value == 0) > { > *first++ = '0'; > > *first++ = '.'; > *first++ = '0'; > return first; > } > >#pragma GCC diagnostic pop > > > (static_cast <bool> (last - first >= std::numeric_limits<FloatType>::max_digits10) ? void (0) : __assert_fail ("last - first >= std::numeric_limits<FloatType>::max_digits10", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 1093, __extension__ __PRETTY_FUNCTION__)); > > > > > > int len = 0; > int decimal_exponent = 0; > dtoa_impl::grisu2(first, len, decimal_exponent, value); > > (static_cast <bool> (len <= std::numeric_limits<FloatType>::max_digits10) ? void (0) : __assert_fail ("len <= std::numeric_limits<FloatType>::max_digits10", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 1103, __extension__ __PRETTY_FUNCTION__)); > > > constexpr int kMinExp = -4; > > constexpr int kMaxExp = std::numeric_limits<FloatType>::digits10; > > (static_cast <bool> (last - first >= kMaxExp + 2) ? void (0) : __assert_fail ("last - first >= kMaxExp + 2", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 1110, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (last - first >= 2 + (-kMinExp - 1) + std::numeric_limits<FloatType>::max_digits10) ? void (0) : __assert_fail ("last - first >= 2 + (-kMinExp - 1) + std::numeric_limits<FloatType>::max_digits10", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 1111, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (last - first >= std::numeric_limits<FloatType>::max_digits10 + 6) ? void (0) : __assert_fail ("last - first >= std::numeric_limits<FloatType>::max_digits10 + 6", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/conversions/to_chars.hpp", 1112, __extension__ __PRETTY_FUNCTION__)); > > return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, kMaxExp); >} > >} >} } ># 26 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 2 3 ># 34 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { >namespace detail >{ > > > > > > >enum class error_handler_t >{ > strict, > replace, > ignore >}; > >template<typename BasicJsonType> >class serializer >{ > using string_t = typename BasicJsonType::string_t; > using number_float_t = typename BasicJsonType::number_float_t; > using number_integer_t = typename BasicJsonType::number_integer_t; > using number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using binary_char_t = typename BasicJsonType::binary_t::value_type; > static constexpr std::uint8_t UTF8_ACCEPT = 0; > static constexpr std::uint8_t UTF8_REJECT = 1; > > public: > > > > > > serializer(output_adapter_t<char> s, const char ichar, > error_handler_t error_handler_ = error_handler_t::strict) > : o(std::move(s)) > , loc(std::localeconv()) > , thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep))) > , decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point))) > , indent_char(ichar) > , indent_string(512, indent_char) > , error_handler(error_handler_) > {} > > > serializer(const serializer&) = delete; > serializer& operator=(const serializer&) = delete; > serializer(serializer&&) = delete; > serializer& operator=(serializer&&) = delete; > ~serializer() = default; ># 107 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 > void dump(const BasicJsonType& val, > const bool pretty_print, > const bool ensure_ascii, > const unsigned int indent_step, > const unsigned int current_indent = 0) > { > switch (val.m_type) > { > case value_t::object: > { > if (val.m_value.object->empty()) > { > o->write_characters("{}", 2); > return; > } > > if (pretty_print) > { > o->write_characters("{\n", 2); > > > const auto new_indent = current_indent + indent_step; > if (__builtin_expect (!!(indent_string.size() < new_indent), 0 )) > { > indent_string.resize(indent_string.size() * 2, ' '); > } > > > auto i = val.m_value.object->cbegin(); > for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) > { > o->write_characters(indent_string.c_str(), new_indent); > o->write_character('\"'); > dump_escaped(i->first, ensure_ascii); > o->write_characters("\": ", 3); > dump(i->second, true, ensure_ascii, indent_step, new_indent); > o->write_characters(",\n", 2); > } > > > (static_cast <bool> (i != val.m_value.object->cend()) ? void (0) : __assert_fail ("i != val.m_value.object->cend()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 147, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (std::next(i) == val.m_value.object->cend()) ? void (0) : __assert_fail ("std::next(i) == val.m_value.object->cend()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 148, __extension__ __PRETTY_FUNCTION__)); > o->write_characters(indent_string.c_str(), new_indent); > o->write_character('\"'); > dump_escaped(i->first, ensure_ascii); > o->write_characters("\": ", 3); > dump(i->second, true, ensure_ascii, indent_step, new_indent); > > o->write_character('\n'); > o->write_characters(indent_string.c_str(), current_indent); > o->write_character('}'); > } > else > { > o->write_character('{'); > > > auto i = val.m_value.object->cbegin(); > for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) > { > o->write_character('\"'); > dump_escaped(i->first, ensure_ascii); > o->write_characters("\":", 2); > dump(i->second, false, ensure_ascii, indent_step, current_indent); > o->write_character(','); > } > > > (static_cast <bool> (i != val.m_value.object->cend()) ? void (0) : __assert_fail ("i != val.m_value.object->cend()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 175, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (std::next(i) == val.m_value.object->cend()) ? void (0) : __assert_fail ("std::next(i) == val.m_value.object->cend()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 176, __extension__ __PRETTY_FUNCTION__)); > o->write_character('\"'); > dump_escaped(i->first, ensure_ascii); > o->write_characters("\":", 2); > dump(i->second, false, ensure_ascii, indent_step, current_indent); > > o->write_character('}'); > } > > return; > } > > case value_t::array: > { > if (val.m_value.array->empty()) > { > o->write_characters("[]", 2); > return; > } > > if (pretty_print) > { > o->write_characters("[\n", 2); > > > const auto new_indent = current_indent + indent_step; > if (__builtin_expect (!!(indent_string.size() < new_indent), 0 )) > { > indent_string.resize(indent_string.size() * 2, ' '); > } > > > for (auto i = val.m_value.array->cbegin(); > i != val.m_value.array->cend() - 1; ++i) > { > o->write_characters(indent_string.c_str(), new_indent); > dump(*i, true, ensure_ascii, indent_step, new_indent); > o->write_characters(",\n", 2); > } > > > (static_cast <bool> (!val.m_value.array->empty()) ? void (0) : __assert_fail ("!val.m_value.array->empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 217, __extension__ __PRETTY_FUNCTION__)); > o->write_characters(indent_string.c_str(), new_indent); > dump(val.m_value.array->back(), true, ensure_ascii, indent_step, new_indent); > > o->write_character('\n'); > o->write_characters(indent_string.c_str(), current_indent); > o->write_character(']'); > } > else > { > o->write_character('['); > > > for (auto i = val.m_value.array->cbegin(); > i != val.m_value.array->cend() - 1; ++i) > { > dump(*i, false, ensure_ascii, indent_step, current_indent); > o->write_character(','); > } > > > (static_cast <bool> (!val.m_value.array->empty()) ? void (0) : __assert_fail ("!val.m_value.array->empty()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 238, __extension__ __PRETTY_FUNCTION__)); > dump(val.m_value.array->back(), false, ensure_ascii, indent_step, current_indent); > > o->write_character(']'); > } > > return; > } > > case value_t::string: > { > o->write_character('\"'); > dump_escaped(*val.m_value.string, ensure_ascii); > o->write_character('\"'); > return; > } > > case value_t::binary: > { > if (pretty_print) > { > o->write_characters("{\n", 2); > > > const auto new_indent = current_indent + indent_step; > if (__builtin_expect (!!(indent_string.size() < new_indent), 0 )) > { > indent_string.resize(indent_string.size() * 2, ' '); > } > > o->write_characters(indent_string.c_str(), new_indent); > > o->write_characters("\"bytes\": [", 10); > > if (!val.m_value.binary->empty()) > { > for (auto i = val.m_value.binary->cbegin(); > i != val.m_value.binary->cend() - 1; ++i) > { > dump_integer(*i); > o->write_characters(", ", 2); > } > dump_integer(val.m_value.binary->back()); > } > > o->write_characters("],\n", 3); > o->write_characters(indent_string.c_str(), new_indent); > > o->write_characters("\"subtype\": ", 11); > if (val.m_value.binary->has_subtype()) > { > dump_integer(val.m_value.binary->subtype()); > } > else > { > o->write_characters("null", 4); > } > o->write_character('\n'); > o->write_characters(indent_string.c_str(), current_indent); > o->write_character('}'); > } > else > { > o->write_characters("{\"bytes\":[", 10); > > if (!val.m_value.binary->empty()) > { > for (auto i = val.m_value.binary->cbegin(); > i != val.m_value.binary->cend() - 1; ++i) > { > dump_integer(*i); > o->write_character(','); > } > dump_integer(val.m_value.binary->back()); > } > > o->write_characters("],\"subtype\":", 12); > if (val.m_value.binary->has_subtype()) > { > dump_integer(val.m_value.binary->subtype()); > o->write_character('}'); > } > else > { > o->write_characters("null}", 5); > } > } > return; > } > > case value_t::boolean: > { > if (val.m_value.boolean) > { > o->write_characters("true", 4); > } > else > { > o->write_characters("false", 5); > } > return; > } > > case value_t::number_integer: > { > dump_integer(val.m_value.number_integer); > return; > } > > case value_t::number_unsigned: > { > dump_integer(val.m_value.number_unsigned); > return; > } > > case value_t::number_float: > { > dump_float(val.m_value.number_float); > return; > } > > case value_t::discarded: > { > o->write_characters("<discarded>", 11); > return; > } > > case value_t::null: > { > o->write_characters("null", 4); > return; > } > > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 372, __extension__ __PRETTY_FUNCTION__)); > } > } > > private: ># 391 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 > void dump_escaped(const string_t& s, const bool ensure_ascii) > { > std::uint32_t codepoint{}; > std::uint8_t state = UTF8_ACCEPT; > std::size_t bytes = 0; > > > std::size_t bytes_after_last_accept = 0; > std::size_t undumped_chars = 0; > > for (std::size_t i = 0; i < s.size(); ++i) > { > const auto byte = static_cast<std::uint8_t>(s[i]); > > switch (decode(state, codepoint, byte)) > { > case UTF8_ACCEPT: > { > switch (codepoint) > { > case 0x08: > { > string_buffer[bytes++] = '\\'; > string_buffer[bytes++] = 'b'; > break; > } > > case 0x09: > { > string_buffer[bytes++] = '\\'; > string_buffer[bytes++] = 't'; > break; > } > > case 0x0A: > { > string_buffer[bytes++] = '\\'; > string_buffer[bytes++] = 'n'; > break; > } > > case 0x0C: > { > string_buffer[bytes++] = '\\'; > string_buffer[bytes++] = 'f'; > break; > } > > case 0x0D: > { > string_buffer[bytes++] = '\\'; > string_buffer[bytes++] = 'r'; > break; > } > > case 0x22: > { > string_buffer[bytes++] = '\\'; > string_buffer[bytes++] = '\"'; > break; > } > > case 0x5C: > { > string_buffer[bytes++] = '\\'; > string_buffer[bytes++] = '\\'; > break; > } > > default: > { > > > if ((codepoint <= 0x1F) || (ensure_ascii && (codepoint >= 0x7F))) > { > if (codepoint <= 0xFFFF) > { > > static_cast<void>((std::snprintf)(string_buffer.data() + bytes, 7, "\\u%04x", > static_cast<std::uint16_t>(codepoint))); > bytes += 6; > } > else > { > > static_cast<void>((std::snprintf)(string_buffer.data() + bytes, 13, "\\u%04x\\u%04x", > static_cast<std::uint16_t>(0xD7C0u + (codepoint >> 10u)), > static_cast<std::uint16_t>(0xDC00u + (codepoint & 0x3FFu)))); > bytes += 12; > } > } > else > { > > > string_buffer[bytes++] = s[i]; > } > break; > } > } > > > > > if (string_buffer.size() - bytes < 13) > { > o->write_characters(string_buffer.data(), bytes); > bytes = 0; > } > > > bytes_after_last_accept = bytes; > undumped_chars = 0; > break; > } > > case UTF8_REJECT: > { > switch (error_handler) > { > case error_handler_t::strict: > { > throw type_error::create(316, concat("invalid UTF-8 byte at index ", std::to_string(i), ": 0x", hex_bytes(byte | 0)), nullptr); > } > > case error_handler_t::ignore: > case error_handler_t::replace: > { > > > > > if (undumped_chars > 0) > { > --i; > } > > > > bytes = bytes_after_last_accept; > > if (error_handler == error_handler_t::replace) > { > > if (ensure_ascii) > { > string_buffer[bytes++] = '\\'; > string_buffer[bytes++] = 'u'; > string_buffer[bytes++] = 'f'; > string_buffer[bytes++] = 'f'; > string_buffer[bytes++] = 'f'; > string_buffer[bytes++] = 'd'; > } > else > { > string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xEF'); > string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBF'); > string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBD'); > } > > > > > if (string_buffer.size() - bytes < 13) > { > o->write_characters(string_buffer.data(), bytes); > bytes = 0; > } > > bytes_after_last_accept = bytes; > } > > undumped_chars = 0; > > > state = UTF8_ACCEPT; > break; > } > > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 571, __extension__ __PRETTY_FUNCTION__)); > } > break; > } > > default: > { > if (!ensure_ascii) > { > > string_buffer[bytes++] = s[i]; > } > ++undumped_chars; > break; > } > } > } > > > if (__builtin_expect (!!(state == UTF8_ACCEPT), 1 )) > { > > if (bytes > 0) > { > o->write_characters(string_buffer.data(), bytes); > } > } > else > { > > switch (error_handler) > { > case error_handler_t::strict: > { > throw type_error::create(316, concat("incomplete UTF-8 string; last byte: 0x", hex_bytes(static_cast<std::uint8_t>(s.back() | 0))), nullptr); > } > > case error_handler_t::ignore: > { > > o->write_characters(string_buffer.data(), bytes_after_last_accept); > break; > } > > case error_handler_t::replace: > { > > o->write_characters(string_buffer.data(), bytes_after_last_accept); > > if (ensure_ascii) > { > o->write_characters("\\ufffd", 6); > } > else > { > o->write_characters("\xEF\xBF\xBD", 3); > } > break; > } > > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 632, __extension__ __PRETTY_FUNCTION__)); > } > } > } > > private: ># 646 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 > inline unsigned int count_digits(number_unsigned_t x) noexcept > { > unsigned int n_digits = 1; > for (;;) > { > if (x < 10) > { > return n_digits; > } > if (x < 100) > { > return n_digits + 1; > } > if (x < 1000) > { > return n_digits + 2; > } > if (x < 10000) > { > return n_digits + 3; > } > x = x / 10000u; > n_digits += 4; > } > } > > > > > > > static std::string hex_bytes(std::uint8_t byte) > { > std::string result = "FF"; > constexpr const char* nibble_to_hex = "0123456789ABCDEF"; > result[0] = nibble_to_hex[byte / 16]; > result[1] = nibble_to_hex[byte % 16]; > return result; > } > > > template <typename NumberType, enable_if_t<std::is_signed<NumberType>::value, int> = 0> > bool is_negative_number(NumberType x) > { > return x < 0; > } > > template < typename NumberType, enable_if_t <std::is_unsigned<NumberType>::value, int > = 0 > > bool is_negative_number(NumberType ) > { > return false; > } ># 708 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 > template < typename NumberType, detail::enable_if_t < > std::is_integral<NumberType>::value || > std::is_same<NumberType, number_unsigned_t>::value || > std::is_same<NumberType, number_integer_t>::value || > std::is_same<NumberType, binary_char_t>::value, > int > = 0 > > void dump_integer(NumberType x) > { > static constexpr std::array<std::array<char, 2>, 100> digits_to_99 > { > { > {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, > {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, > {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, > {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, > {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, > {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, > {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, > {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, > {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, > {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, > } > }; > > > if (x == 0) > { > o->write_character('0'); > return; > } > > > auto buffer_ptr = number_buffer.begin(); > > number_unsigned_t abs_value; > > unsigned int n_chars{}; > > if (is_negative_number(x)) > { > *buffer_ptr = '-'; > abs_value = remove_sign(static_cast<number_integer_t>(x)); > > > n_chars = 1 + count_digits(abs_value); > } > else > { > abs_value = static_cast<number_unsigned_t>(x); > n_chars = count_digits(abs_value); > } > > > (static_cast <bool> (n_chars < number_buffer.size() - 1) ? void (0) : __assert_fail ("n_chars < number_buffer.size() - 1", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 761, __extension__ __PRETTY_FUNCTION__)); > > > > buffer_ptr += n_chars; > > > > while (abs_value >= 100) > { > const auto digits_index = static_cast<unsigned>((abs_value % 100)); > abs_value /= 100; > *(--buffer_ptr) = digits_to_99[digits_index][1]; > *(--buffer_ptr) = digits_to_99[digits_index][0]; > } > > if (abs_value >= 10) > { > const auto digits_index = static_cast<unsigned>(abs_value); > *(--buffer_ptr) = digits_to_99[digits_index][1]; > *(--buffer_ptr) = digits_to_99[digits_index][0]; > } > else > { > *(--buffer_ptr) = static_cast<char>('0' + abs_value); > } > > o->write_characters(number_buffer.data(), n_chars); > } ># 799 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 > void dump_float(number_float_t x) > { > > if (!std::isfinite(x)) > { > o->write_characters("null", 4); > return; > } > > > > > > > static constexpr bool is_ieee_single_or_double > = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || > (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); > > dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); > } > > void dump_float(number_float_t x, std::true_type ) > { > auto* begin = number_buffer.data(); > auto* end = ::nlohmann::detail::to_chars(begin, begin + number_buffer.size(), x); > > o->write_characters(begin, static_cast<size_t>(end - begin)); > } > > void dump_float(number_float_t x, std::false_type ) > { > > static constexpr auto d = std::numeric_limits<number_float_t>::max_digits10; > > > > std::ptrdiff_t len = (std::snprintf)(number_buffer.data(), number_buffer.size(), "%.*g", d, x); > > > (static_cast <bool> (len > 0) ? void (0) : __assert_fail ("len > 0", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 838, __extension__ __PRETTY_FUNCTION__)); > > (static_cast <bool> (static_cast<std::size_t>(len) < number_buffer.size()) ? void (0) : __assert_fail ("static_cast<std::size_t>(len) < number_buffer.size()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 840, __extension__ __PRETTY_FUNCTION__)); > > > if (thousands_sep != '\0') > { > > const auto end = std::remove(number_buffer.begin(), number_buffer.begin() + len, thousands_sep); > std::fill(end, number_buffer.end(), '\0'); > (static_cast <bool> ((end - number_buffer.begin()) <= len) ? void (0) : __assert_fail ("(end - number_buffer.begin()) <= len", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 848, __extension__ __PRETTY_FUNCTION__)); > len = (end - number_buffer.begin()); > } > > > if (decimal_point != '\0' && decimal_point != '.') > { > > const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point); > if (dec_pos != number_buffer.end()) > { > *dec_pos = '.'; > } > } > > o->write_characters(number_buffer.data(), static_cast<std::size_t>(len)); > > > const bool value_is_int_like = > std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1, > [](char c) > { > return c == '.' || c == 'e'; > }); > > if (value_is_int_like) > { > o->write_characters(".0", 2); > } > } ># 900 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 > static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept > { > static const std::array<std::uint8_t, 400> utf8d = > { > { > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, > 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, > 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, > 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, > 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, > 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, > 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, > 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, > 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, > 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 > } > }; > > (static_cast <bool> (byte < utf8d.size()) ? void (0) : __assert_fail ("byte < utf8d.size()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 922, __extension__ __PRETTY_FUNCTION__)); > const std::uint8_t type = utf8d[byte]; > > codep = (state != UTF8_ACCEPT) > ? (byte & 0x3fu) | (codep << 6u) > : (0xFFu >> type) & (byte); > > std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type); > (static_cast <bool> (index < 400) ? void (0) : __assert_fail ("index < 400", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 930, __extension__ __PRETTY_FUNCTION__)); > state = utf8d[index]; > return state; > } > > > > > > > number_unsigned_t remove_sign(number_unsigned_t x) > { > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 942, __extension__ __PRETTY_FUNCTION__)); > return x; > } ># 955 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp" 3 > inline number_unsigned_t remove_sign(number_integer_t x) noexcept > { > (static_cast <bool> (x < 0 && x < (std::numeric_limits<number_integer_t>::max)()) ? void (0) : __assert_fail ("x < 0 && x < (std::numeric_limits<number_integer_t>::max)()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/output/serializer.hpp", 957, __extension__ __PRETTY_FUNCTION__)); > return static_cast<number_unsigned_t>(-(x + 1)) + 1; > } > > private: > > output_adapter_t<char> o = nullptr; > > > std::array<char, 64> number_buffer{{}}; > > > const std::lconv* loc = nullptr; > > const char thousands_sep = '\0'; > > const char decimal_point = '\0'; > > > std::array<char, 512> string_buffer{{}}; > > > const char indent_char; > > string_t indent_string; > > > const error_handler_t error_handler; >}; > >} >} } ># 60 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/ordered_map.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/ordered_map.hpp" 3 > ># 23 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/ordered_map.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { > > > >template <class Key, class T, class IgnoredLess = std::less<Key>, > class Allocator = std::allocator<std::pair<const Key, T>>> > struct ordered_map : std::vector<std::pair<const Key, T>, Allocator> >{ > using key_type = Key; > using mapped_type = T; > using Container = std::vector<std::pair<const Key, T>, Allocator>; > using iterator = typename Container::iterator; > using const_iterator = typename Container::const_iterator; > using size_type = typename Container::size_type; > using value_type = typename Container::value_type; > > using key_compare = std::equal_to<>; > > > > > > > ordered_map() noexcept(noexcept(Container())) : Container{} {} > explicit ordered_map(const Allocator& alloc) noexcept(noexcept(Container(alloc))) : Container{alloc} {} > template <class It> > ordered_map(It first, It last, const Allocator& alloc = Allocator()) > : Container{first, last, alloc} {} > ordered_map(std::initializer_list<value_type> init, const Allocator& alloc = Allocator() ) > : Container{init, alloc} {} > > std::pair<iterator, bool> emplace(const key_type& key, T&& t) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return {it, false}; > } > } > Container::emplace_back(key, std::forward<T>(t)); > return {std::prev(this->end()), true}; > } > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> > std::pair<iterator, bool> emplace(KeyType && key, T && t) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return {it, false}; > } > } > Container::emplace_back(std::forward<KeyType>(key), std::forward<T>(t)); > return {std::prev(this->end()), true}; > } > > T& operator[](const key_type& key) > { > return emplace(key, T{}).first->second; > } > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> > T & operator[](KeyType && key) > { > return emplace(std::forward<KeyType>(key), T{}).first->second; > } > > const T& operator[](const key_type& key) const > { > return at(key); > } > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> > const T & operator[](KeyType && key) const > { > return at(std::forward<KeyType>(key)); > } > > T& at(const key_type& key) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return it->second; > } > } > > throw std::out_of_range("key not found"); > } > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> > T & at(KeyType && key) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return it->second; > } > } > > throw std::out_of_range("key not found"); > } > > const T& at(const key_type& key) const > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return it->second; > } > } > > throw std::out_of_range("key not found"); > } > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> > const T & at(KeyType && key) const > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return it->second; > } > } > > throw std::out_of_range("key not found"); > } > > size_type erase(const key_type& key) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > > for (auto next = it; ++next != this->end(); ++it) > { > it->~value_type(); > new (&*it) value_type{std::move(*next)}; > } > Container::pop_back(); > return 1; > } > } > return 0; > } > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> > size_type erase(KeyType && key) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > > for (auto next = it; ++next != this->end(); ++it) > { > it->~value_type(); > new (&*it) value_type{std::move(*next)}; > } > Container::pop_back(); > return 1; > } > } > return 0; > } > > iterator erase(iterator pos) > { > return erase(pos, std::next(pos)); > } > > iterator erase(iterator first, iterator last) > { > if (first == last) > { > return first; > } > > const auto elements_affected = std::distance(first, last); > const auto offset = std::distance(Container::begin(), first); ># 237 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/ordered_map.hpp" 3 > for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) > { > it->~value_type(); > new (&*it) value_type{std::move(*std::next(it, elements_affected))}; > } > > > > > > > Container::resize(this->size() - static_cast<size_type>(elements_affected)); ># 257 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/ordered_map.hpp" 3 > return Container::begin() + offset; > } > > size_type count(const key_type& key) const > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return 1; > } > } > return 0; > } > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> > size_type count(KeyType && key) const > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return 1; > } > } > return 0; > } > > iterator find(const key_type& key) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return it; > } > } > return Container::end(); > } > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> > iterator find(KeyType && key) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return it; > } > } > return Container::end(); > } > > const_iterator find(const key_type& key) const > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, key)) > { > return it; > } > } > return Container::end(); > } > > std::pair<iterator, bool> insert( value_type&& value ) > { > return emplace(value.first, std::move(value.second)); > } > > std::pair<iterator, bool> insert( const value_type& value ) > { > for (auto it = this->begin(); it != this->end(); ++it) > { > if (m_compare(it->first, value.first)) > { > return {it, false}; > } > } > Container::push_back(value); > return {--this->end(), true}; > } > > template<typename InputIt> > using require_input_iter = typename std::enable_if<std::is_convertible<typename std::iterator_traits<InputIt>::iterator_category, > std::input_iterator_tag>::value>::type; > > template<typename InputIt, typename = require_input_iter<InputIt>> > void insert(InputIt first, InputIt last) > { > for (auto it = first; it != last; ++it) > { > insert(*it); > } > } > >private: > [[no_unique_address]] key_compare m_compare = key_compare(); >}; > >} } ># 63 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 > > ># 1 "/usr/include/c++/13/any" 1 3 ># 32 "/usr/include/c++/13/any" 3 > ># 33 "/usr/include/c++/13/any" 3 ># 42 "/usr/include/c++/13/any" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 55 "/usr/include/c++/13/any" 3 > class bad_any_cast : public bad_cast > { > public: > virtual const char* what() const noexcept { return "bad any_cast"; } > }; > > [[gnu::noreturn]] inline void __throw_bad_any_cast() > { > > throw bad_any_cast{}; > > > > } ># 80 "/usr/include/c++/13/any" 3 > class any > { > > union _Storage > { > constexpr _Storage() : _M_ptr{nullptr} {} > > > _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) > { > reset(); > _Mgr::_S_create(_M_storage, std::forward<_Args>(__args)...); > _M_manager = &_Mgr::_S_manage; > } > > > > template <typename _Tp, typename _Up, typename... _Args, > typename _Mgr = _Manager<_Tp>> > void __do_emplace(initializer_list<_Up> __il, _Args&&... __args) > { > reset(); > _Mgr::_S_create(_M_storage, __il, std::forward<_Args>(__args)...); > _M_manager = &_Mgr::_S_manage; > } > > 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() noexcept : _M_manager(nullptr) { } > > > any(const any& __other) > { > if (!__other.has_value()) > _M_manager = nullptr; > else > { > _Arg __arg; > __arg._M_any = this; > __other._M_manager(_Op_clone, &__other, &__arg); > } > } > > > > > > > any(any&& __other) noexcept > { > if (!__other.has_value()) > _M_manager = nullptr; > else > { > _Arg __arg; > __arg._M_any = this; > __other._M_manager(_Op_xfer, &__other, &__arg); > } > } > > > 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) > : _M_manager(&_Mgr::_S_manage) > { > _Mgr::_S_create(_M_storage, std::forward<_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) > : _M_manager(&_Mgr::_S_manage) > { > _Mgr::_S_create(_M_storage, std::forward<_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) > : _M_manager(&_Mgr::_S_manage) > { > _Mgr::_S_create(_M_storage, __il, std::forward<_Args>(__args)...); > } > > > ~any() { reset(); } > > > > > any& > operator=(const any& __rhs) > { > *this = any(__rhs); > return *this; > } > > > > > > > any& > operator=(any&& __rhs) noexcept > { > if (!__rhs.has_value()) > reset(); > else if (this != &__rhs) > { > reset(); > _Arg __arg; > __arg._M_any = this; > __rhs._M_manager(_Op_xfer, &__rhs, &__arg); > } > return *this; > } > > > template<typename _Tp> > enable_if_t<is_copy_constructible<_Decay_if_not_any<_Tp>>::value, any&> > operator=(_Tp&& __rhs) > { > *this = any(std::forward<_Tp>(__rhs)); > return *this; > } > > > template <typename _Tp, typename... _Args> > __emplace_t<decay_t<_Tp>, _Args...> > emplace(_Args&&... __args) > { > using _VTp = decay_t<_Tp>; > __do_emplace<_VTp>(std::forward<_Args>(__args)...); > return *any::_Manager<_VTp>::_S_access(_M_storage); > } > > > > template <typename _Tp, typename _Up, typename... _Args> > __emplace_t<decay_t<_Tp>, initializer_list<_Up>&, _Args&&...> > emplace(initializer_list<_Up> __il, _Args&&... __args) > { > using _VTp = decay_t<_Tp>; > __do_emplace<_VTp, _Up>(__il, std::forward<_Args>(__args)...); > return *any::_Manager<_VTp>::_S_access(_M_storage); > } > > > > > void reset() noexcept > { > if (has_value()) > { > _M_manager(_Op_destroy, this, nullptr); > _M_manager = nullptr; > } > } > > > void swap(any& __rhs) noexcept > { > if (!has_value() && !__rhs.has_value()) > return; > > if (has_value() && __rhs.has_value()) > { > if (this == &__rhs) > return; > > any __tmp; > _Arg __arg; > __arg._M_any = &__tmp; > __rhs._M_manager(_Op_xfer, &__rhs, &__arg); > __arg._M_any = &__rhs; > _M_manager(_Op_xfer, this, &__arg); > __arg._M_any = this; > __tmp._M_manager(_Op_xfer, &__tmp, &__arg); > } > else > { > any* __empty = !has_value() ? this : &__rhs; > any* __full = !has_value() ? &__rhs : this; > _Arg __arg; > __arg._M_any = __empty; > __full->_M_manager(_Op_xfer, __full, &__arg); > } > } > > > > > bool has_value() const noexcept { return _M_manager != nullptr; } > > > > const type_info& type() const noexcept > { > if (!has_value()) > return typeid(void); > _Arg __arg; > _M_manager(_Op_get_type_info, this, &__arg); > return *__arg._M_typeinfo; > } > > > > template<typename _Tp> > static constexpr bool __is_valid_cast() > { return __or_<is_reference<_Tp>, is_copy_constructible<_Tp>>::value; } > > > 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) > { > void* __addr = &__storage._M_buffer; > ::new (__addr) _Tp(std::forward<_Up>(__value)); > } > > template<typename... _Args> > static void > _S_create(_Storage& __storage, _Args&&... __args) > { > void* __addr = &__storage._M_buffer; > ::new (__addr) _Tp(std::forward<_Args>(__args)...); > } > > static _Tp* > _S_access(const _Storage& __storage) > { > > const void* __addr = &__storage._M_buffer; > return static_cast<_Tp*>(const_cast<void*>(__addr)); > } > }; > > > 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) > { > __storage._M_ptr = new _Tp(std::forward<_Up>(__value)); > } > template<typename... _Args> > static void > _S_create(_Storage& __storage, _Args&&... __args) > { > __storage._M_ptr = new _Tp(std::forward<_Args>(__args)...); > } > static _Tp* > _S_access(const _Storage& __storage) > { > > return static_cast<_Tp*>(__storage._M_ptr); > } > }; > }; > > > inline void swap(any& __x, any& __y) noexcept { __x.swap(__y); } > > > template <typename _Tp, typename... _Args> > inline > enable_if_t<is_constructible_v<any, in_place_type_t<_Tp>, _Args...>, any> > make_any(_Args&&... __args) > { > return any(in_place_type<_Tp>, std::forward<_Args>(__args)...); > } > > > template <typename _Tp, typename _Up, typename... _Args> > inline > 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) > { > return any(in_place_type<_Tp>, __il, std::forward<_Args>(__args)...); > } ># 460 "/usr/include/c++/13/any" 3 > template<typename _ValueType> > inline _ValueType any_cast(const any& __any) > { > using _Up = __remove_cvref_t<_ValueType>; > static_assert(any::__is_valid_cast<_ValueType>(), > "Template argument must be a reference or CopyConstructible type"); > static_assert(is_constructible_v<_ValueType, const _Up&>, > "Template argument must be constructible from a const value."); > auto __p = any_cast<_Up>(&__any); > if (__p) > return static_cast<_ValueType>(*__p); > __throw_bad_any_cast(); > } ># 486 "/usr/include/c++/13/any" 3 > template<typename _ValueType> > inline _ValueType any_cast(any& __any) > { > using _Up = __remove_cvref_t<_ValueType>; > static_assert(any::__is_valid_cast<_ValueType>(), > "Template argument must be a reference or CopyConstructible type"); > static_assert(is_constructible_v<_ValueType, _Up&>, > "Template argument must be constructible from an lvalue."); > auto __p = any_cast<_Up>(&__any); > if (__p) > return static_cast<_ValueType>(*__p); > __throw_bad_any_cast(); > } > > template<typename _ValueType> > inline _ValueType any_cast(any&& __any) > { > using _Up = __remove_cvref_t<_ValueType>; > static_assert(any::__is_valid_cast<_ValueType>(), > "Template argument must be a reference or CopyConstructible type"); > static_assert(is_constructible_v<_ValueType, _Up>, > "Template argument must be constructible from an rvalue."); > auto __p = any_cast<_Up>(&__any); > if (__p) > return static_cast<_ValueType>(std::move(*__p)); > __throw_bad_any_cast(); > } > > > > template<typename _Tp> > void* __any_caster(const any* __any) > { > > > using _Up = remove_cv_t<_Tp>; > > > if constexpr (!is_same_v<decay_t<_Up>, _Up>) > return nullptr; > > else if constexpr (!is_copy_constructible_v<_Up>) > return nullptr; > > else if (__any->_M_manager == &any::_Manager<_Up>::_S_manage > > || __any->type() == typeid(_Tp) > > ) > { > return any::_Manager<_Up>::_S_access(__any->_M_storage); > } > return nullptr; > } ># 553 "/usr/include/c++/13/any" 3 > template<typename _ValueType> > inline const _ValueType* any_cast(const any* __any) noexcept > { > if constexpr (is_object_v<_ValueType>) > if (__any) > return static_cast<_ValueType*>(__any_caster<_ValueType>(__any)); > return nullptr; > } > > template<typename _ValueType> > inline _ValueType* any_cast(any* __any) noexcept > { > if constexpr (is_object_v<_ValueType>) > if (__any) > return static_cast<_ValueType*>(__any_caster<_ValueType>(__any)); > return nullptr; > } > > > template<typename _Tp> > void > any::_Manager_internal<_Tp>:: > _S_manage(_Op __which, const any* __any, _Arg* __arg) > { > > auto __ptr = reinterpret_cast<const _Tp*>(&__any->_M_storage._M_buffer); > switch (__which) > { > case _Op_access: > __arg->_M_obj = const_cast<_Tp*>(__ptr); > break; > case _Op_get_type_info: > > __arg->_M_typeinfo = &typeid(_Tp); > > break; > case _Op_clone: > ::new(&__arg->_M_any->_M_storage._M_buffer) _Tp(*__ptr); > __arg->_M_any->_M_manager = __any->_M_manager; > break; > case _Op_destroy: > __ptr->~_Tp(); > break; > case _Op_xfer: > ::new(&__arg->_M_any->_M_storage._M_buffer) _Tp > (std::move(*const_cast<_Tp*>(__ptr))); > __ptr->~_Tp(); > __arg->_M_any->_M_manager = __any->_M_manager; > const_cast<any*>(__any)->_M_manager = nullptr; > break; > } > } > > template<typename _Tp> > void > any::_Manager_external<_Tp>:: > _S_manage(_Op __which, const any* __any, _Arg* __arg) > { > > auto __ptr = static_cast<const _Tp*>(__any->_M_storage._M_ptr); > switch (__which) > { > case _Op_access: > __arg->_M_obj = const_cast<_Tp*>(__ptr); > break; > case _Op_get_type_info: > > __arg->_M_typeinfo = &typeid(_Tp); > > break; > case _Op_clone: > __arg->_M_any->_M_storage._M_ptr = new _Tp(*__ptr); > __arg->_M_any->_M_manager = __any->_M_manager; > break; > case _Op_destroy: > delete __ptr; > break; > case _Op_xfer: > __arg->_M_any->_M_storage._M_ptr = __any->_M_storage._M_ptr; > __arg->_M_any->_M_manager = __any->_M_manager; > const_cast<any*>(__any)->_M_manager = nullptr; > break; > } > } > > > > namespace __detail::__variant > { > template<typename> struct _Never_valueless_alt; > > > > template<> > struct _Never_valueless_alt<std::any> > : std::true_type > { }; > } > > >} ># 66 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 ># 74 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 >namespace nlohmann { inline namespace json_abi_v3_11_2 { ># 94 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 >template<template<typename, typename, typename...> class ObjectType, template<typename, typename...> class ArrayType, class StringType, class BooleanType, class NumberIntegerType, class NumberUnsignedType, class NumberFloatType, template<typename> class AllocatorType, template<typename, typename = void> class JSONSerializer, class BinaryType> >class basic_json >{ > private: > template<detail::value_t> friend struct detail::external_constructor; > > template<typename> > friend class ::nlohmann::json_pointer; > > > > template<typename BasicJsonType, typename InputType> > friend class ::nlohmann::detail::parser; > friend ::nlohmann::detail::serializer<basic_json>; > template<typename BasicJsonType> > friend class ::nlohmann::detail::iter_impl; > template<typename BasicJsonType, typename CharType> > friend class ::nlohmann::detail::binary_writer; > template<typename BasicJsonType, typename InputType, typename SAX> > friend class ::nlohmann::detail::binary_reader; > template<typename BasicJsonType> > friend class ::nlohmann::detail::json_sax_dom_parser; > template<typename BasicJsonType> > friend class ::nlohmann::detail::json_sax_dom_callback_parser; > friend class ::nlohmann::detail::exception; > > > using basic_json_t = basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>; > > private: > > using lexer = ::nlohmann::detail::lexer_base<basic_json>; > > template<typename InputAdapterType> > static ::nlohmann::detail::parser<basic_json, InputAdapterType> parser( > InputAdapterType adapter, > detail::parser_callback_t<basic_json>cb = nullptr, > const bool allow_exceptions = true, > const bool ignore_comments = false > ) > { > return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter), > std::move(cb), allow_exceptions, ignore_comments); > } > > private: > using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t; > template<typename BasicJsonType> > using internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType>; > template<typename BasicJsonType> > using iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType>; > template<typename Iterator> > using iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator>; > template<typename Base> using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base>; > > template<typename CharType> > using output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType>; > > template<typename InputType> > using binary_reader = ::nlohmann::detail::binary_reader<basic_json, InputType>; > template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>; > > private: > using serializer = ::nlohmann::detail::serializer<basic_json>; > > public: > using value_t = detail::value_t; > > using json_pointer = ::nlohmann::json_pointer<StringType>; > template<typename T, typename SFINAE> > using json_serializer = JSONSerializer<T, SFINAE>; > > using error_handler_t = detail::error_handler_t; > > using cbor_tag_handler_t = detail::cbor_tag_handler_t; > > using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>; > > using input_format_t = detail::input_format_t; > > using json_sax_t = json_sax<basic_json>; ># 184 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > using exception = detail::exception; > using parse_error = detail::parse_error; > using invalid_iterator = detail::invalid_iterator; > using type_error = detail::type_error; > using out_of_range = detail::out_of_range; > using other_error = detail::other_error; ># 204 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > using value_type = basic_json; > > > using reference = value_type&; > > using const_reference = const value_type&; > > > using difference_type = std::ptrdiff_t; > > using size_type = std::size_t; > > > using allocator_type = AllocatorType<basic_json>; > > > using pointer = typename std::allocator_traits<allocator_type>::pointer; > > using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer; > > > using iterator = iter_impl<basic_json>; > > using const_iterator = iter_impl<const basic_json>; > > using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>; > > using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>; > > > > > > > static allocator_type get_allocator() > { > return allocator_type(); > } > > > > __attribute__((__warn_unused_result__)) > static basic_json meta() > { > basic_json result; > > result["copyright"] = "(C) 2013-2022 Niels Lohmann"; > result["name"] = "JSON for Modern C++"; > result["url"] = "https://github.com/nlohmann/json"; > result["version"]["string"] = > detail::concat(std::to_string(3), '.', > std::to_string(11), '.', > std::to_string(2)); > result["version"]["major"] = 3; > result["version"]["minor"] = 11; > result["version"]["patch"] = 2; > > > > > result["platform"] = "linux"; ># 278 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > result["compiler"] = {{"family", "gcc"}, {"version", detail::concat( > std::to_string(13), '.', > std::to_string(0), '.', > std::to_string(1)) > } > }; ># 302 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > result["compiler"]["c++"] = std::to_string(201703L); > > > > return result; > } ># 326 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > using default_object_comparator_t = std::less<>; > > > > > > > using object_t = ObjectType<StringType, > basic_json, > default_object_comparator_t, > AllocatorType<std::pair<const StringType, > basic_json>>>; > > > > using array_t = ArrayType<basic_json, AllocatorType<basic_json>>; > > > > using string_t = StringType; > > > > using boolean_t = BooleanType; > > > > using number_integer_t = NumberIntegerType; > > > > using number_unsigned_t = NumberUnsignedType; > > > > using number_float_t = NumberFloatType; > > > > using binary_t = nlohmann::byte_container_with_subtype<BinaryType>; > > > > using object_comparator_t = detail::actual_object_comparator_t<basic_json>; > > > > private: > > > template<typename T, typename... Args> > __attribute__((__returns_nonnull__)) > static T* create(Args&& ... args) > { > AllocatorType<T> alloc; > using AllocatorTraits = std::allocator_traits<AllocatorType<T>>; > > auto deleter = [&](T * obj) > { > AllocatorTraits::deallocate(alloc, obj, 1); > }; > std::unique_ptr<T, decltype(deleter)> obj(AllocatorTraits::allocate(alloc, 1), deleter); > AllocatorTraits::construct(alloc, obj.get(), std::forward<Args>(args)...); > (static_cast <bool> (obj != nullptr) ? void (0) : __assert_fail ("obj != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 389, __extension__ __PRETTY_FUNCTION__)); > return obj.release(); > } > > > > > > private: ># 423 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > union json_value > { > > object_t* object; > > array_t* array; > > string_t* string; > > binary_t* binary; > > boolean_t boolean; > > number_integer_t number_integer; > > number_unsigned_t number_unsigned; > > number_float_t number_float; > > > json_value() = default; > > json_value(boolean_t v) noexcept : boolean(v) {} > > json_value(number_integer_t v) noexcept : number_integer(v) {} > > json_value(number_unsigned_t v) noexcept : number_unsigned(v) {} > > json_value(number_float_t v) noexcept : number_float(v) {} > > json_value(value_t t) > { > switch (t) > { > case value_t::object: > { > object = create<object_t>(); > break; > } > > case value_t::array: > { > array = create<array_t>(); > break; > } > > case value_t::string: > { > string = create<string_t>(""); > break; > } > > case value_t::binary: > { > binary = create<binary_t>(); > break; > } > > case value_t::boolean: > { > boolean = static_cast<boolean_t>(false); > break; > } > > case value_t::number_integer: > { > number_integer = static_cast<number_integer_t>(0); > break; > } > > case value_t::number_unsigned: > { > number_unsigned = static_cast<number_unsigned_t>(0); > break; > } > > case value_t::number_float: > { > number_float = static_cast<number_float_t>(0.0); > break; > } > > case value_t::null: > { > object = nullptr; > break; > } > > case value_t::discarded: > default: > { > object = nullptr; > if (__builtin_expect (!!(t == value_t::null), 0 )) > { > throw other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.2", nullptr); > } > break; > } > } > } > > > json_value(const string_t& value) : string(create<string_t>(value)) {} > > > json_value(string_t&& value) : string(create<string_t>(std::move(value))) {} > > > json_value(const object_t& value) : object(create<object_t>(value)) {} > > > json_value(object_t&& value) : object(create<object_t>(std::move(value))) {} > > > json_value(const array_t& value) : array(create<array_t>(value)) {} > > > json_value(array_t&& value) : array(create<array_t>(std::move(value))) {} > > > json_value(const typename binary_t::container_type& value) : binary(create<binary_t>(value)) {} > > > json_value(typename binary_t::container_type&& value) : binary(create<binary_t>(std::move(value))) {} > > > json_value(const binary_t& value) : binary(create<binary_t>(value)) {} > > > json_value(binary_t&& value) : binary(create<binary_t>(std::move(value))) {} > > void destroy(value_t t) > { > if (t == value_t::array || t == value_t::object) > { > > std::vector<basic_json> stack; > > > if (t == value_t::array) > { > stack.reserve(array->size()); > std::move(array->begin(), array->end(), std::back_inserter(stack)); > } > else > { > stack.reserve(object->size()); > for (auto&& it : *object) > { > stack.push_back(std::move(it.second)); > } > } > > while (!stack.empty()) > { > > basic_json current_item(std::move(stack.back())); > stack.pop_back(); > > > > if (current_item.is_array()) > { > std::move(current_item.m_value.array->begin(), current_item.m_value.array->end(), std::back_inserter(stack)); > > current_item.m_value.array->clear(); > } > else if (current_item.is_object()) > { > for (auto&& it : *current_item.m_value.object) > { > stack.push_back(std::move(it.second)); > } > > current_item.m_value.object->clear(); > } > > > > } > } > > switch (t) > { > case value_t::object: > { > AllocatorType<object_t> alloc; > std::allocator_traits<decltype(alloc)>::destroy(alloc, object); > std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1); > break; > } > > case value_t::array: > { > AllocatorType<array_t> alloc; > std::allocator_traits<decltype(alloc)>::destroy(alloc, array); > std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1); > break; > } > > case value_t::string: > { > AllocatorType<string_t> alloc; > std::allocator_traits<decltype(alloc)>::destroy(alloc, string); > std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1); > break; > } > > case value_t::binary: > { > AllocatorType<binary_t> alloc; > std::allocator_traits<decltype(alloc)>::destroy(alloc, binary); > std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1); > break; > } > > case value_t::null: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::discarded: > default: > { > break; > } > } > } > }; > > private: ># 672 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > void assert_invariant(bool check_parents = true) const noexcept > { > (static_cast <bool> (m_type != value_t::object || m_value.object != nullptr) ? void (0) : __assert_fail ("m_type != value_t::object || m_value.object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 674, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (m_type != value_t::array || m_value.array != nullptr) ? void (0) : __assert_fail ("m_type != value_t::array || m_value.array != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 675, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (m_type != value_t::string || m_value.string != nullptr) ? void (0) : __assert_fail ("m_type != value_t::string || m_value.string != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 676, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (m_type != value_t::binary || m_value.binary != nullptr) ? void (0) : __assert_fail ("m_type != value_t::binary || m_value.binary != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 677, __extension__ __PRETTY_FUNCTION__)); ># 690 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > static_cast<void>(check_parents); > } > > void set_parents() > { ># 728 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > } > > iterator set_parents(iterator it, typename iterator::difference_type count_set_parents) > { > > > > > > > static_cast<void>(count_set_parents); > > return it; > } > > reference set_parent(reference j, std::size_t old_capacity = static_cast<std::size_t>(-1)) > { ># 775 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > static_cast<void>(j); > static_cast<void>(old_capacity); > > return j; > } > > public: > > > > > > > using parse_event_t = detail::parse_event_t; > > > > using parser_callback_t = detail::parser_callback_t<basic_json>; ># 805 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > basic_json(const value_t v) > : m_type(v), m_value(v) > { > assert_invariant(); > } > > > > basic_json(std::nullptr_t = nullptr) noexcept > : basic_json(value_t::null) > { > assert_invariant(); > } > > > > template < typename CompatibleType, > typename U = detail::uncvref_t<CompatibleType>, > detail::enable_if_t < > !detail::is_basic_json<U>::value && detail::is_compatible_type<basic_json_t, U>::value, int > = 0 > > basic_json(CompatibleType && val) noexcept(noexcept( > JSONSerializer<U>::to_json(std::declval<basic_json_t&>(), > std::forward<CompatibleType>(val)))) > { > JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val)); > set_parents(); > assert_invariant(); > } > > > > template < typename BasicJsonType, > detail::enable_if_t < > detail::is_basic_json<BasicJsonType>::value&& !std::is_same<basic_json, BasicJsonType>::value, int > = 0 > > basic_json(const BasicJsonType& val) > { > using other_boolean_t = typename BasicJsonType::boolean_t; > using other_number_float_t = typename BasicJsonType::number_float_t; > using other_number_integer_t = typename BasicJsonType::number_integer_t; > using other_number_unsigned_t = typename BasicJsonType::number_unsigned_t; > using other_string_t = typename BasicJsonType::string_t; > using other_object_t = typename BasicJsonType::object_t; > using other_array_t = typename BasicJsonType::array_t; > using other_binary_t = typename BasicJsonType::binary_t; > > switch (val.type()) > { > case value_t::boolean: > JSONSerializer<other_boolean_t>::to_json(*this, val.template get<other_boolean_t>()); > break; > case value_t::number_float: > JSONSerializer<other_number_float_t>::to_json(*this, val.template get<other_number_float_t>()); > break; > case value_t::number_integer: > JSONSerializer<other_number_integer_t>::to_json(*this, val.template get<other_number_integer_t>()); > break; > case value_t::number_unsigned: > JSONSerializer<other_number_unsigned_t>::to_json(*this, val.template get<other_number_unsigned_t>()); > break; > case value_t::string: > JSONSerializer<other_string_t>::to_json(*this, val.template get_ref<const other_string_t&>()); > break; > case value_t::object: > JSONSerializer<other_object_t>::to_json(*this, val.template get_ref<const other_object_t&>()); > break; > case value_t::array: > JSONSerializer<other_array_t>::to_json(*this, val.template get_ref<const other_array_t&>()); > break; > case value_t::binary: > JSONSerializer<other_binary_t>::to_json(*this, val.template get_ref<const other_binary_t&>()); > break; > case value_t::null: > *this = nullptr; > break; > case value_t::discarded: > m_type = value_t::discarded; > break; > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 883, __extension__ __PRETTY_FUNCTION__)); > } > (static_cast <bool> (m_type == val.type()) ? void (0) : __assert_fail ("m_type == val.type()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 885, __extension__ __PRETTY_FUNCTION__)); > set_parents(); > assert_invariant(); > } > > > > basic_json(initializer_list_t init, > bool type_deduction = true, > value_t manual_type = value_t::array) > { > > > bool is_an_object = std::all_of(init.begin(), init.end(), > [](const detail::json_ref<basic_json>& element_ref) > { > return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[0].is_string(); > }); > > > if (!type_deduction) > { > > if (manual_type == value_t::array) > { > is_an_object = false; > } > > > if (__builtin_expect (!!(manual_type == value_t::object && !is_an_object), 0 )) > { > throw type_error::create(301, "cannot create object from initializer list", nullptr); > } > } > > if (is_an_object) > { > > m_type = value_t::object; > m_value = value_t::object; > > for (auto& element_ref : init) > { > auto element = element_ref.moved_or_copied(); > m_value.object->emplace( > std::move(*((*element.m_value.array)[0].m_value.string)), > std::move((*element.m_value.array)[1])); > } > } > else > { > > m_type = value_t::array; > m_value.array = create<array_t>(init.begin(), init.end()); > } > > set_parents(); > assert_invariant(); > } > > > > __attribute__((__warn_unused_result__)) > static basic_json binary(const typename binary_t::container_type& init) > { > auto res = basic_json(); > res.m_type = value_t::binary; > res.m_value = init; > return res; > } > > > > __attribute__((__warn_unused_result__)) > static basic_json binary(const typename binary_t::container_type& init, typename binary_t::subtype_type subtype) > { > auto res = basic_json(); > res.m_type = value_t::binary; > res.m_value = binary_t(init, subtype); > return res; > } > > > > __attribute__((__warn_unused_result__)) > static basic_json binary(typename binary_t::container_type&& init) > { > auto res = basic_json(); > res.m_type = value_t::binary; > res.m_value = std::move(init); > return res; > } > > > > __attribute__((__warn_unused_result__)) > static basic_json binary(typename binary_t::container_type&& init, typename binary_t::subtype_type subtype) > { > auto res = basic_json(); > res.m_type = value_t::binary; > res.m_value = binary_t(std::move(init), subtype); > return res; > } > > > > __attribute__((__warn_unused_result__)) > static basic_json array(initializer_list_t init = {}) > { > return basic_json(init, false, value_t::array); > } > > > > __attribute__((__warn_unused_result__)) > static basic_json object(initializer_list_t init = {}) > { > return basic_json(init, false, value_t::object); > } > > > > basic_json(size_type cnt, const basic_json& val) > : m_type(value_t::array) > { > m_value.array = create<array_t>(cnt, val); > set_parents(); > assert_invariant(); > } > > > > template < class InputIT, typename std::enable_if < > std::is_same<InputIT, typename basic_json_t::iterator>::value || > std::is_same<InputIT, typename basic_json_t::const_iterator>::value, int >::type = 0 > > basic_json(InputIT first, InputIT last) > { > (static_cast <bool> (first.m_object != nullptr) ? void (0) : __assert_fail ("first.m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 1022, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (last.m_object != nullptr) ? void (0) : __assert_fail ("last.m_object != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 1023, __extension__ __PRETTY_FUNCTION__)); > > > if (__builtin_expect (!!(first.m_object != last.m_object), 0 )) > { > throw invalid_iterator::create(201, "iterators are not compatible", nullptr); > } > > > m_type = first.m_object->m_type; > > > switch (m_type) > { > case value_t::boolean: > case value_t::number_float: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::string: > { > if (__builtin_expect (!!(!first.m_it.primitive_iterator.is_begin() || !last.m_it.primitive_iterator.is_end()), 0 ) > ) > { > throw invalid_iterator::create(204, "iterators out of range", first.m_object); > } > break; > } > > case value_t::null: > case value_t::object: > case value_t::array: > case value_t::binary: > case value_t::discarded: > default: > break; > } > > switch (m_type) > { > case value_t::number_integer: > { > m_value.number_integer = first.m_object->m_value.number_integer; > break; > } > > case value_t::number_unsigned: > { > m_value.number_unsigned = first.m_object->m_value.number_unsigned; > break; > } > > case value_t::number_float: > { > m_value.number_float = first.m_object->m_value.number_float; > break; > } > > case value_t::boolean: > { > m_value.boolean = first.m_object->m_value.boolean; > break; > } > > case value_t::string: > { > m_value = *first.m_object->m_value.string; > break; > } > > case value_t::object: > { > m_value.object = create<object_t>(first.m_it.object_iterator, > last.m_it.object_iterator); > break; > } > > case value_t::array: > { > m_value.array = create<array_t>(first.m_it.array_iterator, > last.m_it.array_iterator); > break; > } > > case value_t::binary: > { > m_value = *first.m_object->m_value.binary; > break; > } > > case value_t::null: > case value_t::discarded: > default: > throw invalid_iterator::create(206, detail::concat("cannot construct with iterators from ", first.m_object->type_name()), first.m_object); > } > > set_parents(); > assert_invariant(); > } > > > > > > > template<typename JsonRef, > detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>, > std::is_same<typename JsonRef::value_type, basic_json>>::value, int> = 0 > > basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {} > > > > basic_json(const basic_json& other) > : m_type(other.m_type) > { > > other.assert_invariant(); > > switch (m_type) > { > case value_t::object: > { > m_value = *other.m_value.object; > break; > } > > case value_t::array: > { > m_value = *other.m_value.array; > break; > } > > case value_t::string: > { > m_value = *other.m_value.string; > break; > } > > case value_t::boolean: > { > m_value = other.m_value.boolean; > break; > } > > case value_t::number_integer: > { > m_value = other.m_value.number_integer; > break; > } > > case value_t::number_unsigned: > { > m_value = other.m_value.number_unsigned; > break; > } > > case value_t::number_float: > { > m_value = other.m_value.number_float; > break; > } > > case value_t::binary: > { > m_value = *other.m_value.binary; > break; > } > > case value_t::null: > case value_t::discarded: > default: > break; > } > > set_parents(); > assert_invariant(); > } > > > > basic_json(basic_json&& other) noexcept > : m_type(std::move(other.m_type)), > m_value(std::move(other.m_value)) > { > > other.assert_invariant(false); > > > other.m_type = value_t::null; > other.m_value = {}; > > set_parents(); > assert_invariant(); > } > > > > basic_json& operator=(basic_json other) noexcept ( > std::is_nothrow_move_constructible<value_t>::value&& > std::is_nothrow_move_assignable<value_t>::value&& > std::is_nothrow_move_constructible<json_value>::value&& > std::is_nothrow_move_assignable<json_value>::value > ) > { > > other.assert_invariant(); > > using std::swap; > swap(m_type, other.m_type); > swap(m_value, other.m_value); > > set_parents(); > assert_invariant(); > return *this; > } > > > > ~basic_json() noexcept > { > assert_invariant(false); > m_value.destroy(m_type); > } > > > > public: ># 1259 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > string_t dump(const int indent = -1, > const char indent_char = ' ', > const bool ensure_ascii = false, > const error_handler_t error_handler = error_handler_t::strict) const > { > string_t result; > serializer s(detail::output_adapter<char, string_t>(result), indent_char, error_handler); > > if (indent >= 0) > { > s.dump(*this, true, ensure_ascii, static_cast<unsigned int>(indent)); > } > else > { > s.dump(*this, false, ensure_ascii, 0); > } > > return result; > } > > > > constexpr value_t type() const noexcept > { > return m_type; > } > > > > constexpr bool is_primitive() const noexcept > { > return is_null() || is_string() || is_boolean() || is_number() || is_binary(); > } > > > > constexpr bool is_structured() const noexcept > { > return is_array() || is_object(); > } > > > > constexpr bool is_null() const noexcept > { > return m_type == value_t::null; > } > > > > constexpr bool is_boolean() const noexcept > { > return m_type == value_t::boolean; > } > > > > constexpr bool is_number() const noexcept > { > return is_number_integer() || is_number_float(); > } > > > > constexpr bool is_number_integer() const noexcept > { > return m_type == value_t::number_integer || m_type == value_t::number_unsigned; > } > > > > constexpr bool is_number_unsigned() const noexcept > { > return m_type == value_t::number_unsigned; > } > > > > constexpr bool is_number_float() const noexcept > { > return m_type == value_t::number_float; > } > > > > constexpr bool is_object() const noexcept > { > return m_type == value_t::object; > } > > > > constexpr bool is_array() const noexcept > { > return m_type == value_t::array; > } > > > > constexpr bool is_string() const noexcept > { > return m_type == value_t::string; > } > > > > constexpr bool is_binary() const noexcept > { > return m_type == value_t::binary; > } > > > > constexpr bool is_discarded() const noexcept > { > return m_type == value_t::discarded; > } > > > > constexpr operator value_t() const noexcept > { > return m_type; > } > > > > private: > > > > > > boolean_t get_impl(boolean_t* ) const > { > if (__builtin_expect (!!(is_boolean()), 1 )) > { > return m_value.boolean; > } > > throw type_error::create(302, detail::concat("type must be boolean, but is ", type_name()), this); > } > > > object_t* get_impl_ptr(object_t* ) noexcept > { > return is_object() ? m_value.object : nullptr; > } > > > constexpr const object_t* get_impl_ptr(const object_t* ) const noexcept > { > return is_object() ? m_value.object : nullptr; > } > > > array_t* get_impl_ptr(array_t* ) noexcept > { > return is_array() ? m_value.array : nullptr; > } > > > constexpr const array_t* get_impl_ptr(const array_t* ) const noexcept > { > return is_array() ? m_value.array : nullptr; > } > > > string_t* get_impl_ptr(string_t* ) noexcept > { > return is_string() ? m_value.string : nullptr; > } > > > constexpr const string_t* get_impl_ptr(const string_t* ) const noexcept > { > return is_string() ? m_value.string : nullptr; > } > > > boolean_t* get_impl_ptr(boolean_t* ) noexcept > { > return is_boolean() ? &m_value.boolean : nullptr; > } > > > constexpr const boolean_t* get_impl_ptr(const boolean_t* ) const noexcept > { > return is_boolean() ? &m_value.boolean : nullptr; > } > > > number_integer_t* get_impl_ptr(number_integer_t* ) noexcept > { > return is_number_integer() ? &m_value.number_integer : nullptr; > } > > > constexpr const number_integer_t* get_impl_ptr(const number_integer_t* ) const noexcept > { > return is_number_integer() ? &m_value.number_integer : nullptr; > } > > > number_unsigned_t* get_impl_ptr(number_unsigned_t* ) noexcept > { > return is_number_unsigned() ? &m_value.number_unsigned : nullptr; > } > > > constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* ) const noexcept > { > return is_number_unsigned() ? &m_value.number_unsigned : nullptr; > } > > > number_float_t* get_impl_ptr(number_float_t* ) noexcept > { > return is_number_float() ? &m_value.number_float : nullptr; > } > > > constexpr const number_float_t* get_impl_ptr(const number_float_t* ) const noexcept > { > return is_number_float() ? &m_value.number_float : nullptr; > } > > > binary_t* get_impl_ptr(binary_t* ) noexcept > { > return is_binary() ? m_value.binary : nullptr; > } > > > constexpr const binary_t* get_impl_ptr(const binary_t* ) const noexcept > { > return is_binary() ? m_value.binary : nullptr; > } ># 1509 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template<typename ReferenceType, typename ThisType> > static ReferenceType get_ref_impl(ThisType& obj) > { > > auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); > > if (__builtin_expect (!!(ptr != nullptr), 1 )) > { > return *ptr; > } > > throw type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj); > } > > public: > > > > > > > template<typename PointerType, typename std::enable_if< > std::is_pointer<PointerType>::value, int>::type = 0> > auto get_ptr() noexcept -> decltype(std::declval<basic_json_t&>().get_impl_ptr(std::declval<PointerType>())) > { > > return get_impl_ptr(static_cast<PointerType>(nullptr)); > } > > > > template < typename PointerType, typename std::enable_if < > std::is_pointer<PointerType>::value&& > std::is_const<typename std::remove_pointer<PointerType>::type>::value, int >::type = 0 > > constexpr auto get_ptr() const noexcept -> decltype(std::declval<const basic_json_t&>().get_impl_ptr(std::declval<PointerType>())) > { > > return get_impl_ptr(static_cast<PointerType>(nullptr)); > } > > private: ># 1588 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template < typename ValueType, > detail::enable_if_t < > detail::is_default_constructible<ValueType>::value&& > detail::has_from_json<basic_json_t, ValueType>::value, > int > = 0 > > ValueType get_impl(detail::priority_tag<0> ) const noexcept(noexcept( > JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>()))) > { > auto ret = ValueType(); > JSONSerializer<ValueType>::from_json(*this, ret); > return ret; > } ># 1631 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template < typename ValueType, > detail::enable_if_t < > detail::has_non_default_from_json<basic_json_t, ValueType>::value, > int > = 0 > > ValueType get_impl(detail::priority_tag<1> ) const noexcept(noexcept( > JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>()))) > { > return JSONSerializer<ValueType>::from_json(*this); > } ># 1656 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template < typename BasicJsonType, > detail::enable_if_t < > detail::is_basic_json<BasicJsonType>::value, > int > = 0 > > BasicJsonType get_impl(detail::priority_tag<2> ) const > { > return *this; > } ># 1679 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template<typename BasicJsonType, > detail::enable_if_t< > std::is_same<BasicJsonType, basic_json_t>::value, > int> = 0> > basic_json get_impl(detail::priority_tag<3> ) const > { > return *this; > } > > > > > > template<typename PointerType, > detail::enable_if_t< > std::is_pointer<PointerType>::value, > int> = 0> > constexpr auto get_impl(detail::priority_tag<4> ) const noexcept > -> decltype(std::declval<const basic_json_t&>().template get_ptr<PointerType>()) > { > > return get_ptr<PointerType>(); > } > > public: ># 1727 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template < typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>> > > constexpr > > auto get() const noexcept( > noexcept(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))) > -> decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {})) > { > > > > static_assert(!std::is_reference<ValueTypeCV>::value, > "get() cannot be used with reference types, you might want to use get_ref()"); > return get_impl<ValueType>(detail::priority_tag<4> {}); > } ># 1770 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template<typename PointerType, typename std::enable_if< > std::is_pointer<PointerType>::value, int>::type = 0> > auto get() noexcept -> decltype(std::declval<basic_json_t&>().template get_ptr<PointerType>()) > { > > return get_ptr<PointerType>(); > } > > > > template < typename ValueType, > detail::enable_if_t < > !detail::is_basic_json<ValueType>::value&& > detail::has_from_json<basic_json_t, ValueType>::value, > int > = 0 > > ValueType & get_to(ValueType& v) const noexcept(noexcept( > JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v))) > { > JSONSerializer<ValueType>::from_json(*this, v); > return v; > } > > > > template<typename ValueType, > detail::enable_if_t < > detail::is_basic_json<ValueType>::value, > int> = 0> > ValueType & get_to(ValueType& v) const > { > v = *this; > return v; > } > > template < > typename T, std::size_t N, > typename Array = T (&)[N], > detail::enable_if_t < > detail::has_from_json<basic_json_t, Array>::value, int > = 0 > > Array get_to(T (&v)[N]) const > noexcept(noexcept(JSONSerializer<Array>::from_json( > std::declval<const basic_json_t&>(), v))) > { > JSONSerializer<Array>::from_json(*this, v); > return v; > } > > > > template<typename ReferenceType, typename std::enable_if< > std::is_reference<ReferenceType>::value, int>::type = 0> > ReferenceType get_ref() > { > > return get_ref_impl<ReferenceType>(*this); > } > > > > template < typename ReferenceType, typename std::enable_if < > std::is_reference<ReferenceType>::value&& > std::is_const<typename std::remove_reference<ReferenceType>::type>::value, int >::type = 0 > > ReferenceType get_ref() const > { > > return get_ref_impl<ReferenceType>(*this); > } ># 1867 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template < typename ValueType, typename std::enable_if < > detail::conjunction < > detail::negation<std::is_pointer<ValueType>>, > detail::negation<std::is_same<ValueType, std::nullptr_t>>, > detail::negation<std::is_same<ValueType, detail::json_ref<basic_json>>>, > detail::negation<std::is_same<ValueType, typename string_t::value_type>>, > detail::negation<detail::is_basic_json<ValueType>>, > detail::negation<std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>>, > > detail::negation<std::is_same<ValueType, std::string_view>>, > > > detail::negation<std::is_same<ValueType, std::any>>, > > detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType> > >::value, int >::type = 0 > > operator ValueType() const > { > > return get<ValueType>(); > } > > > > binary_t& get_binary() > { > if (!is_binary()) > { > throw type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this); > } > > return *get_ptr<binary_t*>(); > } > > > > const binary_t& get_binary() const > { > if (!is_binary()) > { > throw type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this); > } > > return *get_ptr<const binary_t*>(); > } ># 1926 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > reference at(size_type idx) > { > > if (__builtin_expect (!!(is_array()), 1 )) > { > try > { > return set_parent(m_value.array->at(idx)); > } > catch(std::out_of_range&) > { > > throw out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this); > } > } > else > { > throw type_error::create(304, detail::concat("cannot use at() with ", type_name()), this); > } > } > > > > const_reference at(size_type idx) const > { > > if (__builtin_expect (!!(is_array()), 1 )) > { > try > { > return m_value.array->at(idx); > } > catch(std::out_of_range&) > { > > throw out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this); > } > } > else > { > throw type_error::create(304, detail::concat("cannot use at() with ", type_name()), this); > } > } > > > > reference at(const typename object_t::key_type& key) > { > > if (__builtin_expect (!!(!is_object()), 0 )) > { > throw type_error::create(304, detail::concat("cannot use at() with ", type_name()), this); > } > > auto it = m_value.object->find(key); > if (it == m_value.object->end()) > { > throw out_of_range::create(403, detail::concat("key '", key, "' not found"), this); > } > return set_parent(it->second); > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> > reference at(KeyType && key) > { > > if (__builtin_expect (!!(!is_object()), 0 )) > { > throw type_error::create(304, detail::concat("cannot use at() with ", type_name()), this); > } > > auto it = m_value.object->find(std::forward<KeyType>(key)); > if (it == m_value.object->end()) > { > throw out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this); > } > return set_parent(it->second); > } > > > > const_reference at(const typename object_t::key_type& key) const > { > > if (__builtin_expect (!!(!is_object()), 0 )) > { > throw type_error::create(304, detail::concat("cannot use at() with ", type_name()), this); > } > > auto it = m_value.object->find(key); > if (it == m_value.object->end()) > { > throw out_of_range::create(403, detail::concat("key '", key, "' not found"), this); > } > return it->second; > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> > const_reference at(KeyType && key) const > { > > if (__builtin_expect (!!(!is_object()), 0 )) > { > throw type_error::create(304, detail::concat("cannot use at() with ", type_name()), this); > } > > auto it = m_value.object->find(std::forward<KeyType>(key)); > if (it == m_value.object->end()) > { > throw out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this); > } > return it->second; > } > > > > reference operator[](size_type idx) > { > > if (is_null()) > { > m_type = value_t::array; > m_value.array = create<array_t>(); > assert_invariant(); > } > > > if (__builtin_expect (!!(is_array()), 1 )) > { > > if (idx >= m_value.array->size()) > { > > > > > > m_value.array->resize(idx + 1); ># 2083 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > assert_invariant(); > } > > return m_value.array->operator[](idx); > } > > throw type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this); > } > > > > const_reference operator[](size_type idx) const > { > > if (__builtin_expect (!!(is_array()), 1 )) > { > return m_value.array->operator[](idx); > } > > throw type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this); > } > > > > reference operator[](typename object_t::key_type key) > { > > if (is_null()) > { > m_type = value_t::object; > m_value.object = create<object_t>(); > assert_invariant(); > } > > > if (__builtin_expect (!!(is_object()), 1 )) > { > auto result = m_value.object->emplace(std::move(key), nullptr); > return set_parent(result.first->second); > } > > throw type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this); > } > > > > const_reference operator[](const typename object_t::key_type& key) const > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > auto it = m_value.object->find(key); > (static_cast <bool> (it != m_value.object->end()) ? void (0) : __assert_fail ("it != m_value.object->end()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 2135, __extension__ __PRETTY_FUNCTION__)); > return it->second; > } > > throw type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this); > } > > > > template<typename T> > reference operator[](T* key) > { > return operator[](typename object_t::key_type(key)); > } > > template<typename T> > const_reference operator[](T* key) const > { > return operator[](typename object_t::key_type(key)); > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int > = 0 > > reference operator[](KeyType && key) > { > > if (is_null()) > { > m_type = value_t::object; > m_value.object = create<object_t>(); > assert_invariant(); > } > > > if (__builtin_expect (!!(is_object()), 1 )) > { > auto result = m_value.object->emplace(std::forward<KeyType>(key), nullptr); > return set_parent(result.first->second); > } > > throw type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this); > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int > = 0 > > const_reference operator[](KeyType && key) const > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > auto it = m_value.object->find(std::forward<KeyType>(key)); > (static_cast <bool> (it != m_value.object->end()) ? void (0) : __assert_fail ("it != m_value.object->end()", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 2190, __extension__ __PRETTY_FUNCTION__)); > return it->second; > } > > throw type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this); > } > > private: > template<typename KeyType> > using is_comparable_with_object_key = detail::is_comparable < > object_comparator_t, const typename object_t::key_type&, KeyType >; > > template<typename ValueType> > using value_return_type = std::conditional < > detail::is_c_string_uncvref<ValueType>::value, > string_t, typename std::decay<ValueType>::type >; > > public: > > > template < class ValueType, detail::enable_if_t < > !detail::is_transparent<object_comparator_t>::value > && detail::is_getable<basic_json_t, ValueType>::value > && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > > ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > > const auto it = find(key); > if (it != end()) > { > return it->template get<ValueType>(); > } > > return default_value; > } > > throw type_error::create(306, detail::concat("cannot use value() with ", type_name()), this); > } > > > > template < class ValueType, class ReturnType = typename value_return_type<ValueType>::type, > detail::enable_if_t < > !detail::is_transparent<object_comparator_t>::value > && detail::is_getable<basic_json_t, ReturnType>::value > && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > > ReturnType value(const typename object_t::key_type& key, ValueType && default_value) const > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > > const auto it = find(key); > if (it != end()) > { > return it->template get<ReturnType>(); > } > > return std::forward<ValueType>(default_value); > } > > throw type_error::create(306, detail::concat("cannot use value() with ", type_name()), this); > } > > > > template < class ValueType, class KeyType, detail::enable_if_t < > detail::is_transparent<object_comparator_t>::value > && !detail::is_json_pointer<KeyType>::value > && is_comparable_with_object_key<KeyType>::value > && detail::is_getable<basic_json_t, ValueType>::value > && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > > ValueType value(KeyType && key, const ValueType& default_value) const > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > > const auto it = find(std::forward<KeyType>(key)); > if (it != end()) > { > return it->template get<ValueType>(); > } > > return default_value; > } > > throw type_error::create(306, detail::concat("cannot use value() with ", type_name()), this); > } > > > > template < class ValueType, class KeyType, class ReturnType = typename value_return_type<ValueType>::type, > detail::enable_if_t < > detail::is_transparent<object_comparator_t>::value > && !detail::is_json_pointer<KeyType>::value > && is_comparable_with_object_key<KeyType>::value > && detail::is_getable<basic_json_t, ReturnType>::value > && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > > ReturnType value(KeyType && key, ValueType && default_value) const > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > > const auto it = find(std::forward<KeyType>(key)); > if (it != end()) > { > return it->template get<ReturnType>(); > } > > return std::forward<ValueType>(default_value); > } > > throw type_error::create(306, detail::concat("cannot use value() with ", type_name()), this); > } > > > > template < class ValueType, detail::enable_if_t < > detail::is_getable<basic_json_t, ValueType>::value > && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > > ValueType value(const json_pointer& ptr, const ValueType& default_value) const > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > > try > { > return ptr.get_checked(this).template get<ValueType>(); > } > catch(out_of_range&) > { > return default_value; > } > } > > throw type_error::create(306, detail::concat("cannot use value() with ", type_name()), this); > } > > > > template < class ValueType, class ReturnType = typename value_return_type<ValueType>::type, > detail::enable_if_t < > detail::is_getable<basic_json_t, ReturnType>::value > && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > > ReturnType value(const json_pointer& ptr, ValueType && default_value) const > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > > try > { > return ptr.get_checked(this).template get<ReturnType>(); > } > catch(out_of_range&) > { > return std::forward<ValueType>(default_value); > } > } > > throw type_error::create(306, detail::concat("cannot use value() with ", type_name()), this); > } > > template < class ValueType, class BasicJsonType, detail::enable_if_t < > detail::is_basic_json<BasicJsonType>::value > && detail::is_getable<basic_json_t, ValueType>::value > && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > > __attribute__((__deprecated__("Since " "3.11.0" "; use " "basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>"))) > ValueType value(const ::nlohmann::json_pointer<BasicJsonType>& ptr, const ValueType& default_value) const > { > return value(ptr.convert(), default_value); > } > > template < class ValueType, class BasicJsonType, class ReturnType = typename value_return_type<ValueType>::type, > detail::enable_if_t < > detail::is_basic_json<BasicJsonType>::value > && detail::is_getable<basic_json_t, ReturnType>::value > && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > > __attribute__((__deprecated__("Since " "3.11.0" "; use " "basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>"))) > ReturnType value(const ::nlohmann::json_pointer<BasicJsonType>& ptr, ValueType && default_value) const > { > return value(ptr.convert(), std::forward<ValueType>(default_value)); > } > > > > reference front() > { > return *begin(); > } > > > > const_reference front() const > { > return *cbegin(); > } > > > > reference back() > { > auto tmp = end(); > --tmp; > return *tmp; > } > > > > const_reference back() const > { > auto tmp = cend(); > --tmp; > return *tmp; > } > > > > template < class IteratorType, detail::enable_if_t < > std::is_same<IteratorType, typename basic_json_t::iterator>::value || > std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int > = 0 > > IteratorType erase(IteratorType pos) > { > > if (__builtin_expect (!!(this != pos.m_object), 0 )) > { > throw invalid_iterator::create(202, "iterator does not fit current value", this); > } > > IteratorType result = end(); > > switch (m_type) > { > case value_t::boolean: > case value_t::number_float: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::string: > case value_t::binary: > { > if (__builtin_expect (!!(!pos.m_it.primitive_iterator.is_begin()), 0 )) > { > throw invalid_iterator::create(205, "iterator out of range", this); > } > > if (is_string()) > { > AllocatorType<string_t> alloc; > std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string); > std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1); > m_value.string = nullptr; > } > else if (is_binary()) > { > AllocatorType<binary_t> alloc; > std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.binary); > std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.binary, 1); > m_value.binary = nullptr; > } > > m_type = value_t::null; > assert_invariant(); > break; > } > > case value_t::object: > { > result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator); > break; > } > > case value_t::array: > { > result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator); > break; > } > > case value_t::null: > case value_t::discarded: > default: > throw type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this); > } > > return result; > } > > > > template < class IteratorType, detail::enable_if_t < > std::is_same<IteratorType, typename basic_json_t::iterator>::value || > std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int > = 0 > > IteratorType erase(IteratorType first, IteratorType last) > { > > if (__builtin_expect (!!(this != first.m_object || this != last.m_object), 0 )) > { > throw invalid_iterator::create(203, "iterators do not fit current value", this); > } > > IteratorType result = end(); > > switch (m_type) > { > case value_t::boolean: > case value_t::number_float: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::string: > case value_t::binary: > { > if (__builtin_expect (!!(!first.m_it.primitive_iterator.is_begin() || !last.m_it.primitive_iterator.is_end()), 1 ) > ) > { > throw invalid_iterator::create(204, "iterators out of range", this); > } > > if (is_string()) > { > AllocatorType<string_t> alloc; > std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string); > std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1); > m_value.string = nullptr; > } > else if (is_binary()) > { > AllocatorType<binary_t> alloc; > std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.binary); > std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.binary, 1); > m_value.binary = nullptr; > } > > m_type = value_t::null; > assert_invariant(); > break; > } > > case value_t::object: > { > result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator, > last.m_it.object_iterator); > break; > } > > case value_t::array: > { > result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator, > last.m_it.array_iterator); > break; > } > > case value_t::null: > case value_t::discarded: > default: > throw type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this); > } > > return result; > } > > private: > template < typename KeyType, detail::enable_if_t < > detail::has_erase_with_key_type<basic_json_t, KeyType>::value, int > = 0 > > size_type erase_internal(KeyType && key) > { > > if (__builtin_expect (!!(!is_object()), 0 )) > { > throw type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this); > } > > return m_value.object->erase(std::forward<KeyType>(key)); > } > > template < typename KeyType, detail::enable_if_t < > !detail::has_erase_with_key_type<basic_json_t, KeyType>::value, int > = 0 > > size_type erase_internal(KeyType && key) > { > > if (__builtin_expect (!!(!is_object()), 0 )) > { > throw type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this); > } > > const auto it = m_value.object->find(std::forward<KeyType>(key)); > if (it != m_value.object->end()) > { > m_value.object->erase(it); > return 1; > } > return 0; > } > > public: > > > > size_type erase(const typename object_t::key_type& key) > { > > > return erase_internal(key); > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> > size_type erase(KeyType && key) > { > return erase_internal(std::forward<KeyType>(key)); > } > > > > void erase(const size_type idx) > { > > if (__builtin_expect (!!(is_array()), 1 )) > { > if (__builtin_expect (!!(idx >= size()), 0 )) > { > throw out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this); > } > > m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx)); > } > else > { > throw type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this); > } > } ># 2640 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > iterator find(const typename object_t::key_type& key) > { > auto result = end(); > > if (is_object()) > { > result.m_it.object_iterator = m_value.object->find(key); > } > > return result; > } > > > > const_iterator find(const typename object_t::key_type& key) const > { > auto result = cend(); > > if (is_object()) > { > result.m_it.object_iterator = m_value.object->find(key); > } > > return result; > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> > iterator find(KeyType && key) > { > auto result = end(); > > if (is_object()) > { > result.m_it.object_iterator = m_value.object->find(std::forward<KeyType>(key)); > } > > return result; > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> > const_iterator find(KeyType && key) const > { > auto result = cend(); > > if (is_object()) > { > result.m_it.object_iterator = m_value.object->find(std::forward<KeyType>(key)); > } > > return result; > } > > > > size_type count(const typename object_t::key_type& key) const > { > > return is_object() ? m_value.object->count(key) : 0; > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> > size_type count(KeyType && key) const > { > > return is_object() ? m_value.object->count(std::forward<KeyType>(key)) : 0; > } > > > > bool contains(const typename object_t::key_type& key) const > { > return is_object() && m_value.object->find(key) != m_value.object->end(); > } > > > > template<class KeyType, detail::enable_if_t< > detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> > bool contains(KeyType && key) const > { > return is_object() && m_value.object->find(std::forward<KeyType>(key)) != m_value.object->end(); > } > > > > bool contains(const json_pointer& ptr) const > { > return ptr.contains(this); > } > > template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> > __attribute__((__deprecated__("Since " "3.11.0" "; use " "basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>"))) > bool contains(const typename ::nlohmann::json_pointer<BasicJsonType>& ptr) const > { > return ptr.contains(this); > } ># 2758 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > iterator begin() noexcept > { > iterator result(this); > result.set_begin(); > return result; > } > > > > const_iterator begin() const noexcept > { > return cbegin(); > } > > > > const_iterator cbegin() const noexcept > { > const_iterator result(this); > result.set_begin(); > return result; > } > > > > iterator end() noexcept > { > iterator result(this); > result.set_end(); > return result; > } > > > > const_iterator end() const noexcept > { > return cend(); > } > > > > const_iterator cend() const noexcept > { > const_iterator result(this); > result.set_end(); > return result; > } > > > > reverse_iterator rbegin() noexcept > { > return reverse_iterator(end()); > } > > > > const_reverse_iterator rbegin() const noexcept > { > return crbegin(); > } > > > > reverse_iterator rend() noexcept > { > return reverse_iterator(begin()); > } > > > > const_reverse_iterator rend() const noexcept > { > return crend(); > } > > > > const_reverse_iterator crbegin() const noexcept > { > return const_reverse_iterator(cend()); > } > > > > const_reverse_iterator crend() const noexcept > { > return const_reverse_iterator(cbegin()); > } > > public: > > > > > > __attribute__((__deprecated__("Since " "3.1.0" "; use " "items()"))) > static iteration_proxy<iterator> iterator_wrapper(reference ref) noexcept > { > return ref.items(); > } > > > > > > > __attribute__((__deprecated__("Since " "3.1.0" "; use " "items()"))) > static iteration_proxy<const_iterator> iterator_wrapper(const_reference ref) noexcept > { > return ref.items(); > } > > > > iteration_proxy<iterator> items() noexcept > { > return iteration_proxy<iterator>(*this); > } > > > > iteration_proxy<const_iterator> items() const noexcept > { > return iteration_proxy<const_iterator>(*this); > } ># 2897 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > bool empty() const noexcept > { > switch (m_type) > { > case value_t::null: > { > > return true; > } > > case value_t::array: > { > > return m_value.array->empty(); > } > > case value_t::object: > { > > return m_value.object->empty(); > } > > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > > return false; > } > } > } > > > > size_type size() const noexcept > { > switch (m_type) > { > case value_t::null: > { > > return 0; > } > > case value_t::array: > { > > return m_value.array->size(); > } > > case value_t::object: > { > > return m_value.object->size(); > } > > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > > return 1; > } > } > } > > > > size_type max_size() const noexcept > { > switch (m_type) > { > case value_t::array: > { > > return m_value.array->max_size(); > } > > case value_t::object: > { > > return m_value.object->max_size(); > } > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > > return size(); > } > } > } ># 3019 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > void clear() noexcept > { > switch (m_type) > { > case value_t::number_integer: > { > m_value.number_integer = 0; > break; > } > > case value_t::number_unsigned: > { > m_value.number_unsigned = 0; > break; > } > > case value_t::number_float: > { > m_value.number_float = 0.0; > break; > } > > case value_t::boolean: > { > m_value.boolean = false; > break; > } > > case value_t::string: > { > m_value.string->clear(); > break; > } > > case value_t::binary: > { > m_value.binary->clear(); > break; > } > > case value_t::array: > { > m_value.array->clear(); > break; > } > > case value_t::object: > { > m_value.object->clear(); > break; > } > > case value_t::null: > case value_t::discarded: > default: > break; > } > } > > > > void push_back(basic_json&& val) > { > > if (__builtin_expect (!!(!(is_null() || is_array())), 0 )) > { > throw type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this); > } > > > if (is_null()) > { > m_type = value_t::array; > m_value = value_t::array; > assert_invariant(); > } > > > const auto old_capacity = m_value.array->capacity(); > m_value.array->push_back(std::move(val)); > set_parent(m_value.array->back(), old_capacity); > > } > > > > reference operator+=(basic_json&& val) > { > push_back(std::move(val)); > return *this; > } > > > > void push_back(const basic_json& val) > { > > if (__builtin_expect (!!(!(is_null() || is_array())), 0 )) > { > throw type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this); > } > > > if (is_null()) > { > m_type = value_t::array; > m_value = value_t::array; > assert_invariant(); > } > > > const auto old_capacity = m_value.array->capacity(); > m_value.array->push_back(val); > set_parent(m_value.array->back(), old_capacity); > } > > > > reference operator+=(const basic_json& val) > { > push_back(val); > return *this; > } > > > > void push_back(const typename object_t::value_type& val) > { > > if (__builtin_expect (!!(!(is_null() || is_object())), 0 )) > { > throw type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this); > } > > > if (is_null()) > { > m_type = value_t::object; > m_value = value_t::object; > assert_invariant(); > } > > > auto res = m_value.object->insert(val); > set_parent(res.first->second); > } > > > > reference operator+=(const typename object_t::value_type& val) > { > push_back(val); > return *this; > } > > > > void push_back(initializer_list_t init) > { > if (is_object() && init.size() == 2 && (*init.begin())->is_string()) > { > basic_json&& key = init.begin()->moved_or_copied(); > push_back(typename object_t::value_type( > std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied())); > } > else > { > push_back(basic_json(init)); > } > } > > > > reference operator+=(initializer_list_t init) > { > push_back(init); > return *this; > } > > > > template<class... Args> > reference emplace_back(Args&& ... args) > { > > if (__builtin_expect (!!(!(is_null() || is_array())), 0 )) > { > throw type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this); > } > > > if (is_null()) > { > m_type = value_t::array; > m_value = value_t::array; > assert_invariant(); > } > > > const auto old_capacity = m_value.array->capacity(); > m_value.array->emplace_back(std::forward<Args>(args)...); > return set_parent(m_value.array->back(), old_capacity); > } > > > > template<class... Args> > std::pair<iterator, bool> emplace(Args&& ... args) > { > > if (__builtin_expect (!!(!(is_null() || is_object())), 0 )) > { > throw type_error::create(311, detail::concat("cannot use emplace() with ", type_name()), this); > } > > > if (is_null()) > { > m_type = value_t::object; > m_value = value_t::object; > assert_invariant(); > } > > > auto res = m_value.object->emplace(std::forward<Args>(args)...); > set_parent(res.first->second); > > > auto it = begin(); > it.m_it.object_iterator = res.first; > > > return {it, res.second}; > } > > > > > template<typename... Args> > iterator insert_iterator(const_iterator pos, Args&& ... args) > { > iterator result(this); > (static_cast <bool> (m_value.array != nullptr) ? void (0) : __assert_fail ("m_value.array != nullptr", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 3261, __extension__ __PRETTY_FUNCTION__)); > > auto insert_pos = std::distance(m_value.array->begin(), pos.m_it.array_iterator); > m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...); > result.m_it.array_iterator = m_value.array->begin() + insert_pos; > > > > > > set_parents(); > return result; > } > > > > iterator insert(const_iterator pos, const basic_json& val) > { > > if (__builtin_expect (!!(is_array()), 1 )) > { > > if (__builtin_expect (!!(pos.m_object != this), 0 )) > { > throw invalid_iterator::create(202, "iterator does not fit current value", this); > } > > > return insert_iterator(pos, val); > } > > throw type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this); > } > > > > iterator insert(const_iterator pos, basic_json&& val) > { > return insert(pos, val); > } > > > > iterator insert(const_iterator pos, size_type cnt, const basic_json& val) > { > > if (__builtin_expect (!!(is_array()), 1 )) > { > > if (__builtin_expect (!!(pos.m_object != this), 0 )) > { > throw invalid_iterator::create(202, "iterator does not fit current value", this); > } > > > return insert_iterator(pos, cnt, val); > } > > throw type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this); > } > > > > iterator insert(const_iterator pos, const_iterator first, const_iterator last) > { > > if (__builtin_expect (!!(!is_array()), 0 )) > { > throw type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this); > } > > > if (__builtin_expect (!!(pos.m_object != this), 0 )) > { > throw invalid_iterator::create(202, "iterator does not fit current value", this); > } > > > if (__builtin_expect (!!(first.m_object != last.m_object), 0 )) > { > throw invalid_iterator::create(210, "iterators do not fit", this); > } > > if (__builtin_expect (!!(first.m_object == this), 0 )) > { > throw invalid_iterator::create(211, "passed iterators may not belong to container", this); > } > > > return insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator); > } > > > > iterator insert(const_iterator pos, initializer_list_t ilist) > { > > if (__builtin_expect (!!(!is_array()), 0 )) > { > throw type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this); > } > > > if (__builtin_expect (!!(pos.m_object != this), 0 )) > { > throw invalid_iterator::create(202, "iterator does not fit current value", this); > } > > > return insert_iterator(pos, ilist.begin(), ilist.end()); > } > > > > void insert(const_iterator first, const_iterator last) > { > > if (__builtin_expect (!!(!is_object()), 0 )) > { > throw type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this); > } > > > if (__builtin_expect (!!(first.m_object != last.m_object), 0 )) > { > throw invalid_iterator::create(210, "iterators do not fit", this); > } > > > if (__builtin_expect (!!(!first.m_object->is_object()), 0 )) > { > throw invalid_iterator::create(202, "iterators first and last must point to objects", this); > } > > m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); > } > > > > void update(const_reference j, bool merge_objects = false) > { > update(j.begin(), j.end(), merge_objects); > } > > > > void update(const_iterator first, const_iterator last, bool merge_objects = false) > { > > if (is_null()) > { > m_type = value_t::object; > m_value.object = create<object_t>(); > assert_invariant(); > } > > if (__builtin_expect (!!(!is_object()), 0 )) > { > throw type_error::create(312, detail::concat("cannot use update() with ", type_name()), this); > } > > > if (__builtin_expect (!!(first.m_object != last.m_object), 0 )) > { > throw invalid_iterator::create(210, "iterators do not fit", this); > } > > > if (__builtin_expect (!!(!first.m_object->is_object()), 0 )) > { > throw type_error::create(312, detail::concat("cannot use update() with ", first.m_object->type_name()), first.m_object); > } > > for (auto it = first; it != last; ++it) > { > if (merge_objects && it.value().is_object()) > { > auto it2 = m_value.object->find(it.key()); > if (it2 != m_value.object->end()) > { > it2->second.update(it.value(), true); > continue; > } > } > m_value.object->operator[](it.key()) = it.value(); > > > > } > } > > > > void swap(reference other) noexcept ( > std::is_nothrow_move_constructible<value_t>::value&& > std::is_nothrow_move_assignable<value_t>::value&& > std::is_nothrow_move_constructible<json_value>::value&& > std::is_nothrow_move_assignable<json_value>::value > ) > { > std::swap(m_type, other.m_type); > std::swap(m_value, other.m_value); > > set_parents(); > other.set_parents(); > assert_invariant(); > } > > > > friend void swap(reference left, reference right) noexcept ( > std::is_nothrow_move_constructible<value_t>::value&& > std::is_nothrow_move_assignable<value_t>::value&& > std::is_nothrow_move_constructible<json_value>::value&& > std::is_nothrow_move_assignable<json_value>::value > ) > { > left.swap(right); > } > > > > void swap(array_t& other) > { > > if (__builtin_expect (!!(is_array()), 1 )) > { > using std::swap; > swap(*(m_value.array), other); > } > else > { > throw type_error::create(310, detail::concat("cannot use swap(array_t&) with ", type_name()), this); > } > } > > > > void swap(object_t& other) > { > > if (__builtin_expect (!!(is_object()), 1 )) > { > using std::swap; > swap(*(m_value.object), other); > } > else > { > throw type_error::create(310, detail::concat("cannot use swap(object_t&) with ", type_name()), this); > } > } > > > > void swap(string_t& other) > { > > if (__builtin_expect (!!(is_string()), 1 )) > { > using std::swap; > swap(*(m_value.string), other); > } > else > { > throw type_error::create(310, detail::concat("cannot use swap(string_t&) with ", type_name()), this); > } > } > > > > void swap(binary_t& other) > { > > if (__builtin_expect (!!(is_binary()), 1 )) > { > using std::swap; > swap(*(m_value.binary), other); > } > else > { > throw type_error::create(310, detail::concat("cannot use swap(binary_t&) with ", type_name()), this); > } > } > > > > void swap(typename binary_t::container_type& other) > { > > if (__builtin_expect (!!(is_binary()), 1 )) > { > using std::swap; > swap(*(m_value.binary), other); > } > else > { > throw type_error::create(310, detail::concat("cannot use swap(binary_t::container_type&) with ", type_name()), this); > } > } ># 3643 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > private: > > > > > > static bool compares_unordered(const_reference lhs, const_reference rhs, bool inverse = false) noexcept > { > if ((lhs.is_number_float() && std::isnan(lhs.m_value.number_float) && rhs.is_number()) > || (rhs.is_number_float() && std::isnan(rhs.m_value.number_float) && lhs.is_number())) > { > return true; > } > > > > static_cast<void>(inverse); > return lhs.is_discarded() || rhs.is_discarded(); > > } > > private: > bool compares_unordered(const_reference rhs, bool inverse = false) const noexcept > { > return compares_unordered(*this, rhs, inverse); > } > > public: ># 3778 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > friend bool operator==(const_reference lhs, const_reference rhs) noexcept > { > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wfloat-equal" > > const auto lhs_type = lhs.type(); const auto rhs_type = rhs.type(); if (lhs_type == rhs_type) { switch (lhs_type) { case value_t::array: return (*lhs.m_value.array) == (*rhs.m_value.array); case value_t::object: return (*lhs.m_value.object) == (*rhs.m_value.object); case value_t::null: return (true); case value_t::string: return (*lhs.m_value.string) == (*rhs.m_value.string); case value_t::boolean: return (lhs.m_value.boolean) == (rhs.m_value.boolean); case value_t::number_integer: return (lhs.m_value.number_integer) == (rhs.m_value.number_integer); case value_t::number_unsigned: return (lhs.m_value.number_unsigned) == (rhs.m_value.number_unsigned); case value_t::number_float: return (lhs.m_value.number_float) == (rhs.m_value.number_float); case value_t::binary: return (*lhs.m_value.binary) == (*rhs.m_value.binary); case value_t::discarded: default: return (false); } } else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_float) { return static_cast<number_float_t>(lhs.m_value.number_integer) == rhs.m_value.number_float; } else if (lhs_type == value_t::number_float && rhs_type == value_t::number_integer) { return lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_integer); } else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_float) { return static_cast<number_float_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_float; } else if (lhs_type == value_t::number_float && rhs_type == value_t::number_unsigned) { return lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_unsigned); } else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_integer) { return static_cast<number_integer_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_integer; } else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_unsigned) { return lhs.m_value.number_integer == static_cast<number_integer_t>(rhs.m_value.number_unsigned); } else if(compares_unordered(lhs, rhs)) { return (false); } return (false); > > ># 3786 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 >#pragma GCC diagnostic pop > > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator==(const_reference lhs, ScalarType rhs) noexcept > { > return lhs == basic_json(rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator==(ScalarType lhs, const_reference rhs) noexcept > { > return basic_json(lhs) == rhs; > } > > > > friend bool operator!=(const_reference lhs, const_reference rhs) noexcept > { > if (compares_unordered(lhs, rhs, true)) > { > return false; > } > return !(lhs == rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator!=(const_reference lhs, ScalarType rhs) noexcept > { > return lhs != basic_json(rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator!=(ScalarType lhs, const_reference rhs) noexcept > { > return basic_json(lhs) != rhs; > } > > > > friend bool operator<(const_reference lhs, const_reference rhs) noexcept > { > > > > const auto lhs_type = lhs.type(); const auto rhs_type = rhs.type(); if (lhs_type == rhs_type) { switch (lhs_type) { case value_t::array: return (*lhs.m_value.array) < (*rhs.m_value.array); case value_t::object: return (*lhs.m_value.object) < (*rhs.m_value.object); case value_t::null: return (false); case value_t::string: return (*lhs.m_value.string) < (*rhs.m_value.string); case value_t::boolean: return (lhs.m_value.boolean) < (rhs.m_value.boolean); case value_t::number_integer: return (lhs.m_value.number_integer) < (rhs.m_value.number_integer); case value_t::number_unsigned: return (lhs.m_value.number_unsigned) < (rhs.m_value.number_unsigned); case value_t::number_float: return (lhs.m_value.number_float) < (rhs.m_value.number_float); case value_t::binary: return (*lhs.m_value.binary) < (*rhs.m_value.binary); case value_t::discarded: default: return (false); } } else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_float) { return static_cast<number_float_t>(lhs.m_value.number_integer) < rhs.m_value.number_float; } else if (lhs_type == value_t::number_float && rhs_type == value_t::number_integer) { return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_integer); } else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_float) { return static_cast<number_float_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_float; } else if (lhs_type == value_t::number_float && rhs_type == value_t::number_unsigned) { return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_unsigned); } else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_integer) { return static_cast<number_integer_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_integer; } else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_unsigned) { return lhs.m_value.number_integer < static_cast<number_integer_t>(rhs.m_value.number_unsigned); } else if(compares_unordered(lhs, rhs)) { return (false); } return (operator<(lhs_type, rhs_type)); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator<(const_reference lhs, ScalarType rhs) noexcept > { > return lhs < basic_json(rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator<(ScalarType lhs, const_reference rhs) noexcept > { > return basic_json(lhs) < rhs; > } > > > > friend bool operator<=(const_reference lhs, const_reference rhs) noexcept > { > if (compares_unordered(lhs, rhs, true)) > { > return false; > } > return !(rhs < lhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator<=(const_reference lhs, ScalarType rhs) noexcept > { > return lhs <= basic_json(rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator<=(ScalarType lhs, const_reference rhs) noexcept > { > return basic_json(lhs) <= rhs; > } > > > > friend bool operator>(const_reference lhs, const_reference rhs) noexcept > { > > if (compares_unordered(lhs, rhs)) > { > return false; > } > return !(lhs <= rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator>(const_reference lhs, ScalarType rhs) noexcept > { > return lhs > basic_json(rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator>(ScalarType lhs, const_reference rhs) noexcept > { > return basic_json(lhs) > rhs; > } > > > > friend bool operator>=(const_reference lhs, const_reference rhs) noexcept > { > if (compares_unordered(lhs, rhs, true)) > { > return false; > } > return !(lhs < rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator>=(const_reference lhs, ScalarType rhs) noexcept > { > return lhs >= basic_json(rhs); > } > > > > template<typename ScalarType, typename std::enable_if< > std::is_scalar<ScalarType>::value, int>::type = 0> > friend bool operator>=(ScalarType lhs, const_reference rhs) noexcept > { > return basic_json(lhs) >= rhs; > } ># 3967 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > friend std::ostream& operator<<(std::ostream& o, const basic_json& j) > { > > const bool pretty_print = o.width() > 0; > const auto indentation = pretty_print ? o.width() : 0; > > > o.width(0); > > > serializer s(detail::output_adapter<char>(o), o.fill()); > s.dump(j, pretty_print, false, static_cast<unsigned int>(indentation)); > return o; > } > > > > > > > > __attribute__((__deprecated__("Since " "3.0.0" "; use " "operator<<(std::ostream&, const basic_json&)"))) > friend std::ostream& operator>>(const basic_json& j, std::ostream& o) > { > return o << j; > } ># 4006 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > template<typename InputType> > __attribute__((__warn_unused_result__)) > static basic_json parse(InputType&& i, > const parser_callback_t cb = nullptr, > const bool allow_exceptions = true, > const bool ignore_comments = false) > { > basic_json result; > parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); > return result; > } > > > > template<typename IteratorType> > __attribute__((__warn_unused_result__)) > static basic_json parse(IteratorType first, > IteratorType last, > const parser_callback_t cb = nullptr, > const bool allow_exceptions = true, > const bool ignore_comments = false) > { > basic_json result; > parser(detail::input_adapter(std::move(first), std::move(last)), cb, allow_exceptions, ignore_comments).parse(true, result); > return result; > } > > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "parse(ptr, ptr + len)"))) > static basic_json parse(detail::span_input_adapter&& i, > const parser_callback_t cb = nullptr, > const bool allow_exceptions = true, > const bool ignore_comments = false) > { > basic_json result; > parser(i.get(), cb, allow_exceptions, ignore_comments).parse(true, result); > return result; > } > > > > template<typename InputType> > static bool accept(InputType&& i, > const bool ignore_comments = false) > { > return parser(detail::input_adapter(std::forward<InputType>(i)), nullptr, false, ignore_comments).accept(true); > } > > > > template<typename IteratorType> > static bool accept(IteratorType first, IteratorType last, > const bool ignore_comments = false) > { > return parser(detail::input_adapter(std::move(first), std::move(last)), nullptr, false, ignore_comments).accept(true); > } > > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "accept(ptr, ptr + len)"))) > static bool accept(detail::span_input_adapter&& i, > const bool ignore_comments = false) > { > return parser(i.get(), nullptr, false, ignore_comments).accept(true); > } > > > > template <typename InputType, typename SAX> > __attribute__((__nonnull__(2))) > static bool sax_parse(InputType&& i, SAX* sax, > input_format_t format = input_format_t::json, > const bool strict = true, > const bool ignore_comments = false) > { > auto ia = detail::input_adapter(std::forward<InputType>(i)); > return format == input_format_t::json > ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) > : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict); > } > > > > template<class IteratorType, class SAX> > __attribute__((__nonnull__(3))) > static bool sax_parse(IteratorType first, IteratorType last, SAX* sax, > input_format_t format = input_format_t::json, > const bool strict = true, > const bool ignore_comments = false) > { > auto ia = detail::input_adapter(std::move(first), std::move(last)); > return format == input_format_t::json > ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) > : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict); > } > > > > > > > template <typename SAX> > __attribute__((__deprecated__("Since " "3.8.0" "; use " "sax_parse(ptr, ptr + len, ...)"))) > __attribute__((__nonnull__(2))) > static bool sax_parse(detail::span_input_adapter&& i, SAX* sax, > input_format_t format = input_format_t::json, > const bool strict = true, > const bool ignore_comments = false) > { > auto ia = i.get(); > return format == input_format_t::json > > ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) > > : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict); > } > > > > > > > > __attribute__((__deprecated__("Since " "3.0.0" "; use " "operator>>(std::istream&, basic_json&)"))) > friend std::istream& operator<<(basic_json& j, std::istream& i) > { > return operator>>(i, j); > } > > > > friend std::istream& operator>>(std::istream& i, basic_json& j) > { > parser(detail::input_adapter(i)).parse(false, j); > return i; > } ># 4150 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > __attribute__((__returns_nonnull__)) > const char* type_name() const noexcept > { > switch (m_type) > { > case value_t::null: > return "null"; > case value_t::object: > return "object"; > case value_t::array: > return "array"; > case value_t::string: > return "string"; > case value_t::boolean: > return "boolean"; > case value_t::binary: > return "binary"; > case value_t::discarded: > return "discarded"; > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > default: > return "number"; > } > } > > > private: > > > > > > value_t m_type = value_t::null; > > > json_value m_value = {}; ># 4201 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > public: > > > static std::vector<std::uint8_t> to_cbor(const basic_json& j) > { > std::vector<std::uint8_t> result; > to_cbor(j, result); > return result; > } > > > > static void to_cbor(const basic_json& j, detail::output_adapter<std::uint8_t> o) > { > binary_writer<std::uint8_t>(o).write_cbor(j); > } > > > > static void to_cbor(const basic_json& j, detail::output_adapter<char> o) > { > binary_writer<char>(o).write_cbor(j); > } > > > > static std::vector<std::uint8_t> to_msgpack(const basic_json& j) > { > std::vector<std::uint8_t> result; > to_msgpack(j, result); > return result; > } > > > > static void to_msgpack(const basic_json& j, detail::output_adapter<std::uint8_t> o) > { > binary_writer<std::uint8_t>(o).write_msgpack(j); > } > > > > static void to_msgpack(const basic_json& j, detail::output_adapter<char> o) > { > binary_writer<char>(o).write_msgpack(j); > } > > > > static std::vector<std::uint8_t> to_ubjson(const basic_json& j, > const bool use_size = false, > const bool use_type = false) > { > std::vector<std::uint8_t> result; > to_ubjson(j, result, use_size, use_type); > return result; > } > > > > static void to_ubjson(const basic_json& j, detail::output_adapter<std::uint8_t> o, > const bool use_size = false, const bool use_type = false) > { > binary_writer<std::uint8_t>(o).write_ubjson(j, use_size, use_type); > } > > > > static void to_ubjson(const basic_json& j, detail::output_adapter<char> o, > const bool use_size = false, const bool use_type = false) > { > binary_writer<char>(o).write_ubjson(j, use_size, use_type); > } > > > > static std::vector<std::uint8_t> to_bjdata(const basic_json& j, > const bool use_size = false, > const bool use_type = false) > { > std::vector<std::uint8_t> result; > to_bjdata(j, result, use_size, use_type); > return result; > } > > > > static void to_bjdata(const basic_json& j, detail::output_adapter<std::uint8_t> o, > const bool use_size = false, const bool use_type = false) > { > binary_writer<std::uint8_t>(o).write_ubjson(j, use_size, use_type, true, true); > } > > > > static void to_bjdata(const basic_json& j, detail::output_adapter<char> o, > const bool use_size = false, const bool use_type = false) > { > binary_writer<char>(o).write_ubjson(j, use_size, use_type, true, true); > } > > > > static std::vector<std::uint8_t> to_bson(const basic_json& j) > { > std::vector<std::uint8_t> result; > to_bson(j, result); > return result; > } > > > > static void to_bson(const basic_json& j, detail::output_adapter<std::uint8_t> o) > { > binary_writer<std::uint8_t>(o).write_bson(j); > } > > > > static void to_bson(const basic_json& j, detail::output_adapter<char> o) > { > binary_writer<char>(o).write_bson(j); > } > > > > template<typename InputType> > __attribute__((__warn_unused_result__)) > static basic_json from_cbor(InputType&& i, > const bool strict = true, > const bool allow_exceptions = true, > const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::forward<InputType>(i)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); > return res ? result : basic_json(value_t::discarded); > } > > > > template<typename IteratorType> > __attribute__((__warn_unused_result__)) > static basic_json from_cbor(IteratorType first, IteratorType last, > const bool strict = true, > const bool allow_exceptions = true, > const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::move(first), std::move(last)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); > return res ? result : basic_json(value_t::discarded); > } > > template<typename T> > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "from_cbor(ptr, ptr + len)"))) > static basic_json from_cbor(const T* ptr, std::size_t len, > const bool strict = true, > const bool allow_exceptions = true, > const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) > { > return from_cbor(ptr, ptr + len, strict, allow_exceptions, tag_handler); > } > > > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "from_cbor(ptr, ptr + len)"))) > static basic_json from_cbor(detail::span_input_adapter&& i, > const bool strict = true, > const bool allow_exceptions = true, > const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = i.get(); > > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); > return res ? result : basic_json(value_t::discarded); > } > > > > template<typename InputType> > __attribute__((__warn_unused_result__)) > static basic_json from_msgpack(InputType&& i, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::forward<InputType>(i)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > > > template<typename IteratorType> > __attribute__((__warn_unused_result__)) > static basic_json from_msgpack(IteratorType first, IteratorType last, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::move(first), std::move(last)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > template<typename T> > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "from_msgpack(ptr, ptr + len)"))) > static basic_json from_msgpack(const T* ptr, std::size_t len, > const bool strict = true, > const bool allow_exceptions = true) > { > return from_msgpack(ptr, ptr + len, strict, allow_exceptions); > } > > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "from_msgpack(ptr, ptr + len)"))) > static basic_json from_msgpack(detail::span_input_adapter&& i, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = i.get(); > > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > > > template<typename InputType> > __attribute__((__warn_unused_result__)) > static basic_json from_ubjson(InputType&& i, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::forward<InputType>(i)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > > > template<typename IteratorType> > __attribute__((__warn_unused_result__)) > static basic_json from_ubjson(IteratorType first, IteratorType last, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::move(first), std::move(last)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > template<typename T> > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "from_ubjson(ptr, ptr + len)"))) > static basic_json from_ubjson(const T* ptr, std::size_t len, > const bool strict = true, > const bool allow_exceptions = true) > { > return from_ubjson(ptr, ptr + len, strict, allow_exceptions); > } > > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "from_ubjson(ptr, ptr + len)"))) > static basic_json from_ubjson(detail::span_input_adapter&& i, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = i.get(); > > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > > > > template<typename InputType> > __attribute__((__warn_unused_result__)) > static basic_json from_bjdata(InputType&& i, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::forward<InputType>(i)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bjdata).sax_parse(input_format_t::bjdata, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > > > template<typename IteratorType> > __attribute__((__warn_unused_result__)) > static basic_json from_bjdata(IteratorType first, IteratorType last, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::move(first), std::move(last)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bjdata).sax_parse(input_format_t::bjdata, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > > > template<typename InputType> > __attribute__((__warn_unused_result__)) > static basic_json from_bson(InputType&& i, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::forward<InputType>(i)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > > > template<typename IteratorType> > __attribute__((__warn_unused_result__)) > static basic_json from_bson(IteratorType first, IteratorType last, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = detail::input_adapter(std::move(first), std::move(last)); > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } > > template<typename T> > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "from_bson(ptr, ptr + len)"))) > static basic_json from_bson(const T* ptr, std::size_t len, > const bool strict = true, > const bool allow_exceptions = true) > { > return from_bson(ptr, ptr + len, strict, allow_exceptions); > } > > __attribute__((__warn_unused_result__)) > __attribute__((__deprecated__("Since " "3.8.0" "; use " "from_bson(ptr, ptr + len)"))) > static basic_json from_bson(detail::span_input_adapter&& i, > const bool strict = true, > const bool allow_exceptions = true) > { > basic_json result; > detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); > auto ia = i.get(); > > const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); > return res ? result : basic_json(value_t::discarded); > } ># 4587 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > reference operator[](const json_pointer& ptr) > { > return ptr.get_unchecked(this); > } > > template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> > __attribute__((__deprecated__("Since " "3.11.0" "; use " "basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>"))) > reference operator[](const ::nlohmann::json_pointer<BasicJsonType>& ptr) > { > return ptr.get_unchecked(this); > } > > > > const_reference operator[](const json_pointer& ptr) const > { > return ptr.get_unchecked(this); > } > > template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> > __attribute__((__deprecated__("Since " "3.11.0" "; use " "basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>"))) > const_reference operator[](const ::nlohmann::json_pointer<BasicJsonType>& ptr) const > { > return ptr.get_unchecked(this); > } > > > > reference at(const json_pointer& ptr) > { > return ptr.get_checked(this); > } > > template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> > __attribute__((__deprecated__("Since " "3.11.0" "; use " "basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>"))) > reference at(const ::nlohmann::json_pointer<BasicJsonType>& ptr) > { > return ptr.get_checked(this); > } > > > > const_reference at(const json_pointer& ptr) const > { > return ptr.get_checked(this); > } > > template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> > __attribute__((__deprecated__("Since " "3.11.0" "; use " "basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>"))) > const_reference at(const ::nlohmann::json_pointer<BasicJsonType>& ptr) const > { > return ptr.get_checked(this); > } > > > > basic_json flatten() const > { > basic_json result(value_t::object); > json_pointer::flatten("", *this, result); > return result; > } > > > > basic_json unflatten() const > { > return json_pointer::unflatten(*this); > } ># 4668 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > void patch_inplace(const basic_json& json_patch) > { > basic_json& result = *this; > > enum class patch_operations {add, remove, replace, move, copy, test, invalid}; > > const auto get_op = [](const std::string & op) > { > if (op == "add") > { > return patch_operations::add; > } > if (op == "remove") > { > return patch_operations::remove; > } > if (op == "replace") > { > return patch_operations::replace; > } > if (op == "move") > { > return patch_operations::move; > } > if (op == "copy") > { > return patch_operations::copy; > } > if (op == "test") > { > return patch_operations::test; > } > > return patch_operations::invalid; > }; > > > const auto operation_add = [&result](json_pointer & ptr, basic_json val) > { > > if (ptr.empty()) > { > result = val; > return; > } > > > json_pointer top_pointer = ptr.top(); > if (top_pointer != ptr) > { > result.at(top_pointer); > } > > > const auto last_path = ptr.back(); > ptr.pop_back(); > > basic_json& parent = result.at(ptr); > > switch (parent.m_type) > { > case value_t::null: > case value_t::object: > { > > parent[last_path] = val; > break; > } > > case value_t::array: > { > if (last_path == "-") > { > > parent.push_back(val); > } > else > { > const auto idx = json_pointer::template array_index<basic_json_t>(last_path); > if (__builtin_expect (!!(idx > parent.size()), 0 )) > { > > throw out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), &parent); > } > > > parent.insert(parent.begin() + static_cast<difference_type>(idx), val); > } > break; > } > > > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp", 4768, __extension__ __PRETTY_FUNCTION__)); > } > }; > > > const auto operation_remove = [this, &result](json_pointer & ptr) > { > > const auto last_path = ptr.back(); > ptr.pop_back(); > basic_json& parent = result.at(ptr); > > > if (parent.is_object()) > { > > auto it = parent.find(last_path); > if (__builtin_expect (!!(it != parent.end()), 1 )) > { > parent.erase(it); > } > else > { > throw out_of_range::create(403, detail::concat("key '", last_path, "' not found"), this); > } > } > else if (parent.is_array()) > { > > parent.erase(json_pointer::template array_index<basic_json_t>(last_path)); > } > }; > > > if (__builtin_expect (!!(!json_patch.is_array()), 0 )) > { > throw parse_error::create(104, 0, "JSON patch must be an array of objects", &json_patch); > } > > > for (const auto& val : json_patch) > { > > const auto get_value = [&val](const std::string & op, > const std::string & member, > bool string_type) -> basic_json & > { > > auto it = val.m_value.object->find(member); > > > const auto error_msg = (op == "op") ? "operation" : detail::concat("operation '", op, '\''); > > > if (__builtin_expect (!!(it == val.m_value.object->end()), 0 )) > { > > throw parse_error::create(105, 0, detail::concat(error_msg, " must have member '", member, "'"), &val); > } > > > if (__builtin_expect (!!(string_type && !it->second.is_string()), 0 )) > { > > throw parse_error::create(105, 0, detail::concat(error_msg, " must have string member '", member, "'"), &val); > } > > > return it->second; > }; > > > if (__builtin_expect (!!(!val.is_object()), 0 )) > { > throw parse_error::create(104, 0, "JSON patch must be an array of objects", &val); > } > > > const auto op = get_value("op", "op", true).template get<std::string>(); > const auto path = get_value(op, "path", true).template get<std::string>(); > json_pointer ptr(path); > > switch (get_op(op)) > { > case patch_operations::add: > { > operation_add(ptr, get_value("add", "value", false)); > break; > } > > case patch_operations::remove: > { > operation_remove(ptr); > break; > } > > case patch_operations::replace: > { > > result.at(ptr) = get_value("replace", "value", false); > break; > } > > case patch_operations::move: > { > const auto from_path = get_value("move", "from", true).template get<std::string>(); > json_pointer from_ptr(from_path); > > > basic_json v = result.at(from_ptr); > > > > > > operation_remove(from_ptr); > operation_add(ptr, v); > break; > } > > case patch_operations::copy: > { > const auto from_path = get_value("copy", "from", true).template get<std::string>(); > const json_pointer from_ptr(from_path); > > > basic_json v = result.at(from_ptr); > > > > > operation_add(ptr, v); > break; > } > > case patch_operations::test: > { > bool success = false; > try > { > > > success = (result.at(ptr) == get_value("test", "value", false)); > } > catch(out_of_range&) > { > > } > > > if (__builtin_expect (!!(!success), 0 )) > { > throw other_error::create(501, detail::concat("unsuccessful: ", val.dump()), &val); > } > > break; > } > > case patch_operations::invalid: > default: > { > > > throw parse_error::create(105, 0, detail::concat("operation value '", op, "' is invalid"), &val); > } > } > } > } > > > > basic_json patch(const basic_json& json_patch) const > { > basic_json result = *this; > result.patch_inplace(json_patch); > return result; > } > > > > __attribute__((__warn_unused_result__)) > static basic_json diff(const basic_json& source, const basic_json& target, > const std::string& path = "") > { > > basic_json result(value_t::array); > > > if (source == target) > { > return result; > } > > if (source.type() != target.type()) > { > > result.push_back( > { > {"op", "replace"}, {"path", path}, {"value", target} > }); > return result; > } > > switch (source.type()) > { > case value_t::array: > { > > std::size_t i = 0; > while (i < source.size() && i < target.size()) > { > > auto temp_diff = diff(source[i], target[i], detail::concat(path, '/', std::to_string(i))); > result.insert(result.end(), temp_diff.begin(), temp_diff.end()); > ++i; > } > > > > > > const auto end_index = static_cast<difference_type>(result.size()); > while (i < source.size()) > { > > > result.insert(result.begin() + end_index, object( > { > {"op", "remove"}, > {"path", detail::concat(path, '/', std::to_string(i))} > })); > ++i; > } > > > while (i < target.size()) > { > result.push_back( > { > {"op", "add"}, > {"path", detail::concat(path, "/-")}, > {"value", target[i]} > }); > ++i; > } > > break; > } > > case value_t::object: > { > > for (auto it = source.cbegin(); it != source.cend(); ++it) > { > > const auto path_key = detail::concat(path, '/', detail::escape(it.key())); > > if (target.find(it.key()) != target.end()) > { > > auto temp_diff = diff(it.value(), target[it.key()], path_key); > result.insert(result.end(), temp_diff.begin(), temp_diff.end()); > } > else > { > > result.push_back(object( > { > {"op", "remove"}, {"path", path_key} > })); > } > } > > > for (auto it = target.cbegin(); it != target.cend(); ++it) > { > if (source.find(it.key()) == source.end()) > { > > const auto path_key = detail::concat(path, '/', detail::escape(it.key())); > result.push_back( > { > {"op", "add"}, {"path", path_key}, > {"value", it.value()} > }); > } > } > > break; > } > > case value_t::null: > case value_t::string: > case value_t::boolean: > case value_t::number_integer: > case value_t::number_unsigned: > case value_t::number_float: > case value_t::binary: > case value_t::discarded: > default: > { > > result.push_back( > { > {"op", "replace"}, {"path", path}, {"value", target} > }); > break; > } > } > > return result; > } ># 5091 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 3 > void merge_patch(const basic_json& apply_patch) > { > if (apply_patch.is_object()) > { > if (!is_object()) > { > *this = object(); > } > for (auto it = apply_patch.begin(); it != apply_patch.end(); ++it) > { > if (it.value().is_null()) > { > erase(it.key()); > } > else > { > operator[](it.key()).merge_patch(it.value()); > } > } > } > else > { > *this = apply_patch; > } > } > > >}; > > > >template<template<typename, typename, typename...> class ObjectType, template<typename, typename...> class ArrayType, class StringType, class BooleanType, class NumberIntegerType, class NumberUnsignedType, class NumberFloatType, template<typename> class AllocatorType, template<typename, typename = void> class JSONSerializer, class BinaryType> >std::string to_string(const basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>& j) >{ > return j.dump(); >} > >inline namespace literals >{ >inline namespace json_literals >{ > > > >__attribute__((__nonnull__(1))) >inline nlohmann::json operator "" _json(const char* s, std::size_t n) >{ > return nlohmann::json::parse(s, s + n); >} > > > >__attribute__((__nonnull__(1))) >inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) >{ > return nlohmann::json::json_pointer(std::string(s, n)); >} > >} >} >} } > > > > > >namespace std >{ > > > >template<template<typename, typename, typename...> class ObjectType, template<typename, typename...> class ArrayType, class StringType, class BooleanType, class NumberIntegerType, class NumberUnsignedType, class NumberFloatType, template<typename> class AllocatorType, template<typename, typename = void> class JSONSerializer, class BinaryType> >struct hash<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType> > >{ > std::size_t operator()(const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>& j) const > { > return nlohmann::detail::hash(j); > } >}; > > >template<> >struct less< ::nlohmann::detail::value_t> >{ > > > > > bool operator()(::nlohmann::detail::value_t lhs, > ::nlohmann::detail::value_t rhs) const noexcept > { > > > > return ::nlohmann::detail::operator<(lhs, rhs); > > } >}; > > > > > > >template<template<typename, typename, typename...> class ObjectType, template<typename, typename...> class ArrayType, class StringType, class BooleanType, class NumberIntegerType, class NumberUnsignedType, class NumberFloatType, template<typename> class AllocatorType, template<typename, typename = void> class JSONSerializer, class BinaryType> >inline void swap(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>& j1, nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>& j2) noexcept( > is_nothrow_move_constructible<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType> >::value&& > is_nothrow_move_assignable<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType> >::value) >{ > j1.swap(j2); >} > > > >} > > > using nlohmann::literals::json_literals::operator "" _json; > using nlohmann::literals::json_literals::operator "" _json_pointer; > > ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_unscope.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_unscope.hpp" 3 > ># 44 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_unscope.hpp" 3 ># 1 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley_undef.hpp" 1 3 ># 9 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/thirdparty/hedley/hedley_undef.hpp" 3 > ># 45 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/detail/macro_unscope.hpp" 2 3 ># 5213 "../../subprojects/edfst/subprojects/facile/3pty/nlohmann/include/nlohmann/json.hpp" 2 3 ># 26 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" 1 3 > > > > > > >namespace facile >{ >namespace PhaseContext >{ >struct Element { > virtual ~Element() {} > > virtual inline std::ostream& > print(std::ostream& o) const = 0; > > protected: > Element() {} >}; > >static struct ElementsToken {} >Elements; > >struct Block { > virtual ~Block() {} > > virtual inline std::ostream& > print(std::ostream& o) const = 0; > > protected: > Block() {} >}; > >static struct BlocksToken {} >Blocks; > >class Registry { >using ElementSet = std::unordered_set<loan<Element>, loan_hash<Element>>; >using BlockSet = std::unordered_set<loan<Block>, loan_hash<Block>>; > >public: > void > addElement(loan<Element> e) { _elements.emplace(e); } > > void > removeElement(loan<Element> e) { _elements.erase(e); } > > void > addBlock(loan<Block> b) { _blocks.emplace(b); } > > void > removeBlock(loan<Block> b) { _blocks.erase(b); } > > > > static loan<Registry> > get() > { > static owner<Registry> instance = owner<Registry>::make(); > > return instance; > } > > static bool > elementsEmpty() { return get()->_elements.empty(); } > > static bool > blocksEmpty() { return get()->_blocks.empty(); } > > static bool > empty() { return get()->_elements.empty() && get()->_blocks.empty(); } > > static void > clear() > { > get()->_blocks.clear(); > get()->_elements.clear(); > } > > static iterable<typename ElementSet::iterator> > iterateElements() > { > return iterable<typename ElementSet::iterator>(get()->_elements); > } > > static iterable<typename BlockSet::iterator> > iterateBlocks() > { > return iterable<typename BlockSet::iterator>(get()->_blocks); > } > > template<typename Stream> > static Stream& > printElements(Stream& o) > { > if (!elementsEmpty()) { > o << ># 97 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" > std::endl ># 97 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" 3 > << " C|"; > for (loan<Element> e : iterateElements()) > o << e << "|"; > o << " "; > } > > return o; > } > > template<typename Stream> > static Stream& > printBlocks(Stream& o) > { > if (!blocksEmpty()) { > o << ># 111 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" > std::endl ># 111 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" 3 > << ># 111 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" > std::endl ># 111 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" 3 > ; > for (loan<Block> b : iterateBlocks()) > o << b << ># 113 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" > std::endl ># 113 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" 3 > << ># 113 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" > std::endl ># 113 "../../subprojects/edfst/subprojects/facile/src/io/PhaseContext.hpp" 3 > ; > } > > return o; > } > >private: > ElementSet _elements; > BlockSet _blocks; >}; > >inline std::ostream& >operator <<(std::ostream& o, const Element& e) >{ > e.print(o); > return o; >} > >inline std::ostream& >operator <<(std::ostream& o, const ElementsToken& b) >{ > return Registry::printElements(o); >} > >inline std::ostream& >operator <<(std::ostream& o, const Block& e) >{ > e.print(o); > return o; >} > >inline std::ostream& >operator <<(std::ostream& o, const BlocksToken& b) >{ > return Registry::printBlocks(o); >} >} >} ># 28 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 1 3 > > > > > > > ># 1 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 1 3 > > > > > > > ># 1 "/home/volet/lab/inria/trace/facile/src/fail/FacileFail.hpp" 1 3 > > ># 3 "/home/volet/lab/inria/trace/facile/src/fail/FacileFail.hpp" 3 ># 9 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 2 3 ># 1 "/home/volet/lab/inria/trace/facile/src/fail/ExceptionWithContext.hpp" 1 3 > > > > > ># 1 "/home/volet/lab/inria/trace/facile/src/fail/SourceCodeFile.hpp" 1 3 > > > > >namespace facile >{ >class SourceCodeFile >{ >public: > SourceCodeFile( ># 10 "/home/volet/lab/inria/trace/facile/src/fail/SourceCodeFile.hpp" > __attribute__((unused)) ># 10 "/home/volet/lab/inria/trace/facile/src/fail/SourceCodeFile.hpp" 3 > nullptr_t null) : > _filename("") > {} > > SourceCodeFile(const char *path) : > _path(path == __null ? boost::filesystem::path() : path), > _directory(path == __null ? boost::filesystem::path() : _path.parent_path()), > _filename(path == __null ? "" : _path.filename().string()) > {} > > SourceCodeFile(const SourceCodeFile& src) : > _path(src._path), > _directory(src._directory), > _filename(src._filename) > {} > > boost::filesystem::path > path() const { return _path; } > > boost::filesystem::path > directory() const { return _directory; } > > std::string > filename() const { return _filename; } > >private: > boost::filesystem::path _path; > boost::filesystem::path _directory; > std::string _filename; >}; >} ># 7 "/home/volet/lab/inria/trace/facile/src/fail/ExceptionWithContext.hpp" 2 3 > > > > >namespace facile >{ >class ExceptionWithContext : > public std::exception { >public: > ExceptionWithContext(const char *file, int line) : > _throw(file, line), > _copy() > {} > > ExceptionWithContext(const char *file, int line, const ExceptionWithContext& e) : > _throw(e._throw), > _copy(file, line) > {} > > > ExceptionWithContext(const ExceptionWithContext& e) : > _throw(e._throw), > _copy(e._copy) > {} > > void > appendThrowContext(std::ostream& o) > { > o << "[at " << _throw.file.filename() << ":" << _throw.line << "] "; > } > > void > appendCopyContext(std::ostream& o) > { > o << "[copied at " << _copy.file.filename() << ":" << _copy.line << "] "; > } > >protected: > struct Location { > Location() : > Location(__null, 0) > {} > > Location(const char *file, int line) : > file(file), > line(line) > {} > > SourceCodeFile file; > int line; > }; > > Location _throw; > Location _copy; >}; >} ># 10 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 2 3 > >namespace facile >{ >class RequireException : > public ExceptionWithContext { >public: > RequireException(const char *file, int line) : > ExceptionWithContext(file, line) > { > ># 19 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" > facile::StreamLog::log(__PRETTY_FUNCTION__, 19, facile::StreamLogLevel::Require) ># 19 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 3 > << "Exception generated on failed `require` "; > appendThrowContext( ># 20 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" > facile::StreamLog::getLogStream(facile::StreamLogLevel::Require) ># 20 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 3 > ); > ># 21 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" > facile::StreamLog::getLogStream(facile::StreamLogLevel::Require) ># 21 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 3 > << ># 21 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" > std::endl ># 21 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 3 > ; > > appendThrowContext(_messageBuffer); > } > > > RequireException(const RequireException& e) : > ExceptionWithContext(e), > _messageBuffer(e._messageBuffer.str()), > _message(e._message) > {} > > static struct require_sentinel_type {} > require_sentinel; > > template<typename T> > RequireException& > operator <<(T const& messageFragment) > { > _messageBuffer << messageFragment; > return *this; > } > > RequireException& > operator<<(std::ostream& (*manipulator)(std::ostream&)) > { > _messageBuffer << manipulator; > return *this; > } > > inline bool > operator <<(require_sentinel_type) > { > RequireException& r = *this; > > if (!PhaseContext::Registry::elementsEmpty()) { > r << " C|"; > for (loan<PhaseContext::Element> e : PhaseContext::Registry::iterateElements()) > r << e << "|"; > r << " "; > } > > if (!PhaseContext::Registry::blocksEmpty()) { > r << ># 64 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" > std::endl ># 64 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 3 > << ># 64 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" > std::endl ># 64 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 3 > ; > for (loan<PhaseContext::Block> b : PhaseContext::Registry::iterateBlocks()) > r << b << ># 66 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" > std::endl ># 66 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 3 > << ># 66 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" > std::endl ># 66 "/home/volet/lab/inria/trace/facile/src/fail/RequireException.hpp" 3 > ; > } > > r.packMessage(); > > throw r; > } > > std::string > getMessage() const { return _message; } > > const char * > what() const noexcept override { return _message.c_str(); } > > std::ostream& > appendMessageTo(std::ostream& o) const > { > o << getMessage(); > return o; > } > >protected: > void > packMessage() > { > _message = _messageBuffer.str(); > _messageBuffer.str(""); > _messageBuffer.clear(); > } > > std::stringstream _messageBuffer; > std::string _message; >}; >} ># 9 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 2 3 > >namespace facile >{ >static struct PackFacileExceptionContext { > std::string > > packContext(loan<std::stringstream> message, loan<std::stringstream> context) const > { > *message << context->str(); > return message->str(); > } >} >packContext; > >static struct PackFacileExceptionMessage { > std::string > packMessage(loan<std::stringstream> message) const > { > return message->str(); > } >} >packMessage; > >class FacileException : > public ExceptionWithContext { >public: > FacileException(const char *file, int line, StreamLogLevel reportingLevel = ># 35 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > facile::StreamLogLevel::Sanity ># 35 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > ) : > FacileException(file, line, 0, reportingLevel) > {} > > FacileException(const char *file, int line, int posix_errno, StreamLogLevel reportingLevel = ># 39 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > facile::StreamLogLevel::Sanity ># 39 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > ) : > ExceptionWithContext(file, line), > _reportingLevel(reportingLevel), > _messageBuffer(owner<std::stringstream>::make()), > _contextBuffer(owner<std::stringstream>::make()), > _message(""), > _posixError(posix_errno) > { > ># 47 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > facile::StreamLog::log(__PRETTY_FUNCTION__, 47, ># 47 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > _reportingLevel ># 47 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > ) ># 47 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > << "Facile library exception generated "; > if (posix_errno != 0) > ># 49 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > facile::StreamLog::getLogStream( ># 49 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > _reportingLevel ># 49 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > ) ># 49 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > << "with posix error " << posix_errno << " "; > appendThrowContext( ># 50 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > facile::StreamLog::getLogStream( ># 50 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > _reportingLevel ># 50 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > ) ># 50 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > ); > ># 51 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > facile::StreamLog::getLogStream( ># 51 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > _reportingLevel ># 51 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > ) ># 51 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > << ># 51 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" > std::endl ># 51 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > ; > > appendThrowContext(*_messageBuffer); > *_contextBuffer << PhaseContext::Elements; > *_contextBuffer << PhaseContext::Blocks; > } ># 75 "../../subprojects/edfst/subprojects/facile/src/fail/FacileException.hpp" 3 > FacileException(const FacileException& e) : > ExceptionWithContext(e), > _reportingLevel(e._reportingLevel), > _messageBuffer(nullptr), > > > _contextBuffer(nullptr), > _message(e._message), > _posixError(e._posixError) > {} > > template<typename T> > FacileException& > operator <<(T const& messageFragment) > { > *_messageBuffer << messageFragment; > return *this; > } > > FacileException& > operator <<(std::ostream& (*manipulator)(std::ostream&)) > { > *_messageBuffer << manipulator; > return *this; > } > > FacileException& > operator <<(PackFacileExceptionContext const& pack) > { > _message = pack.packContext(_messageBuffer, _contextBuffer); > _messageBuffer.reset(); > _contextBuffer.reset(); > > return *this; > } > > FacileException& > operator <<(PackFacileExceptionMessage const& pack) > { > _message = pack.packMessage(_messageBuffer); > _messageBuffer.reset(); > _contextBuffer.reset(); > > return *this; > } > > std::string > getMessage() const > { > if (_messageBuffer == nullptr) > return _message; > else > return _messageBuffer->str(); > } > > const char * > what() const noexcept override > { > if (_messageBuffer != nullptr) > return "<message not packed>"; > else > return _message.c_str(); > } > > StreamLogLevel > reportingLevel() { return _reportingLevel; } > > bool > isPosixError() { return _posixError != 0; } > > int > getPosixError() { return _posixError; } > > const char * > getPosixErrorMessage() const > { > if (_posixError == 0) > return ""; > else > return strerror(_posixError); > } > > std::ostream& > appendMessageTo(std::ostream& o) const > { > o << getMessage(); > if (_posixError != 0) > o << " [" << strerror(_posixError) << "]"; > return o; > } > > void > unpack() > { > _messageBuffer = owner<std::stringstream>::make(); > _messageBuffer << _message; > } > >protected: > StreamLogLevel _reportingLevel; > owner<std::stringstream> _messageBuffer; > owner<std::stringstream> _contextBuffer; > std::string _message; > >private: > int _posixError; >}; >} ># 29 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 > >using namespace point_util; >using json = nlohmann::json; > ># 1 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 1 3 > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/index/TemplateSequence.hpp" 1 3 > > >template<unsigned int ... indices> >struct IndexSequence {}; > >template<unsigned int N, unsigned int ... indices> >struct TemplateSequence : > TemplateSequence<N - 1, N - 1, indices ...> {}; > >template<unsigned int ... indices> >struct TemplateSequence<0, indices ...> : > IndexSequence<indices ...> {}; ># 5 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/NamedVariable.hpp" 1 3 > > > > > > > >namespace facile >{ >struct VariableNameConverter { > using Character = unsigned char; > > > static std::string > toFileCase(const std::string& s) > { > static std::regex uppercase("([A-Z])"); > static VariableNameConverter lowercase; > > std::string inFileCase = std::regex_replace(s, uppercase, "-$1"); > std::transform(inFileCase.begin(), inFileCase.end(), inFileCase.begin(), lowercase); > return inFileCase; > } > > Character > operator () (unsigned char c) { return std::tolower(c); } >}; > >template<typename T> >struct NamedVariable { > const std::string& name; > T& t; > > NamedVariable(const std::string& name, T& t) : > name(name), > t(t) > {} >}; >} ># 6 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 2 3 > >namespace facile >{ >namespace ConfigurationSchema >{ >enum class TupleJunction { > all, > some, > one, > any, > unreachable >}; > >template<typename FieldType, typename FieldValue> >using FieldAssignable = typename std::enable_if_t<std::is_constructible<FieldType, FieldValue>::value>; > >template<typename FieldType, typename FieldValue> >using NotFieldAssignable = typename std::enable_if_t<!std::is_constructible<FieldType, FieldValue>::value>; > >struct PropertyDatumTag {}; >struct PropertyTreeTag {}; > >template<typename T, typename = typename std::enable_if_t<!std::is_reference_v<T>>> >struct PropertyDatum { > using Value = T; > using Tag = PropertyDatumTag; > > PropertyDatum(T& t) : > _value(t) > { > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp", 36) << "unreachable (for type introspection purposes only)" << facile::RequireException::require_sentinel; > } > > PropertyDatum(NamedVariable<Value> field, bool isSpecified = false) : > _key(VariableNameConverter::toFileCase(field.name)), > _value(field.t), > _isSpecified(isSpecified) > { > _value = Default<Value>().value; > } > > template<typename Functor, typename ... Args> > void > dispatch( ># 49 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 49 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > Functor& f, ># 49 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 49 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > Args&& ... args) {} > > std::string > key() const { return _key; } > > handle<Value> > value() const { return _value; } > > bool > isSpecified() const { return _isSpecified; } > > template<typename ValueType, typename = FieldAssignable<Value, ValueType>> > void > specify(ValueType specified) > { > _value = specified; > _isSpecified = true; > } > > template<typename FieldType> > bool > contains(FieldType& field) const { return static_cast<void *>(&_value) == (void *) (&field); } > > private: > const std::string _key; > Value& _value; > bool _isSpecified; >}; > >template<typename T, typename = typename std::enable_if_t<!std::is_reference_v<T>>> >class PropertyTree { >public: > using Value = T; > using Tag = PropertyTreeTag; > > PropertyTree(T& t) : > _t(t) > { > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp", 87) << "unreachable (for type introspection purposes only)" << facile::RequireException::require_sentinel; > } > > PropertyTree(NamedVariable<T> field, bool isSpecified = false) : > _key(VariableNameConverter::toFileCase(field.name)), > _t(field.t), > _isSpecified(isSpecified) > {} > > std::string > key() const { return _key; } > > handle<T> > value() { return handle(_t); } > > TupleJunction > junction() const { return _t.fields.junction(); } > > bool > isSpecified() const { return _isSpecified; } > > void > specify() { _isSpecified = true; } > > template<typename FieldType> > bool > contains(FieldType& field) const { return static_cast<void *>(&_t) == (void *) (&field); } > > template<typename Functor, typename ... Args> > void > dispatch(Functor& f, Args&& ... args) { _t.fields.template dispatch<Functor, Args ...>(f, std::forward<Args>(args) ...); } > > static owner<PropertyTree<T>> > makeRoot(T& field) { return owner<PropertyTree<T>>::make(NamedVariable{ "<root>", field }, true ); } > >private: > const std::string _key; > T& _t; > bool _isSpecified; >}; > >struct IsFieldSpecified { > template<typename Property, typename Type> > bool > operator ()(Property& p, Type& field) { return p.contains(field) && p.isSpecified(); } >}; > >template<typename Property> >using IsPropertyDatum = std::enable_if_t<std::is_same_v<typename Property::Tag, PropertyDatumTag>>; > >template<typename Property> >using IsPropertyTree = std::enable_if_t<std::is_same_v<typename Property::Tag, PropertyTreeTag>>; > >struct SpecifyField { > template<typename PropertyTree, typename Type, > typename = FieldAssignable<typename PropertyTree::Value, Type>> > bool > operator ()(PropertyTree& p, Type& field) > { > if (p.contains(field)) { > p.specify(); > return true; > } else { > return false; > } > } > > template<typename PropertyTree, typename Type, > typename = NotFieldAssignable<typename PropertyTree::Value, Type>> > bool > operator ()( ># 157 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 157 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > PropertyTree& p, ># 157 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 157 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > Type& field, ># 157 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 157 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > int disambiguator = 0) { return false; } > > template<typename Property, typename Type, typename Value, > typename = FieldAssignable<Type, Value>, > typename = FieldAssignable<typename Property::Value, Value>> > bool > operator ()(Property& p, Type& field, Value& value) > { > if (p.contains(field)) { > p.specify(value); > return true; > } else { > return false; > } > } > > template<typename Property, typename Type, typename Value, > typename = NotFieldAssignable<typename Property::Value, Value>> > bool > operator ()( ># 176 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 176 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > Property& t, ># 176 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 176 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > Type& field, ># 176 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 176 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > Value& value, ># 176 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 176 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > int disambiguator = 0) { return false; } >}; > >template<typename ... Types> >class FieldSet { > >template<typename T> >using FieldType = typename std::conditional<is_datum<T>::value, PropertyDatum<T>, PropertyTree<T>>::type; > >using TupleType = std::tuple<FieldType<Types> ...>; > >template<unsigned int index> >using FieldTypeAt = typename std::remove_reference_t<std::tuple_element_t<index, TupleType>>; > >template<unsigned int index> >using ConstFieldTypeAt = typename std::add_const_t<FieldTypeAt<index>>; > >public: > FieldSet() { throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp", 194) << "unreachable" << facile::RequireException::require_sentinel; } > > > FieldSet(NamedVariable<Types> ... links, TupleJunction junction = TupleJunction::any) : > _tuple(std::forward<FieldType<Types>>(links) ...), > _junction(junction) > {} > > template<unsigned int index> > FieldTypeAt<index>& > at() { return std::get<index>(_tuple); } > > template<unsigned int index> > ConstFieldTypeAt<index>& > constAt() const { return std::get<index>(_tuple); } > > template<typename FieldType> > bool > isSpecified(FieldType& field) const > { > IsFieldSpecified query; > return ifAny(TemplateSequence<Size>{}, query, field); > } > > template<typename FieldType, typename FieldValue, typename = FieldAssignable<FieldType, FieldValue>> > void > specify(FieldType& field, FieldValue& value) > { > SpecifyField command; > doUntil(TemplateSequence<Size>{}, command, field, value); > } > > template<typename FieldType> > void > specify(FieldType& field) > { > SpecifyField specify; > doUntil(TemplateSequence<Size>{}, specify, field); > } > > TupleJunction > junction() const { return _junction; } > > template<typename Functor, typename ... Args> > void > dispatch(Functor& f, Args&& ... args) { dispatch(TemplateSequence<Size>{}, f, std::forward<Args>(args) ...); } > > template<typename Functor, typename ... Args> > void > constDispatch(Functor& f, Args&& ... args) const { constDispatch(TemplateSequence<Size>{}, f, std::forward<Args>(args) ...); } > > template<typename Functor, typename ... Args> > bool > ifAll(Functor& f, Args&& ... args) const { return ifAll(TemplateSequence<Size>{}, f, std::forward<Args>(args) ...); } > > template<typename Functor, typename ... Args> > bool > ifAny(Functor& f, Args&& ... args) const { return ifAny(TemplateSequence<Size>{}, f, std::forward<Args>(args) ...); } > > template<typename Functor, typename ... Args> > bool > doUntil(Functor& f, Args&& ... args) { return ifAny(TemplateSequence<Size>{}, f, std::forward<Args>(args) ...); } > > static constexpr uint32_t Size = std::tuple_size_v<TupleType>; > >private: > template<unsigned int ... FieldIndices, typename Functor, typename ... Args> > bool > ifAll(IndexSequence<FieldIndices ...>, Functor& f, Args&& ... args) const > { > return (... && ifAll<FieldIndices, Functor, Args ...>(f, std::forward<Args>(args) ...)); > } > > template<unsigned int index, typename Functor, typename ... Args> > bool > ifAll(Functor& f, Args&& ... args) const { return f(std::get<index>(_tuple), std::forward<Args>(args) ...); } > > template<unsigned int ... FieldIndices, typename Functor, typename ... Args> > bool > ifAny(IndexSequence<FieldIndices ...>, Functor& f, Args&& ... args) const > { > return (... || ifAny<FieldIndices, Functor, Args ...>(f, std::forward<Args>(args) ...)); > } > > template<unsigned int index, typename Functor, typename ... Args> > bool > ifAny(Functor& f, Args&& ... args) const { return f(std::get<index>(_tuple), std::forward<Args>(args) ...); } > > template<unsigned int ... FieldIndices, typename Functor, typename ... Args> > bool > doUntil(IndexSequence<FieldIndices ...>, Functor& f, Args&& ... args) > { > return (... || doUntil<FieldIndices, Functor, Args ...>(f, std::forward<Args>(args) ...)); > } > > template<unsigned int index, typename Functor, typename ... Args> > bool > doUntil(Functor& f, Args&& ... args) { return f(std::get<index>(_tuple), std::forward<Args>(args) ...); } > > template<unsigned int ... FieldIndices, typename Functor, typename ... Args> > void > dispatch(IndexSequence<FieldIndices ...>, Functor& f, Args&& ... args) > { > ># 297 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 297 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > auto Void = { 0, (dispatch<FieldIndices, Functor, Args ...>(f, std::forward<Args>(args) ...), 0) ... }; > } > > template<unsigned int index, typename Functor, typename ... Args> > void > dispatch(Functor& f, Args&& ... args) { f(std::get<index>(_tuple), std::forward<Args>(args) ...); } > > template<unsigned int ... FieldIndices, typename Functor, typename ... Args> > void > constDispatch(IndexSequence<FieldIndices ...>, Functor& f, Args&& ... args) const > { > ># 308 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 308 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > auto Void = { 0, (constDispatch<FieldIndices, Functor, Args ...>(f, std::forward<Args>(args) ...), 0) ... }; > } > > template<unsigned int index, typename Functor, typename ... Args> > void > constDispatch(Functor& f, Args&& ... args) const { f(std::get<index>(_tuple), std::forward<Args>(args) ...); } > > TupleType _tuple; > TupleJunction _junction; >}; > >template<typename ... Types> >struct DefineFieldSet { > using Type = FieldSet<Types ...>; > > DefineFieldSet( ># 323 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > __attribute__((unused)) ># 323 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > Types& ... types) {} >}; > >class Printer { >public: > Printer(std::ostream& o) : > _o(o) > {} > > template<typename Property, typename = IsPropertyTree<Property>> > void > operator ()(Property& t, uint32_t indent = 0, char tag = ' ') > { > _o << "key: " << (std::string(indent * 2, ' ')) << tag << " " << t.key() << std::endl; > if (t.junction() != TupleJunction::unreachable) > t.dispatch(*this, indent + 1, junctionSymbol(t.junction())); > } > > template<typename Property, typename = IsPropertyDatum<Property>> > void > operator ()(Property& t, uint32_t indent = 0, char tag = ' ', int disambiguator = 0) > { > _o << "key: " << (std::string(indent * 2, ' ')) << tag << " " << t.key() << std::endl; > } > > template<typename Configuration> > static void > printConfiguration(std::ostream& o, const std::string& rootName) > { > Configuration c; > PropertyTree<Configuration> pc(NamedVariable(rootName, c)); > Printer printer(o); > printer(pc); > } > >private: > char > junctionSymbol(TupleJunction junction) > { > switch (junction) > { > case TupleJunction::all: > return '='; > > case TupleJunction::some: > return '+'; > > case TupleJunction::one: > return '|'; > > case TupleJunction::any: > return '*'; > > default: > ; > } > > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp", 380) << "unreachable" << facile::RequireException::require_sentinel; > } > > std::ostream& _o; >}; > >struct Parser { > class TupleJunctionConstraint { > public: > TupleJunctionConstraint(const std::string& key, TupleJunction junction) : > _setKey(key), > _junction(junction), > _isEmpty(true) > {} > > void > operator ()(const std::string& memberKey, bool specified) > { > switch (_junction) > { > case TupleJunction::all: > (specified) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp", 401) << ># 401 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > std::endl ># 401 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > << "⢠Condition [" << "specified" << "] " << ># 401 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > std::endl ># 401 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > << "⢠" << "Element '" << memberKey << "' is missing. " > << "Set '" << _setKey << "' requires all elements to be specified." << facile::RequireException::require_sentinel; > break; > > case TupleJunction::one: > (_isEmpty || !specified) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp", 406) << ># 406 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > std::endl ># 406 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > << "⢠Condition [" << "_isEmpty || !specified" << "] " << ># 406 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > std::endl ># 406 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > << "⢠" << "Conflicting specifiecations for element '" << memberKey << "': " > << "set '" << _setKey << "' permits only one element to be specified." << facile::RequireException::require_sentinel; > > [[fallthrough]]; > > case TupleJunction::some: > _isEmpty &= !specified; > break; > > default: > ; > } > } > > bool > isEmpty() { return _isEmpty; } > > private: > const std::string& _setKey; > TupleJunction _junction; > bool _isEmpty; > }; > > class Breadcrumbs > { > public: > Breadcrumbs() {} > Breadcrumbs(Breadcrumbs& src) = delete; > Breadcrumbs(Breadcrumbs&& src) = delete; > > void > push(const std::string& key) { _keyStack.push_back(key); } > > void > pop() { _keyStack.pop_back(); } > > friend std::ostream& > operator <<(std::ostream& o, const Breadcrumbs& b) > { > Comma comma(" > "); > for (const std::string& key : b._keyStack) > o << comma << key; > > return o; > } > > private: > std::vector<std::string> _keyStack; > }; > > template<typename Root> > owner<PropertyTree<Root>> > parse(Root& root , const json& j, TupleJunction junction = TupleJunction::unreachable) > { > if (junction == TupleJunction::unreachable) > junction = root.fields.junction(); > > owner<PropertyTree<Root>> p = owner<PropertyTree<Root>>::make(NamedVariable("<root>", root)); > TupleJunctionConstraint constraint(p->key(), junction); > p->dispatch(*this, j, constraint); > return p; > } > > > > template<typename Property, typename = IsPropertyDatum<Property>, typename = typename std::enable_if_t<!std::is_const_v<Property>, void>> > void > operator ()(Property& t, const json& j, TupleJunctionConstraint& siblingConstraint) > { > using Value = typename Property::Value; > > std::string key = t.key(); > > if (j.contains(key)) { > siblingConstraint(key, true); > } else { > siblingConstraint(key, false); > return; > } > > Value value = j.value<Value>(key, Default<Value>().value); > t.specify(value); > } > > template<typename Property, typename = IsPropertyTree<Property>, typename = typename std::enable_if_t<!std::is_const_v<Property>, void>> > void > operator ()(Property& t, const json& j, TupleJunctionConstraint& siblingConstraint, int disambiguator = 0) > { > std::string key = t.key(); > > if (j.contains(key)) { > siblingConstraint(key, true); > } else { > siblingConstraint(key, false); > return; > } > > _breadcrumbs.push(key); > > const json& jj = j.at(key); > TupleJunctionConstraint memberConstraint{ key, t.junction() }; > t.specify(); > t.dispatch(*this, jj, memberConstraint); > > switch (t.junction()) > { > case TupleJunction::one: > (!memberConstraint.isEmpty()) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp", 513) << ># 513 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > std::endl ># 513 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > << "⢠Condition [" << "!memberConstraint.isEmpty()" << "] " << ># 513 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > std::endl ># 513 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > << "⢠" > << "Set '" << _breadcrumbs << "' is empty but requires exactly one member to be specified." << facile::RequireException::require_sentinel; > break; > > case TupleJunction::some: > (!memberConstraint.isEmpty()) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp", 518) << ># 518 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > std::endl ># 518 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > << "⢠Condition [" << "!memberConstraint.isEmpty()" << "] " << ># 518 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" > std::endl ># 518 "../../subprojects/edfst/subprojects/facile/src/relation/ConfigurationSchema.hpp" 3 > << "⢠" > << "Set '" << _breadcrumbs << "' is empty but requires at least one member to be specified." << facile::RequireException::require_sentinel; > break; > > default: > ; > } > > _breadcrumbs.pop(); > } > > private: > Breadcrumbs _breadcrumbs; >}; > >struct Packer { > template<typename Property> > json > operator ()(Property& t) > { > json j; > > operator ()(t, j); > return j; > } > > template<typename Property> > void > operator ()(Property& t, handle<json> j) > { > using Value = typename Property::Value; > > if (!t.isSpecified()) > return; > > std::string key = t.key(); > > > if constexpr (std::is_same_v<PropertyDatum<Value>, Property>) { > j->emplace(key, t.value().reference()); > } else { > json jj; > t.dispatch(*this, jj); > j->emplace(key, jj); > } > } >}; >} >} ># 34 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/ComponentLogStream.hpp" 1 3 > > > > >namespace facile >{ >class ComponentLogStream { >public: > class File { > struct use_the_open_method {}; > > public: > File( ># 13 "../../subprojects/edfst/subprojects/facile/src/io/ComponentLogStream.hpp" > __attribute__((unused)) ># 13 "../../subprojects/edfst/subprojects/facile/src/io/ComponentLogStream.hpp" 3 > use_the_open_method *please, owner<StreamLogDirectory> outputDir, owner<LogFileStream> logFile, > const std::string& logFileBasename) : > _outputDir(std::move(outputDir)), > _logFile(std::move(logFile)), > _logFileBasename(logFileBasename) > {} > > static owner<File> > open(loan<StreamLogDirectory> directory, const std::string& logFileBasename = "ComponentLogStream") > { > return open(directory->getPath()->c_str(), logFileBasename); > } > > static owner<File> > open(const std::string& dirname = "./log/", const std::string& logFileBasename = "ComponentLogStream") > { > static use_the_open_method *hidden_key = nullptr; > > owner<StreamLogDirectory> directory = owner<StreamLogDirectory>::make(dirname); > directory->mkdirs(); > owner<LogFileStream> logFile = directory->openFile(logFileBasename + ".log"); > > return owner<File>::make(hidden_key, std::move(directory), std::move(logFile), logFileBasename); > } > > loan<LogFileStream> > get() { return _logFile; } > > owner<ComponentLogStream> > createStream() { return owner<ComponentLogStream>::make(_logFile->fstream()); } > > > > loan<StreamLogDirectory> > outputDir() { return _outputDir; } > > std::string > logFileBasename() { return _logFileBasename; } > > private: > owner<StreamLogDirectory, DSA> _outputDir; > owner<LogFileStream, DSA> _logFile; > std::string _logFileBasename; > }; > > template<typename InstanceId> > struct GlobalInstance { > static loan<ComponentLogStream> > log() { return _log(); } > > template<typename Configuration> > static void > redirect(loan<Configuration> c, const std::string& tag) > { > redirect(handle(c.reference()), tag); > } > > template<typename Configuration> > static void > redirect(handle<Configuration> c, const std::string& tag) > { > owner<ComponentLogStream::File> sink = ComponentLogStream::File::open(c->outputDir(), c->logFileBasename() + "." + tag); > _log(_logFile(std::move(sink))->createStream()); > } > > static void > reset() > { > loan<ComponentLogStream::File> logFile = _logFile(); > if (logFile != nullptr) > logFile->get()->reset(); > } > > loan<StreamLogDirectory> > outputDir() { return _logFile()->outputDir(); } > > std::string > logFileBasename() { return _logFile()->logFileBasename(); } > > private: > static loan<ComponentLogStream> > _log(owner<ComponentLogStream> redirect = nullptr) > { > static owner<ComponentLogStream> logStream = ComponentLogStream::makeNull(); > > if (redirect != nullptr) > logStream = std::move(redirect); > > return logStream; > } > > static loan<ComponentLogStream::File> > _logFile(owner<ComponentLogStream::File> replace = nullptr) > { > static owner<ComponentLogStream::File> logFile = nullptr; > > if (replace != nullptr) > logFile = std::move(replace); > > return logFile; > } > }; > > ComponentLogStream(std::ostream& stream) : > _stream(stream) > {} > > void > setPrefix(const std::string& prefix) { _prefix = prefix; } > > std::ostream& > stream() { return _stream; } > > std::ostream& > prefix() { return _stream << _prefix; } > > static owner<ComponentLogStream> > makeNull() { return owner<ComponentLogStream>::make(StreamLog::nullog()); } > >private: > std::string _prefix; > > std::ostream& _stream; >}; >} ># 35 "../../subprojects/edfst/subprojects/facile/src/FacileFramework.hpp" 2 3 ># 4 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 2 > > > > ># 7 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" >namespace facile >{ > > >struct InstantLogConfiguration { > static void > start() > { > enableUpTo(StreamLogLevel::Status); > } > > static void > enableUpTo(StreamLogLevel level) > { > StreamLog::enableLogLevels(allUpTo(level)); > } >}; > >class LogConfiguration >{ >public: > struct Configurable { > bool overwrite; > std::string logDirectory; > std::string logLevels; > > using Fields = decltype(ConfigurationSchema::DefineFieldSet(overwrite, logDirectory, logLevels))::Type; > Fields fields; > > Configurable() : > overwrite(false), > logDirectory("./log"), > logLevels("SANITY"), > fields( ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > facile::NamedVariable( ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > "overwrite" ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > , ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > overwrite ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > ) ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > , ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > facile::NamedVariable( ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > "logDirectory" ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > , ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > logDirectory ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > ) ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > , ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > facile::NamedVariable( ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > "logLevels" ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > , ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > logLevels ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" 3 > ) ># 40 "../../subprojects/edfst/subprojects/facile/src/io/LogConfiguration.hpp" > ) > {} > }; > > LogConfiguration(handle<Configurable> configurable) : > _configurable(configurable) > {} > > void > setLevels(const std::string& levels) { _configurable->logLevels = levels; } > > std::string > runId() { return _runId; } > > void > setRunId(const std::string& runId) { _runId = runId; } > > std::string > logFileBasename() const { return _logFileBasename; } > > loan<StreamLogDirectory> > outputDir() const { return _outputDir; } > > void > activate() > { > if (_configurable->logDirectory.empty()) > _configurable->logDirectory = "./log"; > _outputDir = owner<StreamLogDirectory, DSA>::make(_configurable->logDirectory); > _outputDir->mkdirs(); > > _logFileBasename = _runId; > std::stringstream ss; > ss << _runId << ".log"; > if (!_configurable->overwrite) { > uint32_t index = 0; > while (_outputDir->fileExists(ss.str())) { > ss.str(""); > ss.clear(); > ss << _runId << "." << ++index; > _logFileBasename = ss.str(); > ss << ".log"; > } > } > > std::cout << "Logging to " << _configurable->logDirectory << "/" << ss.str() << std::endl; > > _logFilename = _logFileBasename + ".log"; > StreamLog::enableLogLevels(StreamLog::parseLogLevels(_configurable->logLevels)); > > _logFile = _outputDir->openFile(_logFilename); > StreamLog::setLogStream(_logFile); > } > > void > restart() > { > if (_logFile != nullptr) > _logFile->reset(); > } > >protected: > handle<Configurable> _configurable; > > std::string _runId; > > owner<StreamLogDirectory, DSA> _outputDir; > std::string _logFileBasename; > std::string _logFilename; > owner<LogFileStream, DSA> _logFile; >}; >} ># 5 "../../subprojects/edfst/test/ElasticTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 1 > > ># 1 "/usr/include/signal.h" 1 3 4 ># 27 "/usr/include/signal.h" 3 4 > ># 27 "/usr/include/signal.h" 3 4 >extern "C" { > > ># 1 "/usr/include/bits/signum-generic.h" 1 3 4 ># 76 "/usr/include/bits/signum-generic.h" 3 4 ># 1 "/usr/include/bits/signum-arch.h" 1 3 4 ># 77 "/usr/include/bits/signum-generic.h" 2 3 4 ># 31 "/usr/include/signal.h" 2 3 4 > ># 1 "/usr/include/bits/types/sig_atomic_t.h" 1 3 4 > > > > > > > >typedef __sig_atomic_t sig_atomic_t; ># 33 "/usr/include/signal.h" 2 3 4 ># 57 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/types/siginfo_t.h" 1 3 4 > > > ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 5 "/usr/include/bits/types/siginfo_t.h" 2 3 4 > ># 1 "/usr/include/bits/types/__sigval_t.h" 1 3 4 ># 24 "/usr/include/bits/types/__sigval_t.h" 3 4 >union sigval >{ > int sival_int; > void *sival_ptr; >}; > >typedef union sigval __sigval_t; ># 7 "/usr/include/bits/types/siginfo_t.h" 2 3 4 ># 16 "/usr/include/bits/types/siginfo_t.h" 3 4 ># 1 "/usr/include/bits/siginfo-arch.h" 1 3 4 ># 17 "/usr/include/bits/types/siginfo_t.h" 2 3 4 ># 36 "/usr/include/bits/types/siginfo_t.h" 3 4 >typedef struct > { > int si_signo; > > int si_errno; > > int si_code; > > > > > > int __pad0; > > > union > { > int _pad[((128 / sizeof (int)) - 4)]; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > } _kill; > > > struct > { > int si_tid; > int si_overrun; > __sigval_t si_sigval; > } _timer; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > __sigval_t si_sigval; > } _rt; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > int si_status; > __clock_t si_utime; > __clock_t si_stime; > } _sigchld; > > > struct > { > void *si_addr; > > short int si_addr_lsb; > union > { > > struct > { > void *_lower; > void *_upper; > } _addr_bnd; > > __uint32_t _pkey; > } _bounds; > } _sigfault; > > > struct > { > long int si_band; > int si_fd; > } _sigpoll; > > > > struct > { > void *_call_addr; > int _syscall; > unsigned int _arch; > } _sigsys; > > } _sifields; > } siginfo_t ; ># 58 "/usr/include/signal.h" 2 3 4 ># 1 "/usr/include/bits/siginfo-consts.h" 1 3 4 ># 35 "/usr/include/bits/siginfo-consts.h" 3 4 >enum >{ > SI_ASYNCNL = -60, > SI_DETHREAD = -7, > > SI_TKILL, > SI_SIGIO, > > SI_ASYNCIO, > SI_MESGQ, > SI_TIMER, > > > > > > SI_QUEUE, > SI_USER, > SI_KERNEL = 0x80 ># 66 "/usr/include/bits/siginfo-consts.h" 3 4 >}; > > > > >enum >{ > ILL_ILLOPC = 1, > > ILL_ILLOPN, > > ILL_ILLADR, > > ILL_ILLTRP, > > ILL_PRVOPC, > > ILL_PRVREG, > > ILL_COPROC, > > ILL_BADSTK, > > ILL_BADIADDR > >}; > > >enum >{ > FPE_INTDIV = 1, > > FPE_INTOVF, > > FPE_FLTDIV, > > FPE_FLTOVF, > > FPE_FLTUND, > > FPE_FLTRES, > > FPE_FLTINV, > > FPE_FLTSUB, > > FPE_FLTUNK = 14, > > FPE_CONDTRAP > >}; > > >enum >{ > SEGV_MAPERR = 1, > > SEGV_ACCERR, > > SEGV_BNDERR, > > SEGV_PKUERR, > > SEGV_ACCADI, > > SEGV_ADIDERR, > > SEGV_ADIPERR, > > SEGV_MTEAERR, > > SEGV_MTESERR > >}; > > >enum >{ > BUS_ADRALN = 1, > > BUS_ADRERR, > > BUS_OBJERR, > > BUS_MCEERR_AR, > > BUS_MCEERR_AO > >}; > > > > >enum >{ > TRAP_BRKPT = 1, > > TRAP_TRACE, > > TRAP_BRANCH, > > TRAP_HWBKPT, > > TRAP_UNK > >}; > > > > >enum >{ > CLD_EXITED = 1, > > CLD_KILLED, > > CLD_DUMPED, > > CLD_TRAPPED, > > CLD_STOPPED, > > CLD_CONTINUED > >}; > > >enum >{ > POLL_IN = 1, > > POLL_OUT, > > POLL_MSG, > > POLL_ERR, > > POLL_PRI, > > POLL_HUP > >}; > > > > > ># 1 "/usr/include/bits/siginfo-consts-arch.h" 1 3 4 ># 214 "/usr/include/bits/siginfo-consts.h" 2 3 4 ># 59 "/usr/include/signal.h" 2 3 4 > > > ># 1 "/usr/include/bits/types/sigval_t.h" 1 3 4 ># 16 "/usr/include/bits/types/sigval_t.h" 3 4 >typedef __sigval_t sigval_t; ># 63 "/usr/include/signal.h" 2 3 4 > > > ># 1 "/usr/include/bits/types/sigevent_t.h" 1 3 4 > > > ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 5 "/usr/include/bits/types/sigevent_t.h" 2 3 4 ># 22 "/usr/include/bits/types/sigevent_t.h" 3 4 >typedef struct sigevent > { > __sigval_t sigev_value; > int sigev_signo; > int sigev_notify; > > union > { > int _pad[((64 / sizeof (int)) - 4)]; > > > > __pid_t _tid; > > struct > { > void (*_function) (__sigval_t); > pthread_attr_t *_attribute; > } _sigev_thread; > } _sigev_un; > } sigevent_t; ># 67 "/usr/include/signal.h" 2 3 4 ># 1 "/usr/include/bits/sigevent-consts.h" 1 3 4 ># 27 "/usr/include/bits/sigevent-consts.h" 3 4 >enum >{ > SIGEV_SIGNAL = 0, > > SIGEV_NONE, > > SIGEV_THREAD, > > > SIGEV_THREAD_ID = 4 > > >}; ># 68 "/usr/include/signal.h" 2 3 4 > > > > >typedef void (*__sighandler_t) (int); > > > > >extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) > noexcept (true); > >extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) > noexcept (true); > > > > > > >extern __sighandler_t signal (int __sig, __sighandler_t __handler) > noexcept (true); ># 112 "/usr/include/signal.h" 3 4 >extern int kill (__pid_t __pid, int __sig) noexcept (true); > > > > > > >extern int killpg (__pid_t __pgrp, int __sig) noexcept (true); > > > >extern int raise (int __sig) noexcept (true); > > > >extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) > noexcept (true); >extern int gsignal (int __sig) noexcept (true); > > > > >extern void psignal (int __sig, const char *__s); > > >extern void psiginfo (const siginfo_t *__pinfo, const char *__s); ># 151 "/usr/include/signal.h" 3 4 >extern int sigpause (int __sig) __asm__ ("__xpg_sigpause") > __attribute__ ((__deprecated__ ("Use the sigsuspend function instead"))); ># 173 "/usr/include/signal.h" 3 4 >extern int sigblock (int __mask) noexcept (true) __attribute__ ((__deprecated__)); > > >extern int sigsetmask (int __mask) noexcept (true) __attribute__ ((__deprecated__)); > > >extern int siggetmask (void) noexcept (true) __attribute__ ((__deprecated__)); ># 188 "/usr/include/signal.h" 3 4 >typedef __sighandler_t sighandler_t; > > > > >typedef __sighandler_t sig_t; > > > > > >extern int sigemptyset (sigset_t *__set) noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int sigfillset (sigset_t *__set) noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int sigaddset (sigset_t *__set, int __signo) noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int sigdelset (sigset_t *__set, int __signo) noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int sigismember (const sigset_t *__set, int __signo) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > >extern int sigisemptyset (const sigset_t *__set) noexcept (true) __attribute__ ((__nonnull__ (1))); > > >extern int sigandset (sigset_t *__set, const sigset_t *__left, > const sigset_t *__right) noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))); > > >extern int sigorset (sigset_t *__set, const sigset_t *__left, > const sigset_t *__right) noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))); > > > > ># 1 "/usr/include/bits/sigaction.h" 1 3 4 ># 27 "/usr/include/bits/sigaction.h" 3 4 >struct sigaction > { > > > union > { > > __sighandler_t sa_handler; > > void (*sa_sigaction) (int, siginfo_t *, void *); > } > __sigaction_handler; > > > > > > > > __sigset_t sa_mask; > > > int sa_flags; > > > void (*sa_restorer) (void); > }; ># 230 "/usr/include/signal.h" 2 3 4 > > >extern int sigprocmask (int __how, const sigset_t *__restrict __set, > sigset_t *__restrict __oset) noexcept (true); > > > > > > >extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1))); > > >extern int sigaction (int __sig, const struct sigaction *__restrict __act, > struct sigaction *__restrict __oact) noexcept (true); > > >extern int sigpending (sigset_t *__set) noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > > > >extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) > __attribute__ ((__nonnull__ (1, 2))); > > > > > > > >extern int sigwaitinfo (const sigset_t *__restrict __set, > siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); > > > > > > > >extern int sigtimedwait (const sigset_t *__restrict __set, > siginfo_t *__restrict __info, > const struct timespec *__restrict __timeout) > __attribute__ ((__nonnull__ (1))); ># 292 "/usr/include/signal.h" 3 4 >extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) > noexcept (true); > > > > > > > ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 31 "/usr/include/bits/sigcontext.h" 3 4 >struct _fpx_sw_bytes >{ > __uint32_t magic1; > __uint32_t extended_size; > __uint64_t xstate_bv; > __uint32_t xstate_size; > __uint32_t __glibc_reserved1[7]; >}; > >struct _fpreg >{ > unsigned short significand[4]; > unsigned short exponent; >}; > >struct _fpxreg >{ > unsigned short significand[4]; > unsigned short exponent; > unsigned short __glibc_reserved1[3]; >}; > >struct _xmmreg >{ > __uint32_t element[4]; >}; ># 123 "/usr/include/bits/sigcontext.h" 3 4 >struct _fpstate >{ > > __uint16_t cwd; > __uint16_t swd; > __uint16_t ftw; > __uint16_t fop; > __uint64_t rip; > __uint64_t rdp; > __uint32_t mxcsr; > __uint32_t mxcr_mask; > struct _fpxreg _st[8]; > struct _xmmreg _xmm[16]; > __uint32_t __glibc_reserved1[24]; >}; > >struct sigcontext >{ > __uint64_t r8; > __uint64_t r9; > __uint64_t r10; > __uint64_t r11; > __uint64_t r12; > __uint64_t r13; > __uint64_t r14; > __uint64_t r15; > __uint64_t rdi; > __uint64_t rsi; > __uint64_t rbp; > __uint64_t rbx; > __uint64_t rdx; > __uint64_t rax; > __uint64_t rcx; > __uint64_t rsp; > __uint64_t rip; > __uint64_t eflags; > unsigned short cs; > unsigned short gs; > unsigned short fs; > unsigned short __pad0; > __uint64_t err; > __uint64_t trapno; > __uint64_t oldmask; > __uint64_t cr2; > __extension__ union > { > struct _fpstate * fpstate; > __uint64_t __fpstate_word; > }; > __uint64_t __reserved1 [8]; >}; > > > >struct _xsave_hdr >{ > __uint64_t xstate_bv; > __uint64_t __glibc_reserved1[2]; > __uint64_t __glibc_reserved2[5]; >}; > >struct _ymmh_state >{ > __uint32_t ymmh_space[64]; >}; > >struct _xstate >{ > struct _fpstate fpstate; > struct _xsave_hdr xstate_hdr; > struct _ymmh_state ymmh; >}; ># 302 "/usr/include/signal.h" 2 3 4 > > >extern int sigreturn (struct sigcontext *__scp) noexcept (true); > > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 312 "/usr/include/signal.h" 2 3 4 > ># 1 "/usr/include/bits/types/stack_t.h" 1 3 4 ># 23 "/usr/include/bits/types/stack_t.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 24 "/usr/include/bits/types/stack_t.h" 2 3 4 > > >typedef struct > { > void *ss_sp; > int ss_flags; > size_t ss_size; > } stack_t; ># 314 "/usr/include/signal.h" 2 3 4 > > ># 1 "/usr/include/sys/ucontext.h" 1 3 4 ># 37 "/usr/include/sys/ucontext.h" 3 4 >__extension__ typedef long long int greg_t; ># 46 "/usr/include/sys/ucontext.h" 3 4 >typedef greg_t gregset_t[23]; > > > >enum >{ > REG_R8 = 0, > > REG_R9, > > REG_R10, > > REG_R11, > > REG_R12, > > REG_R13, > > REG_R14, > > REG_R15, > > REG_RDI, > > REG_RSI, > > REG_RBP, > > REG_RBX, > > REG_RDX, > > REG_RAX, > > REG_RCX, > > REG_RSP, > > REG_RIP, > > REG_EFL, > > REG_CSGSFS, > > REG_ERR, > > REG_TRAPNO, > > REG_OLDMASK, > > REG_CR2 > >}; > > >struct _libc_fpxreg >{ > unsigned short int significand[4]; > unsigned short int exponent; > unsigned short int __glibc_reserved1[3]; >}; > >struct _libc_xmmreg >{ > __uint32_t element[4]; >}; > >struct _libc_fpstate >{ > > __uint16_t cwd; > __uint16_t swd; > __uint16_t ftw; > __uint16_t fop; > __uint64_t rip; > __uint64_t rdp; > __uint32_t mxcsr; > __uint32_t mxcr_mask; > struct _libc_fpxreg _st[8]; > struct _libc_xmmreg _xmm[16]; > __uint32_t __glibc_reserved1[24]; >}; > > >typedef struct _libc_fpstate *fpregset_t; > > >typedef struct > { > gregset_t gregs; > > fpregset_t fpregs; > __extension__ unsigned long long __reserved1 [8]; >} mcontext_t; > > >typedef struct ucontext_t > { > unsigned long int uc_flags; > struct ucontext_t *uc_link; > stack_t uc_stack; > mcontext_t uc_mcontext; > sigset_t uc_sigmask; > struct _libc_fpstate __fpregs_mem; > __extension__ unsigned long long int __ssp[4]; > } ucontext_t; ># 317 "/usr/include/signal.h" 2 3 4 > > > > > > > >extern int siginterrupt (int __sig, int __interrupt) noexcept (true) > __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead"))); > ># 1 "/usr/include/bits/sigstack.h" 1 3 4 ># 328 "/usr/include/signal.h" 2 3 4 ># 1 "/usr/include/bits/sigstksz.h" 1 3 4 ># 329 "/usr/include/signal.h" 2 3 4 ># 1 "/usr/include/bits/ss_flags.h" 1 3 4 ># 27 "/usr/include/bits/ss_flags.h" 3 4 >enum >{ > SS_ONSTACK = 1, > > SS_DISABLE > >}; ># 330 "/usr/include/signal.h" 2 3 4 > > > >extern int sigaltstack (const stack_t *__restrict __ss, > stack_t *__restrict __oss) noexcept (true); > > > > ># 1 "/usr/include/bits/types/struct_sigstack.h" 1 3 4 ># 23 "/usr/include/bits/types/struct_sigstack.h" 3 4 >struct sigstack > { > void *ss_sp; > int ss_onstack; > }; ># 340 "/usr/include/signal.h" 2 3 4 > > > > > > > >extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) > noexcept (true) __attribute__ ((__deprecated__)); > > > > > > >extern int sighold (int __sig) noexcept (true) > __attribute__ ((__deprecated__ ("Use the sigprocmask function instead"))); > > >extern int sigrelse (int __sig) noexcept (true) > __attribute__ ((__deprecated__ ("Use the sigprocmask function instead"))); > > >extern int sigignore (int __sig) noexcept (true) > __attribute__ ((__deprecated__ ("Use the signal function instead"))); > > >extern __sighandler_t sigset (int __sig, __sighandler_t __disp) noexcept (true) > __attribute__ ((__deprecated__ ("Use the signal and sigprocmask functions instead"))) > ; > > > > > > ># 1 "/usr/include/bits/sigthread.h" 1 3 4 ># 31 "/usr/include/bits/sigthread.h" 3 4 >extern int pthread_sigmask (int __how, > const __sigset_t *__restrict __newmask, > __sigset_t *__restrict __oldmask)noexcept (true); > > >extern int pthread_kill (pthread_t __threadid, int __signo) noexcept (true); > > > >extern int pthread_sigqueue (pthread_t __threadid, int __signo, > const union sigval __value) noexcept (true); ># 377 "/usr/include/signal.h" 2 3 4 > > > > > > >extern int __libc_current_sigrtmin (void) noexcept (true); > >extern int __libc_current_sigrtmax (void) noexcept (true); > > > > > ># 1 "/usr/include/bits/signal_ext.h" 1 3 4 ># 29 "/usr/include/bits/signal_ext.h" 3 4 >extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal); ># 392 "/usr/include/signal.h" 2 3 4 > >} ># 4 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 2 > > ># 1 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" 1 > > > > > ># 5 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" >namespace facile >{ >class FacileTestFailure : > public FacileException >{ >public: > FacileTestFailure( ># 11 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" 3 > const char *file, int line ># 11 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" > ) : > FacileException( ># 12 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" 3 > file, line ># 12 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" > , StreamLogLevel::Evaluation) > {} > > FacileTestFailure(const FacileTestFailure& e) : > FacileException(e) > {} > > > template<typename T> > FacileTestFailure& > operator <<(T const& messageFragment) > { > FacileException::operator <<(messageFragment); > > return *this; > } > > > FacileTestFailure& > operator<<(std::ostream& (*manipulator)(std::ostream&)) > { > FacileException::operator <<(manipulator); > > return *this; > } > > friend std::ostream& > operator <<(std::ostream& o, const FacileTestFailure& f) > { > o << "FacileTestFailure: "; > > > return f.appendMessageTo(o); > } > >private: >}; > >static inline void >testInvariantCondition( ># 51 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" 3 > const char *file, int line ># 51 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" > , bool condition, const std::string& invariant) >{ > if (!condition) > throw FacileTestFailure( ># 54 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" 3 > file, line ># 54 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFailure.hpp" > ) << "Test fails invariant [" << invariant << "]"; >} >} ># 7 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestInvariant.hpp" 1 > > > > > > > >namespace facile >{ >struct FacileTestInvariant { > FacileTestInvariant( ># 11 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestInvariant.hpp" 3 > const char *file, int line ># 11 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestInvariant.hpp" > , bool condition, const std::string& conditionSourceCodeFragment) : > _file(file), > _line(line), > _condition(condition), > _conditionSourceCodeFragment(conditionSourceCodeFragment) > {} > > > FacileTestInvariant(const FacileTestInvariant& i) : > _file(i._file), > _line(i._line), > _condition(i._condition), > _conditionSourceCodeFragment(i._conditionSourceCodeFragment), > _s(i._s.str()) > {} > > static struct verify_sentinel_type {} > verify_sentinel; > > template<typename T> > FacileTestInvariant& > operator <<(T t) > { > _s << t; > return *this; > } > > FacileTestInvariant& > operator <<(StreamManipulator m) > { > _s << m; > return *this; > } > > bool > operator <<(__attribute__((unused)) verify_sentinel_type) > { > FacileTestFailure f(_file, _line); > f << "Test fails invariant [" << _conditionSourceCodeFragment << "] " << std::endl; > PhaseContext::Registry::printElements(f); > f << _s.str(); > PhaseContext::Registry::printBlocks(f); > f << packMessage; > throw f; > } > > private: > const char *_file; > int _line; > bool _condition; > std::string _conditionSourceCodeFragment; > std::stringstream _s; >}; >} ># 8 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" 1 > > > ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 5 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" 2 ># 1 "/usr/include/c++/13/cstring" 1 3 ># 39 "/usr/include/c++/13/cstring" 3 > ># 40 "/usr/include/c++/13/cstring" 3 ># 6 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" 2 > > > > > ># 1 "/usr/include/c++/13/random" 1 3 ># 32 "/usr/include/c++/13/random" 3 > ># 33 "/usr/include/c++/13/random" 3 > > > > > > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 41 "/usr/include/c++/13/random" 2 3 ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 42 "/usr/include/c++/13/random" 2 3 ># 51 "/usr/include/c++/13/random" 3 ># 1 "/usr/include/c++/13/bits/random.h" 1 3 ># 37 "/usr/include/c++/13/bits/random.h" 3 > ># 37 "/usr/include/c++/13/bits/random.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 58 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, size_t __bits, > typename _UniformRandomNumberGenerator> > _RealType > generate_canonical(_UniformRandomNumberGenerator& __g); > > > > namespace __detail > { > template<typename _UIntType, size_t __w, > bool = __w < static_cast<size_t> > (std::numeric_limits<_UIntType>::digits)> > struct _Shift > { static constexpr _UIntType __value = 0; }; > > template<typename _UIntType, size_t __w> > struct _Shift<_UIntType, __w, true> > { static constexpr _UIntType __value = _UIntType(1) << __w; }; > > template<int __s, > int __which = ((__s <= 8 * sizeof (int)) > + (__s <= 8 * sizeof (long)) > + (__s <= 8 * sizeof (long long)) > > + (__s <= 128))> > struct _Select_uint_least_t > { > static_assert(__which < 0, > "sorry, would be too much trouble for a slow result"); > }; > > template<int __s> > struct _Select_uint_least_t<__s, 4> > { using type = unsigned int; }; > > template<int __s> > struct _Select_uint_least_t<__s, 3> > { using type = unsigned long; }; > > template<int __s> > struct _Select_uint_least_t<__s, 2> > { using type = unsigned long long; }; > > > template<int __s> > struct _Select_uint_least_t<__s, 1> > { __extension__ using type = unsigned __int128; }; > > > > template<typename _Tp, _Tp __m, _Tp __a, _Tp __c, > bool __big_enough = (!(__m & (__m - 1)) > || (_Tp(-1) - __c) / __a >= __m - 1), > bool __schrage_ok = __m % __a < __m / __a> > struct _Mod > { > static _Tp > __calc(_Tp __x) > { > using _Tp2 > = typename _Select_uint_least_t<std::__lg(__a) > + std::__lg(__m) + 2>::type; > return static_cast<_Tp>((_Tp2(__a) * __x + __c) % __m); > } > }; > > > template<typename _Tp, _Tp __m, _Tp __a, _Tp __c> > struct _Mod<_Tp, __m, __a, __c, false, true> > { > static _Tp > __calc(_Tp __x); > }; > > > > > template<typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool __s> > struct _Mod<_Tp, __m, __a, __c, true, __s> > { > static _Tp > __calc(_Tp __x) > { > _Tp __res = __a * __x + __c; > if (__m) > __res %= __m; > return __res; > } > }; > > template<typename _Tp, _Tp __m, _Tp __a = 1, _Tp __c = 0> > inline _Tp > __mod(_Tp __x) > { > if constexpr (__a == 0) > return __c; > else > { > > constexpr _Tp __a1 = __a ? __a : 1; > return _Mod<_Tp, __m, __a1, __c>::__calc(__x); > } > } > > > > > > template<typename _Engine, typename _DInputType> > struct _Adaptor > { > static_assert(std::is_floating_point<_DInputType>::value, > "template argument must be a floating point type"); > > public: > _Adaptor(_Engine& __g) > : _M_g(__g) { } > > _DInputType > min() const > { return _DInputType(0); } > > _DInputType > max() const > { return _DInputType(1); } > > > > > > > _DInputType > operator()() > { > return std::generate_canonical<_DInputType, > std::numeric_limits<_DInputType>::digits, > _Engine>(_M_g); > } > > private: > _Engine& _M_g; > }; > > > > > > > template<typename _Sseq> > using __seed_seq_generate_t = decltype( > std::declval<_Sseq&>().generate(std::declval<uint_least32_t*>(), > std::declval<uint_least32_t*>())); > > template<typename _Sseq, typename _Engine, typename _Res, > typename _GenerateCheck = __seed_seq_generate_t<_Sseq>> > using _If_seed_seq_for = _Require< > __not_<is_same<__remove_cvref_t<_Sseq>, _Engine>>, > is_unsigned<typename _Sseq::result_type>, > __not_<is_convertible<_Sseq, _Res>> > >; > > } ># 260 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> > class linear_congruential_engine > { > static_assert(std::is_unsigned<_UIntType>::value, > "result_type must be an unsigned integral type"); > static_assert(__m == 0u || (__a < __m && __c < __m), > "template argument substituting __m out of bounds"); > > template<typename _Sseq> > using _If_seed_seq > = __detail::_If_seed_seq_for<_Sseq, linear_congruential_engine, > _UIntType>; > > public: > > typedef _UIntType result_type; > > > static constexpr result_type multiplier = __a; > > static constexpr result_type increment = __c; > > static constexpr result_type modulus = __m; > static constexpr result_type default_seed = 1u; > > > > > > linear_congruential_engine() : linear_congruential_engine(default_seed) > { } ># 299 "/usr/include/c++/13/bits/random.h" 3 > explicit > linear_congruential_engine(result_type __s) > { seed(__s); } > > > > > > > > template<typename _Sseq, typename = _If_seed_seq<_Sseq>> > explicit > linear_congruential_engine(_Sseq& __q) > { seed(__q); } > > > > > > > > void > seed(result_type __s = default_seed); ># 330 "/usr/include/c++/13/bits/random.h" 3 > template<typename _Sseq> > _If_seed_seq<_Sseq> > seed(_Sseq& __q); > > > > > > > > static constexpr result_type > min() > { return __c == 0u ? 1u : 0u; } > > > > > static constexpr result_type > max() > { return __m - 1u; } > > > > > void > discard(unsigned long long __z) > { > for (; __z != 0ULL; --__z) > (*this)(); > } > > > > > result_type > operator()() > { > _M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x); > return _M_x; > } ># 382 "/usr/include/c++/13/bits/random.h" 3 > friend bool > operator==(const linear_congruential_engine& __lhs, > const linear_congruential_engine& __rhs) > { return __lhs._M_x == __rhs._M_x; } ># 395 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1, > _UIntType1 __m1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::linear_congruential_engine<_UIntType1, > __a1, __c1, __m1>& __lcr); ># 415 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1, > _UIntType1 __m1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::linear_congruential_engine<_UIntType1, __a1, > __c1, __m1>& __lcr); > > private: > _UIntType _M_x; > }; ># 438 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> > inline bool > operator!=(const std::linear_congruential_engine<_UIntType, __a, > __c, __m>& __lhs, > const std::linear_congruential_engine<_UIntType, __a, > __c, __m>& __rhs) > { return !(__lhs == __rhs); } ># 475 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType, size_t __w, > size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, > _UIntType __c, size_t __l, _UIntType __f> > class mersenne_twister_engine > { > static_assert(std::is_unsigned<_UIntType>::value, > "result_type must be an unsigned integral type"); > static_assert(1u <= __m && __m <= __n, > "template argument substituting __m out of bounds"); > static_assert(__r <= __w, "template argument substituting " > "__r out of bound"); > static_assert(__u <= __w, "template argument substituting " > "__u out of bound"); > static_assert(__s <= __w, "template argument substituting " > "__s out of bound"); > static_assert(__t <= __w, "template argument substituting " > "__t out of bound"); > static_assert(__l <= __w, "template argument substituting " > "__l out of bound"); > static_assert(__w <= std::numeric_limits<_UIntType>::digits, > "template argument substituting __w out of bound"); > static_assert(__a <= (__detail::_Shift<_UIntType, __w>::__value - 1), > "template argument substituting __a out of bound"); > static_assert(__b <= (__detail::_Shift<_UIntType, __w>::__value - 1), > "template argument substituting __b out of bound"); > static_assert(__c <= (__detail::_Shift<_UIntType, __w>::__value - 1), > "template argument substituting __c out of bound"); > static_assert(__d <= (__detail::_Shift<_UIntType, __w>::__value - 1), > "template argument substituting __d out of bound"); > static_assert(__f <= (__detail::_Shift<_UIntType, __w>::__value - 1), > "template argument substituting __f out of bound"); > > template<typename _Sseq> > using _If_seed_seq > = __detail::_If_seed_seq_for<_Sseq, mersenne_twister_engine, > _UIntType>; > > public: > > typedef _UIntType result_type; > > > static constexpr size_t word_size = __w; > static constexpr size_t state_size = __n; > static constexpr size_t shift_size = __m; > static constexpr size_t mask_bits = __r; > static constexpr result_type xor_mask = __a; > static constexpr size_t tempering_u = __u; > static constexpr result_type tempering_d = __d; > static constexpr size_t tempering_s = __s; > static constexpr result_type tempering_b = __b; > static constexpr size_t tempering_t = __t; > static constexpr result_type tempering_c = __c; > static constexpr size_t tempering_l = __l; > static constexpr result_type initialization_multiplier = __f; > static constexpr result_type default_seed = 5489u; > > > > mersenne_twister_engine() : mersenne_twister_engine(default_seed) { } > > explicit > mersenne_twister_engine(result_type __sd) > { seed(__sd); } > > > > > > > > template<typename _Sseq, typename = _If_seed_seq<_Sseq>> > explicit > mersenne_twister_engine(_Sseq& __q) > { seed(__q); } > > void > seed(result_type __sd = default_seed); > > template<typename _Sseq> > _If_seed_seq<_Sseq> > seed(_Sseq& __q); > > > > > static constexpr result_type > min() > { return 0; } > > > > > static constexpr result_type > max() > { return __detail::_Shift<_UIntType, __w>::__value - 1; } > > > > > void > discard(unsigned long long __z); > > result_type > operator()(); ># 595 "/usr/include/c++/13/bits/random.h" 3 > friend bool > operator==(const mersenne_twister_engine& __lhs, > const mersenne_twister_engine& __rhs) > { return (std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x) > && __lhs._M_p == __rhs._M_p); } ># 613 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType1, > size_t __w1, size_t __n1, > size_t __m1, size_t __r1, > _UIntType1 __a1, size_t __u1, > _UIntType1 __d1, size_t __s1, > _UIntType1 __b1, size_t __t1, > _UIntType1 __c1, size_t __l1, _UIntType1 __f1, > typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::mersenne_twister_engine<_UIntType1, __w1, __n1, > __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, > __l1, __f1>& __x); ># 639 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType1, > size_t __w1, size_t __n1, > size_t __m1, size_t __r1, > _UIntType1 __a1, size_t __u1, > _UIntType1 __d1, size_t __s1, > _UIntType1 __b1, size_t __t1, > _UIntType1 __c1, size_t __l1, _UIntType1 __f1, > typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::mersenne_twister_engine<_UIntType1, __w1, __n1, __m1, > __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, > __l1, __f1>& __x); > > private: > void _M_gen_rand(); > > _UIntType _M_x[state_size]; > size_t _M_p; > }; ># 673 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType, size_t __w, > size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, > _UIntType __c, size_t __l, _UIntType __f> > inline bool > operator!=(const std::mersenne_twister_engine<_UIntType, __w, __n, __m, > __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs, > const std::mersenne_twister_engine<_UIntType, __w, __n, __m, > __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs) > { return !(__lhs == __rhs); } ># 701 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType, size_t __w, size_t __s, size_t __r> > class subtract_with_carry_engine > { > static_assert(std::is_unsigned<_UIntType>::value, > "result_type must be an unsigned integral type"); > static_assert(0u < __s && __s < __r, > "0 < s < r"); > static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, > "template argument substituting __w out of bounds"); > > template<typename _Sseq> > using _If_seed_seq > = __detail::_If_seed_seq_for<_Sseq, subtract_with_carry_engine, > _UIntType>; > > public: > > typedef _UIntType result_type; > > > static constexpr size_t word_size = __w; > static constexpr size_t short_lag = __s; > static constexpr size_t long_lag = __r; > static constexpr uint_least32_t default_seed = 19780503u; > > subtract_with_carry_engine() : subtract_with_carry_engine(0u) > { } > > > > > > explicit > subtract_with_carry_engine(result_type __sd) > { seed(__sd); } > > > > > > > > template<typename _Sseq, typename = _If_seed_seq<_Sseq>> > explicit > subtract_with_carry_engine(_Sseq& __q) > { seed(__q); } ># 760 "/usr/include/c++/13/bits/random.h" 3 > void > seed(result_type __sd = 0u); > > > > > > template<typename _Sseq> > _If_seed_seq<_Sseq> > seed(_Sseq& __q); > > > > > > static constexpr result_type > min() > { return 0; } > > > > > > static constexpr result_type > max() > { return __detail::_Shift<_UIntType, __w>::__value - 1; } > > > > > void > discard(unsigned long long __z) > { > for (; __z != 0ULL; --__z) > (*this)(); > } > > > > > result_type > operator()(); ># 815 "/usr/include/c++/13/bits/random.h" 3 > friend bool > operator==(const subtract_with_carry_engine& __lhs, > const subtract_with_carry_engine& __rhs) > { return (std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x) > && __lhs._M_carry == __rhs._M_carry > && __lhs._M_p == __rhs._M_p); } ># 834 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1, > typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::subtract_with_carry_engine<_UIntType1, __w1, > __s1, __r1>& __x); ># 853 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1, > typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::subtract_with_carry_engine<_UIntType1, __w1, > __s1, __r1>& __x); > > private: > > _UIntType _M_x[long_lag]; > _UIntType _M_carry; > size_t _M_p; > }; ># 880 "/usr/include/c++/13/bits/random.h" 3 > template<typename _UIntType, size_t __w, size_t __s, size_t __r> > inline bool > operator!=(const std::subtract_with_carry_engine<_UIntType, __w, > __s, __r>& __lhs, > const std::subtract_with_carry_engine<_UIntType, __w, > __s, __r>& __rhs) > { return !(__lhs == __rhs); } ># 895 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine, size_t __p, size_t __r> > class discard_block_engine > { > static_assert(1 <= __r && __r <= __p, > "template argument substituting __r out of bounds"); > > public: > > typedef typename _RandomNumberEngine::result_type result_type; > > template<typename _Sseq> > using _If_seed_seq > = __detail::_If_seed_seq_for<_Sseq, discard_block_engine, > result_type>; > > > static constexpr size_t block_size = __p; > static constexpr size_t used_block = __r; > > > > > > > discard_block_engine() > : _M_b(), _M_n(0) { } > > > > > > > > explicit > discard_block_engine(const _RandomNumberEngine& __rng) > : _M_b(__rng), _M_n(0) { } > > > > > > > > explicit > discard_block_engine(_RandomNumberEngine&& __rng) > : _M_b(std::move(__rng)), _M_n(0) { } > > > > > > > > explicit > discard_block_engine(result_type __s) > : _M_b(__s), _M_n(0) { } > > > > > > > template<typename _Sseq, typename = _If_seed_seq<_Sseq>> > explicit > discard_block_engine(_Sseq& __q) > : _M_b(__q), _M_n(0) > { } > > > > > > void > seed() > { > _M_b.seed(); > _M_n = 0; > } > > > > > > void > seed(result_type __s) > { > _M_b.seed(__s); > _M_n = 0; > } > > > > > > > template<typename _Sseq> > _If_seed_seq<_Sseq> > seed(_Sseq& __q) > { > _M_b.seed(__q); > _M_n = 0; > } > > > > > > const _RandomNumberEngine& > base() const noexcept > { return _M_b; } > > > > > static constexpr result_type > min() > { return _RandomNumberEngine::min(); } > > > > > static constexpr result_type > max() > { return _RandomNumberEngine::max(); } > > > > > void > discard(unsigned long long __z) > { > for (; __z != 0ULL; --__z) > (*this)(); > } > > > > > result_type > operator()(); ># 1047 "/usr/include/c++/13/bits/random.h" 3 > friend bool > operator==(const discard_block_engine& __lhs, > const discard_block_engine& __rhs) > { return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; } ># 1063 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine1, size_t __p1, size_t __r1, > typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::discard_block_engine<_RandomNumberEngine1, > __p1, __r1>& __x); ># 1081 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine1, size_t __p1, size_t __r1, > typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::discard_block_engine<_RandomNumberEngine1, > __p1, __r1>& __x); > > private: > _RandomNumberEngine _M_b; > size_t _M_n; > }; ># 1105 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine, size_t __p, size_t __r> > inline bool > operator!=(const std::discard_block_engine<_RandomNumberEngine, __p, > __r>& __lhs, > const std::discard_block_engine<_RandomNumberEngine, __p, > __r>& __rhs) > { return !(__lhs == __rhs); } > > > > > > > template<typename _RandomNumberEngine, size_t __w, typename _UIntType> > class independent_bits_engine > { > static_assert(std::is_unsigned<_UIntType>::value, > "result_type must be an unsigned integral type"); > static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, > "template argument substituting __w out of bounds"); > > template<typename _Sseq> > using _If_seed_seq > = __detail::_If_seed_seq_for<_Sseq, independent_bits_engine, > _UIntType>; > > public: > > typedef _UIntType result_type; > > > > > > > independent_bits_engine() > : _M_b() { } > > > > > > > > explicit > independent_bits_engine(const _RandomNumberEngine& __rng) > : _M_b(__rng) { } > > > > > > > > explicit > independent_bits_engine(_RandomNumberEngine&& __rng) > : _M_b(std::move(__rng)) { } > > > > > > > > explicit > independent_bits_engine(result_type __s) > : _M_b(__s) { } > > > > > > > template<typename _Sseq, typename = _If_seed_seq<_Sseq>> > explicit > independent_bits_engine(_Sseq& __q) > : _M_b(__q) > { } > > > > > > void > seed() > { _M_b.seed(); } > > > > > > void > seed(result_type __s) > { _M_b.seed(__s); } > > > > > > > template<typename _Sseq> > _If_seed_seq<_Sseq> > seed(_Sseq& __q) > { _M_b.seed(__q); } > > > > > > const _RandomNumberEngine& > base() const noexcept > { return _M_b; } > > > > > static constexpr result_type > min() > { return 0U; } > > > > > static constexpr result_type > max() > { return __detail::_Shift<_UIntType, __w>::__value - 1; } > > > > > void > discard(unsigned long long __z) > { > for (; __z != 0ULL; --__z) > (*this)(); > } > > > > > result_type > operator()(); ># 1260 "/usr/include/c++/13/bits/random.h" 3 > friend bool > operator==(const independent_bits_engine& __lhs, > const independent_bits_engine& __rhs) > { return __lhs._M_b == __rhs._M_b; } ># 1277 "/usr/include/c++/13/bits/random.h" 3 > template<typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::independent_bits_engine<_RandomNumberEngine, > __w, _UIntType>& __x) > { > __is >> __x._M_b; > return __is; > } > > private: > _RandomNumberEngine _M_b; > }; ># 1304 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine, size_t __w, typename _UIntType> > inline bool > operator!=(const std::independent_bits_engine<_RandomNumberEngine, __w, > _UIntType>& __lhs, > const std::independent_bits_engine<_RandomNumberEngine, __w, > _UIntType>& __rhs) > { return !(__lhs == __rhs); } ># 1323 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine, size_t __w, typename _UIntType, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::independent_bits_engine<_RandomNumberEngine, > __w, _UIntType>& __x) > { > __os << __x.base(); > return __os; > } ># 1342 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine, size_t __k> > class shuffle_order_engine > { > static_assert(1u <= __k, "template argument substituting " > "__k out of bound"); > > public: > > typedef typename _RandomNumberEngine::result_type result_type; > > template<typename _Sseq> > using _If_seed_seq > = __detail::_If_seed_seq_for<_Sseq, shuffle_order_engine, > result_type>; > > static constexpr size_t table_size = __k; > > > > > > > shuffle_order_engine() > : _M_b() > { _M_initialize(); } > > > > > > > > explicit > shuffle_order_engine(const _RandomNumberEngine& __rng) > : _M_b(__rng) > { _M_initialize(); } > > > > > > > > explicit > shuffle_order_engine(_RandomNumberEngine&& __rng) > : _M_b(std::move(__rng)) > { _M_initialize(); } > > > > > > > > explicit > shuffle_order_engine(result_type __s) > : _M_b(__s) > { _M_initialize(); } > > > > > > > template<typename _Sseq, typename = _If_seed_seq<_Sseq>> > explicit > shuffle_order_engine(_Sseq& __q) > : _M_b(__q) > { _M_initialize(); } > > > > > > void > seed() > { > _M_b.seed(); > _M_initialize(); > } > > > > > > void > seed(result_type __s) > { > _M_b.seed(__s); > _M_initialize(); > } > > > > > > > template<typename _Sseq> > _If_seed_seq<_Sseq> > seed(_Sseq& __q) > { > _M_b.seed(__q); > _M_initialize(); > } > > > > > const _RandomNumberEngine& > base() const noexcept > { return _M_b; } > > > > > static constexpr result_type > min() > { return _RandomNumberEngine::min(); } > > > > > static constexpr result_type > max() > { return _RandomNumberEngine::max(); } > > > > > void > discard(unsigned long long __z) > { > for (; __z != 0ULL; --__z) > (*this)(); > } > > > > > result_type > operator()(); ># 1495 "/usr/include/c++/13/bits/random.h" 3 > friend bool > operator==(const shuffle_order_engine& __lhs, > const shuffle_order_engine& __rhs) > { return (__lhs._M_b == __rhs._M_b > && std::equal(__lhs._M_v, __lhs._M_v + __k, __rhs._M_v) > && __lhs._M_y == __rhs._M_y); } ># 1513 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine1, size_t __k1, > typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::shuffle_order_engine<_RandomNumberEngine1, > __k1>& __x); ># 1531 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine1, size_t __k1, > typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::shuffle_order_engine<_RandomNumberEngine1, __k1>& __x); > > private: > void _M_initialize() > { > for (size_t __i = 0; __i < __k; ++__i) > _M_v[__i] = _M_b(); > _M_y = _M_b(); > } > > _RandomNumberEngine _M_b; > result_type _M_v[__k]; > result_type _M_y; > }; ># 1562 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RandomNumberEngine, size_t __k> > inline bool > operator!=(const std::shuffle_order_engine<_RandomNumberEngine, > __k>& __lhs, > const std::shuffle_order_engine<_RandomNumberEngine, > __k>& __rhs) > { return !(__lhs == __rhs); } > > > > > > typedef linear_congruential_engine<uint_fast32_t, 16807UL, 0UL, 2147483647UL> > minstd_rand0; > > > > > typedef linear_congruential_engine<uint_fast32_t, 48271UL, 0UL, 2147483647UL> > minstd_rand; ># 1591 "/usr/include/c++/13/bits/random.h" 3 > typedef mersenne_twister_engine< > uint_fast32_t, > 32, 624, 397, 31, > 0x9908b0dfUL, 11, > 0xffffffffUL, 7, > 0x9d2c5680UL, 15, > 0xefc60000UL, 18, 1812433253UL> mt19937; > > > > > typedef mersenne_twister_engine< > uint_fast64_t, > 64, 312, 156, 31, > 0xb5026f5aa96619e9ULL, 29, > 0x5555555555555555ULL, 17, > 0x71d67fffeda60000ULL, 37, > 0xfff7eee000000000ULL, 43, > 6364136223846793005ULL> mt19937_64; > > typedef subtract_with_carry_engine<uint_fast32_t, 24, 10, 24> > ranlux24_base; > > typedef subtract_with_carry_engine<uint_fast64_t, 48, 5, 12> > ranlux48_base; > > typedef discard_block_engine<ranlux24_base, 223, 23> ranlux24; > > typedef discard_block_engine<ranlux48_base, 389, 11> ranlux48; > > typedef shuffle_order_engine<minstd_rand0, 256> knuth_b; > > typedef minstd_rand0 default_random_engine; > > > > > > class random_device > { > public: > > typedef unsigned int result_type; > > > > random_device() { _M_init("default"); } > > explicit > random_device(const std::string& __token) { _M_init(__token); } > > ~random_device() > { _M_fini(); } > > static constexpr result_type > min() > { return std::numeric_limits<result_type>::min(); } > > static constexpr result_type > max() > { return std::numeric_limits<result_type>::max(); } > > double > entropy() const noexcept > { return this->_M_getentropy(); } > > result_type > operator()() > { return this->_M_getval(); } > > > random_device(const random_device&) = delete; > void operator=(const random_device&) = delete; > > private: > > void _M_init(const std::string& __token); > void _M_init_pretr1(const std::string& __token); > void _M_fini(); > > result_type _M_getval(); > result_type _M_getval_pretr1(); > double _M_getentropy() const noexcept; > > void _M_init(const char*, size_t); > > __extension__ union > { > struct > { > void* _M_file; > result_type (*_M_func)(void*); > int _M_fd; > }; > mt19937 _M_mt; > }; > }; ># 1710 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType> > inline bool > operator!=(const std::uniform_int_distribution<_IntType>& __d1, > const std::uniform_int_distribution<_IntType>& __d2) > { return !(__d1 == __d2); } ># 1727 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>&, > const std::uniform_int_distribution<_IntType>&); ># 1741 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>&, > std::uniform_int_distribution<_IntType>&); ># 1754 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class uniform_real_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef uniform_real_distribution<_RealType> distribution_type; > > param_type() : param_type(0) { } > > explicit > param_type(_RealType __a, _RealType __b = _RealType(1)) > : _M_a(__a), _M_b(__b) > { > do { if (std::__is_constant_evaluated() && !bool(_M_a <= _M_b)) __builtin_unreachable(); } while (false); > } > > result_type > a() const > { return _M_a; } > > result_type > b() const > { return _M_b; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_a; > _RealType _M_b; > }; > > public: > > > > > > uniform_real_distribution() : uniform_real_distribution(0.0) { } > > > > > > > > explicit > uniform_real_distribution(_RealType __a, _RealType __b = _RealType(1)) > : _M_param(__a, __b) > { } > > explicit > uniform_real_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > > > void > reset() { } > > result_type > a() const > { return _M_param.a(); } > > result_type > b() const > { return _M_param.b(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return this->a(); } > > > > > result_type > max() const > { return this->b(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > return (__aurng() * (__p.b() - __p.a())) + __p.a(); > } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const uniform_real_distribution& __d1, > const uniform_real_distribution& __d2) > { return __d1._M_param == __d2._M_param; } > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _IntType> > inline bool > operator!=(const std::uniform_real_distribution<_IntType>& __d1, > const std::uniform_real_distribution<_IntType>& __d2) > { return !(__d1 == __d2); } ># 1952 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>&, > const std::uniform_real_distribution<_RealType>&); ># 1966 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>&, > std::uniform_real_distribution<_RealType>&); ># 1988 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class normal_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef normal_distribution<_RealType> distribution_type; > > param_type() : param_type(0.0) { } > > explicit > param_type(_RealType __mean, _RealType __stddev = _RealType(1)) > : _M_mean(__mean), _M_stddev(__stddev) > { > do { if (std::__is_constant_evaluated() && !bool(_M_stddev > _RealType(0))) __builtin_unreachable(); } while (false); > } > > _RealType > mean() const > { return _M_mean; } > > _RealType > stddev() const > { return _M_stddev; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return (__p1._M_mean == __p2._M_mean > && __p1._M_stddev == __p2._M_stddev); } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_mean; > _RealType _M_stddev; > }; > > public: > normal_distribution() : normal_distribution(0.0) { } > > > > > > explicit > normal_distribution(result_type __mean, > result_type __stddev = result_type(1)) > : _M_param(__mean, __stddev) > { } > > explicit > normal_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > void > reset() > { _M_saved_available = false; } > > > > > _RealType > mean() const > { return _M_param.mean(); } > > > > > _RealType > stddev() const > { return _M_param.stddev(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return std::numeric_limits<result_type>::lowest(); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > > template<typename _RealType1> > friend bool > operator==(const std::normal_distribution<_RealType1>& __d1, > const std::normal_distribution<_RealType1>& __d2); ># 2159 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::normal_distribution<_RealType1>& __x); ># 2174 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::normal_distribution<_RealType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > result_type _M_saved = 0; > bool _M_saved_available = false; > }; > > > > > > template<typename _RealType> > inline bool > operator!=(const std::normal_distribution<_RealType>& __d1, > const std::normal_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 2212 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class lognormal_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef lognormal_distribution<_RealType> distribution_type; > > param_type() : param_type(0.0) { } > > explicit > param_type(_RealType __m, _RealType __s = _RealType(1)) > : _M_m(__m), _M_s(__s) > { } > > _RealType > m() const > { return _M_m; } > > _RealType > s() const > { return _M_s; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_m == __p2._M_m && __p1._M_s == __p2._M_s; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_m; > _RealType _M_s; > }; > > lognormal_distribution() : lognormal_distribution(0.0) { } > > explicit > lognormal_distribution(_RealType __m, _RealType __s = _RealType(1)) > : _M_param(__m, __s), _M_nd() > { } > > explicit > lognormal_distribution(const param_type& __p) > : _M_param(__p), _M_nd() > { } > > > > > void > reset() > { _M_nd.reset(); } > > > > > _RealType > m() const > { return _M_param.m(); } > > _RealType > s() const > { return _M_param.s(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return result_type(0); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { return std::exp(__p.s() * _M_nd(__urng) + __p.m()); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > > friend bool > operator==(const lognormal_distribution& __d1, > const lognormal_distribution& __d2) > { return (__d1._M_param == __d2._M_param > && __d1._M_nd == __d2._M_nd); } ># 2373 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::lognormal_distribution<_RealType1>& __x); ># 2388 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::lognormal_distribution<_RealType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > > std::normal_distribution<result_type> _M_nd; > }; > > > > > > template<typename _RealType> > inline bool > operator!=(const std::lognormal_distribution<_RealType>& __d1, > const std::lognormal_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 2426 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class gamma_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef gamma_distribution<_RealType> distribution_type; > friend class gamma_distribution<_RealType>; > > param_type() : param_type(1.0) { } > > explicit > param_type(_RealType __alpha_val, _RealType __beta_val = _RealType(1)) > : _M_alpha(__alpha_val), _M_beta(__beta_val) > { > do { if (std::__is_constant_evaluated() && !bool(_M_alpha > _RealType(0))) __builtin_unreachable(); } while (false); > _M_initialize(); > } > > _RealType > alpha() const > { return _M_alpha; } > > _RealType > beta() const > { return _M_beta; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return (__p1._M_alpha == __p2._M_alpha > && __p1._M_beta == __p2._M_beta); } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > void > _M_initialize(); > > _RealType _M_alpha; > _RealType _M_beta; > > _RealType _M_malpha, _M_a2; > }; > > public: > > > > gamma_distribution() : gamma_distribution(1.0) { } > > > > > > explicit > gamma_distribution(_RealType __alpha_val, > _RealType __beta_val = _RealType(1)) > : _M_param(__alpha_val, __beta_val), _M_nd() > { } > > explicit > gamma_distribution(const param_type& __p) > : _M_param(__p), _M_nd() > { } > > > > > void > reset() > { _M_nd.reset(); } > > > > > _RealType > alpha() const > { return _M_param.alpha(); } > > > > > _RealType > beta() const > { return _M_param.beta(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return result_type(0); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > > friend bool > operator==(const gamma_distribution& __d1, > const gamma_distribution& __d2) > { return (__d1._M_param == __d2._M_param > && __d1._M_nd == __d2._M_nd); } ># 2608 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::gamma_distribution<_RealType1>& __x); ># 2622 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::gamma_distribution<_RealType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > > std::normal_distribution<result_type> _M_nd; > }; > > > > > > template<typename _RealType> > inline bool > operator!=(const std::gamma_distribution<_RealType>& __d1, > const std::gamma_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 2657 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class chi_squared_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef chi_squared_distribution<_RealType> distribution_type; > > param_type() : param_type(1) { } > > explicit > param_type(_RealType __n) > : _M_n(__n) > { } > > _RealType > n() const > { return _M_n; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_n == __p2._M_n; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_n; > }; > > chi_squared_distribution() : chi_squared_distribution(1) { } > > explicit > chi_squared_distribution(_RealType __n) > : _M_param(__n), _M_gd(__n / 2) > { } > > explicit > chi_squared_distribution(const param_type& __p) > : _M_param(__p), _M_gd(__p.n() / 2) > { } > > > > > void > reset() > { _M_gd.reset(); } > > > > > _RealType > n() const > { return _M_param.n(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { > _M_param = __param; > typedef typename std::gamma_distribution<result_type>::param_type > param_type; > _M_gd.param(param_type{__param.n() / 2}); > } > > > > > result_type > min() const > { return result_type(0); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return 2 * _M_gd(__urng); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > typedef typename std::gamma_distribution<result_type>::param_type > param_type; > return 2 * _M_gd(__urng, param_type(__p.n() / 2)); > } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate_impl(__f, __t, __urng); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { typename std::gamma_distribution<result_type>::param_type > __p2(__p.n() / 2); > this->__generate_impl(__f, __t, __urng, __p2); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate_impl(__f, __t, __urng); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { typename std::gamma_distribution<result_type>::param_type > __p2(__p.n() / 2); > this->__generate_impl(__f, __t, __urng, __p2); } > > > > > > > friend bool > operator==(const chi_squared_distribution& __d1, > const chi_squared_distribution& __d2) > { return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; } ># 2827 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::chi_squared_distribution<_RealType1>& __x); ># 2842 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::chi_squared_distribution<_RealType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const typename > std::gamma_distribution<result_type>::param_type& __p); > > param_type _M_param; > > std::gamma_distribution<result_type> _M_gd; > }; > > > > > > template<typename _RealType> > inline bool > operator!=(const std::chi_squared_distribution<_RealType>& __d1, > const std::chi_squared_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 2884 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class cauchy_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef cauchy_distribution<_RealType> distribution_type; > > param_type() : param_type(0) { } > > explicit > param_type(_RealType __a, _RealType __b = _RealType(1)) > : _M_a(__a), _M_b(__b) > { } > > _RealType > a() const > { return _M_a; } > > _RealType > b() const > { return _M_b; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_a; > _RealType _M_b; > }; > > cauchy_distribution() : cauchy_distribution(0.0) { } > > explicit > cauchy_distribution(_RealType __a, _RealType __b = 1.0) > : _M_param(__a, __b) > { } > > explicit > cauchy_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > void > reset() > { } > > > > > _RealType > a() const > { return _M_param.a(); } > > _RealType > b() const > { return _M_param.b(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return std::numeric_limits<result_type>::lowest(); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const cauchy_distribution& __d1, > const cauchy_distribution& __d2) > { return __d1._M_param == __d2._M_param; } > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _RealType> > inline bool > operator!=(const std::cauchy_distribution<_RealType>& __d1, > const std::cauchy_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 3065 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::cauchy_distribution<_RealType>& __x); ># 3080 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::cauchy_distribution<_RealType>& __x); ># 3096 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class fisher_f_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef fisher_f_distribution<_RealType> distribution_type; > > param_type() : param_type(1) { } > > explicit > param_type(_RealType __m, _RealType __n = _RealType(1)) > : _M_m(__m), _M_n(__n) > { } > > _RealType > m() const > { return _M_m; } > > _RealType > n() const > { return _M_n; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_m; > _RealType _M_n; > }; > > fisher_f_distribution() : fisher_f_distribution(1.0) { } > > explicit > fisher_f_distribution(_RealType __m, > _RealType __n = _RealType(1)) > : _M_param(__m, __n), _M_gd_x(__m / 2), _M_gd_y(__n / 2) > { } > > explicit > fisher_f_distribution(const param_type& __p) > : _M_param(__p), _M_gd_x(__p.m() / 2), _M_gd_y(__p.n() / 2) > { } > > > > > void > reset() > { > _M_gd_x.reset(); > _M_gd_y.reset(); > } > > > > > _RealType > m() const > { return _M_param.m(); } > > _RealType > n() const > { return _M_param.n(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return result_type(0); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return (_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m()); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > typedef typename std::gamma_distribution<result_type>::param_type > param_type; > return ((_M_gd_x(__urng, param_type(__p.m() / 2)) * n()) > / (_M_gd_y(__urng, param_type(__p.n() / 2)) * m())); > } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate_impl(__f, __t, __urng); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate_impl(__f, __t, __urng); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > > friend bool > operator==(const fisher_f_distribution& __d1, > const fisher_f_distribution& __d2) > { return (__d1._M_param == __d2._M_param > && __d1._M_gd_x == __d2._M_gd_x > && __d1._M_gd_y == __d2._M_gd_y); } ># 3273 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::fisher_f_distribution<_RealType1>& __x); ># 3288 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::fisher_f_distribution<_RealType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > > std::gamma_distribution<result_type> _M_gd_x, _M_gd_y; > }; > > > > > > template<typename _RealType> > inline bool > operator!=(const std::fisher_f_distribution<_RealType>& __d1, > const std::fisher_f_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 3332 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class student_t_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef student_t_distribution<_RealType> distribution_type; > > param_type() : param_type(1) { } > > explicit > param_type(_RealType __n) > : _M_n(__n) > { } > > _RealType > n() const > { return _M_n; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_n == __p2._M_n; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_n; > }; > > student_t_distribution() : student_t_distribution(1.0) { } > > explicit > student_t_distribution(_RealType __n) > : _M_param(__n), _M_nd(), _M_gd(__n / 2, 2) > { } > > explicit > student_t_distribution(const param_type& __p) > : _M_param(__p), _M_nd(), _M_gd(__p.n() / 2, 2) > { } > > > > > void > reset() > { > _M_nd.reset(); > _M_gd.reset(); > } > > > > > _RealType > n() const > { return _M_param.n(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return std::numeric_limits<result_type>::lowest(); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return _M_nd(__urng) * std::sqrt(n() / _M_gd(__urng)); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > typedef typename std::gamma_distribution<result_type>::param_type > param_type; > > const result_type __g = _M_gd(__urng, param_type(__p.n() / 2, 2)); > return _M_nd(__urng) * std::sqrt(__p.n() / __g); > } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate_impl(__f, __t, __urng); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate_impl(__f, __t, __urng); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > > friend bool > operator==(const student_t_distribution& __d1, > const student_t_distribution& __d2) > { return (__d1._M_param == __d2._M_param > && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); } ># 3499 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::student_t_distribution<_RealType1>& __x); ># 3514 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::student_t_distribution<_RealType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng); > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > > std::normal_distribution<result_type> _M_nd; > std::gamma_distribution<result_type> _M_gd; > }; > > > > > > template<typename _RealType> > inline bool > operator!=(const std::student_t_distribution<_RealType>& __d1, > const std::student_t_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 3563 "/usr/include/c++/13/bits/random.h" 3 > class bernoulli_distribution > { > public: > > typedef bool result_type; > > > struct param_type > { > typedef bernoulli_distribution distribution_type; > > param_type() : param_type(0.5) { } > > explicit > param_type(double __p) > : _M_p(__p) > { > do { if (std::__is_constant_evaluated() && !bool((_M_p >= 0.0) && (_M_p <= 1.0))) __builtin_unreachable(); } while (false); > } > > double > p() const > { return _M_p; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_p == __p2._M_p; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > double _M_p; > }; > > public: > > > > bernoulli_distribution() : bernoulli_distribution(0.5) { } > > > > > > > > explicit > bernoulli_distribution(double __p) > : _M_param(__p) > { } > > explicit > bernoulli_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > > > void > reset() { } > > > > > double > p() const > { return _M_param.p(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return std::numeric_limits<result_type>::min(); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > if ((__aurng() - __aurng.min()) > < __p.p() * (__aurng.max() - __aurng.min())) > return true; > return false; > } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const bernoulli_distribution& __d1, > const bernoulli_distribution& __d2) > { return __d1._M_param == __d2._M_param; } > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > inline bool > operator!=(const std::bernoulli_distribution& __d1, > const std::bernoulli_distribution& __d2) > { return !(__d1 == __d2); } ># 3750 "/usr/include/c++/13/bits/random.h" 3 > template<typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::bernoulli_distribution& __x); ># 3764 "/usr/include/c++/13/bits/random.h" 3 > template<typename _CharT, typename _Traits> > inline std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::bernoulli_distribution& __x) > { > double __p; > if (__is >> __p) > __x.param(bernoulli_distribution::param_type(__p)); > return __is; > } ># 3783 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType = int> > class binomial_distribution > { > static_assert(std::is_integral<_IntType>::value, > "result_type must be an integral type"); > > public: > > typedef _IntType result_type; > > > struct param_type > { > typedef binomial_distribution<_IntType> distribution_type; > friend class binomial_distribution<_IntType>; > > param_type() : param_type(1) { } > > explicit > param_type(_IntType __t, double __p = 0.5) > : _M_t(__t), _M_p(__p) > { > do { if (std::__is_constant_evaluated() && !bool((_M_t >= _IntType(0)) && (_M_p >= 0.0) && (_M_p <= 1.0))) __builtin_unreachable(); } while (false) > > ; > _M_initialize(); > } > > _IntType > t() const > { return _M_t; } > > double > p() const > { return _M_p; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > void > _M_initialize(); > > _IntType _M_t; > double _M_p; > > double _M_q; > > double _M_d1, _M_d2, _M_s1, _M_s2, _M_c, > _M_a1, _M_a123, _M_s, _M_lf, _M_lp1p; > > bool _M_easy; > }; > > > > binomial_distribution() : binomial_distribution(1) { } > > explicit > binomial_distribution(_IntType __t, double __p = 0.5) > : _M_param(__t, __p), _M_nd() > { } > > explicit > binomial_distribution(const param_type& __p) > : _M_param(__p), _M_nd() > { } > > > > > void > reset() > { _M_nd.reset(); } > > > > > _IntType > t() const > { return _M_param.t(); } > > > > > double > p() const > { return _M_param.p(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return 0; } > > > > > result_type > max() const > { return _M_param.t(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > > friend bool > operator==(const binomial_distribution& __d1, > const binomial_distribution& __d2) > > { return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; } ># 3967 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType1, > typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::binomial_distribution<_IntType1>& __x); ># 3983 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType1, > typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::binomial_distribution<_IntType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _UniformRandomNumberGenerator> > result_type > _M_waiting(_UniformRandomNumberGenerator& __urng, > _IntType __t, double __q); > > param_type _M_param; > > > std::normal_distribution<double> _M_nd; > }; > > > > > > template<typename _IntType> > inline bool > operator!=(const std::binomial_distribution<_IntType>& __d1, > const std::binomial_distribution<_IntType>& __d2) > { return !(__d1 == __d2); } ># 4026 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType = int> > class geometric_distribution > { > static_assert(std::is_integral<_IntType>::value, > "result_type must be an integral type"); > > public: > > typedef _IntType result_type; > > > struct param_type > { > typedef geometric_distribution<_IntType> distribution_type; > friend class geometric_distribution<_IntType>; > > param_type() : param_type(0.5) { } > > explicit > param_type(double __p) > : _M_p(__p) > { > do { if (std::__is_constant_evaluated() && !bool((_M_p > 0.0) && (_M_p < 1.0))) __builtin_unreachable(); } while (false); > _M_initialize(); > } > > double > p() const > { return _M_p; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_p == __p2._M_p; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > void > _M_initialize() > { _M_log_1_p = std::log(1.0 - _M_p); } > > double _M_p; > > double _M_log_1_p; > }; > > > > geometric_distribution() : geometric_distribution(0.5) { } > > explicit > geometric_distribution(double __p) > : _M_param(__p) > { } > > explicit > geometric_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > > > void > reset() { } > > > > > double > p() const > { return _M_param.p(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return 0; } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const geometric_distribution& __d1, > const geometric_distribution& __d2) > { return __d1._M_param == __d2._M_param; } > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _IntType> > inline bool > operator!=(const std::geometric_distribution<_IntType>& __d1, > const std::geometric_distribution<_IntType>& __d2) > { return !(__d1 == __d2); } ># 4211 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::geometric_distribution<_IntType>& __x); ># 4226 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType, > typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::geometric_distribution<_IntType>& __x); ># 4240 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType = int> > class negative_binomial_distribution > { > static_assert(std::is_integral<_IntType>::value, > "result_type must be an integral type"); > > public: > > typedef _IntType result_type; > > > struct param_type > { > typedef negative_binomial_distribution<_IntType> distribution_type; > > param_type() : param_type(1) { } > > explicit > param_type(_IntType __k, double __p = 0.5) > : _M_k(__k), _M_p(__p) > { > do { if (std::__is_constant_evaluated() && !bool((_M_k > 0) && (_M_p > 0.0) && (_M_p <= 1.0))) __builtin_unreachable(); } while (false); > } > > _IntType > k() const > { return _M_k; } > > double > p() const > { return _M_p; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _IntType _M_k; > double _M_p; > }; > > negative_binomial_distribution() : negative_binomial_distribution(1) { } > > explicit > negative_binomial_distribution(_IntType __k, double __p = 0.5) > : _M_param(__k, __p), _M_gd(__k, (1.0 - __p) / __p) > { } > > explicit > negative_binomial_distribution(const param_type& __p) > : _M_param(__p), _M_gd(__p.k(), (1.0 - __p.p()) / __p.p()) > { } > > > > > void > reset() > { _M_gd.reset(); } > > > > > _IntType > k() const > { return _M_param.k(); } > > > > > double > p() const > { return _M_param.p(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return result_type(0); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng); > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate_impl(__f, __t, __urng); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate_impl(__f, __t, __urng); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > > friend bool > operator==(const negative_binomial_distribution& __d1, > const negative_binomial_distribution& __d2) > { return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; } ># 4410 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::negative_binomial_distribution<_IntType1>& __x); ># 4425 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::negative_binomial_distribution<_IntType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng); > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > > std::gamma_distribution<double> _M_gd; > }; > > > > > > template<typename _IntType> > inline bool > operator!=(const std::negative_binomial_distribution<_IntType>& __d1, > const std::negative_binomial_distribution<_IntType>& __d2) > { return !(__d1 == __d2); } ># 4474 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType = int> > class poisson_distribution > { > static_assert(std::is_integral<_IntType>::value, > "result_type must be an integral type"); > > public: > > typedef _IntType result_type; > > > struct param_type > { > typedef poisson_distribution<_IntType> distribution_type; > friend class poisson_distribution<_IntType>; > > param_type() : param_type(1.0) { } > > explicit > param_type(double __mean) > : _M_mean(__mean) > { > do { if (std::__is_constant_evaluated() && !bool(_M_mean > 0.0)) __builtin_unreachable(); } while (false); > _M_initialize(); > } > > double > mean() const > { return _M_mean; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_mean == __p2._M_mean; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > > void > _M_initialize(); > > double _M_mean; > > double _M_lm_thr; > > double _M_lfm, _M_sm, _M_d, _M_scx, _M_1cx, _M_c2b, _M_cb; > > }; > > > > poisson_distribution() : poisson_distribution(1.0) { } > > explicit > poisson_distribution(double __mean) > : _M_param(__mean), _M_nd() > { } > > explicit > poisson_distribution(const param_type& __p) > : _M_param(__p), _M_nd() > { } > > > > > void > reset() > { _M_nd.reset(); } > > > > > double > mean() const > { return _M_param.mean(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return 0; } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > > friend bool > operator==(const poisson_distribution& __d1, > const poisson_distribution& __d2) > > { return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; } ># 4643 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::poisson_distribution<_IntType1>& __x); ># 4658 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::poisson_distribution<_IntType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > > > std::normal_distribution<double> _M_nd; > }; > > > > > > template<typename _IntType> > inline bool > operator!=(const std::poisson_distribution<_IntType>& __d1, > const std::poisson_distribution<_IntType>& __d2) > { return !(__d1 == __d2); } ># 4703 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class exponential_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef exponential_distribution<_RealType> distribution_type; > > param_type() : param_type(1.0) { } > > explicit > param_type(_RealType __lambda) > : _M_lambda(__lambda) > { > do { if (std::__is_constant_evaluated() && !bool(_M_lambda > _RealType(0))) __builtin_unreachable(); } while (false); > } > > _RealType > lambda() const > { return _M_lambda; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_lambda == __p2._M_lambda; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_lambda; > }; > > public: > > > > > exponential_distribution() : exponential_distribution(1.0) { } > > > > > > explicit > exponential_distribution(_RealType __lambda) > : _M_param(__lambda) > { } > > explicit > exponential_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > > > void > reset() { } > > > > > _RealType > lambda() const > { return _M_param.lambda(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return result_type(0); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > return -std::log(result_type(1) - __aurng()) / __p.lambda(); > } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const exponential_distribution& __d1, > const exponential_distribution& __d2) > { return __d1._M_param == __d2._M_param; } > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _RealType> > inline bool > operator!=(const std::exponential_distribution<_RealType>& __d1, > const std::exponential_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 4892 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::exponential_distribution<_RealType>& __x); ># 4907 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::exponential_distribution<_RealType>& __x); ># 4922 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class weibull_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef weibull_distribution<_RealType> distribution_type; > > param_type() : param_type(1.0) { } > > explicit > param_type(_RealType __a, _RealType __b = _RealType(1.0)) > : _M_a(__a), _M_b(__b) > { } > > _RealType > a() const > { return _M_a; } > > _RealType > b() const > { return _M_b; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_a; > _RealType _M_b; > }; > > weibull_distribution() : weibull_distribution(1.0) { } > > explicit > weibull_distribution(_RealType __a, _RealType __b = _RealType(1)) > : _M_param(__a, __b) > { } > > explicit > weibull_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > void > reset() > { } > > > > > _RealType > a() const > { return _M_param.a(); } > > > > > _RealType > b() const > { return _M_param.b(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return result_type(0); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const weibull_distribution& __d1, > const weibull_distribution& __d2) > { return __d1._M_param == __d2._M_param; } > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _RealType> > inline bool > operator!=(const std::weibull_distribution<_RealType>& __d1, > const std::weibull_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 5106 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::weibull_distribution<_RealType>& __x); ># 5121 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::weibull_distribution<_RealType>& __x); ># 5136 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class extreme_value_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef extreme_value_distribution<_RealType> distribution_type; > > param_type() : param_type(0.0) { } > > explicit > param_type(_RealType __a, _RealType __b = _RealType(1.0)) > : _M_a(__a), _M_b(__b) > { } > > _RealType > a() const > { return _M_a; } > > _RealType > b() const > { return _M_b; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > _RealType _M_a; > _RealType _M_b; > }; > > extreme_value_distribution() : extreme_value_distribution(0.0) { } > > explicit > extreme_value_distribution(_RealType __a, _RealType __b = _RealType(1)) > : _M_param(__a, __b) > { } > > explicit > extreme_value_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > void > reset() > { } > > > > > _RealType > a() const > { return _M_param.a(); } > > > > > _RealType > b() const > { return _M_param.b(); } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return std::numeric_limits<result_type>::lowest(); } > > > > > result_type > max() const > { return std::numeric_limits<result_type>::max(); } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const extreme_value_distribution& __d1, > const extreme_value_distribution& __d2) > { return __d1._M_param == __d2._M_param; } > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _RealType> > inline bool > operator!=(const std::extreme_value_distribution<_RealType>& __d1, > const std::extreme_value_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 5320 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::extreme_value_distribution<_RealType>& __x); ># 5335 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::extreme_value_distribution<_RealType>& __x); ># 5347 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType = int> > class discrete_distribution > { > static_assert(std::is_integral<_IntType>::value, > "result_type must be an integral type"); > > public: > > typedef _IntType result_type; > > > struct param_type > { > typedef discrete_distribution<_IntType> distribution_type; > friend class discrete_distribution<_IntType>; > > param_type() > : _M_prob(), _M_cp() > { } > > template<typename _InputIterator> > param_type(_InputIterator __wbegin, > _InputIterator __wend) > : _M_prob(__wbegin, __wend), _M_cp() > { _M_initialize(); } > > param_type(initializer_list<double> __wil) > : _M_prob(__wil.begin(), __wil.end()), _M_cp() > { _M_initialize(); } > > template<typename _Func> > param_type(size_t __nw, double __xmin, double __xmax, > _Func __fw); > > > param_type(const param_type&) = default; > param_type& operator=(const param_type&) = default; > > std::vector<double> > probabilities() const > { return _M_prob.empty() ? std::vector<double>(1, 1.0) : _M_prob; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_prob == __p2._M_prob; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > void > _M_initialize(); > > std::vector<double> _M_prob; > std::vector<double> _M_cp; > }; > > discrete_distribution() > : _M_param() > { } > > template<typename _InputIterator> > discrete_distribution(_InputIterator __wbegin, > _InputIterator __wend) > : _M_param(__wbegin, __wend) > { } > > discrete_distribution(initializer_list<double> __wl) > : _M_param(__wl) > { } > > template<typename _Func> > discrete_distribution(size_t __nw, double __xmin, double __xmax, > _Func __fw) > : _M_param(__nw, __xmin, __xmax, __fw) > { } > > explicit > discrete_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > void > reset() > { } > > > > > std::vector<double> > probabilities() const > { > return _M_param._M_prob.empty() > ? std::vector<double>(1, 1.0) : _M_param._M_prob; > } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { return result_type(0); } > > > > > result_type > max() const > { > return _M_param._M_prob.empty() > ? result_type(0) : result_type(_M_param._M_prob.size() - 1); > } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const discrete_distribution& __d1, > const discrete_distribution& __d2) > { return __d1._M_param == __d2._M_param; } ># 5535 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::discrete_distribution<_IntType1>& __x); ># 5551 "/usr/include/c++/13/bits/random.h" 3 > template<typename _IntType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::discrete_distribution<_IntType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _IntType> > inline bool > operator!=(const std::discrete_distribution<_IntType>& __d1, > const std::discrete_distribution<_IntType>& __d2) > { return !(__d1 == __d2); } ># 5585 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class piecewise_constant_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef piecewise_constant_distribution<_RealType> distribution_type; > friend class piecewise_constant_distribution<_RealType>; > > param_type() > : _M_int(), _M_den(), _M_cp() > { } > > template<typename _InputIteratorB, typename _InputIteratorW> > param_type(_InputIteratorB __bfirst, > _InputIteratorB __bend, > _InputIteratorW __wbegin); > > template<typename _Func> > param_type(initializer_list<_RealType> __bi, _Func __fw); > > template<typename _Func> > param_type(size_t __nw, _RealType __xmin, _RealType __xmax, > _Func __fw); > > > param_type(const param_type&) = default; > param_type& operator=(const param_type&) = default; > > std::vector<_RealType> > intervals() const > { > if (_M_int.empty()) > { > std::vector<_RealType> __tmp(2); > __tmp[1] = _RealType(1); > return __tmp; > } > else > return _M_int; > } > > std::vector<double> > densities() const > { return _M_den.empty() ? std::vector<double>(1, 1.0) : _M_den; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > void > _M_initialize(); > > std::vector<_RealType> _M_int; > std::vector<double> _M_den; > std::vector<double> _M_cp; > }; > > piecewise_constant_distribution() > : _M_param() > { } > > template<typename _InputIteratorB, typename _InputIteratorW> > piecewise_constant_distribution(_InputIteratorB __bfirst, > _InputIteratorB __bend, > _InputIteratorW __wbegin) > : _M_param(__bfirst, __bend, __wbegin) > { } > > template<typename _Func> > piecewise_constant_distribution(initializer_list<_RealType> __bl, > _Func __fw) > : _M_param(__bl, __fw) > { } > > template<typename _Func> > piecewise_constant_distribution(size_t __nw, > _RealType __xmin, _RealType __xmax, > _Func __fw) > : _M_param(__nw, __xmin, __xmax, __fw) > { } > > explicit > piecewise_constant_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > void > reset() > { } > > > > > std::vector<_RealType> > intervals() const > { > if (_M_param._M_int.empty()) > { > std::vector<_RealType> __tmp(2); > __tmp[1] = _RealType(1); > return __tmp; > } > else > return _M_param._M_int; > } > > > > > std::vector<double> > densities() const > { > return _M_param._M_den.empty() > ? std::vector<double>(1, 1.0) : _M_param._M_den; > } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { > return _M_param._M_int.empty() > ? result_type(0) : _M_param._M_int.front(); > } > > > > > result_type > max() const > { > return _M_param._M_int.empty() > ? result_type(1) : _M_param._M_int.back(); > } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const piecewise_constant_distribution& __d1, > const piecewise_constant_distribution& __d2) > { return __d1._M_param == __d2._M_param; } ># 5809 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::piecewise_constant_distribution<_RealType1>& __x); ># 5825 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::piecewise_constant_distribution<_RealType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _RealType> > inline bool > operator!=(const std::piecewise_constant_distribution<_RealType>& __d1, > const std::piecewise_constant_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 5859 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType = double> > class piecewise_linear_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "result_type must be a floating point type"); > > public: > > typedef _RealType result_type; > > > struct param_type > { > typedef piecewise_linear_distribution<_RealType> distribution_type; > friend class piecewise_linear_distribution<_RealType>; > > param_type() > : _M_int(), _M_den(), _M_cp(), _M_m() > { } > > template<typename _InputIteratorB, typename _InputIteratorW> > param_type(_InputIteratorB __bfirst, > _InputIteratorB __bend, > _InputIteratorW __wbegin); > > template<typename _Func> > param_type(initializer_list<_RealType> __bl, _Func __fw); > > template<typename _Func> > param_type(size_t __nw, _RealType __xmin, _RealType __xmax, > _Func __fw); > > > param_type(const param_type&) = default; > param_type& operator=(const param_type&) = default; > > std::vector<_RealType> > intervals() const > { > if (_M_int.empty()) > { > std::vector<_RealType> __tmp(2); > __tmp[1] = _RealType(1); > return __tmp; > } > else > return _M_int; > } > > std::vector<double> > densities() const > { return _M_den.empty() ? std::vector<double>(2, 1.0) : _M_den; } > > friend bool > operator==(const param_type& __p1, const param_type& __p2) > { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; } > > > friend bool > operator!=(const param_type& __p1, const param_type& __p2) > { return !(__p1 == __p2); } > > > private: > void > _M_initialize(); > > std::vector<_RealType> _M_int; > std::vector<double> _M_den; > std::vector<double> _M_cp; > std::vector<double> _M_m; > }; > > piecewise_linear_distribution() > : _M_param() > { } > > template<typename _InputIteratorB, typename _InputIteratorW> > piecewise_linear_distribution(_InputIteratorB __bfirst, > _InputIteratorB __bend, > _InputIteratorW __wbegin) > : _M_param(__bfirst, __bend, __wbegin) > { } > > template<typename _Func> > piecewise_linear_distribution(initializer_list<_RealType> __bl, > _Func __fw) > : _M_param(__bl, __fw) > { } > > template<typename _Func> > piecewise_linear_distribution(size_t __nw, > _RealType __xmin, _RealType __xmax, > _Func __fw) > : _M_param(__nw, __xmin, __xmax, __fw) > { } > > explicit > piecewise_linear_distribution(const param_type& __p) > : _M_param(__p) > { } > > > > > void > reset() > { } > > > > > std::vector<_RealType> > intervals() const > { > if (_M_param._M_int.empty()) > { > std::vector<_RealType> __tmp(2); > __tmp[1] = _RealType(1); > return __tmp; > } > else > return _M_param._M_int; > } > > > > > > std::vector<double> > densities() const > { > return _M_param._M_den.empty() > ? std::vector<double>(2, 1.0) : _M_param._M_den; > } > > > > > param_type > param() const > { return _M_param; } > > > > > > void > param(const param_type& __param) > { _M_param = __param; } > > > > > result_type > min() const > { > return _M_param._M_int.empty() > ? result_type(0) : _M_param._M_int.front(); > } > > > > > result_type > max() const > { > return _M_param._M_int.empty() > ? result_type(1) : _M_param._M_int.back(); > } > > > > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng) > { return this->operator()(__urng, _M_param); } > > template<typename _UniformRandomNumberGenerator> > result_type > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p); > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { this->__generate(__f, __t, __urng, _M_param); } > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > template<typename _UniformRandomNumberGenerator> > void > __generate(result_type* __f, result_type* __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { this->__generate_impl(__f, __t, __urng, __p); } > > > > > > friend bool > operator==(const piecewise_linear_distribution& __d1, > const piecewise_linear_distribution& __d2) > { return __d1._M_param == __d2._M_param; } ># 6085 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const std::piecewise_linear_distribution<_RealType1>& __x); ># 6101 "/usr/include/c++/13/bits/random.h" 3 > template<typename _RealType1, typename _CharT, typename _Traits> > friend std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > std::piecewise_linear_distribution<_RealType1>& __x); > > private: > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p); > > param_type _M_param; > }; > > > > > > > template<typename _RealType> > inline bool > operator!=(const std::piecewise_linear_distribution<_RealType>& __d1, > const std::piecewise_linear_distribution<_RealType>& __d2) > { return !(__d1 == __d2); } ># 6143 "/usr/include/c++/13/bits/random.h" 3 > class seed_seq > { > public: > > typedef uint_least32_t result_type; > > > seed_seq() noexcept > : _M_v() > { } > > template<typename _IntType, typename = _Require<is_integral<_IntType>>> > seed_seq(std::initializer_list<_IntType> __il); > > template<typename _InputIterator> > seed_seq(_InputIterator __begin, _InputIterator __end); > > > template<typename _RandomAccessIterator> > void > generate(_RandomAccessIterator __begin, _RandomAccessIterator __end); > > > size_t size() const noexcept > { return _M_v.size(); } > > template<typename _OutputIterator> > void > param(_OutputIterator __dest) const > { std::copy(_M_v.begin(), _M_v.end(), __dest); } > > > seed_seq(const seed_seq&) = delete; > seed_seq& operator=(const seed_seq&) = delete; > > private: > std::vector<result_type> _M_v; > }; > > > > > > >} ># 52 "/usr/include/c++/13/random" 2 3 ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/opt_random.h" 1 3 ># 38 "/usr/include/c++/13/x86_64-redhat-linux/bits/opt_random.h" 3 > ># 39 "/usr/include/c++/13/x86_64-redhat-linux/bits/opt_random.h" 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 217 "/usr/include/c++/13/x86_64-redhat-linux/bits/opt_random.h" 3 > >} ># 53 "/usr/include/c++/13/random" 2 3 ># 1 "/usr/include/c++/13/bits/random.tcc" 1 3 ># 35 "/usr/include/c++/13/bits/random.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > namespace __detail > { > > > > > > > template<typename _Tp, _Tp __m, _Tp __a, _Tp __c> > _Tp > _Mod<_Tp, __m, __a, __c, false, true>:: > __calc(_Tp __x) > { > if (__a == 1) > __x %= __m; > else > { > static const _Tp __q = __m / __a; > static const _Tp __r = __m % __a; > > _Tp __t1 = __a * (__x % __q); > _Tp __t2 = __r * (__x / __q); > if (__t1 >= __t2) > __x = __t1 - __t2; > else > __x = __m - __t2 + __t1; > } > > if (__c != 0) > { > const _Tp __d = __m - __x; > if (__d > __c) > __x += __c; > else > __x = __c - __d; > } > return __x; > } > > template<typename _InputIterator, typename _OutputIterator, > typename _Tp> > _OutputIterator > __normalize(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, const _Tp& __factor) > { > for (; __first != __last; ++__first, ++__result) > *__result = *__first / __factor; > return __result; > } > > } ># 116 "/usr/include/c++/13/bits/random.tcc" 3 > template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> > void > linear_congruential_engine<_UIntType, __a, __c, __m>:: > seed(result_type __s) > { > if ((__detail::__mod<_UIntType, __m>(__c) == 0) > && (__detail::__mod<_UIntType, __m>(__s) == 0)) > _M_x = 1; > else > _M_x = __detail::__mod<_UIntType, __m>(__s); > } > > > > > template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> > template<typename _Sseq> > auto > linear_congruential_engine<_UIntType, __a, __c, __m>:: > seed(_Sseq& __q) > -> _If_seed_seq<_Sseq> > { > const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits > : std::__lg(__m); > const _UIntType __k = (__k0 + 31) / 32; > uint_least32_t __arr[__k + 3]; > __q.generate(__arr + 0, __arr + __k + 3); > _UIntType __factor = 1u; > _UIntType __sum = 0u; > for (size_t __j = 0; __j < __k; ++__j) > { > __sum += __arr[__j + 3] * __factor; > __factor *= __detail::_Shift<_UIntType, 32>::__value; > } > seed(__sum); > } > > template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const linear_congruential_engine<_UIntType, > __a, __c, __m>& __lcr) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); > __os.fill(__os.widen(' ')); > > __os << __lcr._M_x; > > __os.flags(__flags); > __os.fill(__fill); > return __os; > } > > template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m, > typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > linear_congruential_engine<_UIntType, __a, __c, __m>& __lcr) > { > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec); > > __is >> __lcr._M_x; > > __is.flags(__flags); > return __is; > } ># 320 "/usr/include/c++/13/bits/random.tcc" 3 > template<typename _UIntType, > size_t __w, size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, _UIntType __c, size_t __l, > _UIntType __f> > void > mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, > __s, __b, __t, __c, __l, __f>:: > seed(result_type __sd) > { > _M_x[0] = __detail::__mod<_UIntType, > __detail::_Shift<_UIntType, __w>::__value>(__sd); > > for (size_t __i = 1; __i < state_size; ++__i) > { > _UIntType __x = _M_x[__i - 1]; > __x ^= __x >> (__w - 2); > __x *= __f; > __x += __detail::__mod<_UIntType, __n>(__i); > _M_x[__i] = __detail::__mod<_UIntType, > __detail::_Shift<_UIntType, __w>::__value>(__x); > } > _M_p = state_size; > } > > template<typename _UIntType, > size_t __w, size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, _UIntType __c, size_t __l, > _UIntType __f> > template<typename _Sseq> > auto > mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, > __s, __b, __t, __c, __l, __f>:: > seed(_Sseq& __q) > -> _If_seed_seq<_Sseq> > { > const _UIntType __upper_mask = (~_UIntType()) << __r; > const size_t __k = (__w + 31) / 32; > uint_least32_t __arr[__n * __k]; > __q.generate(__arr + 0, __arr + __n * __k); > > bool __zero = true; > for (size_t __i = 0; __i < state_size; ++__i) > { > _UIntType __factor = 1u; > _UIntType __sum = 0u; > for (size_t __j = 0; __j < __k; ++__j) > { > __sum += __arr[__k * __i + __j] * __factor; > __factor *= __detail::_Shift<_UIntType, 32>::__value; > } > _M_x[__i] = __detail::__mod<_UIntType, > __detail::_Shift<_UIntType, __w>::__value>(__sum); > > if (__zero) > { > if (__i == 0) > { > if ((_M_x[0] & __upper_mask) != 0u) > __zero = false; > } > else if (_M_x[__i] != 0u) > __zero = false; > } > } > if (__zero) > _M_x[0] = __detail::_Shift<_UIntType, __w - 1>::__value; > _M_p = state_size; > } > > template<typename _UIntType, size_t __w, > size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, _UIntType __c, size_t __l, > _UIntType __f> > void > mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, > __s, __b, __t, __c, __l, __f>:: > _M_gen_rand(void) > { > const _UIntType __upper_mask = (~_UIntType()) << __r; > const _UIntType __lower_mask = ~__upper_mask; > > for (size_t __k = 0; __k < (__n - __m); ++__k) > { > _UIntType __y = ((_M_x[__k] & __upper_mask) > | (_M_x[__k + 1] & __lower_mask)); > _M_x[__k] = (_M_x[__k + __m] ^ (__y >> 1) > ^ ((__y & 0x01) ? __a : 0)); > } > > for (size_t __k = (__n - __m); __k < (__n - 1); ++__k) > { > _UIntType __y = ((_M_x[__k] & __upper_mask) > | (_M_x[__k + 1] & __lower_mask)); > _M_x[__k] = (_M_x[__k + (__m - __n)] ^ (__y >> 1) > ^ ((__y & 0x01) ? __a : 0)); > } > > _UIntType __y = ((_M_x[__n - 1] & __upper_mask) > | (_M_x[0] & __lower_mask)); > _M_x[__n - 1] = (_M_x[__m - 1] ^ (__y >> 1) > ^ ((__y & 0x01) ? __a : 0)); > _M_p = 0; > } > > template<typename _UIntType, size_t __w, > size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, _UIntType __c, size_t __l, > _UIntType __f> > void > mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, > __s, __b, __t, __c, __l, __f>:: > discard(unsigned long long __z) > { > while (__z > state_size - _M_p) > { > __z -= state_size - _M_p; > _M_gen_rand(); > } > _M_p += __z; > } > > template<typename _UIntType, size_t __w, > size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, _UIntType __c, size_t __l, > _UIntType __f> > typename > mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, > __s, __b, __t, __c, __l, __f>::result_type > mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, > __s, __b, __t, __c, __l, __f>:: > operator()() > { > > if (_M_p >= state_size) > _M_gen_rand(); > > > result_type __z = _M_x[_M_p++]; > __z ^= (__z >> __u) & __d; > __z ^= (__z << __s) & __b; > __z ^= (__z << __t) & __c; > __z ^= (__z >> __l); > > return __z; > } > > template<typename _UIntType, size_t __w, > size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, _UIntType __c, size_t __l, > _UIntType __f, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const mersenne_twister_engine<_UIntType, __w, __n, __m, > __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); > __os.fill(__space); > > for (size_t __i = 0; __i < __n; ++__i) > __os << __x._M_x[__i] << __space; > __os << __x._M_p; > > __os.flags(__flags); > __os.fill(__fill); > return __os; > } > > template<typename _UIntType, size_t __w, > size_t __n, size_t __m, size_t __r, > _UIntType __a, size_t __u, _UIntType __d, size_t __s, > _UIntType __b, size_t __t, _UIntType __c, size_t __l, > _UIntType __f, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > mersenne_twister_engine<_UIntType, __w, __n, __m, > __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __x) > { > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > for (size_t __i = 0; __i < __n; ++__i) > __is >> __x._M_x[__i]; > __is >> __x._M_p; > > __is.flags(__flags); > return __is; > } ># 539 "/usr/include/c++/13/bits/random.tcc" 3 > template<typename _UIntType, size_t __w, size_t __s, size_t __r> > void > subtract_with_carry_engine<_UIntType, __w, __s, __r>:: > seed(result_type __value) > { > std::linear_congruential_engine<uint_least32_t, 40014u, 0u, 2147483563u> > __lcg(__value == 0u ? default_seed : __value); > > const size_t __n = (__w + 31) / 32; > > for (size_t __i = 0; __i < long_lag; ++__i) > { > _UIntType __sum = 0u; > _UIntType __factor = 1u; > for (size_t __j = 0; __j < __n; ++__j) > { > __sum += __detail::__mod<uint_least32_t, > __detail::_Shift<uint_least32_t, 32>::__value> > (__lcg()) * __factor; > __factor *= __detail::_Shift<_UIntType, 32>::__value; > } > _M_x[__i] = __detail::__mod<_UIntType, > __detail::_Shift<_UIntType, __w>::__value>(__sum); > } > _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0; > _M_p = 0; > } > > template<typename _UIntType, size_t __w, size_t __s, size_t __r> > template<typename _Sseq> > auto > subtract_with_carry_engine<_UIntType, __w, __s, __r>:: > seed(_Sseq& __q) > -> _If_seed_seq<_Sseq> > { > const size_t __k = (__w + 31) / 32; > uint_least32_t __arr[__r * __k]; > __q.generate(__arr + 0, __arr + __r * __k); > > for (size_t __i = 0; __i < long_lag; ++__i) > { > _UIntType __sum = 0u; > _UIntType __factor = 1u; > for (size_t __j = 0; __j < __k; ++__j) > { > __sum += __arr[__k * __i + __j] * __factor; > __factor *= __detail::_Shift<_UIntType, 32>::__value; > } > _M_x[__i] = __detail::__mod<_UIntType, > __detail::_Shift<_UIntType, __w>::__value>(__sum); > } > _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0; > _M_p = 0; > } > > template<typename _UIntType, size_t __w, size_t __s, size_t __r> > typename subtract_with_carry_engine<_UIntType, __w, __s, __r>:: > result_type > subtract_with_carry_engine<_UIntType, __w, __s, __r>:: > operator()() > { > > long __ps = _M_p - short_lag; > if (__ps < 0) > __ps += long_lag; > > > > > _UIntType __xi; > if (_M_x[__ps] >= _M_x[_M_p] + _M_carry) > { > __xi = _M_x[__ps] - _M_x[_M_p] - _M_carry; > _M_carry = 0; > } > else > { > __xi = (__detail::_Shift<_UIntType, __w>::__value > - _M_x[_M_p] - _M_carry + _M_x[__ps]); > _M_carry = 1; > } > _M_x[_M_p] = __xi; > > > if (++_M_p >= long_lag) > _M_p = 0; > > return __xi; > } > > template<typename _UIntType, size_t __w, size_t __s, size_t __r, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const subtract_with_carry_engine<_UIntType, > __w, __s, __r>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); > __os.fill(__space); > > for (size_t __i = 0; __i < __r; ++__i) > __os << __x._M_x[__i] << __space; > __os << __x._M_carry << __space << __x._M_p; > > __os.flags(__flags); > __os.fill(__fill); > return __os; > } > > template<typename _UIntType, size_t __w, size_t __s, size_t __r, > typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > subtract_with_carry_engine<_UIntType, __w, __s, __r>& __x) > { > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > for (size_t __i = 0; __i < __r; ++__i) > __is >> __x._M_x[__i]; > __is >> __x._M_carry; > __is >> __x._M_p; > > __is.flags(__flags); > return __is; > } ># 683 "/usr/include/c++/13/bits/random.tcc" 3 > template<typename _RandomNumberEngine, size_t __p, size_t __r> > typename discard_block_engine<_RandomNumberEngine, > __p, __r>::result_type > discard_block_engine<_RandomNumberEngine, __p, __r>:: > operator()() > { > if (_M_n >= used_block) > { > _M_b.discard(block_size - _M_n); > _M_n = 0; > } > ++_M_n; > return _M_b(); > } > > template<typename _RandomNumberEngine, size_t __p, size_t __r, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const discard_block_engine<_RandomNumberEngine, > __p, __r>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); > __os.fill(__space); > > __os << __x.base() << __space << __x._M_n; > > __os.flags(__flags); > __os.fill(__fill); > return __os; > } > > template<typename _RandomNumberEngine, size_t __p, size_t __r, > typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > discard_block_engine<_RandomNumberEngine, __p, __r>& __x) > { > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > __is >> __x._M_b >> __x._M_n; > > __is.flags(__flags); > return __is; > } > > > template<typename _RandomNumberEngine, size_t __w, typename _UIntType> > typename independent_bits_engine<_RandomNumberEngine, __w, _UIntType>:: > result_type > independent_bits_engine<_RandomNumberEngine, __w, _UIntType>:: > operator()() > { > typedef typename _RandomNumberEngine::result_type _Eresult_type; > const _Eresult_type __r > = (_M_b.max() - _M_b.min() < std::numeric_limits<_Eresult_type>::max() > ? _M_b.max() - _M_b.min() + 1 : 0); > const unsigned __edig = std::numeric_limits<_Eresult_type>::digits; > const unsigned __m = __r ? std::__lg(__r) : __edig; > > typedef typename std::common_type<_Eresult_type, result_type>::type > __ctype; > const unsigned __cdig = std::numeric_limits<__ctype>::digits; > > unsigned __n, __n0; > __ctype __s0, __s1, __y0, __y1; > > for (size_t __i = 0; __i < 2; ++__i) > { > __n = (__w + __m - 1) / __m + __i; > __n0 = __n - __w % __n; > const unsigned __w0 = __w / __n; > > __s0 = 0; > __s1 = 0; > if (__w0 < __cdig) > { > __s0 = __ctype(1) << __w0; > __s1 = __s0 << 1; > } > > __y0 = 0; > __y1 = 0; > if (__r) > { > __y0 = __s0 * (__r / __s0); > if (__s1) > __y1 = __s1 * (__r / __s1); > > if (__r - __y0 <= __y0 / __n) > break; > } > else > break; > } > > result_type __sum = 0; > for (size_t __k = 0; __k < __n0; ++__k) > { > __ctype __u; > do > __u = _M_b() - _M_b.min(); > while (__y0 && __u >= __y0); > __sum = __s0 * __sum + (__s0 ? __u % __s0 : __u); > } > for (size_t __k = __n0; __k < __n; ++__k) > { > __ctype __u; > do > __u = _M_b() - _M_b.min(); > while (__y1 && __u >= __y1); > __sum = __s1 * __sum + (__s1 ? __u % __s1 : __u); > } > return __sum; > } > > > > > > > > namespace __detail > { > > template<typename _Tp> > constexpr bool > __representable_as_double(_Tp __x) noexcept > { > static_assert(numeric_limits<_Tp>::is_integer, ""); > static_assert(!numeric_limits<_Tp>::is_signed, ""); > > return (__x <= (1ull << 53)) > > || (!(__x & 1) && __detail::__representable_as_double(__x >> 1)); > } > > > template<typename _Tp> > constexpr bool > __p1_representable_as_double(_Tp __x) noexcept > { > static_assert(numeric_limits<_Tp>::is_integer, ""); > static_assert(!numeric_limits<_Tp>::is_signed, ""); > return numeric_limits<_Tp>::digits < 53 > || (bool(__x + 1u) > && __detail::__representable_as_double(__x + 1u)); > } > } > > template<typename _RandomNumberEngine, size_t __k> > typename shuffle_order_engine<_RandomNumberEngine, __k>::result_type > shuffle_order_engine<_RandomNumberEngine, __k>:: > operator()() > { > constexpr result_type __range = max() - min(); > size_t __j = __k; > const result_type __y = _M_y - min(); > > if constexpr (__detail::__p1_representable_as_double(__range)) > __j *= __y / (__range + 1.0); > else > __j *= __y / (__range + 1.0L); > _M_y = _M_v[__j]; > _M_v[__j] = _M_b(); > > return _M_y; > } > > template<typename _RandomNumberEngine, size_t __k, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const shuffle_order_engine<_RandomNumberEngine, __k>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); > __os.fill(__space); > > __os << __x.base(); > for (size_t __i = 0; __i < __k; ++__i) > __os << __space << __x._M_v[__i]; > __os << __space << __x._M_y; > > __os.flags(__flags); > __os.fill(__fill); > return __os; > } > > template<typename _RandomNumberEngine, size_t __k, > typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > shuffle_order_engine<_RandomNumberEngine, __k>& __x) > { > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > __is >> __x._M_b; > for (size_t __i = 0; __i < __k; ++__i) > __is >> __x._M_v[__i]; > __is >> __x._M_y; > > __is.flags(__flags); > return __is; > } > > > template<typename _IntType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const uniform_int_distribution<_IntType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > > __os << __x.a() << __space << __x.b(); > > __os.flags(__flags); > __os.fill(__fill); > return __os; > } > > template<typename _IntType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > uniform_int_distribution<_IntType>& __x) > { > using param_type > = typename uniform_int_distribution<_IntType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _IntType __a, __b; > if (__is >> __a >> __b) > __x.param(param_type(__a, __b)); > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > uniform_real_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > auto __range = __p.b() - __p.a(); > while (__f != __t) > *__f++ = __aurng() * __range + __p.a(); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const uniform_real_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.a() << __space << __x.b(); > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > uniform_real_distribution<_RealType>& __x) > { > using param_type > = typename uniform_real_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::skipws); > > _RealType __a, __b; > if (__is >> __a >> __b) > __x.param(param_type(__a, __b)); > > __is.flags(__flags); > return __is; > } > > > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > std::bernoulli_distribution:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > auto __limit = __p.p() * (__aurng.max() - __aurng.min()); > > while (__f != __t) > *__f++ = (__aurng() - __aurng.min()) < __limit; > } > > template<typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const bernoulli_distribution& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__os.widen(' ')); > __os.precision(std::numeric_limits<double>::max_digits10); > > __os << __x.p(); > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > > template<typename _IntType> > template<typename _UniformRandomNumberGenerator> > typename geometric_distribution<_IntType>::result_type > geometric_distribution<_IntType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > > const double __naf = > (1 - std::numeric_limits<double>::epsilon()) / 2; > > const double __thr = > std::numeric_limits<_IntType>::max() + __naf; > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > double __cand; > do > __cand = std::floor(std::log(1.0 - __aurng()) / __param._M_log_1_p); > while (__cand >= __thr); > > return result_type(__cand + __naf); > } > > template<typename _IntType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > geometric_distribution<_IntType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > > > const double __naf = > (1 - std::numeric_limits<double>::epsilon()) / 2; > > const double __thr = > std::numeric_limits<_IntType>::max() + __naf; > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > while (__f != __t) > { > double __cand; > do > __cand = std::floor(std::log(1.0 - __aurng()) > / __param._M_log_1_p); > while (__cand >= __thr); > > *__f++ = __cand + __naf; > } > } > > template<typename _IntType, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const geometric_distribution<_IntType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__os.widen(' ')); > __os.precision(std::numeric_limits<double>::max_digits10); > > __os << __x.p(); > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _IntType, > typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > geometric_distribution<_IntType>& __x) > { > using param_type = typename geometric_distribution<_IntType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::skipws); > > double __p; > if (__is >> __p) > __x.param(param_type(__p)); > > __is.flags(__flags); > return __is; > } > > > template<typename _IntType> > template<typename _UniformRandomNumberGenerator> > typename negative_binomial_distribution<_IntType>::result_type > negative_binomial_distribution<_IntType>:: > operator()(_UniformRandomNumberGenerator& __urng) > { > const double __y = _M_gd(__urng); > > > std::poisson_distribution<result_type> __poisson(__y); > return __poisson(__urng); > } > > template<typename _IntType> > template<typename _UniformRandomNumberGenerator> > typename negative_binomial_distribution<_IntType>::result_type > negative_binomial_distribution<_IntType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > typedef typename std::gamma_distribution<double>::param_type > param_type; > > const double __y = > _M_gd(__urng, param_type(__p.k(), (1.0 - __p.p()) / __p.p())); > > std::poisson_distribution<result_type> __poisson(__y); > return __poisson(__urng); > } > > template<typename _IntType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > negative_binomial_distribution<_IntType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { > > while (__f != __t) > { > const double __y = _M_gd(__urng); > > > std::poisson_distribution<result_type> __poisson(__y); > *__f++ = __poisson(__urng); > } > } > > template<typename _IntType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > negative_binomial_distribution<_IntType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > typename std::gamma_distribution<result_type>::param_type > __p2(__p.k(), (1.0 - __p.p()) / __p.p()); > > while (__f != __t) > { > const double __y = _M_gd(__urng, __p2); > > std::poisson_distribution<result_type> __poisson(__y); > *__f++ = __poisson(__urng); > } > } > > template<typename _IntType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const negative_binomial_distribution<_IntType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__os.widen(' ')); > __os.precision(std::numeric_limits<double>::max_digits10); > > __os << __x.k() << __space << __x.p() > << __space << __x._M_gd; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _IntType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > negative_binomial_distribution<_IntType>& __x) > { > using param_type > = typename negative_binomial_distribution<_IntType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::skipws); > > _IntType __k; > double __p; > if (__is >> __k >> __p >> __x._M_gd) > __x.param(param_type(__k, __p)); > > __is.flags(__flags); > return __is; > } > > > template<typename _IntType> > void > poisson_distribution<_IntType>::param_type:: > _M_initialize() > { > > if (_M_mean >= 12) > { > const double __m = std::floor(_M_mean); > _M_lm_thr = std::log(_M_mean); > _M_lfm = std::lgamma(__m + 1); > _M_sm = std::sqrt(__m); > > const double __pi_4 = 0.7853981633974483096156608458198757L; > const double __dx = std::sqrt(2 * __m * std::log(32 * __m > / __pi_4)); > _M_d = std::round(std::max<double>(6.0, std::min(__m, __dx))); > const double __cx = 2 * __m + _M_d; > _M_scx = std::sqrt(__cx / 2); > _M_1cx = 1 / __cx; > > _M_c2b = std::sqrt(__pi_4 * __cx) * std::exp(_M_1cx); > _M_cb = 2 * __cx * std::exp(-_M_d * _M_1cx * (1 + _M_d / 2)) > / _M_d; > } > else > > _M_lm_thr = std::exp(-_M_mean); > } ># 1305 "/usr/include/c++/13/bits/random.tcc" 3 > template<typename _IntType> > template<typename _UniformRandomNumberGenerator> > typename poisson_distribution<_IntType>::result_type > poisson_distribution<_IntType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > if (__param.mean() >= 12) > { > double __x; > > > const double __naf = > (1 - std::numeric_limits<double>::epsilon()) / 2; > const double __thr = > std::numeric_limits<_IntType>::max() + __naf; > > const double __m = std::floor(__param.mean()); > > const double __spi_2 = 1.2533141373155002512078826424055226L; > const double __c1 = __param._M_sm * __spi_2; > const double __c2 = __param._M_c2b + __c1; > const double __c3 = __c2 + 1; > const double __c4 = __c3 + 1; > > const double __178 = 0.0128205128205128205128205128205128L; > > const double __e178 = 1.0129030479320018583185514777512983L; > const double __c5 = __c4 + __e178; > const double __c = __param._M_cb + __c5; > const double __2cx = 2 * (2 * __m + __param._M_d); > > bool __reject = true; > do > { > const double __u = __c * __aurng(); > const double __e = -std::log(1.0 - __aurng()); > > double __w = 0.0; > > if (__u <= __c1) > { > const double __n = _M_nd(__urng); > const double __y = -std::abs(__n) * __param._M_sm - 1; > __x = std::floor(__y); > __w = -__n * __n / 2; > if (__x < -__m) > continue; > } > else if (__u <= __c2) > { > const double __n = _M_nd(__urng); > const double __y = 1 + std::abs(__n) * __param._M_scx; > __x = std::ceil(__y); > __w = __y * (2 - __y) * __param._M_1cx; > if (__x > __param._M_d) > continue; > } > else if (__u <= __c3) > > > __x = -1; > else if (__u <= __c4) > __x = 0; > else if (__u <= __c5) > { > __x = 1; > > __w = __178; > } > else > { > const double __v = -std::log(1.0 - __aurng()); > const double __y = __param._M_d > + __v * __2cx / __param._M_d; > __x = std::ceil(__y); > __w = -__param._M_d * __param._M_1cx * (1 + __y / 2); > } > > __reject = (__w - __e - __x * __param._M_lm_thr > > __param._M_lfm - std::lgamma(__x + __m + 1)); > > __reject |= __x + __m >= __thr; > > } while (__reject); > > return result_type(__x + __m + __naf); > } > else > > { > _IntType __x = 0; > double __prod = 1.0; > > do > { > __prod *= __aurng(); > __x += 1; > } > while (__prod > __param._M_lm_thr); > > return __x - 1; > } > } > > template<typename _IntType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > poisson_distribution<_IntType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > > while (__f != __t) > *__f++ = this->operator()(__urng, __param); > } > > template<typename _IntType, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const poisson_distribution<_IntType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<double>::max_digits10); > > __os << __x.mean() << __space << __x._M_nd; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _IntType, > typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > poisson_distribution<_IntType>& __x) > { > using param_type = typename poisson_distribution<_IntType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::skipws); > > double __mean; > if (__is >> __mean >> __x._M_nd) > __x.param(param_type(__mean)); > > __is.flags(__flags); > return __is; > } > > > template<typename _IntType> > void > binomial_distribution<_IntType>::param_type:: > _M_initialize() > { > const double __p12 = _M_p <= 0.5 ? _M_p : 1.0 - _M_p; > > _M_easy = true; > > > if (_M_t * __p12 >= 8) > { > _M_easy = false; > const double __np = std::floor(_M_t * __p12); > const double __pa = __np / _M_t; > const double __1p = 1 - __pa; > > const double __pi_4 = 0.7853981633974483096156608458198757L; > const double __d1x = > std::sqrt(__np * __1p * std::log(32 * __np > / (81 * __pi_4 * __1p))); > _M_d1 = std::round(std::max<double>(1.0, __d1x)); > const double __d2x = > std::sqrt(__np * __1p * std::log(32 * _M_t * __1p > / (__pi_4 * __pa))); > _M_d2 = std::round(std::max<double>(1.0, __d2x)); > > > const double __spi_2 = 1.2533141373155002512078826424055226L; > _M_s1 = std::sqrt(__np * __1p) * (1 + _M_d1 / (4 * __np)); > _M_s2 = std::sqrt(__np * __1p) * (1 + _M_d2 / (4 * _M_t * __1p)); > _M_c = 2 * _M_d1 / __np; > _M_a1 = std::exp(_M_c) * _M_s1 * __spi_2; > const double __a12 = _M_a1 + _M_s2 * __spi_2; > const double __s1s = _M_s1 * _M_s1; > _M_a123 = __a12 + (std::exp(_M_d1 / (_M_t * __1p)) > * 2 * __s1s / _M_d1 > * std::exp(-_M_d1 * _M_d1 / (2 * __s1s))); > const double __s2s = _M_s2 * _M_s2; > _M_s = (_M_a123 + 2 * __s2s / _M_d2 > * std::exp(-_M_d2 * _M_d2 / (2 * __s2s))); > _M_lf = (std::lgamma(__np + 1) > + std::lgamma(_M_t - __np + 1)); > _M_lp1p = std::log(__pa / __1p); > > _M_q = -std::log(1 - (__p12 - __pa) / __1p); > } > else > > _M_q = -std::log(1 - __p12); > } > > template<typename _IntType> > template<typename _UniformRandomNumberGenerator> > typename binomial_distribution<_IntType>::result_type > binomial_distribution<_IntType>:: > _M_waiting(_UniformRandomNumberGenerator& __urng, > _IntType __t, double __q) > { > _IntType __x = 0; > double __sum = 0.0; > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > do > { > if (__t == __x) > return __x; > const double __e = -std::log(1.0 - __aurng()); > __sum += __e / (__t - __x); > __x += 1; > } > while (__sum <= __q); > > return __x - 1; > } ># 1560 "/usr/include/c++/13/bits/random.tcc" 3 > template<typename _IntType> > template<typename _UniformRandomNumberGenerator> > typename binomial_distribution<_IntType>::result_type > binomial_distribution<_IntType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > result_type __ret; > const _IntType __t = __param.t(); > const double __p = __param.p(); > const double __p12 = __p <= 0.5 ? __p : 1.0 - __p; > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > > if (!__param._M_easy) > { > double __x; > > > const double __naf = > (1 - std::numeric_limits<double>::epsilon()) / 2; > const double __thr = > std::numeric_limits<_IntType>::max() + __naf; > > const double __np = std::floor(__t * __p12); > > > const double __spi_2 = 1.2533141373155002512078826424055226L; > const double __a1 = __param._M_a1; > const double __a12 = __a1 + __param._M_s2 * __spi_2; > const double __a123 = __param._M_a123; > const double __s1s = __param._M_s1 * __param._M_s1; > const double __s2s = __param._M_s2 * __param._M_s2; > > bool __reject; > do > { > const double __u = __param._M_s * __aurng(); > > double __v; > > if (__u <= __a1) > { > const double __n = _M_nd(__urng); > const double __y = __param._M_s1 * std::abs(__n); > __reject = __y >= __param._M_d1; > if (!__reject) > { > const double __e = -std::log(1.0 - __aurng()); > __x = std::floor(__y); > __v = -__e - __n * __n / 2 + __param._M_c; > } > } > else if (__u <= __a12) > { > const double __n = _M_nd(__urng); > const double __y = __param._M_s2 * std::abs(__n); > __reject = __y >= __param._M_d2; > if (!__reject) > { > const double __e = -std::log(1.0 - __aurng()); > __x = std::floor(-__y); > __v = -__e - __n * __n / 2; > } > } > else if (__u <= __a123) > { > const double __e1 = -std::log(1.0 - __aurng()); > const double __e2 = -std::log(1.0 - __aurng()); > > const double __y = __param._M_d1 > + 2 * __s1s * __e1 / __param._M_d1; > __x = std::floor(__y); > __v = (-__e2 + __param._M_d1 * (1 / (__t - __np) > -__y / (2 * __s1s))); > __reject = false; > } > else > { > const double __e1 = -std::log(1.0 - __aurng()); > const double __e2 = -std::log(1.0 - __aurng()); > > const double __y = __param._M_d2 > + 2 * __s2s * __e1 / __param._M_d2; > __x = std::floor(-__y); > __v = -__e2 - __param._M_d2 * __y / (2 * __s2s); > __reject = false; > } > > __reject = __reject || __x < -__np || __x > __t - __np; > if (!__reject) > { > const double __lfx = > std::lgamma(__np + __x + 1) > + std::lgamma(__t - (__np + __x) + 1); > __reject = __v > __param._M_lf - __lfx > + __x * __param._M_lp1p; > } > > __reject |= __x + __np >= __thr; > } > while (__reject); > > __x += __np + __naf; > > const _IntType __z = _M_waiting(__urng, __t - _IntType(__x), > __param._M_q); > __ret = _IntType(__x) + __z; > } > else > > __ret = _M_waiting(__urng, __t, __param._M_q); > > if (__p12 != __p) > __ret = __t - __ret; > return __ret; > } > > template<typename _IntType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > binomial_distribution<_IntType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > > while (__f != __t) > *__f++ = this->operator()(__urng, __param); > } > > template<typename _IntType, > typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const binomial_distribution<_IntType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<double>::max_digits10); > > __os << __x.t() << __space << __x.p() > << __space << __x._M_nd; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _IntType, > typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > binomial_distribution<_IntType>& __x) > { > using param_type = typename binomial_distribution<_IntType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _IntType __t; > double __p; > if (__is >> __t >> __p >> __x._M_nd) > __x.param(param_type(__t, __p)); > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > std::exponential_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > while (__f != __t) > *__f++ = -std::log(result_type(1) - __aurng()) / __p.lambda(); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const exponential_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__os.widen(' ')); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.lambda(); > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > exponential_distribution<_RealType>& __x) > { > using param_type > = typename exponential_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __lambda; > if (__is >> __lambda) > __x.param(param_type(__lambda)); > > __is.flags(__flags); > return __is; > } ># 1806 "/usr/include/c++/13/bits/random.tcc" 3 > template<typename _RealType> > template<typename _UniformRandomNumberGenerator> > typename normal_distribution<_RealType>::result_type > normal_distribution<_RealType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > result_type __ret; > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > > if (_M_saved_available) > { > _M_saved_available = false; > __ret = _M_saved; > } > else > { > result_type __x, __y, __r2; > do > { > __x = result_type(2.0) * __aurng() - 1.0; > __y = result_type(2.0) * __aurng() - 1.0; > __r2 = __x * __x + __y * __y; > } > while (__r2 > 1.0 || __r2 == 0.0); > > const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2); > _M_saved = __x * __mult; > _M_saved_available = true; > __ret = __y * __mult; > } > > __ret = __ret * __param.stddev() + __param.mean(); > return __ret; > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > normal_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > > if (__f == __t) > return; > > if (_M_saved_available) > { > _M_saved_available = false; > *__f++ = _M_saved * __param.stddev() + __param.mean(); > > if (__f == __t) > return; > } > > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > > while (__f + 1 < __t) > { > result_type __x, __y, __r2; > do > { > __x = result_type(2.0) * __aurng() - 1.0; > __y = result_type(2.0) * __aurng() - 1.0; > __r2 = __x * __x + __y * __y; > } > while (__r2 > 1.0 || __r2 == 0.0); > > const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2); > *__f++ = __y * __mult * __param.stddev() + __param.mean(); > *__f++ = __x * __mult * __param.stddev() + __param.mean(); > } > > if (__f != __t) > { > result_type __x, __y, __r2; > do > { > __x = result_type(2.0) * __aurng() - 1.0; > __y = result_type(2.0) * __aurng() - 1.0; > __r2 = __x * __x + __y * __y; > } > while (__r2 > 1.0 || __r2 == 0.0); > > const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2); > _M_saved = __x * __mult; > _M_saved_available = true; > *__f = __y * __mult * __param.stddev() + __param.mean(); > } > } > > template<typename _RealType> > bool > operator==(const std::normal_distribution<_RealType>& __d1, > const std::normal_distribution<_RealType>& __d2) > { > if (__d1._M_param == __d2._M_param > && __d1._M_saved_available == __d2._M_saved_available) > return __d1._M_saved_available ? __d1._M_saved == __d2._M_saved : true; > else > return false; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const normal_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.mean() << __space << __x.stddev() > << __space << __x._M_saved_available; > if (__x._M_saved_available) > __os << __space << __x._M_saved; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > normal_distribution<_RealType>& __x) > { > using param_type = typename normal_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > double __mean, __stddev; > bool __saved_avail; > if (__is >> __mean >> __stddev >> __saved_avail) > { > if (!__saved_avail || (__is >> __x._M_saved)) > { > __x._M_saved_available = __saved_avail; > __x.param(param_type(__mean, __stddev)); > } > } > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > lognormal_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > while (__f != __t) > *__f++ = std::exp(__p.s() * _M_nd(__urng) + __p.m()); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const lognormal_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.m() << __space << __x.s() > << __space << __x._M_nd; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > lognormal_distribution<_RealType>& __x) > { > using param_type > = typename lognormal_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __m, __s; > if (__is >> __m >> __s >> __x._M_nd) > __x.param(param_type(__m, __s)); > > __is.flags(__flags); > return __is; > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > std::chi_squared_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { > > while (__f != __t) > *__f++ = 2 * _M_gd(__urng); > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > std::chi_squared_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const typename > std::gamma_distribution<result_type>::param_type& __p) > { > > while (__f != __t) > *__f++ = 2 * _M_gd(__urng, __p); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const chi_squared_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.n() << __space << __x._M_gd; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > chi_squared_distribution<_RealType>& __x) > { > using param_type > = typename chi_squared_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __n; > if (__is >> __n >> __x._M_gd) > __x.param(param_type(__n)); > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > template<typename _UniformRandomNumberGenerator> > typename cauchy_distribution<_RealType>::result_type > cauchy_distribution<_RealType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > _RealType __u; > do > __u = __aurng(); > while (__u == 0.5); > > const _RealType __pi = 3.1415926535897932384626433832795029L; > return __p.a() + __p.b() * std::tan(__pi * __u); > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > cauchy_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > const _RealType __pi = 3.1415926535897932384626433832795029L; > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > while (__f != __t) > { > _RealType __u; > do > __u = __aurng(); > while (__u == 0.5); > > *__f++ = __p.a() + __p.b() * std::tan(__pi * __u); > } > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const cauchy_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.a() << __space << __x.b(); > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > cauchy_distribution<_RealType>& __x) > { > using param_type = typename cauchy_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __a, __b; > if (__is >> __a >> __b) > __x.param(param_type(__a, __b)); > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > std::fisher_f_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { > > while (__f != __t) > *__f++ = ((_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m())); > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > std::fisher_f_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > typedef typename std::gamma_distribution<result_type>::param_type > param_type; > param_type __p1(__p.m() / 2); > param_type __p2(__p.n() / 2); > while (__f != __t) > *__f++ = ((_M_gd_x(__urng, __p1) * n()) > / (_M_gd_y(__urng, __p2) * m())); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const fisher_f_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.m() << __space << __x.n() > << __space << __x._M_gd_x << __space << __x._M_gd_y; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > fisher_f_distribution<_RealType>& __x) > { > using param_type > = typename fisher_f_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __m, __n; > if (__is >> __m >> __n >> __x._M_gd_x >> __x._M_gd_y) > __x.param(param_type(__m, __n)); > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > std::student_t_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng) > { > > while (__f != __t) > *__f++ = _M_nd(__urng) * std::sqrt(n() / _M_gd(__urng)); > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > std::student_t_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > typename std::gamma_distribution<result_type>::param_type > __p2(__p.n() / 2, 2); > while (__f != __t) > *__f++ = _M_nd(__urng) * std::sqrt(__p.n() / _M_gd(__urng, __p2)); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const student_t_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.n() << __space << __x._M_nd << __space << __x._M_gd; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > student_t_distribution<_RealType>& __x) > { > using param_type > = typename student_t_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __n; > if (__is >> __n >> __x._M_nd >> __x._M_gd) > __x.param(param_type(__n)); > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > void > gamma_distribution<_RealType>::param_type:: > _M_initialize() > { > _M_malpha = _M_alpha < 1.0 ? _M_alpha + _RealType(1.0) : _M_alpha; > > const _RealType __a1 = _M_malpha - _RealType(1.0) / _RealType(3.0); > _M_a2 = _RealType(1.0) / std::sqrt(_RealType(9.0) * __a1); > } > > > > > > > template<typename _RealType> > template<typename _UniformRandomNumberGenerator> > typename gamma_distribution<_RealType>::result_type > gamma_distribution<_RealType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > > result_type __u, __v, __n; > const result_type __a1 = (__param._M_malpha > - _RealType(1.0) / _RealType(3.0)); > > do > { > do > { > __n = _M_nd(__urng); > __v = result_type(1.0) + __param._M_a2 * __n; > } > while (__v <= 0.0); > > __v = __v * __v * __v; > __u = __aurng(); > } > while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n > && (std::log(__u) > (0.5 * __n * __n + __a1 > * (1.0 - __v + std::log(__v))))); > > if (__param.alpha() == __param._M_malpha) > return __a1 * __v * __param.beta(); > else > { > do > __u = __aurng(); > while (__u == 0.0); > > return (std::pow(__u, result_type(1.0) / __param.alpha()) > * __a1 * __v * __param.beta()); > } > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > gamma_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > > result_type __u, __v, __n; > const result_type __a1 = (__param._M_malpha > - _RealType(1.0) / _RealType(3.0)); > > if (__param.alpha() == __param._M_malpha) > while (__f != __t) > { > do > { > do > { > __n = _M_nd(__urng); > __v = result_type(1.0) + __param._M_a2 * __n; > } > while (__v <= 0.0); > > __v = __v * __v * __v; > __u = __aurng(); > } > while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n > && (std::log(__u) > (0.5 * __n * __n + __a1 > * (1.0 - __v + std::log(__v))))); > > *__f++ = __a1 * __v * __param.beta(); > } > else > while (__f != __t) > { > do > { > do > { > __n = _M_nd(__urng); > __v = result_type(1.0) + __param._M_a2 * __n; > } > while (__v <= 0.0); > > __v = __v * __v * __v; > __u = __aurng(); > } > while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n > && (std::log(__u) > (0.5 * __n * __n + __a1 > * (1.0 - __v + std::log(__v))))); > > do > __u = __aurng(); > while (__u == 0.0); > > *__f++ = (std::pow(__u, result_type(1.0) / __param.alpha()) > * __a1 * __v * __param.beta()); > } > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const gamma_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.alpha() << __space << __x.beta() > << __space << __x._M_nd; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > gamma_distribution<_RealType>& __x) > { > using param_type = typename gamma_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __alpha_val, __beta_val; > if (__is >> __alpha_val >> __beta_val >> __x._M_nd) > __x.param(param_type(__alpha_val, __beta_val)); > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > template<typename _UniformRandomNumberGenerator> > typename weibull_distribution<_RealType>::result_type > weibull_distribution<_RealType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > return __p.b() * std::pow(-std::log(result_type(1) - __aurng()), > result_type(1) / __p.a()); > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > weibull_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > auto __inv_a = result_type(1) / __p.a(); > > while (__f != __t) > *__f++ = __p.b() * std::pow(-std::log(result_type(1) - __aurng()), > __inv_a); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const weibull_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.a() << __space << __x.b(); > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > weibull_distribution<_RealType>& __x) > { > using param_type = typename weibull_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __a, __b; > if (__is >> __a >> __b) > __x.param(param_type(__a, __b)); > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > template<typename _UniformRandomNumberGenerator> > typename extreme_value_distribution<_RealType>::result_type > extreme_value_distribution<_RealType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > return __p.a() - __p.b() * std::log(-std::log(result_type(1) > - __aurng())); > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > extreme_value_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __p) > { > > __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> > __aurng(__urng); > > while (__f != __t) > *__f++ = __p.a() - __p.b() * std::log(-std::log(result_type(1) > - __aurng())); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const extreme_value_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > __os << __x.a() << __space << __x.b(); > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > extreme_value_distribution<_RealType>& __x) > { > using param_type > = typename extreme_value_distribution<_RealType>::param_type; > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > _RealType __a, __b; > if (__is >> __a >> __b) > __x.param(param_type(__a, __b)); > > __is.flags(__flags); > return __is; > } > > > template<typename _IntType> > void > discrete_distribution<_IntType>::param_type:: > _M_initialize() > { > if (_M_prob.size() < 2) > { > _M_prob.clear(); > return; > } > > const double __sum = std::accumulate(_M_prob.begin(), > _M_prob.end(), 0.0); > do { if (std::__is_constant_evaluated() && !bool(__sum > 0)) __builtin_unreachable(); } while (false); > > __detail::__normalize(_M_prob.begin(), _M_prob.end(), _M_prob.begin(), > __sum); > > _M_cp.reserve(_M_prob.size()); > std::partial_sum(_M_prob.begin(), _M_prob.end(), > std::back_inserter(_M_cp)); > > _M_cp[_M_cp.size() - 1] = 1.0; > } > > template<typename _IntType> > template<typename _Func> > discrete_distribution<_IntType>::param_type:: > param_type(size_t __nw, double __xmin, double __xmax, _Func __fw) > : _M_prob(), _M_cp() > { > const size_t __n = __nw == 0 ? 1 : __nw; > const double __delta = (__xmax - __xmin) / __n; > > _M_prob.reserve(__n); > for (size_t __k = 0; __k < __nw; ++__k) > _M_prob.push_back(__fw(__xmin + __k * __delta + 0.5 * __delta)); > > _M_initialize(); > } > > template<typename _IntType> > template<typename _UniformRandomNumberGenerator> > typename discrete_distribution<_IntType>::result_type > discrete_distribution<_IntType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > if (__param._M_cp.empty()) > return result_type(0); > > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > const double __p = __aurng(); > auto __pos = std::lower_bound(__param._M_cp.begin(), > __param._M_cp.end(), __p); > > return __pos - __param._M_cp.begin(); > } > > template<typename _IntType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > discrete_distribution<_IntType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > > if (__param._M_cp.empty()) > { > while (__f != __t) > *__f++ = result_type(0); > return; > } > > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > while (__f != __t) > { > const double __p = __aurng(); > auto __pos = std::lower_bound(__param._M_cp.begin(), > __param._M_cp.end(), __p); > > *__f++ = __pos - __param._M_cp.begin(); > } > } > > template<typename _IntType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const discrete_distribution<_IntType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<double>::max_digits10); > > std::vector<double> __prob = __x.probabilities(); > __os << __prob.size(); > for (auto __dit = __prob.begin(); __dit != __prob.end(); ++__dit) > __os << __space << *__dit; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > >namespace __detail >{ > template<typename _ValT, typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > __extract_params(basic_istream<_CharT, _Traits>& __is, > vector<_ValT>& __vals, size_t __n) > { > __vals.reserve(__n); > while (__n--) > { > _ValT __val; > if (__is >> __val) > __vals.push_back(__val); > else > break; > } > return __is; > } >} > > template<typename _IntType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > discrete_distribution<_IntType>& __x) > { > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > size_t __n; > if (__is >> __n) > { > std::vector<double> __prob_vec; > if (__detail::__extract_params(__is, __prob_vec, __n)) > __x.param({__prob_vec.begin(), __prob_vec.end()}); > } > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > void > piecewise_constant_distribution<_RealType>::param_type:: > _M_initialize() > { > if (_M_int.size() < 2 > || (_M_int.size() == 2 > && _M_int[0] == _RealType(0) > && _M_int[1] == _RealType(1))) > { > _M_int.clear(); > _M_den.clear(); > return; > } > > const double __sum = std::accumulate(_M_den.begin(), > _M_den.end(), 0.0); > do { if (std::__is_constant_evaluated() && !bool(__sum > 0)) __builtin_unreachable(); } while (false); > > __detail::__normalize(_M_den.begin(), _M_den.end(), _M_den.begin(), > __sum); > > _M_cp.reserve(_M_den.size()); > std::partial_sum(_M_den.begin(), _M_den.end(), > std::back_inserter(_M_cp)); > > > _M_cp[_M_cp.size() - 1] = 1.0; > > for (size_t __k = 0; __k < _M_den.size(); ++__k) > _M_den[__k] /= _M_int[__k + 1] - _M_int[__k]; > } > > template<typename _RealType> > template<typename _InputIteratorB, typename _InputIteratorW> > piecewise_constant_distribution<_RealType>::param_type:: > param_type(_InputIteratorB __bbegin, > _InputIteratorB __bend, > _InputIteratorW __wbegin) > : _M_int(), _M_den(), _M_cp() > { > if (__bbegin != __bend) > { > for (;;) > { > _M_int.push_back(*__bbegin); > ++__bbegin; > if (__bbegin == __bend) > break; > > _M_den.push_back(*__wbegin); > ++__wbegin; > } > } > > _M_initialize(); > } > > template<typename _RealType> > template<typename _Func> > piecewise_constant_distribution<_RealType>::param_type:: > param_type(initializer_list<_RealType> __bl, _Func __fw) > : _M_int(), _M_den(), _M_cp() > { > _M_int.reserve(__bl.size()); > for (auto __biter = __bl.begin(); __biter != __bl.end(); ++__biter) > _M_int.push_back(*__biter); > > _M_den.reserve(_M_int.size() - 1); > for (size_t __k = 0; __k < _M_int.size() - 1; ++__k) > _M_den.push_back(__fw(0.5 * (_M_int[__k + 1] + _M_int[__k]))); > > _M_initialize(); > } > > template<typename _RealType> > template<typename _Func> > piecewise_constant_distribution<_RealType>::param_type:: > param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) > : _M_int(), _M_den(), _M_cp() > { > const size_t __n = __nw == 0 ? 1 : __nw; > const _RealType __delta = (__xmax - __xmin) / __n; > > _M_int.reserve(__n + 1); > for (size_t __k = 0; __k <= __nw; ++__k) > _M_int.push_back(__xmin + __k * __delta); > > _M_den.reserve(__n); > for (size_t __k = 0; __k < __nw; ++__k) > _M_den.push_back(__fw(_M_int[__k] + 0.5 * __delta)); > > _M_initialize(); > } > > template<typename _RealType> > template<typename _UniformRandomNumberGenerator> > typename piecewise_constant_distribution<_RealType>::result_type > piecewise_constant_distribution<_RealType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > const double __p = __aurng(); > if (__param._M_cp.empty()) > return __p; > > auto __pos = std::lower_bound(__param._M_cp.begin(), > __param._M_cp.end(), __p); > const size_t __i = __pos - __param._M_cp.begin(); > > const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0; > > return __param._M_int[__i] + (__p - __pref) / __param._M_den[__i]; > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > piecewise_constant_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > if (__param._M_cp.empty()) > { > while (__f != __t) > *__f++ = __aurng(); > return; > } > > while (__f != __t) > { > const double __p = __aurng(); > > auto __pos = std::lower_bound(__param._M_cp.begin(), > __param._M_cp.end(), __p); > const size_t __i = __pos - __param._M_cp.begin(); > > const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0; > > *__f++ = (__param._M_int[__i] > + (__p - __pref) / __param._M_den[__i]); > } > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const piecewise_constant_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > std::vector<_RealType> __int = __x.intervals(); > __os << __int.size() - 1; > > for (auto __xit = __int.begin(); __xit != __int.end(); ++__xit) > __os << __space << *__xit; > > std::vector<double> __den = __x.densities(); > for (auto __dit = __den.begin(); __dit != __den.end(); ++__dit) > __os << __space << *__dit; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > piecewise_constant_distribution<_RealType>& __x) > { > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > size_t __n; > if (__is >> __n) > { > std::vector<_RealType> __int_vec; > if (__detail::__extract_params(__is, __int_vec, __n + 1)) > { > std::vector<double> __den_vec; > if (__detail::__extract_params(__is, __den_vec, __n)) > { > __x.param({ __int_vec.begin(), __int_vec.end(), > __den_vec.begin() }); > } > } > } > > __is.flags(__flags); > return __is; > } > > > template<typename _RealType> > void > piecewise_linear_distribution<_RealType>::param_type:: > _M_initialize() > { > if (_M_int.size() < 2 > || (_M_int.size() == 2 > && _M_int[0] == _RealType(0) > && _M_int[1] == _RealType(1) > && _M_den[0] == _M_den[1])) > { > _M_int.clear(); > _M_den.clear(); > return; > } > > double __sum = 0.0; > _M_cp.reserve(_M_int.size() - 1); > _M_m.reserve(_M_int.size() - 1); > for (size_t __k = 0; __k < _M_int.size() - 1; ++__k) > { > const _RealType __delta = _M_int[__k + 1] - _M_int[__k]; > __sum += 0.5 * (_M_den[__k + 1] + _M_den[__k]) * __delta; > _M_cp.push_back(__sum); > _M_m.push_back((_M_den[__k + 1] - _M_den[__k]) / __delta); > } > do { if (std::__is_constant_evaluated() && !bool(__sum > 0)) __builtin_unreachable(); } while (false); > > > __detail::__normalize(_M_den.begin(), _M_den.end(), _M_den.begin(), > __sum); > > __detail::__normalize(_M_cp.begin(), _M_cp.end(), _M_cp.begin(), __sum); > > __detail::__normalize(_M_m.begin(), _M_m.end(), _M_m.begin(), __sum); > > > _M_cp[_M_cp.size() - 1] = 1.0; > } > > template<typename _RealType> > template<typename _InputIteratorB, typename _InputIteratorW> > piecewise_linear_distribution<_RealType>::param_type:: > param_type(_InputIteratorB __bbegin, > _InputIteratorB __bend, > _InputIteratorW __wbegin) > : _M_int(), _M_den(), _M_cp(), _M_m() > { > for (; __bbegin != __bend; ++__bbegin, ++__wbegin) > { > _M_int.push_back(*__bbegin); > _M_den.push_back(*__wbegin); > } > > _M_initialize(); > } > > template<typename _RealType> > template<typename _Func> > piecewise_linear_distribution<_RealType>::param_type:: > param_type(initializer_list<_RealType> __bl, _Func __fw) > : _M_int(), _M_den(), _M_cp(), _M_m() > { > _M_int.reserve(__bl.size()); > _M_den.reserve(__bl.size()); > for (auto __biter = __bl.begin(); __biter != __bl.end(); ++__biter) > { > _M_int.push_back(*__biter); > _M_den.push_back(__fw(*__biter)); > } > > _M_initialize(); > } > > template<typename _RealType> > template<typename _Func> > piecewise_linear_distribution<_RealType>::param_type:: > param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) > : _M_int(), _M_den(), _M_cp(), _M_m() > { > const size_t __n = __nw == 0 ? 1 : __nw; > const _RealType __delta = (__xmax - __xmin) / __n; > > _M_int.reserve(__n + 1); > _M_den.reserve(__n + 1); > for (size_t __k = 0; __k <= __nw; ++__k) > { > _M_int.push_back(__xmin + __k * __delta); > _M_den.push_back(__fw(_M_int[__k] + __delta)); > } > > _M_initialize(); > } > > template<typename _RealType> > template<typename _UniformRandomNumberGenerator> > typename piecewise_linear_distribution<_RealType>::result_type > piecewise_linear_distribution<_RealType>:: > operator()(_UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > __detail::_Adaptor<_UniformRandomNumberGenerator, double> > __aurng(__urng); > > const double __p = __aurng(); > if (__param._M_cp.empty()) > return __p; > > auto __pos = std::lower_bound(__param._M_cp.begin(), > __param._M_cp.end(), __p); > const size_t __i = __pos - __param._M_cp.begin(); > > const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0; > > const double __a = 0.5 * __param._M_m[__i]; > const double __b = __param._M_den[__i]; > const double __cm = __p - __pref; > > _RealType __x = __param._M_int[__i]; > if (__a == 0) > __x += __cm / __b; > else > { > const double __d = __b * __b + 4.0 * __a * __cm; > __x += 0.5 * (std::sqrt(__d) - __b) / __a; > } > > return __x; > } > > template<typename _RealType> > template<typename _ForwardIterator, > typename _UniformRandomNumberGenerator> > void > piecewise_linear_distribution<_RealType>:: > __generate_impl(_ForwardIterator __f, _ForwardIterator __t, > _UniformRandomNumberGenerator& __urng, > const param_type& __param) > { > > > while (__f != __t) > *__f++ = this->operator()(__urng, __param); > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_ostream<_CharT, _Traits>& > operator<<(std::basic_ostream<_CharT, _Traits>& __os, > const piecewise_linear_distribution<_RealType>& __x) > { > using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __os.flags(); > const _CharT __fill = __os.fill(); > const std::streamsize __precision = __os.precision(); > const _CharT __space = __os.widen(' '); > __os.flags(__ios_base::scientific | __ios_base::left); > __os.fill(__space); > __os.precision(std::numeric_limits<_RealType>::max_digits10); > > std::vector<_RealType> __int = __x.intervals(); > __os << __int.size() - 1; > > for (auto __xit = __int.begin(); __xit != __int.end(); ++__xit) > __os << __space << *__xit; > > std::vector<double> __den = __x.densities(); > for (auto __dit = __den.begin(); __dit != __den.end(); ++__dit) > __os << __space << *__dit; > > __os.flags(__flags); > __os.fill(__fill); > __os.precision(__precision); > return __os; > } > > template<typename _RealType, typename _CharT, typename _Traits> > std::basic_istream<_CharT, _Traits>& > operator>>(std::basic_istream<_CharT, _Traits>& __is, > piecewise_linear_distribution<_RealType>& __x) > { > using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; > > const typename __ios_base::fmtflags __flags = __is.flags(); > __is.flags(__ios_base::dec | __ios_base::skipws); > > size_t __n; > if (__is >> __n) > { > vector<_RealType> __int_vec; > if (__detail::__extract_params(__is, __int_vec, __n + 1)) > { > vector<double> __den_vec; > if (__detail::__extract_params(__is, __den_vec, __n + 1)) > { > __x.param({ __int_vec.begin(), __int_vec.end(), > __den_vec.begin() }); > } > } > } > __is.flags(__flags); > return __is; > } > > > template<typename _IntType, typename> > seed_seq::seed_seq(std::initializer_list<_IntType> __il) > { > _M_v.reserve(__il.size()); > for (auto __iter = __il.begin(); __iter != __il.end(); ++__iter) > _M_v.push_back(__detail::__mod<result_type, > __detail::_Shift<result_type, 32>::__value>(*__iter)); > } > > template<typename _InputIterator> > seed_seq::seed_seq(_InputIterator __begin, _InputIterator __end) > { > if constexpr (__is_random_access_iter<_InputIterator>::value) > _M_v.reserve(std::distance(__begin, __end)); > > for (_InputIterator __iter = __begin; __iter != __end; ++__iter) > _M_v.push_back(__detail::__mod<result_type, > __detail::_Shift<result_type, 32>::__value>(*__iter)); > } > > template<typename _RandomAccessIterator> > void > seed_seq::generate(_RandomAccessIterator __begin, > _RandomAccessIterator __end) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _Type; > > if (__begin == __end) > return; > > std::fill(__begin, __end, _Type(0x8b8b8b8bu)); > > const size_t __n = __end - __begin; > const size_t __s = _M_v.size(); > const size_t __t = (__n >= 623) ? 11 > : (__n >= 68) ? 7 > : (__n >= 39) ? 5 > : (__n >= 7) ? 3 > : (__n - 1) / 2; > const size_t __p = (__n - __t) / 2; > const size_t __q = __p + __t; > const size_t __m = std::max(size_t(__s + 1), __n); ># 3289 "/usr/include/c++/13/bits/random.tcc" 3 > { > uint32_t __r1 = 1371501266u; > uint32_t __r2 = __r1 + __s; > __begin[__p] += __r1; > __begin[__q] = (uint32_t)__begin[__q] + __r2; > __begin[0] = __r2; > } > > for (size_t __k = 1; __k <= __s; ++__k) > { > const size_t __kn = __k % __n; > const size_t __kpn = (__k + __p) % __n; > const size_t __kqn = (__k + __q) % __n; > uint32_t __arg = (__begin[__kn] > ^ __begin[__kpn] > ^ __begin[(__k - 1) % __n]); > uint32_t __r1 = 1664525u * (__arg ^ (__arg >> 27)); > uint32_t __r2 = __r1 + (uint32_t)__kn + _M_v[__k - 1]; > __begin[__kpn] = (uint32_t)__begin[__kpn] + __r1; > __begin[__kqn] = (uint32_t)__begin[__kqn] + __r2; > __begin[__kn] = __r2; > } > > for (size_t __k = __s + 1; __k < __m; ++__k) > { > const size_t __kn = __k % __n; > const size_t __kpn = (__k + __p) % __n; > const size_t __kqn = (__k + __q) % __n; > uint32_t __arg = (__begin[__kn] > ^ __begin[__kpn] > ^ __begin[(__k - 1) % __n]); > uint32_t __r1 = 1664525u * (__arg ^ (__arg >> 27)); > uint32_t __r2 = __r1 + (uint32_t)__kn; > __begin[__kpn] = (uint32_t)__begin[__kpn] + __r1; > __begin[__kqn] = (uint32_t)__begin[__kqn] + __r2; > __begin[__kn] = __r2; > } > > for (size_t __k = __m; __k < __m + __n; ++__k) > { > const size_t __kn = __k % __n; > const size_t __kpn = (__k + __p) % __n; > const size_t __kqn = (__k + __q) % __n; > uint32_t __arg = (__begin[__kn] > + __begin[__kpn] > + __begin[(__k - 1) % __n]); > uint32_t __r3 = 1566083941u * (__arg ^ (__arg >> 27)); > uint32_t __r4 = __r3 - __kn; > __begin[__kpn] ^= __r3; > __begin[__kqn] ^= __r4; > __begin[__kn] = __r4; > } > } > > template<typename _RealType, size_t __bits, > typename _UniformRandomNumberGenerator> > _RealType > generate_canonical(_UniformRandomNumberGenerator& __urng) > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument must be a floating point type"); > > const size_t __b > = std::min(static_cast<size_t>(std::numeric_limits<_RealType>::digits), > __bits); > const long double __r = static_cast<long double>(__urng.max()) > - static_cast<long double>(__urng.min()) + 1.0L; > const size_t __log2r = std::log(__r) / std::log(2.0L); > const size_t __m = std::max<size_t>(1UL, > (__b + __log2r - 1UL) / __log2r); > _RealType __ret; > _RealType __sum = _RealType(0); > _RealType __tmp = _RealType(1); > for (size_t __k = __m; __k != 0; --__k) > { > __sum += _RealType(__urng() - __urng.min()) * __tmp; > __tmp *= __r; > } > __ret = __sum / __tmp; > if (__builtin_expect(__ret >= _RealType(1), 0)) > { > > __ret = std::nextafter(_RealType(1), _RealType(0)); > > > > > } > return __ret; > } > > >} ># 54 "/usr/include/c++/13/random" 2 3 ># 12 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" 2 ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 13 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" 2 ># 1 "/usr/include/c++/13/chrono" 1 3 ># 33 "/usr/include/c++/13/chrono" 3 > ># 34 "/usr/include/c++/13/chrono" 3 ># 59 "/usr/include/c++/13/chrono" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 76 "/usr/include/c++/13/chrono" 3 > namespace chrono > { ># 3298 "/usr/include/c++/13/chrono" 3 > } ># 3326 "/usr/include/c++/13/chrono" 3 > >} ># 14 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" 2 ># 32 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" > ># 32 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" >namespace simpletons >{ >typedef std::ostream& (*StreamManipulator)(std::ostream&); > >template<typename T> >struct Bounds { > static constexpr T min = std::numeric_limits<T>::min(); > static constexpr T max = std::numeric_limits<T>::max(); >}; > >struct Constant { > static constexpr double pi = 2 * acos(0.0); >}; > >struct Printer { > template<typename T> > Printer& __attribute__((noinline)) > operator <<(const T& t) { return std::cout << t, *this; } > > Printer& __attribute__((noinline)) > operator <<(StreamManipulator sm) { return std::cout << sm, *this; } >}; > >template<typename Integral, typename Real = double> >struct Randomizer { > std::default_random_engine engine; > std::uniform_int_distribution<Integral> integralDistribution; > std::uniform_real_distribution<Real> realDistribution; > > Randomizer() : > Randomizer(std::chrono::system_clock::now().time_since_epoch().count()) > {} > > Randomizer(Integral seed) : > realDistribution(0.0, 1.0) > { engine.seed(seed); } > > Integral __attribute__((noinline)) > choose(Integral min, Integral sentinel) > { > if (min >= sentinel) { > std::cerr << "Cannot choose a random value between [" << min << ", " << sentinel << ")" << std::endl; > throw std::invalid_argument("min/sentinel"); > } > > Integral modulus = sentinel - min; > > if (modulus == 0) > return min; > > Integral value = integralDistribution(engine); > > return min + (value % modulus); > } > > bool __attribute__((noinline)) > maybe(Real probability = 0.5) > { > if ((probability < 0.0) || (probability > 1.0)) { > std::cerr << "Error: valid range of Maybe is { 0.0 <= probability <= 1.0 }" << std::endl; > throw std::invalid_argument("probability"); > } > > Real value = realDistribution(engine); > > return (value < probability); > } > > std::function<Integral(Integral, Integral)> > bindChooser() > { > return std::bind(&Randomizer::choose, this, > std::placeholders::_1, std::placeholders::_2); > } > > template<typename Iterator, typename IteratorType, typename ValueType> > std::vector<ValueType> __attribute__((noinline)) > selectSubset(Iterator begin, Iterator end, Integral subsetSize, > std::function<ValueType(IteratorType)> selector = identitySelector) > { > typename std::vector<ValueType> selection; > > for (Iterator i = begin; i != end; ++i) > selection->push_back(selector(*i)); > Integral remaining = selection->size(); > typename std::vector<ValueType>::iterator i = selection->begin(); > for (Integral s = 0; s < subsetSize; s++, ++i, --remaining) { > typename std::vector<ValueType>::iterator j = i; > std::advance(j, choose(0, remaining)); > std::swap(*i, *j); > } > selection->resize(subsetSize); > return selection; > } > > private: > template<typename ValueType> > ValueType > identitySelector(ValueType v) > { > return v; > } >}; ># 143 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" >class TestFailure : > public std::exception { >public: > TestFailure(__attribute__((unused)) const char *file, __attribute__((unused)) int line, const std::string& message) : > _throw(file, line), > _message(message) > {} > > TestFailure(__attribute__((unused)) const char *file, __attribute__((unused)) int line, const TestFailure& f) : > _throw(f._throw), > _message(f._message) > {} > > > TestFailure(const TestFailure& f) : > _throw(f._throw), > _message(f._message) > {} > > std::string > message() const { return _message; } > > const char * > what() const noexcept override { return _message.c_str(); } > > void > appendThrowContext(std::ostream& o) const > { > o << "[at " << _throw.file.filename() << ":" << _throw.line << "] "; > } > > friend std::ostream& > operator <<(std::ostream& o, const TestFailure& f) > { > o << "TestFailure "; > f.appendThrowContext(o); > return o << f.message(); > } > >protected: > struct Location { > Location() : > Location( ># 185 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" 3 4 > __null ># 185 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" > , 0) > {} > > Location(__attribute__((unused)) const char *file, __attribute__((unused)) int line) : > file(file), > line(line) > {} > > facile::SourceCodeFile file; > int line; > }; > > Location _throw; > std::string _message; >}; > >struct Inspect { > Inspect(__attribute__((unused)) const char *file, __attribute__((unused)) int line, bool condition, const std::string& conditionSourceCodeFragment) : > _file(file), > _line(line), > _condition(condition), > _conditionSourceCodeFragment(conditionSourceCodeFragment) > {} > > > Inspect(const Inspect& i) : > _file(i._file), > _line(i._line), > _condition(i._condition), > _conditionSourceCodeFragment(i._conditionSourceCodeFragment), > _s(i._s.str()) > {} > > static struct judgment_sentinel_type {} > judgment_sentinel; > > template<typename T> > Inspect& > operator <<(T t) > { > _s << t; > return *this; > } > > Inspect& > operator <<(StreamManipulator m) > { > _s << m; > return *this; > } > > bool > operator <<(__attribute__((unused)) judgment_sentinel_type) > { > std::stringstream ss; > ss << "Test fails evaluation [" << _conditionSourceCodeFragment << "] " << std::endl; > ss << _s.str(); > throw TestFailure(_file, _line, ss.str()); > } > > private: > const char *_file; > int _line; > bool _condition; > std::string _conditionSourceCodeFragment; > std::stringstream _s; >}; > >void __attribute__((noinline)) >randomNow() >{ > srand(time( ># 256 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" 3 4 > __null ># 256 "../../subprojects/edfst/subprojects/facile/src/test/Simpletons.hpp" > )); >} > >template<typename T = uint32_t, typename S = T> >T __attribute__((noinline)) >choose(T min, S sentinel) >{ > static Randomizer<T> randomizer; > > return randomizer.choose(min, sentinel); > > > > >} > >template<typename D, typename = std::enable_if_t<std::is_floating_point<D>::value, void>> >double >amplitude(D phase) >{ > static constexpr double limit = (Constant::pi / 2); > > if (phase < 0.0) > return 0.0; > else if (phase > 1.0) > return 1.0; > > double position = ((phase * 2.0) - 1.0); > return ((atan(position) / limit) + 1.0) / 2.0; >} >} ># 9 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 1 > > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 1 > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/TypeId.hpp" 1 > > ># 1 "/usr/include/c++/13/cxxabi.h" 1 3 ># 44 "/usr/include/c++/13/cxxabi.h" 3 > ># 45 "/usr/include/c++/13/cxxabi.h" 3 > >#pragma GCC visibility push(default) > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 49 "/usr/include/c++/13/cxxabi.h" 2 3 > ># 1 "/usr/include/c++/13/x86_64-redhat-linux/bits/cxxabi_tweaks.h" 1 3 ># 34 "/usr/include/c++/13/x86_64-redhat-linux/bits/cxxabi_tweaks.h" 3 > ># 34 "/usr/include/c++/13/x86_64-redhat-linux/bits/cxxabi_tweaks.h" 3 >namespace __cxxabiv1 >{ > extern "C" > { ># 46 "/usr/include/c++/13/x86_64-redhat-linux/bits/cxxabi_tweaks.h" 3 > __extension__ typedef int __guard __attribute__((mode (__DI__))); > > > typedef void __cxa_vec_ctor_return_type; > > > typedef void __cxa_cdtor_return_type; > > > } >} ># 51 "/usr/include/c++/13/cxxabi.h" 2 3 > > > > >namespace __cxxabiv1 >{ > extern "C" > { > > > typedef __cxa_cdtor_return_type (*__cxa_cdtor_type)(void *); > > > void* > __cxa_vec_new(size_t __element_count, size_t __element_size, > size_t __padding_size, __cxa_cdtor_type __constructor, > __cxa_cdtor_type __destructor); > > void* > __cxa_vec_new2(size_t __element_count, size_t __element_size, > size_t __padding_size, __cxa_cdtor_type __constructor, > __cxa_cdtor_type __destructor, void *(*__alloc) (size_t), > void (*__dealloc) (void*)); > > void* > __cxa_vec_new3(size_t __element_count, size_t __element_size, > size_t __padding_size, __cxa_cdtor_type __constructor, > __cxa_cdtor_type __destructor, void *(*__alloc) (size_t), > void (*__dealloc) (void*, size_t)); > > > __cxa_vec_ctor_return_type > __cxa_vec_ctor(void* __array_address, size_t __element_count, > size_t __element_size, __cxa_cdtor_type __constructor, > __cxa_cdtor_type __destructor); > > __cxa_vec_ctor_return_type > __cxa_vec_cctor(void* __dest_array, void* __src_array, > size_t __element_count, size_t __element_size, > __cxa_cdtor_return_type (*__constructor) (void*, void*), > __cxa_cdtor_type __destructor); > > > void > __cxa_vec_dtor(void* __array_address, size_t __element_count, > size_t __element_size, __cxa_cdtor_type __destructor); > > void > __cxa_vec_cleanup(void* __array_address, size_t __element_count, size_t __s, > __cxa_cdtor_type __destructor) noexcept; > > > void > __cxa_vec_delete(void* __array_address, size_t __element_size, > size_t __padding_size, __cxa_cdtor_type __destructor); > > void > __cxa_vec_delete2(void* __array_address, size_t __element_size, > size_t __padding_size, __cxa_cdtor_type __destructor, > void (*__dealloc) (void*)); > > void > __cxa_vec_delete3(void* __array_address, size_t __element_size, > size_t __padding_size, __cxa_cdtor_type __destructor, > void (*__dealloc) (void*, size_t)); > > int > __cxa_guard_acquire(__guard*); > > void > __cxa_guard_release(__guard*) noexcept; > > void > __cxa_guard_abort(__guard*) noexcept; > > > int > > __cxa_atexit(void ( *)(void*), void*, void*) noexcept; > > > > > void > __cxa_finalize(void*); > > > int > > __cxa_thread_atexit(void ( *)(void*), void*, void *) noexcept; > > > > > > void > __cxa_pure_virtual(void) __attribute__ ((__noreturn__)); > > void > __cxa_deleted_virtual(void) __attribute__ ((__noreturn__)); > > > void > __cxa_bad_cast() __attribute__((__noreturn__)); > > void > __cxa_bad_typeid() __attribute__((__noreturn__)); > > void > __cxa_throw_bad_array_new_length() __attribute__((__noreturn__)); ># 203 "/usr/include/c++/13/cxxabi.h" 3 > char* > __cxa_demangle(const char* __mangled_name, char* __output_buffer, > size_t* __length, int* __status); > > > } >} > > > > > > >namespace __cxxabiv1 >{ > > class __fundamental_type_info : public std::type_info > { > public: > explicit > __fundamental_type_info(const char* __n) : std::type_info(__n) { } > > virtual > ~__fundamental_type_info(); > }; > > > class __array_type_info : public std::type_info > { > public: > explicit > __array_type_info(const char* __n) : std::type_info(__n) { } > > virtual > ~__array_type_info(); > }; > > > class __function_type_info : public std::type_info > { > public: > explicit > __function_type_info(const char* __n) : std::type_info(__n) { } > > virtual > ~__function_type_info(); > > protected: > > virtual bool > __is_function_p() const; > }; > > > class __enum_type_info : public std::type_info > { > public: > explicit > __enum_type_info(const char* __n) : std::type_info(__n) { } > > virtual > ~__enum_type_info(); > }; > > > class __pbase_type_info : public std::type_info > { > public: > unsigned int __flags; > const std::type_info* __pointee; > > explicit > __pbase_type_info(const char* __n, int __quals, > const std::type_info* __type) > : std::type_info(__n), __flags(__quals), __pointee(__type) > { } > > virtual > ~__pbase_type_info(); > > > enum __masks > { > __const_mask = 0x1, > __volatile_mask = 0x2, > __restrict_mask = 0x4, > __incomplete_mask = 0x8, > __incomplete_class_mask = 0x10, > __transaction_safe_mask = 0x20, > __noexcept_mask = 0x40 > }; > > protected: > __pbase_type_info(const __pbase_type_info&); > > __pbase_type_info& > operator=(const __pbase_type_info&); > > > virtual bool > __do_catch(const std::type_info* __thr_type, void** __thr_obj, > unsigned int __outer) const; > > inline virtual bool > __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, > unsigned __outer) const; > }; > > inline bool __pbase_type_info:: > __pointer_catch (const __pbase_type_info *thrown_type, > void **thr_obj, > unsigned outer) const > { > return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2); > } > > > class __pointer_type_info : public __pbase_type_info > { > public: > explicit > __pointer_type_info(const char* __n, int __quals, > const std::type_info* __type) > : __pbase_type_info (__n, __quals, __type) { } > > > virtual > ~__pointer_type_info(); > > protected: > > virtual bool > __is_pointer_p() const; > > virtual bool > __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, > unsigned __outer) const; > }; > > class __class_type_info; > > > class __pointer_to_member_type_info : public __pbase_type_info > { > public: > __class_type_info* __context; > > explicit > __pointer_to_member_type_info(const char* __n, int __quals, > const std::type_info* __type, > __class_type_info* __klass) > : __pbase_type_info(__n, __quals, __type), __context(__klass) { } > > virtual > ~__pointer_to_member_type_info(); > > protected: > __pointer_to_member_type_info(const __pointer_to_member_type_info&); > > __pointer_to_member_type_info& > operator=(const __pointer_to_member_type_info&); > > > virtual bool > __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, > unsigned __outer) const; > }; > > > class __base_class_type_info > { > public: > const __class_type_info* __base_type; > > > > long __offset_flags; > > > enum __offset_flags_masks > { > __virtual_mask = 0x1, > __public_mask = 0x2, > __hwm_bit = 2, > __offset_shift = 8 > }; > > > bool > __is_virtual_p() const > { return __offset_flags & __virtual_mask; } > > bool > __is_public_p() const > { return __offset_flags & __public_mask; } > > ptrdiff_t > __offset() const > { > > > > return static_cast<ptrdiff_t>(__offset_flags) >> __offset_shift; > } > }; > > > class __class_type_info : public std::type_info > { > public: > explicit > __class_type_info (const char *__n) : type_info(__n) { } > > virtual > ~__class_type_info (); > > > > > > > enum __sub_kind > { > > __unknown = 0, > > > > __not_contained, > > > __contained_ambig, > > > __contained_virtual_mask = __base_class_type_info::__virtual_mask, > > > __contained_public_mask = __base_class_type_info::__public_mask, > > > __contained_mask = 1 << __base_class_type_info::__hwm_bit, > > __contained_private = __contained_mask, > __contained_public = __contained_mask | __contained_public_mask > }; > > struct __upcast_result; > struct __dyncast_result; > > protected: > > virtual bool > __do_upcast(const __class_type_info* __dst_type, void**__obj_ptr) const; > > virtual bool > __do_catch(const type_info* __thr_type, void** __thr_obj, > unsigned __outer) const; > > public: > > > virtual bool > __do_upcast(const __class_type_info* __dst, const void* __obj, > __upcast_result& __restrict __result) const; > > > > > > > > inline __sub_kind > __find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, > const __class_type_info* __src_type, > const void* __src_ptr) const; ># 486 "/usr/include/c++/13/cxxabi.h" 3 > virtual bool > __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, > const __class_type_info* __dst_type, const void* __obj_ptr, > const __class_type_info* __src_type, const void* __src_ptr, > __dyncast_result& __result) const; > > > > > > virtual __sub_kind > __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, > const __class_type_info* __src_type, > const void* __src_ptr) const; > }; > > > class __si_class_type_info : public __class_type_info > { > public: > const __class_type_info* __base_type; > > explicit > __si_class_type_info(const char *__n, const __class_type_info *__base) > : __class_type_info(__n), __base_type(__base) { } > > virtual > ~__si_class_type_info(); > > protected: > __si_class_type_info(const __si_class_type_info&); > > __si_class_type_info& > operator=(const __si_class_type_info&); > > > virtual bool > __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, > const __class_type_info* __dst_type, const void* __obj_ptr, > const __class_type_info* __src_type, const void* __src_ptr, > __dyncast_result& __result) const; > > virtual __sub_kind > __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, > const __class_type_info* __src_type, > const void* __sub_ptr) const; > > virtual bool > __do_upcast(const __class_type_info*__dst, const void*__obj, > __upcast_result& __restrict __result) const; > }; > > > class __vmi_class_type_info : public __class_type_info > { > public: > unsigned int __flags; > unsigned int __base_count; > > > > > __base_class_type_info __base_info[1]; > > explicit > __vmi_class_type_info(const char* __n, int ___flags) > : __class_type_info(__n), __flags(___flags), __base_count(0) { } > > virtual > ~__vmi_class_type_info(); > > > enum __flags_masks > { > __non_diamond_repeat_mask = 0x1, > __diamond_shaped_mask = 0x2, > __flags_unknown_mask = 0x10 > }; > > protected: > > virtual bool > __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, > const __class_type_info* __dst_type, const void* __obj_ptr, > const __class_type_info* __src_type, const void* __src_ptr, > __dyncast_result& __result) const; > > virtual __sub_kind > __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, > const __class_type_info* __src_type, > const void* __src_ptr) const; > > virtual bool > __do_upcast(const __class_type_info* __dst, const void* __obj, > __upcast_result& __restrict __result) const; > }; > > > struct __cxa_exception; > struct __cxa_refcounted_exception; > struct __cxa_dependent_exception; > struct __cxa_eh_globals; > > extern "C" > { ># 599 "/usr/include/c++/13/cxxabi.h" 3 > void* > __dynamic_cast(const void* __src_ptr, > const __class_type_info* __src_type, > const __class_type_info* __dst_type, > ptrdiff_t __src2dst); ># 612 "/usr/include/c++/13/cxxabi.h" 3 > __cxa_eh_globals* > __cxa_get_globals() noexcept __attribute__ ((__const__)); > > __cxa_eh_globals* > __cxa_get_globals_fast() noexcept __attribute__ ((__const__)); > > > void > __cxa_free_exception(void*) noexcept; > > > void > __cxa_throw(void*, std::type_info*, void ( *) (void *)) > __attribute__((__noreturn__)); > > > void* > __cxa_get_exception_ptr(void*) noexcept __attribute__ ((__pure__)); > > void* > __cxa_begin_catch(void*) noexcept; > > void > __cxa_end_catch(); > > void > __cxa_rethrow() __attribute__((__noreturn__)); > > > > std::type_info* > __cxa_current_exception_type() noexcept __attribute__ ((__pure__)); > > > > > __cxa_dependent_exception* > __cxa_allocate_dependent_exception() noexcept; > > > void > __cxa_free_dependent_exception(__cxa_dependent_exception*) noexcept; > > } > > > > class __foreign_exception > { > virtual ~__foreign_exception() throw(); > virtual void __pure_dummy() = 0; > }; > >} ># 687 "/usr/include/c++/13/cxxabi.h" 3 >namespace abi = __cxxabiv1; > >namespace __gnu_cxx >{ ># 704 "/usr/include/c++/13/cxxabi.h" 3 > class recursive_init_error: public std::exception > { > public: > recursive_init_error() noexcept; > virtual ~recursive_init_error() noexcept; > }; >} > > >#pragma GCC visibility pop ># 4 "../../subprojects/edfst/subprojects/facile/src/io/TypeId.hpp" 2 > > > ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 8 "../../subprojects/edfst/subprojects/facile/src/io/TypeId.hpp" 2 > > ># 9 "../../subprojects/edfst/subprojects/facile/src/io/TypeId.hpp" >namespace facile >{ >namespace TypeId >{ >using HashType = std::size_t; >using NameType = std::string; > >template<typename T> >struct Reflect { > static HashType > hash() { return typeid(T).hash_code(); } > > static NameType > name() > { > int status; > > std::unique_ptr<char, Deleter> demangled_name(__cxxabiv1::__cxa_demangle(typeid(T).name(), nullptr, nullptr, &status)); > > switch (status) > { > case 0: > return NameType(demangled_name.get()); > > case -1: > return "A memory allocation failure occurred."; > > case -2: > return "name is not a valid name under the C++ ABI mangling rules."; > > case -3: > return "One of the arguments is invalid."; > > default: > return "Unknown error."; > } > } > > private: > struct Deleter { > void > operator()(char *c) { std::free(c); } > }; >}; >} >} ># 7 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 2 > > > >namespace facile >{ >struct Base64 { > template<typename T> > struct PrintToken { > ># 15 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 15 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" > ; > > T& t; > > std::ostream& > print(std::ostream& o) > { > return o << encode(reinterpret_cast<byte *>(&t), sizeof(t)); > } > }; > > class StreamEncoder > { > public: > StreamEncoder(uint32_t bufferSize = 0x100) : > _bufferSize(bufferSize) {} > > void > encode(std::istream& src, std::ostream& dst); > > private: > enum Step { > ENCODER_STEP_A, > ENCODER_STEP_B, > ENCODER_STEP_C > }; > > int > encodeBlock(const char *src, int length, char *dst); > > int > encodeTail(char *dst); > > uint32_t _bufferSize; > char _lastCode; > Step _lastStep; > uint32_t _stepCount; > }; > > class StreamDecoder > { > public: > StreamDecoder(uint32_t bufferSize = 0x100) : > _bufferSize(bufferSize) {} > > void > decode(std::istream& src, std::ostream& dst); > > private: > enum Step { > DECODER_STEP_A, > DECODER_STEP_B, > DECODER_STEP_C, > DECODER_STEP_D > }; > > int > decodeBlock(const char *src, int length, char *dst); > > uint32_t _bufferSize; > Step _lastStep; > char _lastChar; > }; > > template<typename T> > static PrintToken<T> > token(T& src) { return PrintToken<T>{ src }; } > > template<typename T> > static std::string > encode(T& src) { return encode(reinterpret_cast<byte *>(&src), sizeof(src)); } > > static std::string > encode(byte *src, int length); > > static LocalityBlock<byte> > decode(const std::string& src); > > template<typename T> > static void > decodeInto(const std::string& src, T& t) > { > DecodingDimensions d = measure(src); > > ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 3 > ( ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" > d.dst.length == sizeof(t) ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp", 99) << ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" > std::endl ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 3 > << "⢠Condition [" << ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" > "d.dst.length == sizeof(t)" ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 3 > << "] " << ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" > std::endl ># 99 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 3 > << "⢠" > ># 100 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" > << "Cannot decode " << d.dst.length << " bytes into a " << TypeId::Reflect<T>::name() << " of size " << sizeof(t) << ># 100 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" 3 > facile::RequireException::require_sentinel ># 100 "../../subprojects/edfst/subprojects/facile/src/io/Base64.hpp" > ; > > decodeBytes(src, reinterpret_cast<byte *>(&t), d); > } > > private: > struct DecodingDimensions { > struct { > const char *tail; > } > src; > struct { > uint32_t length; > uint32_t tail; > } > dst; > }; > > static DecodingDimensions > measure(const std::string& src); > > static void > decodeBytes(const std::string& src, byte *dst, DecodingDimensions d); >}; >} ># 6 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 1 > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 4 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 2 > > > > >namespace facile >{ >namespace Arithmetic >{ >struct Constant { > static constexpr double pi = 2 * acos(0.0); >}; > >template<typename T> >struct Is { > static bool constexpr > less(T a, T b) { return a < b; } > > template<T a, T b> > struct Less { > static constexpr bool value = (a < b); > }; > > static bool constexpr > notless(T a, T b) { return a >= b; } > > template<T a, T b> > struct NotLess { > static constexpr bool value = (a >= b); > }; > > static bool constexpr > more(T a, T b) { return a > b; } > > static bool constexpr > notmore(T a, T b) { return a <= b; } >}; > >template<int Base, int Power> >struct PowerOf { > enum { value = Base * PowerOf<Base, Power - 1>::value }; >}; >template<int Base> >struct PowerOf<Base, 0> { > enum { value = 1 }; >}; >template<int Base> >struct PowerOf<Base, 1> { > enum { value = Base }; >}; > >template<typename T> >struct Bounds { > static constexpr T min = std::numeric_limits<T>::min(); > static constexpr T max = std::numeric_limits<T>::max(); >}; > >template<typename Base, typename X> >static Base >powerOf(Base base, X x) >{ > if (x == 0) > return 1; > else > return base * powerOf(base, x - 1); >} > >template<typename Sink, typename Source, > typename = typename std::enable_if_t<std::is_integral<Sink>::value && std::is_integral<Source>::value>> >static Sink >truncate(Source source) >{ > Sink sink; > if ((sizeof(Sink) < sizeof(Source)) && (source > static_cast<Source>(Bounds<Sink>::max))) > sink = Bounds<Sink>::max; > else > sink = static_cast<Sink>(source); > > if constexpr (std::is_signed<Sink>::value) { > if (std::is_signed<Source>::value) { > if (source < Bounds<Sink>::min) > sink = Bounds<Sink>::min; > } else { > if (source > Bounds<Sink>::max) > sink = Bounds<Sink>::max; > } > } else if constexpr (std::is_signed<Source>::value) { > if (source < 0) > sink = 0; > } > return sink; >} > >template<typename T> >static typename std::make_unsigned<T>::type >absoluteDifference(T a, T b) >{ > using U = typename std::make_unsigned<T>::type; > > if (a < 0) { > if (b < 0) { > a = -a; > b = -b; > } else { > U am = static_cast<U>(-a); > U bm = static_cast<U>(b); > return am + bm; > } > } else if (b < 0) { > U am = static_cast<U>(a); > U bm = static_cast<U>(-b); > return am + bm; > } > > > return static_cast<U>((a > b) ? static_cast<U>(a) - b : static_cast<U>(b) - a); >} > >template<typename T> >static typename std::make_unsigned<T>::type >ascendingDistance(T a, T b) >{ > ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > ( ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > a <= b ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp", 125) << ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > std::endl ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "⢠Condition [" << ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > "a <= b" ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "] " << ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > std::endl ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "⢠" ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > << "Cannot determine the ascending difference of " << a << " -> " << b << ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > facile::RequireException::require_sentinel ># 125 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > ; > > using U = typename std::make_unsigned<T>::type; > > if (a < 0) { > if (b < 0) { > a = -b; > b = -a; > } else { > U am = static_cast<U>(-a); > U bm = static_cast<U>(b); > return am + bm; > } > } > > > return static_cast<U>(static_cast<U>(b) - a); >} > >template<typename T> >static T >increment(T base, T amount = 1) >{ > ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > ( ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > amount > 0 ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp", 148) << ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > std::endl ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "⢠Condition [" << ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > "amount > 0" ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "] " << ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > std::endl ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "⢠" ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > << "Cannot increment by negative value " << amount << ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > facile::RequireException::require_sentinel ># 148 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > ; > > using U = typename std::make_unsigned<T>::type; > > U headroom = ascendingDistance(base, Bounds<T>::max); > if (widen<U>(amount) > headroom) > return Bounds<T>::max; > else > return (base + amount); >} > >template<typename T> >static T >decrement(T base, T amount = 1) >{ > ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > ( ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > amount > 0 ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp", 163) << ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > std::endl ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "⢠Condition [" << ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > "amount > 0" ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "] " << ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > std::endl ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > << "⢠" ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > << "Cannot decrement by negative value " << amount << ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > facile::RequireException::require_sentinel ># 163 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > ; > > using U = typename std::make_unsigned<T>::type; > > U headroom = ascendingDistance(Bounds<T>::min, base); > if (widen<U>(amount) > headroom) > return Bounds<T>::min; > else > return (base - amount); >} > >template<typename T> >static T >negate(T value) >{ > if (value == Bounds<T>::min) > return Bounds<T>::max; > else if (value == Bounds<T>::max) > return Bounds<T>::min; > else > return -value; >} > >template<typename T> >static T >slide(T base, T amount) >{ > if (amount == 0) > return base; > else if (amount < 0) > return decrement(base, negate(amount)); > else > return increment(base, amount); >} > >template<typename T, typename S = typename std::make_signed<T>::type> >static typename std::enable_if<std::is_integral<T>::value, S>::type >difference(T a, T b) >{ > using SignedDelta = typename std::make_signed<T>::type; > using U = typename std::make_unsigned<T>::type; > > U delta = absoluteDifference(a, b); > if (delta > std::numeric_limits<SignedDelta>::max()) { > ># 207 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > throw ># 207 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > FacileException ># 207 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" 3 > ("../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp", 207) ># 207 "../../subprojects/edfst/subprojects/facile/src/math/Arithmetic.hpp" > << "Arithmetic overflow error: cannot compute (" << a << " - " << b > << ") with the bounds of type " << typeid(SignedDelta).name() << std::endl; > } > > if (a < b) > return -static_cast<SignedDelta>(delta); > else > return static_cast<SignedDelta>(delta); >} > >template<typename T> >static typename std::make_signed<T>::type >compare(T first, T second) >{ > using SignedDelta = typename std::make_signed<T>::type; > > if (first == second) > return static_cast<SignedDelta>(0); > > if (first < second) > return static_cast<SignedDelta>(-1); > else > return static_cast<SignedDelta>(1); >} > >template<typename N, typename D> >static constexpr double >ratio(N numerator, D denominator) >{ > return static_cast<double>(numerator) / static_cast<double>(denominator); >} > >template<typename T> >static uint32_t >percentOf(T basis, T value) >{ > return static_cast<uint32_t>((static_cast<double>(value) / static_cast<double>(basis)) * 100.0); >} > >template<typename D, typename = std::enable_if_t<std::is_floating_point<D>::value, void>> >double >amplitude(D phase) >{ > static constexpr double limit = (Constant::pi / 2); > > if (phase < 0.0) > return 0.0; > else if (phase > 1.0) > return 1.0; > > double scaled = ((phase * 20.0) - 10.0); > return ((atan(scaled) / limit) + 1.0) / 2.0; >} > >struct Integral { > static constexpr double > arctan(double x) { return (x * atan(x)) - Arithmetic::ratio(log(1 + (x * x)), 2.0); } >}; > >template<typename T> >static inline constexpr T >highBitMask() >{ > return (static_cast<T>(1) << ((sizeof(T) * 8) - 1)); >} > > >static inline uint64_t >findLowBitPosition(uint64_t value) >{ > return __builtin_ctzll(value); >} > > >static inline uint64_t >findHighBitPosition(uint64_t value) >{ > return 64 - __builtin_clzll(value); > > > > > > > >} > >static inline uint64_t >logFloor(uint64_t value) >{ > return findHighBitPosition(value); >} > >template<typename T> >static inline uint32_t >countDigits(T value) >{ > double log = std::log10(value); > return static_cast<uint32_t>(log) + 1; >} > >template<typename T> >static inline std::string::size_type >stringWidth(T value) >{ > return static_cast<std::string::size_type>(countDigits(value)); >} >} >} ># 7 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 2 > > >namespace facile >{ >namespace Randomization >{ >using ConfigurationSchema::DefineFieldSet; >using ConfigurationSchema::TupleJunction; >using ConfigurationSchema::PropertyTree; > > >struct DistributionConfigurable { > struct Uniform { > using Fields = decltype(DefineFieldSet())::Type; > Fields fields; > > Uniform() : > fields(TupleJunction::unreachable) > {} > }; > > struct Binomial { > double probability; > > using Fields = decltype(DefineFieldSet(probability))::Type; > Fields fields; > > Binomial() : > fields( ># 35 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 35 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "probability" ># 35 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 35 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > probability ># 35 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 35 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ) > {} > }; > > uint64_t seed; > Uniform uniform; > Binomial binomial; > > using Fields = decltype(DefineFieldSet(seed, uniform, binomial))::Type; > Fields fields; > > DistributionConfigurable() : > fields( ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "seed" ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > seed ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > , ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "uniform" ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > uniform ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > , ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "binomial" ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > binomial ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 47 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ) > {} >}; > >struct GeneratorConfigurable { > struct Uniform { > using Fields = decltype(DefineFieldSet())::Type; > Fields fields; > > Uniform() : > fields(TupleJunction::unreachable) > {} > }; > > struct Binomial { > struct Beta { > std::string alpha; > std::string beta; > > using Fields = decltype(DefineFieldSet(alpha, beta))::Type; > Fields fields; > > Beta() : > fields( ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "alpha" ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > alpha ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > , ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "beta" ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > beta ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 70 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ) > {} > }; > > std::string integral; > Beta beta; > > using Fields = decltype(DefineFieldSet(integral, beta))::Type; > Fields fields; > > Binomial() : > fields( ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "integral" ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > integral ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > , ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "beta" ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > beta ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 81 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ) > {} > }; > > std::string engine; > Uniform uniform; > Binomial binomial; > > using Fields = decltype(DefineFieldSet(engine, uniform, binomial))::Type; > Fields fields; > > GeneratorConfigurable() : > fields( ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "engine" ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > engine ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > , ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "uniform" ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > uniform ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > , ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::NamedVariable( ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "binomial" ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > , ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > binomial ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) ># 93 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ) > {} >}; > >template<typename T> >class BetaDistribution >{ >public: > BetaDistribution(T alpha, T beta) : > _alpha(alpha), > _beta(beta) > {} > > template<typename Engine> > T > operator ()(Engine& engine) > { > T alpha = _alpha(engine); > return alpha / (alpha + _beta(engine)); > } > > void > pack(handle<GeneratorConfigurable::Binomial::Beta> c) > { > std::string alpha = Base64::encode(_alpha), beta = Base64::encode(_beta); > > c->fields.specify(c->alpha, alpha); > c->fields.specify(c->beta, beta); > } > >private: > std::gamma_distribution<T> _alpha; > std::gamma_distribution<T> _beta; >}; > >enum class Distribution { > uniform, > binomial >}; > >std::string >spellDistribution(Distribution d) >{ > switch (d) > { > case Distribution::uniform: > return "Uniform"; > > case Distribution::binomial: > return "Binomial"; > } > > ># 145 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp", 145) ># 145 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > << "unreachable" << ># 145 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 145 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ; >} > >Distribution >parseDistribution(const std::string& s) >{ > if (s == "uniform") > return Distribution::uniform; > else if (s == "binomial") > return Distribution::binomial; > > ># 156 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp", 156) ># 156 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > << "Unknown distribution '" << s << "'" << ># 156 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 156 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ; >} ># 166 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" >class RandomGeneratorSpecification { >public: > RandomGeneratorSpecification(owner<json> properties, Distribution distribution) : > _properties(std::move(properties)), > _distribution(distribution) > {} > > Distribution > distribution() { return _distribution; } > > loan<json> > properties() { return _properties; } > > static owner<RandomGeneratorSpecification> > make(owner<json> properties) > { > Distribution distribution = parseDistribution(properties->value("id", "")); > return owner<RandomGeneratorSpecification>::make(std::move(properties), distribution); > } > >private: > owner<json> _properties; > Distribution _distribution; >}; > >template<typename T, typename D = double, typename Seed = uint64_t> >struct RandomGenerator { > struct Token { > const std::default_random_engine& engine; > > friend std::ostream& > operator <<(std::ostream& o, const Token& t) { return o << t.engine; } > }; > > RandomGenerator(Seed seed = 0) : > _seed(seed == 0 ? std::chrono::system_clock::now().time_since_epoch().count() : seed), > _engine(_seed) > {} > > virtual ~RandomGenerator() {} > > virtual T > choose() { return choose(std::numeric_limits<T>::min(), std::numeric_limits<T>::max()); } > > virtual T > choose(T min, T max) = 0; > > virtual D > fish() = 0; > > virtual bool > maybe(double threshold) = 0; > > Seed > originalSeed() { return _seed; } > > template<typename Iterator, typename Sink, typename ValueType = typename Iterator::value_type> > void > selectSubset(Iterator begin, Iterator end, uint32_t subsetSize, handle<Sink> sink) > { > std::vector<ValueType> selection; > for (Iterator i = begin; i != end; ++i) > selection.push_back(*i); > std::shuffle(selection.begin(), selection.end(), _engine); > > for (uint32_t i = 0; i < subsetSize; i++) > sink->draw(selection.at(i)); > } > > virtual void > pack(handle<GeneratorConfigurable> c) > { > std::string encoded = Base64::encode(_engine); > c->fields.specify(c->engine, encoded); > } > > json > pack() > { > using GeneratorSnapshot = PropertyTree<GeneratorConfigurable>; > > GeneratorConfigurable c; > pack(c); > ConfigurationSchema::Packer packer; > owner<GeneratorSnapshot> s = GeneratorSnapshot::makeRoot(c); > return packer(s.reference()); > } > > void > unpack(Seed state) > { > std::stringstream ss; > ss << state; > ss >> _engine; > } > > void > unpack(loan<GeneratorConfigurable> c) > { > Base64::decodeInto(c->engine, _engine); > } > > Token > stateToken() const { return Token{ _engine }; } > > protected: > using SeedType = Seed; > > Seed _seed; > std::default_random_engine _engine; >}; > >template<typename T, typename D = double> >struct UniformRandom : > public RandomGenerator<T> { > using super = RandomGenerator<T>; > using Seed = typename super::SeedType; > > UniformRandom(Seed seed = 0) : > super(seed), > _unit(0.0, 1.0) > {} > > virtual T > choose() { return choose(std::numeric_limits<T>::min(), std::numeric_limits<T>::max()); } > > T > choose(T min, T max) override > { > ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ( ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > min <= max ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp", 295) << ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > std::endl ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > << "⢠Condition [" << ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "min <= max" ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > << "] " << ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > std::endl ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > << "⢠" ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > << "Cannot choose a random value between [" << min << ", " << max << "]" << ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 295 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ; > > std::uniform_int_distribution distribution(min, max); > return distribution(super::_engine); > } > > D > fish() { return _unit(super::_engine); } > > bool > maybe(D threshold) { return _unit(super::_engine) <= threshold; } > > void > serialize(std::ostream& o) > { > super::serialize(o); > o << "std::uniform_real_distribution<D>" << Base64::token(_unit); > } > > virtual void > pack(handle<GeneratorConfigurable> c) override > { > super::pack(c); > c->fields.specify(c->uniform); > } > > private: > std::uniform_real_distribution<D> _unit; >}; > >template<typename T, typename D = double> >struct BinomialRandom : > public RandomGenerator<T> { > using super = RandomGenerator<T>; > > BinomialRandom(double probability, T seed = 0) : > super(seed), > _probability(probability), > _unit(0.0, 1.0) > {} > > T > choose(T min, T max) override > { > using U = typename std::make_unsigned<T>::type; > > ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ( ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > min <= max ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp", 341) << ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > std::endl ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > << "⢠Condition [" << ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > "min <= max" ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > << "] " << ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > std::endl ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > << "⢠" ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > << "Cannot choose a random value between [" << min << ", " << max << "]" << ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 341 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ; > > U span = Arithmetic::absoluteDifference(max, min); > std::binomial_distribution d(span, _probability); > > uint64_t draw = d(super::_engine); > return min + draw; > } > > D > fish() { return _unit(super::_engine); } > > bool > maybe(double threshold) { return _unit(super::_engine) <= threshold; } > > void > serialize(std::ostream& o) > { > super::serialize(o); > o << "BetaDistribution<D>" << Base64::token(_unit); > } > > virtual void > pack(handle<GeneratorConfigurable> c) override > { > super::pack(c); > c->fields.specify(c->binomial); > c->binomial.fields.specify(c->binomial.integral, "<inline>"); > c->binomial.fields.specify(c->binomial.beta); > _unit.pack(c->binomial.beta); > } > > private: > double _probability; > > BetaDistribution<D> _unit; >}; > >template<typename T, typename ShuffleDistribution> >static owner<RandomGenerator<T>> >factory(const ShuffleDistribution& d) >{ > switch (d.d) > { > case Distribution::uniform: > return owner<UniformRandom<T>>::make(); > > case Distribution::binomial: > return owner<BinomialRandom<T>>::make(d.probability); > > > > } > > ># 395 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp", 395) ># 395 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > << "unreachable" << ># 395 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 395 "../../subprojects/edfst/subprojects/facile/src/math/RandomGenerator.hpp" > ; >} >} >} ># 10 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 2 > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" 1 > > ># 1 "/usr/include/getopt.h" 1 3 4 ># 36 "/usr/include/getopt.h" 3 4 ># 1 "/usr/include/bits/getopt_ext.h" 1 3 4 ># 27 "/usr/include/bits/getopt_ext.h" 3 4 > ># 27 "/usr/include/bits/getopt_ext.h" 3 4 >extern "C" { ># 50 "/usr/include/bits/getopt_ext.h" 3 4 >struct option >{ > const char *name; > > > int has_arg; > int *flag; > int val; >}; > > > > > > > >extern int getopt_long (int ___argc, char *const *___argv, > const char *__shortopts, > const struct option *__longopts, int *__longind) > noexcept (true) __attribute__ ((__nonnull__ (2, 3))); >extern int getopt_long_only (int ___argc, char *const *___argv, > const char *__shortopts, > const struct option *__longopts, int *__longind) > noexcept (true) __attribute__ ((__nonnull__ (2, 3))); > >} ># 37 "/usr/include/getopt.h" 2 3 4 ># 4 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" 2 ># 12 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" > ># 12 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" >namespace facile >{ >class OptionParser { >public: > using ConfigurationCallback = std::function<void (loan<OptionParser>)>; > > struct Option { > bool hasArgument; > char commandLineFlag; > std::string usage; > > Option(bool hasArgument_, const std::string& usage_, char commandLineFlag_) : > hasArgument(hasArgument_), > commandLineFlag(commandLineFlag_), > usage(usage_), > _active(false), > _required(false), > _helpRequested(false) > {} > > virtual ~Option() {} > > virtual void > parse(const std::string& input) = 0; > > virtual void > activate() { _active = true; } > > bool > isActive() { return _active; } > > virtual bool > hasValue() { return false; } > > bool > isRequired() { return _required; } > > void > setRequired() { _required = true; } > > bool > isHelpRequested() { return _helpRequested; } > > void > setHelpRequested() { _helpRequested = true; } > > protected: > bool _active; > bool _required; > bool _helpRequested; > }; > > struct BoolOption : > public Option { > bool value; > > BoolOption(char commandLineFlag, const std::string& usage = "<usage not provided>", bool defaultValue = false) : > Option(false, usage, commandLineFlag), > value(defaultValue) {} > > void > parse(__attribute__((unused)) const std::string& input) {} > > void > activate() > { > Option::activate(); > > value = true; > } > > bool > hasValue() { return true; } > }; > > struct StringOption : > public Option { > std::string value; > > StringOption(char commandLineFlag_, const std::string& usage = "<usage not provided>", const std::string& defaultValue_ = "") : > Option(true, usage, commandLineFlag_), > value(defaultValue_) {} > > void > parse(const std::string& input) > { > activate(); > > value = input; > } > > bool > hasValue() { return value.length() > 0; } > }; > > struct IntOption : > public Option { > int32_t value; > > IntOption(char commandLineFlag_, const std::string& usage = "<usage not provided>", int32_t defaultValue_ = 0) : > Option(true, usage, commandLineFlag_), > value(defaultValue_) {} > > void > parse(const std::string& input) > { > activate(); > > if (input.length() == 0) { > _hasValue = false; > value = 0; > } else { > _hasValue = true; > value = strtol(input.c_str(), ># 125 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" 3 4 > __null ># 125 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" > , 0); > } > } > > bool > hasValue() { return _hasValue; } > > private: > bool _hasValue; > }; > > struct PropertiesOption : > public Option { > PropertiesOption(char commandLineFlag_, const std::string& usage = "<usage not provided>", owner<json> defaultValue_ = nullptr) : > Option(true, usage, commandLineFlag_), > _value(std::move(defaultValue_)) {} > > void > parse(const std::string& input) > { > activate(); > > if (input.length() > 0) { > if (input.at(0) == '{') { > _value = owner<json>::make(json::parse(input)); > } else if (input.at(0) == '?') { > _helpRequested = true; > } else { > std::ifstream f(input); > parse(f); > } > } > } > > void > parse(std::istream& input) { _value = owner<json>::make(json::parse(input)); } > > bool > hasValue() { return _value != nullptr && !isEmpty(); } > > loan<json> > value() { return _value; } > > owner<json> > extract() { return std::move(_value); } > > bool > isEmpty() { return _value->empty(); } > > static owner<json> > defaultEmpty() { return owner<json>::make(); } > > private: > owner<json> _value; > }; > > OptionParser() : > _unflaggedArguments(owner<std::vector<std::string>>::make()), > _unflaggedArgumentsIndex(0) > {} > > loan<BoolOption> > addBoolOption(char commandLineFlag, const std::string& usage = "<usage not provided>", bool defaultValue = false) > { > return insertOption(commandLineFlag, > owner<BoolOption>::make(commandLineFlag, usage, defaultValue)); > } > > loan<StringOption> > addStringOption(char commandLineFlag, const std::string& usage = "<usage not provided>", const std::string& defaultValue = "") > { > return insertOption(commandLineFlag, > owner<StringOption>::make(commandLineFlag, usage, defaultValue)); > } > > loan<IntOption> > addIntOption(char commandLineFlag, const std::string& usage = "<usage not provided>", int32_t defaultValue = 0) > { > return insertOption(commandLineFlag, > owner<IntOption>::make(commandLineFlag, usage, defaultValue)); > } > > loan<PropertiesOption> > addPropertiesOption(char commandLineFlag, const std::string& usage = "<usage not provided>", > owner<json> defaultValue = PropertiesOption::defaultEmpty()) > { > return insertOption(commandLineFlag, > owner<PropertiesOption>::make(commandLineFlag, usage, std::move(defaultValue))); > } > > template<typename OptionTuple, typename Option> > void > setRequired(OptionTuple& tuple) { std::get<0>(tuple)->setRequired(); } > > template<typename OptionTuple, typename LastOption, typename ... EarlierOptions, > int OptionIndex = sizeof...(EarlierOptions), > typename = typename std::enable_if<sizeof...(EarlierOptions) != 0>::type> > void > setRequired(OptionTuple& tuple) > { > setRequired<OptionTuple, EarlierOptions ...>(tuple); > std::get<OptionIndex>(tuple)->setRequired(); > } > > template<typename ... Options> > void > setRequired(Options&& ... options) > { > using OptionTuple = std::tuple<Options ...>; > > OptionTuple tuple(std::forward<Options>(options) ...); > setRequired<OptionTuple, Options ...>(tuple); > } > > bool > parseCommandLine(int argc, char *argv[]) > { > _appName = argv[0]; > > int opt; > > std::string optionKey = ""; > > for (const std::pair<const char, owner<Option>>& option : _options) { > optionKey += option.first; > if (option.second->hasArgument) > optionKey += ':'; > } > > while ((opt = getopt(argc, argv, optionKey.c_str())) != -1) { > if (opt == '-') > break; > > if (_options.find(opt) == _options.end()) { > std::cerr << "Error: unknown option '" << argv[optind - 1] << "'" << std::endl; > printUsageTable(std::cerr); > std::cerr << std::endl; > return false; > } > > loan<Option> option = _options.at(opt); > if (option == nullptr) > ># 267 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" 3 > throw ># 267 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" > FacileException ># 267 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" 3 > ("../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp", 267) ># 267 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" > << "Invalid internal configuration of the OptionParser"; > if (option->hasArgument) > option->parse(optarg); > else > option->activate(); > } > > for (int i = optind; i < argc; i++) > _unflaggedArguments->push_back(argv[i]); > > loan<Option> missing = nullptr; > bool helpRequested = false; > for (const std::pair<const char, owner<Option>>& optionMapping : _options) { > loan<Option> option = optionMapping.second; > if (option->isHelpRequested() && option->isActive()) { > helpRequested = true; > break; > } > if (option->isRequired() && !option->hasValue()) > missing = option; > } > > if ((missing != nullptr) && !helpRequested) { > std::cerr << "Error: a required option is missing: -" << missing->commandLineFlag << " (" << missing->usage << ")" << std::endl; > std::cerr << std::endl << "Usage table for " << _appName << ":" << std::endl; > printUsageTable(std::cerr); > std::cerr << std::endl; > return false; > } > > return true; > } > > void > printUsageTable(std::ostream& o) > { > for (std::pair<const char, owner<Option>>& option : _options) > o << " -" << option.second->commandLineFlag << " " << option.second->usage << std::endl; > } > > std::string > getAppName() { return _appName; } > > bool > hasUnflaggedArguments() const { return !_unflaggedArguments->empty(); } > > uint32_t > countUnflaggedArguments() const { return _unflaggedArguments->size(); } > > > > iterable<typename std::vector<std::string>::iterator> > iterateUnflaggedArguments() const > { > > return iterable<typename std::vector<std::string>::iterator>(_unflaggedArguments); > } > > std::string > getUnflaggedArgument(uint32_t index) const > { > return _unflaggedArguments->at(index); > } > > std::string > consumeUnflaggedArgument() > { > return _unflaggedArguments->at(_unflaggedArgumentsIndex++); > } ># 356 "../../subprojects/edfst/subprojects/facile/src/io/OptionParser.hpp" >private: > std::map<char, owner<Option>> _options; > owner<std::vector<std::string>> _unflaggedArguments; > uint32_t _unflaggedArgumentsIndex; > > std::string _appName; > > template<typename T> > loan<T> > insertOption(char commandLineFlag, owner<T> option) > { > std::pair<std::map<char, owner<Option>>::iterator, bool> position; > > position = _options.emplace(commandLineFlag, std::move(option)); > if (!position.second) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 371, facile::StreamLogLevel::Status) << "Warning: overriding a previously installed option '" > << commandLineFlag << "'" << std::endl; > std::cerr << "Warning: overriding a previously installed option '" > << commandLineFlag << "'" << std::endl; > > _options.erase(position.first); > position = _options.emplace(commandLineFlag, std::move(option)); > } > return loan<T>::acquire(static_cast<T *>(position.first->second.get())); > } >}; >} ># 12 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/StreamFile.hpp" 1 > ># 12 "../../subprojects/edfst/subprojects/facile/src/io/StreamFile.hpp" >using namespace point_util; > >namespace facile >{ >class StreamFile : > public DestructorCallback >{ >public: > StreamFile(owner<const boost::filesystem::path, DSA> path, owner<std::fstream, DSA> stream) : > _isOpen(true), > _path(std::move(path)), > _stream(std::move(stream)) > {} > > ~StreamFile() { close(); } > > loan<const boost::filesystem::path> > getPath() { return _path; } > > loan<std::fstream> > getStream() { return _stream; } > > std::fstream& > fstream() { return *_stream; } > > std::fstream& > resetStream() > { > _stream->clear(); > _stream->seekg(0); > return *_stream; > } > > template<typename T> > std::ostream& > operator <<(T v) { return (*_stream) << v; } > > template<typename T> > std::ostream& > operator <<(owner<T> v) { return (*_stream) << *v; } > > std::ostream& > operator <<(std::ostream& (*streamManipulator)(std::ostream&)) { return (*_stream) << streamManipulator; } > > void > close(); > >private: > bool _isOpen; > > owner<const boost::filesystem::path, DSA> _path; > owner<std::fstream, DSA> _stream; >}; > >template<typename T> >inline std::ostream& >operator <<(owner<StreamFile>& log, const T& token) >{ > return log->fstream() << token; >} > >template<typename T> >inline std::ostream& >operator <<(owner<StreamFile>& log, const owner<T>& token) >{ > return log->fstream() << *token; >} > >inline std::ostream& >operator <<(owner<StreamFile>& log, std::ostream& (*streamManipulator)(std::ostream&)) >{ > return log->fstream() << streamManipulator; >} > >class StreamFileLocation >{ >public: > struct FileSubset { > std::vector<boost::filesystem::path> paths; > }; > > StreamFileLocation(const std::string& path) : > _directory(owner<boost::filesystem::path, DSA>::make(path)) > {} > > StreamFileLocation(owner< boost::filesystem::path> path) : > _directory(std::move(path)) > {} > > loan<const boost::filesystem::path> > getPath() { return _directory; } > > bool > exists() { return boost::filesystem::is_directory(*_directory); } > > bool > mkdirs(); > > owner<StreamFileLocation> > getSubDirectory(const std::string& dirname); > > owner<StreamFile> > readFile(const std::string& filename) { return openFile(filename, std::fstream::in); } > > owner<StreamFile> > overwriteFile(const std::string& filename) { return openFile(filename, std::fstream::out | std::fstream::trunc); } > > owner<StreamFile> > openFile(const std::string& filename, std::ios_base::openmode flags); > > bool > fileExists(const std::string& filename); > > owner<FileSubset> > list(const std::regex pattern); > > static owner<StreamFile> > establishFile(const std::string& path); > >private: > owner<boost::filesystem::path, DSA> _directory; >}; >} ># 13 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 2 > > > >namespace facile_test >{ >using namespace facile; > >struct LogOptions { > loan<facile::OptionParser::BoolOption> help; > loan<facile::OptionParser::StringOption> logLevels; > loan<facile::OptionParser::StringOption> runId; > > LogConfiguration::Configurable configurable; > > LogOptions() : > _logConfiguration(configurable) > {} > > void > bind(facile::OptionParser& parser) > { > help = parser.addBoolOption('h', "Print this usage table"); > logLevels = parser.addStringOption('l', "Log levels, separated by ':' for a range or ',' for a list"); > runId = parser.addStringOption('r', "Run ID (basename for log files)"); > > help->setHelpRequested(); > } > > std::string > getRunId(std::string defaultValue = "test") > { > if (runId->hasValue()) > return runId->value; > else > return defaultValue; > } > > facile::StreamLogLevel > parseLogLevels() { return facile::StreamLog::parseLogLevels(logLevels->value); } > > facile::StreamLogLevel > getLogLevels(facile::StreamLogLevel defaultLevels = facile::StreamLogLevel::Sanity) > { > if (logLevels->hasValue()) > return facile::StreamLog::parseLogLevels(logLevels->value); > else > return defaultLevels; > } > > void > enableLogLevels(facile::StreamLogLevel defaultLevels = facile::StreamLogLevel::Sanity) > { > if (logLevels->hasValue()) > facile::StreamLog::enableLogLevels(parseLogLevels()); > else > facile::StreamLog::enableLogLevels(defaultLevels); > } > > void > activate() > { > _logConfiguration.setLevels(logLevels->value); > _logConfiguration.setRunId(getRunId()); > _logConfiguration.activate(); > } > > private: > LogConfiguration _logConfiguration; >}; > >class RandomGeneratorInitialState { >public: > RandomGeneratorInitialState() : > _seed(0), > _state(0), > _snapshot(nullptr) > {} > > static constexpr const char *usage = "Specify the randomizer as 'seed:0x1234abcd' or '<tag>@<json-path>'"; > > bool > isSnapshot() { return _snapshot != nullptr; } > > uint64_t > seed() const { return _seed; } > > uint64_t > state() const { return _state; } > > loan<facile::Randomization::GeneratorConfigurable> > snapshot() { return _snapshot; } > > void > parse(const std::string& specifier) > { > using namespace facile; > using namespace facile::Randomization; > > std::string::size_type arobase = specifier.find("@"); > if (arobase == std::string::npos) { > if (specifier.find("seed:") == 0) > _seed = std::strtol(specifier.substr(5).c_str(), nullptr, 16); > else if (specifier.find("state:") == 0) > _state = std::strtol(specifier.substr(6).c_str(), nullptr, 10); > else > ># 118 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp", 118) ># 118 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > << "Unrecognized format in déjà vu parameter '" << specifier << "': " << usage << ># 118 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 > facile::RequireException::require_sentinel ># 118 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > ; > } else { > std::string tag = specifier.substr(0, arobase), filepath = specifier.substr(arobase + 1); > std::ifstream file(filepath); > json source = json::parse(file); > if (!tag.empty()) > source = source.at(tag); > > ConfigurationSchema::Parser parser; > _snapshot = owner<GeneratorConfigurable>::make(); > parser.parse(_snapshot.reference(), source); > } > } > > void > generateSeed() { _seed = std::chrono::system_clock::now().time_since_epoch().count(); } > >private: > uint64_t _seed; > uint64_t _state; > owner<facile::Randomization::GeneratorConfigurable> _snapshot; >}; > >struct RandomGeneratorFactory { > template<typename ValueType> > static owner<facile::Randomization::RandomGenerator<ValueType>> > make(handle<const facile::Randomization::DistributionConfigurable> c, handle<RandomGeneratorInitialState> i) > { > return make<ValueType>(c, i->state(), i->seed(), i->snapshot()); > } > > template<typename ValueType> > static owner<facile::Randomization::RandomGenerator<ValueType>> > make(handle<const facile::Randomization::DistributionConfigurable> c, ValueType state = 0, ValueType seed = 0) > { > return make<ValueType>(c, state, seed, nullptr); ># 193 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > } > > template<typename ValueType> > static owner<facile::Randomization::RandomGenerator<ValueType>> > make(handle<const facile::Randomization::DistributionConfigurable> c, loan<facile::Randomization::GeneratorConfigurable> snapshot) > { > return make<ValueType>(c, 0, snapshot); > } > > template<typename ValueType> > static owner<facile::Randomization::RandomGenerator<ValueType>> > make(handle<const facile::Randomization::DistributionConfigurable> c, ValueType state, ValueType seed, > loan<facile::Randomization::GeneratorConfigurable> snapshot) > { > using namespace facile::Randomization; > > if (seed == 0) > seed = static_cast<ValueType>(c->seed); > > owner<facile::Randomization::RandomGenerator<ValueType>> generator; > if (c->fields.isSpecified(c->uniform)) > generator = owner<UniformRandom<ValueType>>::make(seed); > else if (c->fields.isSpecified(c->binomial)) > generator = owner<BinomialRandom<ValueType>>::make(c->binomial.probability, seed); > else > ># 218 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp", 218) ># 218 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > << "Distribution missing from the configuration" << ># 218 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 > facile::RequireException::require_sentinel ># 218 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > ; > > if (state > 0) > generator->unpack(state); > if (snapshot != nullptr) > generator->unpack(snapshot); > > return generator; > } ># 252 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" >}; > >struct Continuous { > inline bool > operator ()(__attribute__((unused)) uint64_t k) { return true; } >}; > >struct InvocationMeterSilent { > inline void > operator ()() {} > > inline void > operator ()(__attribute__((unused)) uint64_t p) {} >}; > >template<facile::StreamLogLevel Level = facile::StreamLogLevel::Status> >struct InvocationMeterLog { > inline void > operator ()() { facile::StreamLog::getLogStream(Level) << "Invocation meter: "; } > > inline void > operator ()(uint64_t p) { facile::StreamLog::getLogStream(Level) << p << " "; } >}; > >using InvocationMeterStatus = InvocationMeterLog<>; > >struct InvocationMeterStdout { > inline void > operator ()() { std::cout << "Invocation meter: " << std::flush; } > > inline void > operator ()(uint64_t p) { std::cout << p << " " << std::flush; } >}; > >template<typename PeriodReport = InvocationMeterSilent, typename RepeatPredicate = Continuous> >class InvocationMeter >{ >public: > InvocationMeter(int periodBaseExponent = 4) : > _p(1 << periodBaseExponent), > _k(0) > { > _report(); > } > > inline bool > repeat() { return _repeat(_k); } > > inline void > advance() > { > if (++_k >= _p) { > _report(_p); > _p <<= 1; > } > } > >private: > uint64_t _p; > uint64_t _k; > > PeriodReport _report; > RepeatPredicate _repeat; >}; > >using ContinuousSilentInvocationMeter = InvocationMeter<>; > >struct ExceptionType { > const std::string name; >}; > >struct ExceptionHandler { > virtual ~ExceptionHandler() {} > > template<typename ExceptionType> > int > handleException(const ExceptionType& e) > { > return notify(facile::TypeId::Reflect<ExceptionType>::hash(), facile::TypeId::Reflect<ExceptionType>::name(), e); > } > > protected: > virtual int > notify(__attribute__((unused)) facile::TypeId::HashType id, facile::TypeId::NameType name, const std::exception& e) > { > std::cerr << name << " thrown during invocation of a tenuous function: " << std::endl << "⢠" << e.what() << std::endl; > > facile::StreamLog::log(__PRETTY_FUNCTION__, 339, facile::StreamLogLevel::Sanity) << name << " thrown during invocation of a tenuous function: " << std::endl << "⢠" << e.what() << std::endl; > > return 1; > } >}; > >template<typename ExceptionHandlerType, typename ... ExceptionTypes> >class TestInstanceBase >{ >using TestInstance = TestInstanceBase<ExceptionHandlerType, ExceptionTypes ...>; > >public: > TestInstanceBase(int argc, char **argv, ExceptionHandlerType exceptionHandler = ExceptionHandlerType()) : > _argc(argc), > _argv(argv), > _exceptionHandler(exceptionHandler) > {} > > void > enableSegfaultHandler() > { > struct sigaction segfaultHandler; > memset(&segfaultHandler, 0, sizeof(struct sigaction)); > segfaultHandler. ># 362 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 4 > __sigaction_handler.sa_sigaction ># 362 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > = crash; > segfaultHandler.sa_flags = ># 363 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 4 > 4 ># 363 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > ; > > sigaction( ># 365 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 4 > 11 ># 365 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > , &segfaultHandler, &_defaultSegfault); > sigaction( ># 366 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 4 > 6 ># 366 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > , &segfaultHandler, &_defaultAbort); > } > > template<template<typename> class TestMainTemplate, typename ... ConstructorArgs> > int > testMain(ConstructorArgs&& ... args) > { > using TestMain = TestMainTemplate<TestInstance>; > > TestMain main(std::forward<ConstructorArgs>(args) ...); > return enter<TestMain, ExceptionTypes ...>(main); > } > > void > begin(std::function<void()> tenuous) > { > trial<ExceptionTypes ...>(tenuous); > } > > template<typename Test, typename ... ConstructorArgs> > void > begin(ConstructorArgs&& ... args) > { > Test tenuous(std::forward<ConstructorArgs>(args) ...); > trial<Test, ExceptionTypes ...>(tenuous); > } ># 406 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > template<typename Test> > void > begin(Test& tenuous) > { > trial<Test, ExceptionTypes ...>(tenuous); > } > > std::string > testExecutable() { return _argv[0]; } > > handle<ExceptionHandlerType> > handler() { return _exceptionHandler; } > > static void > crash(int signal, siginfo_t *info, __attribute__((unused)) void *arg) > { > std::cerr << "⤠Terminate with signal " << signal << " at " << hex(info-> ># 422 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" 3 4 > _sifields._sigfault.si_addr ># 422 "../../subprojects/edfst/subprojects/facile/src/test/FacileTestFramework.hpp" > ) << std::endl; > exit(1); > } > >private: > template<typename TestMain, typename ExceptionType> > int > enter(TestMain& main) > { > try { > return main(handle(*this), _argc, _argv); > } catch (const ExceptionType& e) { > return _exceptionHandler.handleException(e); > } > } > > template<typename TestMain, typename LastCaughtType, typename ... EarlierCaughtTypes, > int TypeIndex = sizeof...(EarlierCaughtTypes), > typename = typename std::enable_if<sizeof...(EarlierCaughtTypes) != 0>::type> > int > enter(TestMain& main) > { > try { > return enter<TestMain, EarlierCaughtTypes ...>(main); > } catch (const LastCaughtType& e) { > return _exceptionHandler.handleException(e); > } > } > > template<typename ExceptionType> > void > trial(std::function<void()> tenuous) > { > try { > tenuous(); > } catch (const ExceptionType& e) { > _exceptionHandler.handleException(e); > } > } > > template<typename LastCaughtType, typename ... EarlierCaughtTypes, > int TypeIndex = sizeof...(EarlierCaughtTypes), > typename = typename std::enable_if<sizeof...(EarlierCaughtTypes) != 0>::type> > void > trial(std::function<void()> tenuous) > { > try { > trial<EarlierCaughtTypes ...>(tenuous); > } catch (const LastCaughtType& e) { > _exceptionHandler.handleException(e); > } > } > > template<typename Test, typename ExceptionType> > void > trial(Test& tenuous) > { > try { > tenuous(); > } catch (const ExceptionType& e) { > _exceptionHandler.handleException(e); > } > } > > template<typename Test, typename LastCaughtType, typename ... EarlierCaughtTypes, > int TypeIndex = sizeof...(EarlierCaughtTypes), > typename = typename std::enable_if<sizeof...(EarlierCaughtTypes) != 0>::type> > void > trial(Test& tenuous) > { > try { > trial<Test, EarlierCaughtTypes ...>(tenuous); > } catch (const LastCaughtType& e) { > _exceptionHandler.handleException(e); > } > } > > int _argc; > char **_argv; > ExceptionHandlerType _exceptionHandler; > > struct sigaction _defaultSegfault; > struct sigaction _defaultAbort; >}; > >template<typename ... ExceptionTypes> >using TestInstance = TestInstanceBase<ExceptionHandler, ExceptionTypes ...>; > >template<typename ... ExceptionTypes> >using FacileTestInstance = TestInstanceBase<ExceptionHandler, > std::exception, facile::FacileException, facile::FacileTestFailure, facile::RequireException, > ExceptionTypes ...>; > >template<typename Sentry, typename ... ExceptionTypes> >using FacileTestSentry = TestInstanceBase<Sentry, > std::exception, facile::FacileException, facile::FacileTestFailure, facile::RequireException, > ExceptionTypes ...>; > >using BasicFacileTestInstance = TestInstanceBase<ExceptionHandler, > std::exception, > facile::FacileException, facile::FacileTestFailure, facile::RequireException>; >} ># 6 "../../subprojects/edfst/test/ElasticTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/test/ElasticTestMock.hpp" 1 > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 1 > > > > >namespace facile >{ >template<typename Id, uint size> >class ProportionSetBase >{ >struct Entry { > Id id; > double proportion; >}; > >public: > struct Index { > const Id id; > const uint32_t index; > }; > > struct PrintToken { > ># 22 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 22 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > ; > > PrintToken(ProportionSetBase& s) : > _s(s) > {} > > std::ostream& > print(std::ostream& o) const > { > Comma comma; > double sum = 0.0; > > o << "{"; > for (uint32_t i = 0; i < point_util::lastOfQuantity(size); i++) { > Entry& entry = _s._entries[i]; > o << comma << entry.id << " = " << entry.proportion; > sum += entry.proportion; > } > > return o << comma << _s._entries[point_util::lastOfQuantity(size)].id << " = " << (1.0 - sum) << "}"; > } > > private: > ProportionSetBase& _s; > }; > > ProportionSetBase(std::initializer_list<Id> index) > { > uint32_t i = 0; > for (Id id : index) { > _entries[i].id = id; > _entries[i].proportion = 0.0; > i++; > } > _entries[point_util::lastOfQuantity(size)].proportion = 1.0; > } > > void > set(Index index, double proportion) { set(index.index, proportion); } > > void > set(uint32_t index, double proportion) > { > ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > ( ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > index < size ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp", 65) << ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > std::endl ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "⢠Condition [" << ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > "index < size" ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "] " << ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > std::endl ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "⢠" ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > << "Index out of bounds: index " << index << " >= " << " size " << size << ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > facile::RequireException::require_sentinel ># 65 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > ; > ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > ( ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > index != point_util::lastOfQuantity(size) ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp", 66) << ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > std::endl ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "⢠Condition [" << ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > "index != L(size)" ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "] " << ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > std::endl ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "⢠" ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > << "Cannot set the proportion of the final element, which accounts for unallocated proportion" << ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > facile::RequireException::require_sentinel ># 66 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > ; > > _entries[index].proportion = proportion; > } > > Id > select(double position) > { > ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > ( ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > position >= 0.0 && position <= 1.0 ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp", 74) << ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > std::endl ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "⢠Condition [" << ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > "position >= 0.0 && position <= 1.0" ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "] " << ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > std::endl ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "⢠" ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > << "Selection out of bounds: " << position << " must fall within [0.0, 1.0]" << ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > facile::RequireException::require_sentinel ># 74 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > ; > > for (Entry& entry : _entries) { > if (position <= entry.proportion) > return entry.id; > > position -= entry.proportion; > } > > ># 83 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp", 83) ># 83 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > << "unreachable" << ># 83 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > facile::RequireException::require_sentinel ># 83 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > ; > } > > PrintToken > token() { return PrintToken(*this); } > > void > validate() > { > double sum = 0.0; > for (uint32_t i = 0; i < point_util::lastOfQuantity(size); i++) > sum += _entries[i].proportion; > > ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > ( ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > sum <= 1.0 ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp", 96) << ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > std::endl ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "⢠Condition [" << ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > "sum <= 1.0" ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "] " << ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > std::endl ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > << "⢠" ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > << "Proportion set sum " << sum << " exceeds the maximum total sum of 1.0: " << token() << ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" 3 > facile::RequireException::require_sentinel ># 96 "../../subprojects/edfst/subprojects/facile/src/relation/ProportionSet.hpp" > ; > } > >private: > Entry _entries[size]; >}; >} ># 5 "../../subprojects/edfst/test/ElasticTestMock.hpp" 2 > ># 1 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 1 > > ># 1 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 1 > > > > > > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/index/EnumerationIndexArray.hpp" 1 > > > > > > > > >namespace point_util >{ >template<typename T> >struct EnumeratedPointerMetaProperties { > static bool > isEmpty(const T& t) { return t == nullptr; } >}; > >template<typename C> >struct EnumeratedContainerMetaProperties { > static bool > isEmpty(const C& c) { return c.empty(); } >}; > >template<typename ValueType, typename Enumeration, int size, typename MetaProperties = EnumeratedPointerMetaProperties<ValueType>> >class EnumerationIndexArray >{ >using self = EnumerationIndexArray<ValueType, Enumeration, size, MetaProperties>; > >public: > class iterator > { > public: > typedef iterator self_type; > typedef ValueType value_type; > typedef ValueType& reference; > typedef ValueType * pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > iterator(pointer p) : > _p(p) > {} > > self_type& > operator ++() > { > _p++; > return *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > _p++; > return pre; > } > > template<typename Integer> > typename std::enable_if<std::is_integral<Integer>::value, self_type>::type > operator +(Integer offset) > { > self_type copy = *this; > copy._p += offset; > return copy; > } > > self_type > operator +(Enumeration offset) { return operator +(static_cast<ValueType>(offset)); } > > reference > operator *() { return *_p; } > > pointer > operator ->() const { return _p; } > > difference_type > operator -(self_type other) { return _p - other._p; } > > bool > operator ==(const self_type& other) const { return _p == other._p; } > > bool > operator !=(const self_type& other) const { return _p != other._p; } > > private: > pointer _p; > }; > > class const_iterator > { > public: > typedef const_iterator self_type; > typedef ValueType value_type; > typedef const ValueType * pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > const_iterator(pointer p) : > _p(p) > {} > > self_type& > operator ++() > { > _p++; > return *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > _p++; > return pre; > } > > template<typename Integer> > typename std::enable_if<std::is_integral<Integer>::value, self_type>::type > operator +(Integer offset) > { > self_type copy = *this; > copy._p += offset; > return copy; > } > > self_type > operator +(Enumeration offset) { return operator +(static_cast<ValueType>(offset)); } > > value_type > operator *() { return *_p; } > > pointer > operator ->() const { return _p; } > > difference_type > operator -(self_type other) { return _p - other._p; } > > bool > operator ==(const self_type& other) const { return _p == other._p; } > > bool > operator !=(const self_type& other) const { return _p != other._p; } > > private: > pointer _p; > }; > > class skip_iterator > { > public: > typedef skip_iterator self_type; > typedef ValueType value_type; > typedef ValueType& reference; > typedef ValueType * pointer; > typedef std::forward_iterator_tag iterator_category; > > skip_iterator(pointer p, pointer end) : > _p(p), > _end(end) > { > skip(); > } > > self_type& > operator ++() > { > _p++; > skip(); > return *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > _p++; > skip(); > return pre; > } > > reference > operator *() { return *_p; } > > pointer > operator ->() const { return _p; } > > bool > operator ==(const self_type& other) const { return _p == other._p; } > > bool > operator !=(const self_type& other) const { return _p != other._p; } > > private: > void > skip() > { > > while ((_p < _end) && MetaProperties::isEmpty(*_p)) > _p++; > } > > pointer _p; > pointer _end; > }; > > class const_skip_iterator > { > public: > typedef const_skip_iterator self_type; > typedef ValueType value_type; > typedef const ValueType& reference; > typedef const ValueType * pointer; > typedef std::forward_iterator_tag iterator_category; > > const_skip_iterator(pointer p, pointer end) : > _p(p), > _end(end) > { > skip(); > } > > self_type& > operator ++() > { > _p++; > skip(); > return *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > _p++; > skip(); > return pre; > } > > reference > operator *() { return *_p; } > > pointer > operator ->() const { return _p; } > > bool > operator ==(const self_type& other) const { return _p == other._p; } > > bool > operator !=(const self_type& other) const { return _p != other._p; } > > private: > void > skip() > { > while ((_p < _end) && MetaProperties::isEmpty(*_p)) > _p++; > } > > pointer _p; > pointer _end; > }; > > struct skip_iterable { > skip_iterable(self& src) : > _src(src) > {} > > skip_iterator > begin() { return _src.sbegin(); } > > skip_iterator > end() { return _src.send(); } > > private: > self& _src; > }; > > struct const_skip_iterable { > const_skip_iterable(const self& src) : > _src(src) > {} > > const_skip_iterator > begin() const { return _src.csbegin(); } > > const_skip_iterator > end() const { return _src.csend(); } > > const_skip_iterator > cbegin() const { return _src.csbegin(); } > > const_skip_iterator > cend() const { return _src.csend(); } > > private: > const self& _src; > }; > > static constexpr size_t footprint = (sizeof(ValueType) * size); > > template<typename Fundamental = ValueType> > EnumerationIndexArray(__attribute__((unused)) typename std::enable_if<std::is_fundamental_v<Fundamental>>::type *test = 0) { zero(); } > > template<typename Class = ValueType> > EnumerationIndexArray(__attribute__((unused)) typename std::enable_if<!std::is_fundamental_v<Class>>::type *test = 0) {} > > template<typename ... Types> > EnumerationIndexArray(Types ... values) : > _allocation{values ...} > {} > > EnumerationIndexArray(const self& source) > { > std::copy(source._allocation, source._allocation + size, _allocation); > } > > template<typename T> > inline typename std::enable_if<std::is_integral<T>::value, ValueType&>::type > at(T index) > { > > if (index >= size) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/index/EnumerationIndexArray.hpp", 323) << "Index " << index << " out of bounds (" << size << ")"; > > > return _allocation[index]; > } > > template<typename T> > inline typename std::enable_if<std::is_integral<T>::value, const ValueType&>::type > at(T index) const > { > > if (index >= size) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/index/EnumerationIndexArray.hpp", 335) << "Index " << index << " out of bounds (" << size << ")"; > > > return _allocation[index]; > } > > inline ValueType& > at(Enumeration e) > { > > if (position(e) >= size) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/index/EnumerationIndexArray.hpp", 346) << "Index " << position(e) << " out of bounds (" << size << ")"; > > > return _allocation[position(e)]; > } > > inline const ValueType& > at(Enumeration e) const > { > > if (position(e) >= size) > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/index/EnumerationIndexArray.hpp", 357) << "Index " << position(e) << " out of bounds (" << size << ")"; > > > return _allocation[position(e)]; > } > > inline const ValueType& > first() const { return _allocation[0]; } > > inline const ValueType& > sfirst() const > { > cell<const ValueType> c = cell<const ValueType>::wrap(_allocation); > cell<const ValueType> sentinel = cell<const ValueType>::wrap(_allocation, size); > while (c < sentinel && MetaProperties::isEmpty(c.reference())) > c++; > return c.reference(); > } > > inline const ValueType& > last() const { return _allocation[point_util::lastOfQuantity(size)]; } > > inline const ValueType& > slast() const > { > cell<const ValueType> c = cell<const ValueType>::wrap(_allocation, point_util::lastOfQuantity(size)); > cell<const ValueType> front = cell<const ValueType>::wrap(_allocation); > while (c >= front && MetaProperties::isEmpty(c.reference())) > c--; > return c.reference(); > } > > template<typename T> > inline typename std::enable_if<std::is_integral<T>::value, ValueType&>::type > operator [](T index) > { > return at(index); > } > > inline ValueType& > operator [](Enumeration e) > { > return at(e); > } > > template<typename T> > inline typename std::enable_if<std::is_integral<T>::value, ValueType>::type > read(T index) const { return _allocation[index]; } > > inline ValueType > read(Enumeration e) const { return _allocation[position(e)]; } > > template<typename T> > inline typename std::enable_if<std::is_integral<T>::value, cell<ValueType>>::type > cellView(T index) { return cell_wrap(_allocation, index); } > > inline cell<ValueType> > cellView(Enumeration e) { return cell_wrap(_allocation, position(e)); } > > iterator > begin() { return iterator(&_allocation[0]); } > > iterator > end() { return iterator(&_allocation[size]); } > > const_iterator > begin() const { return const_iterator(&_allocation[0]); } > > const_iterator > end() const { return const_iterator(&_allocation[size]); } > > const_iterator > cbegin() const { return const_iterator(&_allocation[0]); } > > const_iterator > cend() const { return const_iterator(&_allocation[size]); } > > skip_iterator > sbegin() { return skip_iterator(&_allocation[0], &_allocation[size]); } > > skip_iterator > send() { return skip_iterator(&_allocation[size], &_allocation[size]); } > > const_skip_iterator > csbegin() const { return const_skip_iterator(&_allocation[0], &_allocation[size]); } > > const_skip_iterator > csend() const { return const_skip_iterator(&_allocation[size], &_allocation[size]); } > > skip_iterable > iterateElements() const { return skip_iterable(*this); } > > const_skip_iterable > iterateConstElements() const { return const_skip_iterable(*this); } > > > inline void > zero() { std::fill(_allocation, _allocation + size, ValueType() ); } > > inline void > fill(ValueType value) > { > if (value == static_cast<ValueType>(0)) > zero(); > else > std::fill(begin(), end(), value); > } > > static inline Enumeration > none() { return static_cast<Enumeration>(size); } > > static inline uint32_t > position(Enumeration e) { return static_cast<uint32_t>(e); } > > Enumeration > compare(const self& other) const > { > for (const_iterator i = cbegin(), j = other.cbegin(); i != cend(); i++, j++) { > if (*i != *j) > return static_cast<Enumeration>(i - cbegin()); > } > return none(); > } > > void > overwrite(self& dst) { std::memcpy(dst._allocation, _allocation, footprint); } > >private: > ValueType _allocation[size]; >}; >} ># 10 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/point-util/src/index/EnumerationAssignmentArray.hpp" 1 > > >namespace point_util >{ >template<typename ValueType, typename Enumeration, int size> >class EnumerationAssignmentArray >{ >using outer = EnumerationAssignmentArray<ValueType, Enumeration, size>; > >public: > using Assignment = std::pair<Enumeration, ValueType>; > > class iterator > { > public: > typedef iterator self_type; > typedef Assignment value_type; > typedef Assignment& reference; > typedef Assignment * pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > iterator(pointer p) : > _p(p) > {} > > self_type > operator++() > { > _p++; > return *this; > } > > self_type > operator++(__attribute__((unused)) int postfixDisambiguator) const > { > self_type pre = *this; > _p++; > return pre; > } > > reference > operator*() { return *_p; } > > pointer > operator->() const { return _p; } > > bool > operator ==(const self_type& other) const { return _p == other._p; } > > bool > operator !=(const self_type& other) const { return _p != other._p; } > > private: > pointer _p; > }; > > struct iterable { > iterable(outer& src, Enumeration first, Enumeration last) : > _src(src), > _first(first), > _last(last) > {} > > iterator > begin() { return iterator(&_src._allocation[position(_first)]); } > > iterator > end() { return iterator(&_src._allocation[position(_last)+1]); } > > private: > outer& _src; > Enumeration _first; > Enumeration _last; > }; > > EnumerationAssignmentArray() { resetEnumerationKeys(); } > > void > resetEnumerationKeys() > { > Enumeration e = static_cast<Enumeration>(0); > for (uint32_t i = 0; i < size; i++) > _allocation[i].first = e++; > } > > template<typename T> > inline typename std::enable_if<std::is_integral<T>::value, ValueType&>::type > operator[](T index) { return _allocation[index].second; } > > inline ValueType& > operator[](Enumeration e) { return _allocation[position(e)].second; } > > iterator > begin() { return iterator(&_allocation[0]); } > > iterator > end() { return iterator(&_allocation[size]); } > > iterable > span(Enumeration first, Enumeration last) { return iterable(*this, first, last); } > > inline void > zero() { memset(_allocation, 0, sizeof(_allocation)); } > > static inline uint32_t > position(Enumeration e) { return static_cast<uint32_t>(e); } > >private: > Assignment _allocation[size]; >}; >} ># 11 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/point-util/src/index/TemplateComposition.hpp" 1 > > > > > > > >namespace point_util >{ >template<typename HostType, template<typename> class Interface, template<typename> class ... ComponentTemplates> >class TemplateCompositionBase >{ >using ComponentTuple = std::tuple<ComponentTemplates<HostType> ...>; >using AccessTuple = std::tuple<typename Interface<ComponentTemplates<HostType>>::AccessType ...>; >using PersistentTuple = std::tuple<typename Interface<ComponentTemplates<HostType>>::PersistentType ...>; >using TemplateComposition = TemplateCompositionBase<HostType, Interface, ComponentTemplates ...>; > >public: > template<unsigned int index> > using ComponentTypeAt = std::tuple_element_t<index, ComponentTuple>; > > template<unsigned int index> > using AccessTypeAt = std::tuple_element_t<index, AccessTuple>; > > template<unsigned int index> > using PersistentTypeAt = std::tuple_element_t<index, PersistentTuple>; > > template<typename ComponentType> > using ComponentIndexOf = index_of_type<ComponentType, ComponentTemplates<HostType> ...>; > > template<typename PersistentType> > using PersistentIndexOf = index_of_type<PersistentType, typename Interface<ComponentTemplates<HostType>>::PersistentType ...>; > > TemplateCompositionBase() : > _components(Interface<ComponentTemplates<HostType>>::blank() ...) > {} > > template<typename ComponentType, unsigned int index = ComponentIndexOf<ComponentType>::value, typename AccessType = typename Interface<ComponentType>::AccessType> > inline AccessType > component() const { return std::get<index>(_components); } > > template<unsigned int index, typename ComponentType = ComponentTypeAt<index>, typename AccessType = typename Interface<ComponentType>::AccessType> > inline AccessType > componentAt() const { return std::get<index>(_components); } > > template<unsigned int index, typename PersistentType = PersistentTypeAt<index>> > inline typename std::enable_if<std::is_copy_assignable<PersistentType>::value, void>::type > setComponentAt(PersistentType component) { std::get<index>(_components) = component; } > > template<unsigned int index, typename PersistentType = PersistentTypeAt<index>> > inline typename std::enable_if<!std::is_copy_assignable<PersistentType>::value, void>::type > setComponentAt(PersistentType component) { std::get<index>(_components) = std::move(component); } > > template<typename PersistentType, unsigned int index = PersistentIndexOf<PersistentType>::value> > inline typename std::enable_if<std::is_copy_assignable<PersistentType>::value, void>::type > setComponent(PersistentType component) { std::get<index>(_components) = component; } > > template<typename PersistentType, unsigned int index = PersistentIndexOf<PersistentType>::value> > inline typename std::enable_if<!std::is_copy_assignable<PersistentType>::value, void>::type > setComponent(PersistentType component) { std::get<index>(_components) = std::move(component); } > > template<typename Functor, typename ... Args> > void > dispatch(Args&& ... args) > { > Functor f; > dispatch(f, std::forward<Args>(args) ...); > } > > template<typename Functor, typename ... Args> > void > dispatch(Functor& f, Args&& ... args) { dispatch(TemplateSequence<ComponentCount>{}, f, std::forward<Args>(args) ...); } > > template<template<typename> class Functor, typename ... Args> > static void > mux(Args&& ... args) > { > muxBranch<Functor>(TemplateSequence<ComponentCount>{}, std::forward<Args>(args) ...); > } > > template<typename ComponentType> > static void > initialize(__attribute__((unused)) ComponentType component) {} > > static constexpr uint32_t ComponentCount = (sizeof ... (ComponentTemplates)); > >private: > template<unsigned int ... ComponentIndices, typename Functor, typename ... Args> > void > dispatch(IndexSequence<ComponentIndices ...>, Functor& f, Args&& ... args) > { > __attribute__((unused)) auto Void = { 0, (dispatch<ComponentIndices, Functor, Args ...>(f, std::forward<Args>(args) ...), 0) ... }; > } > > template<unsigned int index, typename Functor, typename ... Args> > void > dispatch(Functor& f, Args&& ... args) { f(componentAt<index>(), std::forward<Args>(args) ...); } > > template<template<typename> class Functor, unsigned int ... ComponentIndices, typename ... Args> > static void > muxBranch(IndexSequence<ComponentIndices ...>, Args&& ... args) > { > __attribute__((unused)) auto Void = { 0, (muxCall<ComponentIndices, Functor, Args ...>(std::forward<Args>(args) ...), 0) ... }; > } > > template<unsigned int index, template<typename> class Functor, typename ... Args> > static void > muxCall(Args&& ... args) { Functor<ComponentTypeAt<index>>::relay(std::forward<Args>(args) ...); } > > PersistentTuple _components; >}; > >template<typename ComponentType> >struct EmptyInterface {}; > >template<typename HostType> >using EmptyTemplateComposition = TemplateCompositionBase<HostType, EmptyInterface>; >} ># 12 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/point-util/src/index/TemplateInterfaces.hpp" 1 > > > > > > >namespace point_util >{ >template<typename ComponentType> >struct ObjectBlockInterface { > using PersistentType = unit<ComponentType>; > using AccessType = unit<ComponentType>; > > static PersistentType > blank() { return nullptr; } >}; > >template<typename ComponentType> >struct OwnerInterface { > using PersistentType = owner<ComponentType>; > using AccessType = loan<ComponentType>; > > static PersistentType > blank() { return nullptr; } >}; > >template<typename ComponentType> >struct HandleInterface { > using PersistentType = ComponentType; > using AccessType = handle<ComponentType>; > > static PersistentType > blank() { return PersistentType(); } >}; >} ># 13 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 2 > > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 1 > > > > >namespace facile >{ > >template<typename T, typename InstanceIdType = uint32_t> >class IFactoryMap >{ >public: > virtual bool > isPacked() = 0; > > virtual uint32_t > occupancy() const = 0; > > virtual unit<T> > get(InstanceIdType instanceId) const = 0; > > virtual unit<T> > find(InstanceIdType instanceId) const = 0; > > virtual void > release(unit<T> v) = 0; > > virtual void > clear() = 0; > > virtual void > releaseAll() = 0; >}; > > > >struct FactoryMap { > template<typename T, typename InstanceIdType = uint32_t, > typename InstanceIdHasher = std::hash<InstanceIdType>, > typename InstanceIdCompare = std::equal_to<InstanceIdType>> > class Hash > { > using SparseFactoryMap = Hash<T, InstanceIdType, InstanceIdHasher, InstanceIdCompare>; > using HashTable = std::unordered_map<InstanceIdType, unit<T>, InstanceIdHasher, InstanceIdCompare>; > using Iterator = typename HashTable::iterator; > > public: > class iterator > { > public: > iterator(typename HashTable::const_iterator i) : > _i(i) > {} > > iterator& > operator ++() > { > ++_i; > return *this; > } > > bool > operator ==(const iterator& other) { return (_i == other._i); } > > bool > operator !=(const iterator& other) { return !operator ==(other); } > > unit<T> > operator *() { return entry(); } > > InstanceIdType > id() { return _i->first; } > > unit<T> > entry() { return _i->second; } > > protected: > typename HashTable::const_iterator _i; > }; > > Hash(uint32_t initialBlockSizeExponent) : > _factory(initialBlockSizeExponent) > {} > > bool > empty() const { return occupancy() == 0; } > > uint32_t > occupancy() const { return _table.size(); } > > unit<T> > get(InstanceIdType instanceId) const { return _table.find(instanceId)->second; } > > unit<T> > find(InstanceIdType instanceId) const > { > typename HashTable::const_iterator entry = _table.find(instanceId); > if (entry == _table.cend()) > return nullptr; > else > return entry->second; > } > > template<typename ... Args> > unit<T> > emplace(Args&& ... args) > { > unit<T> v = _factory.makeUnit(std::forward<Args>(args) ...); > _table.emplace(v->instanceId(), v); > return v; > } > > template<typename ... A> > inline unit<T> > remake(unit<T> source, A&& ... args) > { > Iterator i = _table.find(source->instanceId()); > > ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > ( ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > i != _table.end() ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp", 118) << ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > std::endl ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "⢠Condition [" << ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > "i != _table.end()" ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "] " << ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > std::endl ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "⢠" ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > << "Failed to locate instance " << source->instanceId() << " to remake" << ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > facile::RequireException::require_sentinel ># 118 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > ; > > _table.erase(i); > unit<T> sink = source.remake(std::forward<A>(args) ...); > _table.emplace(sink->instanceId(), sink); > return sink; > } > > void > release(unit<T> v) > { > Iterator i = _table.find(v->instanceId()); > > ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > ( ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > i != _table.end() ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp", 131) << ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > std::endl ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "⢠Condition [" << ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > "i != _table.end()" ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "] " << ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > std::endl ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "⢠" ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > << "Failed to locate instance " << v->instanceId() << " to release" << ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > facile::RequireException::require_sentinel ># 131 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > ; > > unit<T> released = i->second; > _table.erase(i); > _factory.release(released); > } > > void > clear() > { > _table.clear(); > _factory.reset(); > } > > void > reset() > { > _factory.reset(); > clear(); > } > > iterator > cbegin() const { return iterator(_table.cbegin()); } > > iterator > cend() const { return iterator(_table.cend()); } > > iterable<iterator> > iterate() const { return iterable<iterator>(*this); } > > private: > HashTable _table; > ObjectBlock<T> _factory; > }; > > template<typename T, typename InstanceIdType = uint32_t> > class Vector > { > using DenseFactoryMap = Vector<T, InstanceIdType>; > using IndexType = uint32_t; > > public: > class iterator > { > public: > iterator(const iterator& i) : > _map(i._map), > _i(i._i) > {} > > iterator(const DenseFactoryMap& map) : > _map(map), > _i(0) > { skipEmptySlots(); } > > iterator(const DenseFactoryMap& map, InstanceIdType i) : > _map(map), > _i(_map.toIndex(i)) > {} > > iterator& > operator ++() > { > ++_i; > skipEmptySlots(); > return *this; > } > > bool > operator ==(const iterator& other) const > { > if (&_map != &other._map) > return false; > else > return (_i == other._i); > } > > bool > operator !=(const iterator& other) const { return !operator ==(other); } > > unit<T> > operator *() const { return entry(); } > > > > > unit<T> > entry() const { return _map._index.table.at(_i); } > > protected: > void > skipEmptySlots() > { > if (_i == _map._index.table.size()) > return; > > while (_map._index.table.at(_i) == nullptr) { > if (++_i == _map._index.table.size()) > break; > } > } > > const DenseFactoryMap& _map; > > IndexType _i; > }; > > Vector(uint32_t initialBlockSizeExponent) : > _factory(initialBlockSizeExponent) > {} > > uint32_t > occupancy() const { return _index.occupancy; } > > unit<T> > get(InstanceIdType i) const { return _index.table.at(toIndex(i)); } ># 258 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > unit<T> > find(InstanceIdType id) const > { > IndexType i = toIndex(id); > if (i < _index.table.size()) > return _index.table.at(i); > else > return nullptr; > } ># 279 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > template<typename ... Args> > unit<T> > emplace(Args&& ... args) > { > unit<T> v = _factory.makeUnit(std::forward<Args>(args) ...); > _index.set(toIndex(v), v); > return v; > } > > void > release(unit<T> v) > { > IndexType index = toIndex(v); > unit<T> released = _index.table.at(index); > _index.clear(index); > _factory.release(released); > } > > void > clear() > { > _index.clear(); > _factory.reset(); > } > > void > releaseAll() > { > _factory.releaseAll(); > clear(); > } > > iterator > cbegin() const { return iterator(*this); } > > iterator > cend() const { return iterator(*this, _index.table.size()); } > > iterable<iterator> > iterate() const { return iterable<iterator>(*this); } > > private: > template<typename IdType = InstanceIdType> > std::enable_if_t<std::is_integral<IdType>::value, IndexType> > toIndex(unit<T> v) const { return v->instanceId(); } > > template<typename IdType = InstanceIdType> > std::enable_if_t<std::is_class<IdType>::value, IndexType> > toIndex(unit<T> v) const { return v->instanceId().index(); } > > template<typename IdType = InstanceIdType> > std::enable_if_t<std::is_integral<IdType>::value, IndexType> > toIndex(IdType id) const { return id; } > > template<typename IdType = InstanceIdType> > std::enable_if_t<std::is_class<IdType>::value, IndexType> > toIndex(IdType id) const { return id.index(); } > > struct LinearIndex { > std::vector<unit<T>> table; > uint32_t occupancy; > > LinearIndex() : > occupancy(0) > {} > > void > set(IndexType index, unit<T> v) > { > if (index >= table.size()) > table.resize(index + 1 ); > > if (table.at(index) == nullptr) > occupancy++; > > table.at(index) = v; > > ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > ( ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > occupancy <= table.size() ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp", 356) << ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > std::endl ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "⢠Condition [" << ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > "occupancy <= table.size()" ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "] " << ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > std::endl ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "⢠" ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > << ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > facile::RequireException::require_sentinel ># 356 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > ; > } > > void > clear(IndexType index) > { > if (table.at(index) != nullptr) { > ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > ( ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > occupancy >= 1 ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp", 363) << ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > std::endl ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "⢠Condition [" << ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > "occupancy >= 1" ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "] " << ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > std::endl ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > << "⢠" ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > << ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" 3 > facile::RequireException::require_sentinel ># 363 "../../subprojects/edfst/subprojects/facile/src/relation/FactoryMap.hpp" > ; > > occupancy--; > } > > table.at(index) = nullptr; > } > > void > clear() > { > table.clear(); > occupancy = 0; > } > } > _index; > > ObjectBlock<T> _factory; > }; >}; >} ># 18 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" 1 > > > > >namespace facile >{ >template<typename T, typename = typename std::enable_if<!std::is_copy_assignable<T>::value, void>> >class FactoryPool >{ >public: > FactoryPool(uint32_t initialBlockSizeExponent) : > _cursor(handle<FactoryPool>(*this)), > _phaseCursor(handle<FactoryPool>(*this)), > _baseMagnitude(initialBlockSizeExponent) > { > _cache.push_back(LocalityBlock<T>::allocate(1 << _baseMagnitude)); > _cursor.reset(); > } > > template<typename ... Args> > handle<T> > acquire(Args&& ... args) > { > if (_phaseCursor.isClosed()) { > if (_in.empty()) { > if (!_cursor.hasNextElement()) { > if (!_cursor.hasNextBlock()) { > uint32_t blockSize = (1 << (_baseMagnitude + _cache.size())); > _cache.push_back(LocalityBlock<T>::allocate(blockSize)); > } > _cursor.advanceHead(); > } > handle<T> next(_cursor.advanceElement()); > next->emplace(std::forward<Args>(args) ...); > return next; > } else { > handle<T> out = _in.back(); > _in.pop_back(); > out->remake(std::forward<Args>(args) ...); > return out; > } > } else { > handle<T> out = handle<T>(_phaseCursor.advance()); > out->remake(std::forward<Args>(args) ...); > return out; > } > } > > void > put(handle<T> t) { _in.push_back(t); } > > void > reset() > { > _in.clear(); > if ((_cache.size() > 1) || (_cursor.elementIndex() > 0)) > _phaseCursor.open(); > } > > void > clear() > { > _in.clear(); > _cursor.releaseAll(); > _cache.clear(); > _phaseCursor.close(); > } > >private: > class Cursor { > public: > Cursor(handle<FactoryPool> pool) : > _pool(pool), > _headIndex(0), > _element(0), > _head(nullptr) > {} > > inline uint32_t > getAllocationCount() const > { > uint32_t fullBlockElementCount = 0; > if (_headIndex > 0) { > uint32_t fullBlockCount = _headIndex; > uint32_t fullTriangle = ((1 << (_pool->_baseMagnitude + fullBlockCount)) - 1); > uint32_t initTriangle = ((1 << _pool->_baseMagnitude) - 1); > fullBlockElementCount = fullTriangle - initTriangle; > } > > return fullBlockElementCount + _element; > } > > uint32_t > elementIndex() { return _element; } > > bool > hasNextElement() { return _element < _head->getNumberOfUnits(); } > > T& > advanceElement() { return _head[_element++]; } > > bool > hasNextBlock() { return _headIndex < point_util::lastOfQuantity(_pool->_cache.size()); } > > void > advanceHead() > { > _headIndex++; > _head = _pool->_cache.at(_headIndex).view(); > _element = 0; > } > > void > reset() > { > _headIndex = _element = 0; > _head = _pool->_cache[_headIndex].view(); > } > > void > releaseAll() > { > for (uint32_t i = 0; i < _headIndex; i++) { > LocalityBlock<T>& block = _pool->_cache.at(i); > for (uint32_t j = 0; j < block.getNumberOfUnits(); j++) > block[j].~T(); > } > > for (uint32_t i = 0; i < _element; i++) > _head[i].~T(); > } > > private: > handle<FactoryPool> _pool; > > uint32_t _headIndex; > uint32_t _element; > > typename LocalityBlock<T>::View _head; > } > _cursor; > > struct PhaseCursor { > PhaseCursor(handle<FactoryPool> pool) : > _pool(pool), > _isClosed(true) > {} > > void > open() > { > _isClosed = false; > _tailBlock = _pool->_cache[point_util::lastOfQuantity(_pool->_cache.size())]; > open(cell<LocalityBlock<T>>(_pool->_cache.at(0))); > } > > void > close() { _isClosed = true; } > > T& > advance() > { > ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" 3 > ( ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" > !_isClosed ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp", 163) << ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" > std::endl ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" 3 > << "⢠Condition [" << ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" > "!_isClosed" ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" 3 > << "] " << ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" > std::endl ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" 3 > << "⢠" ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" > << "Cannot advance a closed FactoryPool::PhaseCursor" << ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" 3 > facile::RequireException::require_sentinel ># 163 "../../subprojects/edfst/subprojects/facile/src/scope/FactoryPool.hpp" > ; > > T& next = _element.reference(); > if (++_element == _elementExtent) { > if (_block == _tailBlock) > _isClosed = true; > else > open(++_block); > } > return next; > } > > bool > isClosed() { return _isClosed; } > > private: > void > open(cell<LocalityBlock<T>> b) > { > _block = b; > > _element = _block->at(0); > if (_block == _tailBlock) > _elementExtent = cell<T>(_block->reference(_pool->_cursor.elementIndex())); > else > _elementExtent = cell<T>(_block->getExtent()); > } > > handle<FactoryPool> _pool; > > bool _isClosed; > > cell<LocalityBlock<T>> _block; > cell<LocalityBlock<T>> _tailBlock; > > cell<T> _element; > cell<T> _elementExtent; > } > _phaseCursor; > > uint32_t _baseMagnitude; > > std::vector<LocalityBlock<T>> _cache; > std::vector<handle<T>> _in; >}; >} ># 19 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 1 > > >namespace facile >{ >template<typename T, typename Set> >struct ISetAccessor { > using ISetAccessorTag = ISetAccessor; > using SetAccessor = ISetAccessor<T, Set>; > using Reader = typename Set::const_iterator; > > virtual ~ISetAccessor() {} > > virtual bool > contains(T e) const = 0; > > virtual T > read() const = 0; > > virtual T > pop() = 0; > > virtual SetAccessor& > advance() = 0; > > > >}; > >template<typename T, typename Set> >class SetAccessorBase : > public ISetAccessor<T, Set> >{ >public: > using super = ISetAccessor<T, Set>; > using SetAccessor = SetAccessorBase<T, Set>; > using Reader = typename super::Reader; > using size_type = typename Set::size_type; > > struct iterator { > handle<SetAccessor> a; > > using self_type = iterator; > using value_type = typename Reader::value_type; > using reference = typename Reader::reference; > using pointer = typename Reader::pointer; > using iterator_category = typename Reader::iterator_category; > using difference_type = typename Reader::difference_type; > > iterator(handle<SetAccessor> a = nullptr) : > _a(a) > {} > > self_type > operator ++() > { > ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ( ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > _a != nullptr ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp", 56) << ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠Condition [" << ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > "_a != nullptr" ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "] " << ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠" ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > << "Cannot advance the end iterator" << ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > facile::RequireException::require_sentinel ># 56 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > ; > > return ++_a->_r, *this; > } > > reference > operator *() > { > ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ( ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > _a != nullptr ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp", 64) << ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠Condition [" << ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > "_a != nullptr" ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "] " << ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠" ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > << "Cannot access the end iterator" << ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > facile::RequireException::require_sentinel ># 64 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > ; > > return *_a->_r; > } > > pointer > operator ->() > { > ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ( ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > _a != nullptr ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp", 72) << ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠Condition [" << ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > "_a != nullptr" ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "] " << ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠" ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > << "Cannot access the end iterator" << ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > facile::RequireException::require_sentinel ># 72 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > ; > > return _a->_r.operator ->(); > } > > bool > operator ==(const self_type& other) const > { > if (_a == nullptr) { > if (other._a == nullptr) > return true; > else > return other._a->_r == other._a->_set->end(); > } else if (other._a == nullptr) { > return _a->_r == _a->_set->end(); > } else { > return _a->_r == other._a->_r; > } > } > > bool > operator !=(const self_type& other) const { return !operator ==(other); } > > handle<SetAccessor> _a; > }; > > struct Proceed { > handle<SetAccessor> a; > > iterator > begin() { return iterator(a); } > > iterator > end() const { return iterator(); } > }; > > SetAccessorBase(handle<Set> set) : > _set(set), > _r(_set->begin()) > {} > > size_type > size() const { return _set->size(); } > > Proceed > start() { return _r = _set->begin(), proceed(); } > > bool > contains(T e) const { return _set->count(e) > 0; } > > virtual T > read() const > { > ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ( ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > _r != _set->end() ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp", 125) << ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠Condition [" << ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > "_r != _set->end()" ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "] " << ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠" ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > << "Overflow" << ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > facile::RequireException::require_sentinel ># 125 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > ; > > return *_r; > } > > virtual T > pop() > { > ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ( ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > _r != _set->end() ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp", 133) << ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠Condition [" << ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > "_r != _set->end()" ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "] " << ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠" ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > << "Overflow" << ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > facile::RequireException::require_sentinel ># 133 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > ; > > return *_r++; > } > > virtual SetAccessor& > advance() > { > ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ( ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > _r != _set->end() ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp", 141) << ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠Condition [" << ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > "_r != _set->end()" ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "] " << ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > std::endl ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > << "⢠" ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > << "Overflow" << ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" 3 > facile::RequireException::require_sentinel ># 141 "../../subprojects/edfst/subprojects/facile/src/iterator/SetAccessor.hpp" > ; > > return _r++, *this; > } > > Proceed > proceed() { return Proceed{ *this }; } > >private: > handle<Set> _set; > Reader _r; >}; >} ># 20 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 2 > ># 1 "../../subprojects/edfst/src/edfst/graph/DualGraphDefinitions.hpp" 1 > > > > > >namespace dual_graph >{ >class Id32 >{ >public: > constexpr Id32() : > _index(0) > {} > > constexpr Id32(uint32_t index) : > _index(index) > {} > > void > operator =(Id32& other) = delete; > > void > operator =(uint32_t other) = delete; > > bool > operator ==(uint32_t other) = delete; > > bool > operator <(uint32_t other) = delete; > > bool > operator <=(uint32_t other) = delete; > > bool > operator >(uint32_t other) = delete; > > bool > operator >=(uint32_t other) = delete; > > bool > operator ==(const Id32& other) const { return _index == other._index; } > > bool > operator <(const Id32& other) const { return _index < other._index; } > > bool > operator <=(const Id32& other) const { return _index <= other._index; } > > bool > operator >(const Id32& other) const { return _index > other._index; } > > bool > operator >=(const Id32& other) const { return _index >= other._index; } > > uint32_t > index() const { return _index; } > > bool > isIndex(uint32_t index) const { return _index == index; } > > friend std::ostream& > operator <<(std::ostream& o, const Id32 id) > { > return o << id._index; > } > > static constexpr uint32_t MIN_VALUE = facile::Arithmetic::Bounds<uint32_t>::min; > static constexpr uint32_t MAX_VALUE = facile::Arithmetic::Bounds<uint32_t>::max; > > > > > > >private: > const uint32_t _index; >}; >} > >namespace std >{ >template<> >struct hash<dual_graph::Id32> { > std::size_t > operator ()(const dual_graph::Id32& id) const > { > return std::hash<uint32_t>()(id.index()); > } >}; >} ># 22 "../../subprojects/edfst/src/edfst/graph/DualGraphFramework.hpp" 2 > >using namespace point_util; >using namespace facile; >using namespace dual_graph; > >template<typename TreeIntegrationType> >using EmptyPluginSet = EmptyTemplateComposition<TreeIntegrationType>; > > > >class GeneratorLog : > public ComponentLogStream::GlobalInstance<GeneratorLog> { >}; > >template<typename T, typename = typename std::enable_if_t<std::is_integral<T>::value, void>> >static constexpr T >kEdges(T vertexCount) >{ > return vertexCount * (vertexCount - 1); >} ># 4 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 2 > > ># 1 "../../subprojects/edfst/src/edfst/graph/Link.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/graph/Vertex.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 1 > > ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 4 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 2 ># 1 "/usr/include/c++/13/set" 1 3 ># 58 "/usr/include/c++/13/set" 3 > ># 59 "/usr/include/c++/13/set" 3 > > > > ># 1 "/usr/include/c++/13/bits/stl_set.h" 1 3 ># 64 "/usr/include/c++/13/bits/stl_set.h" 3 > ># 64 "/usr/include/c++/13/bits/stl_set.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _Key, typename _Compare, typename _Alloc> > class multiset; ># 92 "/usr/include/c++/13/bits/stl_set.h" 3 > template<typename _Key, typename _Compare = std::less<_Key>, > typename _Alloc = std::allocator<_Key> > > class set > { ># 108 "/usr/include/c++/13/bits/stl_set.h" 3 > 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; ># 167 "/usr/include/c++/13/bits/stl_set.h" 3 > set() = default; > > > > > > > > explicit > set(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Key_alloc_type(__a)) { } ># 190 "/usr/include/c++/13/bits/stl_set.h" 3 > template<typename _InputIterator> > set(_InputIterator __first, _InputIterator __last) > : _M_t() > { _M_t._M_insert_range_unique(__first, __last); } ># 207 "/usr/include/c++/13/bits/stl_set.h" 3 > template<typename _InputIterator> > set(_InputIterator __first, _InputIterator __last, > const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Key_alloc_type(__a)) > { _M_t._M_insert_range_unique(__first, __last); } ># 223 "/usr/include/c++/13/bits/stl_set.h" 3 > set(const set&) = default; > > > > > > > > set(set&&) = default; ># 243 "/usr/include/c++/13/bits/stl_set.h" 3 > set(initializer_list<value_type> __l, > const _Compare& __comp = _Compare(), > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Key_alloc_type(__a)) > { _M_t._M_insert_range_unique(__l.begin(), __l.end()); } > > > explicit > set(const allocator_type& __a) > : _M_t(_Key_alloc_type(__a)) { } > > > set(const set& __x, const __type_identity_t<allocator_type>& __a) > : _M_t(__x._M_t, _Key_alloc_type(__a)) { } > > > set(set&& __x, const __type_identity_t<allocator_type>& __a) > noexcept(is_nothrow_copy_constructible<_Compare>::value > && _Alloc_traits::_S_always_equal()) > : _M_t(std::move(__x._M_t), _Key_alloc_type(__a)) { } > > > set(initializer_list<value_type> __l, const allocator_type& __a) > : _M_t(_Key_alloc_type(__a)) > { _M_t._M_insert_range_unique(__l.begin(), __l.end()); } > > > template<typename _InputIterator> > set(_InputIterator __first, _InputIterator __last, > const allocator_type& __a) > : _M_t(_Key_alloc_type(__a)) > { _M_t._M_insert_range_unique(__first, __last); } > > > > > > > ~set() = default; ># 297 "/usr/include/c++/13/bits/stl_set.h" 3 > set& > operator=(const set&) = default; > > > set& > operator=(set&&) = default; ># 315 "/usr/include/c++/13/bits/stl_set.h" 3 > set& > operator=(initializer_list<value_type> __l) > { > _M_t._M_assign_unique(__l.begin(), __l.end()); > return *this; > } > > > > > > key_compare > key_comp() const > { return _M_t.key_comp(); } > > value_compare > value_comp() const > { return _M_t.key_comp(); } > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_t.get_allocator()); } > > > > > > > iterator > begin() const noexcept > { return _M_t.begin(); } > > > > > > > iterator > end() const noexcept > { return _M_t.end(); } > > > > > > > reverse_iterator > rbegin() const noexcept > { return _M_t.rbegin(); } > > > > > > > reverse_iterator > rend() const noexcept > { return _M_t.rend(); } > > > > > > > > iterator > cbegin() const noexcept > { return _M_t.begin(); } > > > > > > > iterator > cend() const noexcept > { return _M_t.end(); } > > > > > > > reverse_iterator > crbegin() const noexcept > { return _M_t.rbegin(); } > > > > > > > reverse_iterator > crend() const noexcept > { return _M_t.rend(); } > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_t.empty(); } > > > size_type > size() const noexcept > { return _M_t.size(); } > > > size_type > max_size() const noexcept > { return _M_t.max_size(); } ># 440 "/usr/include/c++/13/bits/stl_set.h" 3 > void > swap(set& __x) > noexcept(__is_nothrow_swappable<_Compare>::value) > { _M_t.swap(__x._M_t); } ># 460 "/usr/include/c++/13/bits/stl_set.h" 3 > template<typename... _Args> > std::pair<iterator, bool> > emplace(_Args&&... __args) > { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } ># 486 "/usr/include/c++/13/bits/stl_set.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { > return _M_t._M_emplace_hint_unique(__pos, > std::forward<_Args>(__args)...); > } ># 508 "/usr/include/c++/13/bits/stl_set.h" 3 > std::pair<iterator, bool> > insert(const value_type& __x) > { > std::pair<typename _Rep_type::iterator, bool> __p = > _M_t._M_insert_unique(__x); > return std::pair<iterator, bool>(__p.first, __p.second); > } > > > std::pair<iterator, bool> > insert(value_type&& __x) > { > std::pair<typename _Rep_type::iterator, bool> __p = > _M_t._M_insert_unique(std::move(__x)); > return std::pair<iterator, bool>(__p.first, __p.second); > } ># 545 "/usr/include/c++/13/bits/stl_set.h" 3 > iterator > insert(const_iterator __position, const value_type& __x) > { return _M_t._M_insert_unique_(__position, __x); } > > > iterator > insert(const_iterator __position, value_type&& __x) > { return _M_t._M_insert_unique_(__position, std::move(__x)); } ># 564 "/usr/include/c++/13/bits/stl_set.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_t._M_insert_range_unique(__first, __last); } ># 577 "/usr/include/c++/13/bits/stl_set.h" 3 > void > insert(initializer_list<value_type> __l) > { this->insert(__l.begin(), __l.end()); } > > > > > node_type > extract(const_iterator __pos) > { > do { if (std::__is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); > return _M_t.extract(__pos); > } > > > node_type > extract(const key_type& __x) > { return _M_t.extract(__x); } > > > insert_return_type > insert(node_type&& __nh) > { return _M_t._M_reinsert_node_unique(std::move(__nh)); } > > > iterator > insert(const_iterator __hint, node_type&& __nh) > { return _M_t._M_reinsert_node_hint_unique(__hint, std::move(__nh)); } > > template<typename, typename> > friend struct std::_Rb_tree_merge_helper; > > template<typename _Compare1> > void > merge(set<_Key, _Compare1, _Alloc>& __source) > { > using _Merge_helper = _Rb_tree_merge_helper<set, _Compare1>; > _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); > } > > template<typename _Compare1> > void > merge(set<_Key, _Compare1, _Alloc>&& __source) > { merge(__source); } > > template<typename _Compare1> > void > merge(multiset<_Key, _Compare1, _Alloc>& __source) > { > using _Merge_helper = _Rb_tree_merge_helper<set, _Compare1>; > _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); > } > > template<typename _Compare1> > void > merge(multiset<_Key, _Compare1, _Alloc>&& __source) > { merge(__source); } ># 652 "/usr/include/c++/13/bits/stl_set.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __position) > { return _M_t.erase(__position); } ># 683 "/usr/include/c++/13/bits/stl_set.h" 3 > size_type > erase(const key_type& __x) > { return _M_t.erase(__x); } ># 704 "/usr/include/c++/13/bits/stl_set.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_t.erase(__first, __last); } ># 732 "/usr/include/c++/13/bits/stl_set.h" 3 > void > clear() noexcept > { _M_t.clear(); } ># 747 "/usr/include/c++/13/bits/stl_set.h" 3 > size_type > count(const key_type& __x) const > { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } > > > template<typename _Kt> > auto > count(const _Kt& __x) const > -> decltype(_M_t._M_count_tr(__x)) > { return _M_t._M_count_tr(__x); } ># 793 "/usr/include/c++/13/bits/stl_set.h" 3 > iterator > find(const key_type& __x) > { return _M_t.find(__x); } > > const_iterator > find(const key_type& __x) const > { return _M_t.find(__x); } > > > template<typename _Kt> > auto > find(const _Kt& __x) > -> decltype(iterator{_M_t._M_find_tr(__x)}) > { return iterator{_M_t._M_find_tr(__x)}; } > > template<typename _Kt> > auto > find(const _Kt& __x) const > -> decltype(const_iterator{_M_t._M_find_tr(__x)}) > { return const_iterator{_M_t._M_find_tr(__x)}; } ># 828 "/usr/include/c++/13/bits/stl_set.h" 3 > iterator > lower_bound(const key_type& __x) > { return _M_t.lower_bound(__x); } > > const_iterator > lower_bound(const key_type& __x) const > { return _M_t.lower_bound(__x); } > > > template<typename _Kt> > auto > lower_bound(const _Kt& __x) > -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) > { return iterator(_M_t._M_lower_bound_tr(__x)); } > > template<typename _Kt> > auto > lower_bound(const _Kt& __x) const > -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) > { return const_iterator(_M_t._M_lower_bound_tr(__x)); } ># 858 "/usr/include/c++/13/bits/stl_set.h" 3 > iterator > upper_bound(const key_type& __x) > { return _M_t.upper_bound(__x); } > > const_iterator > upper_bound(const key_type& __x) const > { return _M_t.upper_bound(__x); } > > > template<typename _Kt> > auto > upper_bound(const _Kt& __x) > -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) > { return iterator(_M_t._M_upper_bound_tr(__x)); } > > template<typename _Kt> > auto > upper_bound(const _Kt& __x) const > -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) > { return const_iterator(_M_t._M_upper_bound_tr(__x)); } ># 897 "/usr/include/c++/13/bits/stl_set.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_t.equal_range(__x); } > > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_t.equal_range(__x); } > > > template<typename _Kt> > auto > equal_range(const _Kt& __x) > -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) > { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } > > template<typename _Kt> > auto > equal_range(const _Kt& __x) const > -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) > { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } > > > > template<typename _K1, typename _C1, typename _A1> > friend bool > operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); > > > > > > > template<typename _K1, typename _C1, typename _A1> > friend bool > operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); > > }; > > > > template<typename _InputIterator, > typename _Compare = > less<typename iterator_traits<_InputIterator>::value_type>, > typename _Allocator = > allocator<typename iterator_traits<_InputIterator>::value_type>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireAllocator<_Allocator>> > set(_InputIterator, _InputIterator, > _Compare = _Compare(), _Allocator = _Allocator()) > -> set<typename iterator_traits<_InputIterator>::value_type, > _Compare, _Allocator>; > > template<typename _Key, typename _Compare = less<_Key>, > typename _Allocator = allocator<_Key>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireAllocator<_Allocator>> > set(initializer_list<_Key>, > _Compare = _Compare(), _Allocator = _Allocator()) > -> set<_Key, _Compare, _Allocator>; > > template<typename _InputIterator, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > set(_InputIterator, _InputIterator, _Allocator) > -> set<typename iterator_traits<_InputIterator>::value_type, > less<typename iterator_traits<_InputIterator>::value_type>, > _Allocator>; > > template<typename _Key, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > set(initializer_list<_Key>, _Allocator) > -> set<_Key, less<_Key>, _Allocator>; ># 983 "/usr/include/c++/13/bits/stl_set.h" 3 > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator==(const set<_Key, _Compare, _Alloc>& __x, > const set<_Key, _Compare, _Alloc>& __y) > { return __x._M_t == __y._M_t; } ># 1021 "/usr/include/c++/13/bits/stl_set.h" 3 > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator<(const set<_Key, _Compare, _Alloc>& __x, > const set<_Key, _Compare, _Alloc>& __y) > { return __x._M_t < __y._M_t; } > > > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator!=(const set<_Key, _Compare, _Alloc>& __x, > const set<_Key, _Compare, _Alloc>& __y) > { return !(__x == __y); } > > > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator>(const set<_Key, _Compare, _Alloc>& __x, > const set<_Key, _Compare, _Alloc>& __y) > { return __y < __x; } > > > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator<=(const set<_Key, _Compare, _Alloc>& __x, > const set<_Key, _Compare, _Alloc>& __y) > { return !(__y < __x); } > > > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator>=(const set<_Key, _Compare, _Alloc>& __x, > const set<_Key, _Compare, _Alloc>& __y) > { return !(__x < __y); } > > > > template<typename _Key, typename _Compare, typename _Alloc> > inline void > swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > > > > > 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>; > > static auto& > _S_get_tree(std::set<_Val, _Cmp2, _Alloc>& __set) > { return __set._M_t; } > > static auto& > _S_get_tree(std::multiset<_Val, _Cmp2, _Alloc>& __set) > { return __set._M_t; } > }; > > > >} ># 64 "/usr/include/c++/13/set" 2 3 ># 1 "/usr/include/c++/13/bits/stl_multiset.h" 1 3 ># 64 "/usr/include/c++/13/bits/stl_multiset.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _Key, typename _Compare, typename _Alloc> > class set; ># 94 "/usr/include/c++/13/bits/stl_multiset.h" 3 > template <typename _Key, typename _Compare = std::less<_Key>, > typename _Alloc = std::allocator<_Key> > > class multiset > { ># 110 "/usr/include/c++/13/bits/stl_multiset.h" 3 > 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; ># 164 "/usr/include/c++/13/bits/stl_multiset.h" 3 > multiset() = default; > > > > > > > > explicit > multiset(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Key_alloc_type(__a)) { } ># 186 "/usr/include/c++/13/bits/stl_multiset.h" 3 > template<typename _InputIterator> > multiset(_InputIterator __first, _InputIterator __last) > : _M_t() > { _M_t._M_insert_range_equal(__first, __last); } ># 202 "/usr/include/c++/13/bits/stl_multiset.h" 3 > template<typename _InputIterator> > multiset(_InputIterator __first, _InputIterator __last, > const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Key_alloc_type(__a)) > { _M_t._M_insert_range_equal(__first, __last); } ># 218 "/usr/include/c++/13/bits/stl_multiset.h" 3 > multiset(const multiset&) = default; ># 227 "/usr/include/c++/13/bits/stl_multiset.h" 3 > multiset(multiset&&) = default; ># 239 "/usr/include/c++/13/bits/stl_multiset.h" 3 > multiset(initializer_list<value_type> __l, > const _Compare& __comp = _Compare(), > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Key_alloc_type(__a)) > { _M_t._M_insert_range_equal(__l.begin(), __l.end()); } > > > explicit > multiset(const allocator_type& __a) > : _M_t(_Key_alloc_type(__a)) { } > > > multiset(const multiset& __m, > const __type_identity_t<allocator_type>& __a) > : _M_t(__m._M_t, _Key_alloc_type(__a)) { } > > > multiset(multiset&& __m, const __type_identity_t<allocator_type>& __a) > noexcept(is_nothrow_copy_constructible<_Compare>::value > && _Alloc_traits::_S_always_equal()) > : _M_t(std::move(__m._M_t), _Key_alloc_type(__a)) { } > > > multiset(initializer_list<value_type> __l, const allocator_type& __a) > : _M_t(_Key_alloc_type(__a)) > { _M_t._M_insert_range_equal(__l.begin(), __l.end()); } > > > template<typename _InputIterator> > multiset(_InputIterator __first, _InputIterator __last, > const allocator_type& __a) > : _M_t(_Key_alloc_type(__a)) > { _M_t._M_insert_range_equal(__first, __last); } > > > > > > > ~multiset() = default; ># 294 "/usr/include/c++/13/bits/stl_multiset.h" 3 > multiset& > operator=(const multiset&) = default; > > > multiset& > operator=(multiset&&) = default; ># 312 "/usr/include/c++/13/bits/stl_multiset.h" 3 > multiset& > operator=(initializer_list<value_type> __l) > { > _M_t._M_assign_equal(__l.begin(), __l.end()); > return *this; > } > > > > > > key_compare > key_comp() const > { return _M_t.key_comp(); } > > value_compare > value_comp() const > { return _M_t.key_comp(); } > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_t.get_allocator()); } > > > > > > > iterator > begin() const noexcept > { return _M_t.begin(); } > > > > > > > iterator > end() const noexcept > { return _M_t.end(); } > > > > > > > reverse_iterator > rbegin() const noexcept > { return _M_t.rbegin(); } > > > > > > > reverse_iterator > rend() const noexcept > { return _M_t.rend(); } > > > > > > > > iterator > cbegin() const noexcept > { return _M_t.begin(); } > > > > > > > iterator > cend() const noexcept > { return _M_t.end(); } > > > > > > > reverse_iterator > crbegin() const noexcept > { return _M_t.rbegin(); } > > > > > > > reverse_iterator > crend() const noexcept > { return _M_t.rend(); } > > > > [[__nodiscard__]] bool > empty() const noexcept > { return _M_t.empty(); } > > > size_type > size() const noexcept > { return _M_t.size(); } > > > size_type > max_size() const noexcept > { return _M_t.max_size(); } ># 437 "/usr/include/c++/13/bits/stl_multiset.h" 3 > void > swap(multiset& __x) > noexcept(__is_nothrow_swappable<_Compare>::value) > { _M_t.swap(__x._M_t); } ># 456 "/usr/include/c++/13/bits/stl_multiset.h" 3 > template<typename... _Args> > iterator > emplace(_Args&&... __args) > { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } ># 482 "/usr/include/c++/13/bits/stl_multiset.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { > return _M_t._M_emplace_hint_equal(__pos, > std::forward<_Args>(__args)...); > } ># 502 "/usr/include/c++/13/bits/stl_multiset.h" 3 > iterator > insert(const value_type& __x) > { return _M_t._M_insert_equal(__x); } > > > iterator > insert(value_type&& __x) > { return _M_t._M_insert_equal(std::move(__x)); } ># 532 "/usr/include/c++/13/bits/stl_multiset.h" 3 > iterator > insert(const_iterator __position, const value_type& __x) > { return _M_t._M_insert_equal_(__position, __x); } > > > iterator > insert(const_iterator __position, value_type&& __x) > { return _M_t._M_insert_equal_(__position, std::move(__x)); } ># 550 "/usr/include/c++/13/bits/stl_multiset.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_t._M_insert_range_equal(__first, __last); } ># 563 "/usr/include/c++/13/bits/stl_multiset.h" 3 > void > insert(initializer_list<value_type> __l) > { this->insert(__l.begin(), __l.end()); } > > > > > node_type > extract(const_iterator __pos) > { > do { if (std::__is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); > return _M_t.extract(__pos); > } > > > node_type > extract(const key_type& __x) > { return _M_t.extract(__x); } > > > iterator > insert(node_type&& __nh) > { return _M_t._M_reinsert_node_equal(std::move(__nh)); } > > > iterator > insert(const_iterator __hint, node_type&& __nh) > { return _M_t._M_reinsert_node_hint_equal(__hint, std::move(__nh)); } > > template<typename, typename> > friend struct std::_Rb_tree_merge_helper; > > template<typename _Compare1> > void > merge(multiset<_Key, _Compare1, _Alloc>& __source) > { > using _Merge_helper = _Rb_tree_merge_helper<multiset, _Compare1>; > _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); > } > > template<typename _Compare1> > void > merge(multiset<_Key, _Compare1, _Alloc>&& __source) > { merge(__source); } > > template<typename _Compare1> > void > merge(set<_Key, _Compare1, _Alloc>& __source) > { > using _Merge_helper = _Rb_tree_merge_helper<multiset, _Compare1>; > _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); > } > > template<typename _Compare1> > void > merge(set<_Key, _Compare1, _Alloc>&& __source) > { merge(__source); } ># 638 "/usr/include/c++/13/bits/stl_multiset.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __position) > { return _M_t.erase(__position); } ># 669 "/usr/include/c++/13/bits/stl_multiset.h" 3 > size_type > erase(const key_type& __x) > { return _M_t.erase(__x); } ># 690 "/usr/include/c++/13/bits/stl_multiset.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_t.erase(__first, __last); } ># 718 "/usr/include/c++/13/bits/stl_multiset.h" 3 > void > clear() noexcept > { _M_t.clear(); } ># 730 "/usr/include/c++/13/bits/stl_multiset.h" 3 > size_type > count(const key_type& __x) const > { return _M_t.count(__x); } > > > template<typename _Kt> > auto > count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) > { return _M_t._M_count_tr(__x); } ># 775 "/usr/include/c++/13/bits/stl_multiset.h" 3 > iterator > find(const key_type& __x) > { return _M_t.find(__x); } > > const_iterator > find(const key_type& __x) const > { return _M_t.find(__x); } > > > template<typename _Kt> > auto > find(const _Kt& __x) > -> decltype(iterator{_M_t._M_find_tr(__x)}) > { return iterator{_M_t._M_find_tr(__x)}; } > > template<typename _Kt> > auto > find(const _Kt& __x) const > -> decltype(const_iterator{_M_t._M_find_tr(__x)}) > { return const_iterator{_M_t._M_find_tr(__x)}; } ># 810 "/usr/include/c++/13/bits/stl_multiset.h" 3 > iterator > lower_bound(const key_type& __x) > { return _M_t.lower_bound(__x); } > > const_iterator > lower_bound(const key_type& __x) const > { return _M_t.lower_bound(__x); } > > > template<typename _Kt> > auto > lower_bound(const _Kt& __x) > -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) > { return iterator(_M_t._M_lower_bound_tr(__x)); } > > template<typename _Kt> > auto > lower_bound(const _Kt& __x) const > -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) > { return iterator(_M_t._M_lower_bound_tr(__x)); } ># 840 "/usr/include/c++/13/bits/stl_multiset.h" 3 > iterator > upper_bound(const key_type& __x) > { return _M_t.upper_bound(__x); } > > const_iterator > upper_bound(const key_type& __x) const > { return _M_t.upper_bound(__x); } > > > template<typename _Kt> > auto > upper_bound(const _Kt& __x) > -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) > { return iterator(_M_t._M_upper_bound_tr(__x)); } > > template<typename _Kt> > auto > upper_bound(const _Kt& __x) const > -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) > { return iterator(_M_t._M_upper_bound_tr(__x)); } ># 879 "/usr/include/c++/13/bits/stl_multiset.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_t.equal_range(__x); } > > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_t.equal_range(__x); } > > > template<typename _Kt> > auto > equal_range(const _Kt& __x) > -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) > { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } > > template<typename _Kt> > auto > equal_range(const _Kt& __x) const > -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) > { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } > > > > template<typename _K1, typename _C1, typename _A1> > friend bool > operator==(const multiset<_K1, _C1, _A1>&, > const multiset<_K1, _C1, _A1>&); > > > > > > > > template<typename _K1, typename _C1, typename _A1> > friend bool > operator< (const multiset<_K1, _C1, _A1>&, > const multiset<_K1, _C1, _A1>&); > > }; > > > > template<typename _InputIterator, > typename _Compare = > less<typename iterator_traits<_InputIterator>::value_type>, > typename _Allocator = > allocator<typename iterator_traits<_InputIterator>::value_type>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireAllocator<_Allocator>> > multiset(_InputIterator, _InputIterator, > _Compare = _Compare(), _Allocator = _Allocator()) > -> multiset<typename iterator_traits<_InputIterator>::value_type, > _Compare, _Allocator>; > > template<typename _Key, > typename _Compare = less<_Key>, > typename _Allocator = allocator<_Key>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireAllocator<_Allocator>> > multiset(initializer_list<_Key>, > _Compare = _Compare(), _Allocator = _Allocator()) > -> multiset<_Key, _Compare, _Allocator>; > > template<typename _InputIterator, typename _Allocator, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireAllocator<_Allocator>> > multiset(_InputIterator, _InputIterator, _Allocator) > -> multiset<typename iterator_traits<_InputIterator>::value_type, > less<typename iterator_traits<_InputIterator>::value_type>, > _Allocator>; > > template<typename _Key, typename _Allocator, > typename = _RequireAllocator<_Allocator>> > multiset(initializer_list<_Key>, _Allocator) > -> multiset<_Key, less<_Key>, _Allocator>; ># 970 "/usr/include/c++/13/bits/stl_multiset.h" 3 > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator==(const multiset<_Key, _Compare, _Alloc>& __x, > const multiset<_Key, _Compare, _Alloc>& __y) > { return __x._M_t == __y._M_t; } ># 1008 "/usr/include/c++/13/bits/stl_multiset.h" 3 > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator<(const multiset<_Key, _Compare, _Alloc>& __x, > const multiset<_Key, _Compare, _Alloc>& __y) > { return __x._M_t < __y._M_t; } > > > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator!=(const multiset<_Key, _Compare, _Alloc>& __x, > const multiset<_Key, _Compare, _Alloc>& __y) > { return !(__x == __y); } > > > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator>(const multiset<_Key,_Compare,_Alloc>& __x, > const multiset<_Key,_Compare,_Alloc>& __y) > { return __y < __x; } > > > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator<=(const multiset<_Key, _Compare, _Alloc>& __x, > const multiset<_Key, _Compare, _Alloc>& __y) > { return !(__y < __x); } > > > template<typename _Key, typename _Compare, typename _Alloc> > inline bool > operator>=(const multiset<_Key, _Compare, _Alloc>& __x, > const multiset<_Key, _Compare, _Alloc>& __y) > { return !(__x < __y); } > > > > template<typename _Key, typename _Compare, typename _Alloc> > inline void > swap(multiset<_Key, _Compare, _Alloc>& __x, > multiset<_Key, _Compare, _Alloc>& __y) > noexcept(noexcept(__x.swap(__y))) > { __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) > { return __set._M_t; } > > static auto& > _S_get_tree(std::multiset<_Val, _Cmp2, _Alloc>& __set) > { return __set._M_t; } > }; > > > >} ># 65 "/usr/include/c++/13/set" 2 3 ># 74 "/usr/include/c++/13/set" 3 >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>>; > } > >} ># 5 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 2 > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/atomblock.hpp" 1 > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/atomspan.hpp" 1 > > > > > ># 5 "../../subprojects/edfst/subprojects/point-util/src/point/atomspan.hpp" >namespace point_util >{ > >template<typename Atom> >class atomspan >{ >public: > > class iterator > { > public: > typedef iterator self_type; > typedef Atom value_type; > typedef Atom reference; > typedef Atom pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > iterator(cell<const Atom> atom) : > _c(atom) > {} > > self_type > operator ++() > { > _c++; > > return *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > _c++; > return pre; > } > > template<typename Integer> > self_type > operator +(Integer amount) const { return iterator(_c + amount); } > > template<typename Integer> > self_type > operator +=(Integer amount) { return iterator(_c += amount); } > > difference_type > operator -(const self_type& other) const { return _c - other._c; } > > template<typename Integer> > self_type > operator -(Integer amount) const { return iterator(_c - amount); } > > template<typename Integer> > self_type > operator -=(Integer amount) { return iterator(_c -= amount); } > > value_type > operator *() { return _c.read(); } > > value_type > operator ->() const { return _c.read(); } > > bool > operator ==(const self_type& other) const { return _c == other._c; } > > bool > operator !=(const self_type& other) const { return _c != other._c; } > > private: > cell<const Atom> _c; > }; > > constexpr atomspan() : > _start(nullptr), > _end(nullptr) > {} > > atomspan(const Atom& singleton) : > _start(singleton), > _end(_start + 1) > {} > > template<typename Count, typename = typename std::enable_if<std::is_integral<Count>::value, void>::type> > atomspan(const Atom& start, Count count) : > _start(start), > _end(_start + count) > {} > > atomspan(const Atom& start, const Atom& end) : > _start(start), > _end(end) > {} > > atomspan(Atom *start, Atom *end) : > _start(start), > _end(end) > {} > > iterator > begin() const { return iterator(_start); } > > iterator > end() const { return iterator(_end); } > > iterator > cbegin() const { return iterator(_start); } > > iterator > cend() const { return iterator(_end); } > >private: > cell<const Atom> _start; > cell<const Atom> _end; >}; >} ># 4 "../../subprojects/edfst/subprojects/point-util/src/point/atomblock.hpp" 2 > >namespace point_util >{ > > >template<typename Atom> >class atomblock >{ >using self = atomblock<Atom>; > >public: > using iterator = typename atomspan<Atom>::iterator; > > constexpr atomblock() : > _block(nullptr), > _sentinel(nullptr) > {} > > atomblock(const self& source) = delete; > > atomblock(self&& source) : > _block(source._block), > _sentinel(source._sentinel) > { > source.reset(); > } > > template<typename Count, typename = typename std::enable_if<std::is_integral<Count>::value, void>::type> > atomblock(Count count) : > _block(new Atom[count]()), > > _sentinel(_block + count) > {} > > atomblock(std::initializer_list<Atom> atoms) : > _block(new Atom[atoms.size()]), > _sentinel(_block + atoms.size()) > { > uint32_t i = 0; > for (Atom atom : atoms) > _block[i++] = atom; > } > > ~atomblock() > { > if (_block != nullptr) > delete[](_block); > } > > void > reset() { new(this) self(); } > > template<typename Count, typename = typename std::enable_if<std::is_integral<Count>::value, void>::type> > void > allocate(Count count) > { > this->~atomblock(); > > new(this) self(count); > } > > inline bool > empty() const { return _sentinel == _block; } > > inline uint32_t > count() const { return _sentinel - _block; } > > inline cell<Atom> > start() const { return cell<Atom>(_block); } > > inline cell<Atom> > last() const > { > if (_sentinel == _block) > ># 78 "../../subprojects/edfst/subprojects/point-util/src/point/atomblock.hpp" 3 > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/point/atomblock.hpp", 78) ># 78 "../../subprojects/edfst/subprojects/point-util/src/point/atomblock.hpp" > << "Cannot select the last atom of an empty atomblock"; > > return (sentinel() - 1); > } > > inline cell<Atom> > sentinel() const { return cell<Atom>(_sentinel); } > > inline bool > isSentinel(cell<Atom> atom) const { return atom == _sentinel; } > > inline uint32_t > positionIn(cell<Atom> atom) const { return atom - _block; } > > inline Atom& > at(uint32_t i) { return _block[i]; } > > inline const Atom& > at(uint32_t i) const { return _block[i]; } > > void > fill(Atom value) > { > for (cell<Atom> atom = start(); atom < sentinel(); atom++) > atom.write(value); > } > > self& > operator =(self&& block) > { > new(this) self(std::move(block)); > > return *this; > } > > bool > operator ==(nullptr_t null) const { return _block == null; } > > bool > operator !=(nullptr_t null) const { return _block != null; } > > atomspan<Atom> > span() const { return atomspan<Atom>(_block, _sentinel); } > > iterator > begin() const { return iterator(_block); } > > iterator > end() const { return iterator(_sentinel); } > > iterator > cbegin() const { return iterator(_block); } > > iterator > cend() const { return iterator(_sentinel); } > >private: > Atom *const _block; > Atom *const _sentinel; >}; >} ># 8 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/math/Meter.hpp" 1 > > > > >namespace facile >{ >template<typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, void>> >class Meter >{ >public: > Meter(T mark, T limit = 0) : > _mark(mark), > _limit(limit) > {} > > bool > isAtLimit() const { return _mark == _limit; } > > T > read() const { return _mark; } > > operator T() const { return _mark; } > > T > delta() const { return Arithmetic::absoluteDifference(_mark, _limit); } > > > bool > increment(T amount = 1) > { > if (_mark == _limit) > return false; > > if ((_mark < _limit) && (amount > (_limit - _mark))) > _mark = _limit; > else > _mark += amount; > > return true; > } > > bool > decrement(T amount = 1) > { > if (_mark == _limit) > return false; > > if ((_mark > _limit) && (amount > (_mark - _limit))) > _mark = _limit; > else > _mark -= amount; > > return true; > } > > bool > operator +=(T amount) { return increment(amount); } > > bool > operator -=(T amount) { return decrement(amount); } > >private: > T _mark; > T _limit; >}; >} ># 9 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 2 > ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/RangeWalk.hpp" 1 > > >namespace facile >{ >template<typename Table, > typename Iterator = typename Table::const_iterator, > typename Key = typename Table::key_type, > typename RangeMembership = typename Table::key_compare> >class RangeWalkBase { >using RangeBasis = typename RangeMembership::Basis; >using RangeWalk = RangeWalkBase<Table, Iterator, Key, RangeMembership>; > >public: > class RangeIterator > { > public: > typedef RangeIterator self_type; > typedef typename Iterator::value_type value_type; > typedef typename Iterator::reference reference; > typedef typename Iterator::pointer pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > using star_type = decltype(std::declval<Iterator>().operator *()); > using arrow_type = decltype(std::declval<Iterator>().operator ->()); > > RangeIterator(handle<const RangeWalk> walk) : > _i(walk->_table->lower_bound(RangeMembership::start(walk->_range))), > _walk(walk) > {} > > RangeIterator(handle<const RangeWalk> walk, Iterator i) : > _i(i), > _walk(walk) > {} > > self_type > operator ++() { return _i++, *this; } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > return _i++, pre; > } > > star_type > operator *() { return _i.operator *(); } > > arrow_type > operator ->() const { return _i.operator ->(); } > > bool > operator ==(const self_type& other) const > { > if (isInRange()) { > if (other.isInRange()) > return _i == other._i; > else > return false; > } else { > return !other.isInRange(); > } > } > > bool > operator !=(const self_type& other) const { return !operator ==(other); } > > private: > bool > isInRange() const { return (_i != _walk->_table->end() && RangeMembership::contains(_i, _walk->_range)); } > > Iterator _i; > handle<const RangeWalk> _walk; > }; > > RangeWalkBase(handle<const Table> table, RangeBasis range) : > _table(table), > _range(range) > {} > > RangeIterator > begin() const { return RangeIterator(*this); } > > RangeIterator > end() const { return RangeIterator(*this, _table->end()); } > > uint32_t > count() const > { > uint32_t c = 0; > for (__attribute__((unused)) typename RangeIterator::star_type v : *this) > c++; > return c; > } > >private: > handle<const Table> _table; > RangeBasis _range; >}; >} ># 11 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 2 > ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/Globals.hpp" 1 ># 15 "../../subprojects/edfst/3pty/networkit/src/include/networkit/Globals.hpp" >namespace NetworKit { >using index = uint64_t; > > > > > > >using omp_index = index; > > >using count = uint64_t; >using node = index; >using edgeweight = double; >using edgeid = index; > >constexpr index none = std::numeric_limits<index>::max(); >constexpr edgeweight defaultEdgeWeight = 1.0; >constexpr edgeweight nullWeight = 0.0; > >using coordinate = double; > >constexpr double PI = 3.141592653589793238462643383279502884197169399375105820974944592307816406286; > >} ># 13 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 1 ># 19 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/omp.h" 1 3 4 ># 47 "/usr/lib/gcc/x86_64-redhat-linux/13/include/omp.h" 3 4 > ># 47 "/usr/lib/gcc/x86_64-redhat-linux/13/include/omp.h" 3 4 >typedef struct >{ > unsigned char _x[4] > __attribute__((__aligned__(4))); >} omp_lock_t; > >typedef struct >{ > unsigned char _x[8 + sizeof (void *)] > __attribute__((__aligned__(sizeof (void *)))); >} omp_nest_lock_t; > > >typedef enum omp_sched_t >{ > omp_sched_static = 1, > omp_sched_dynamic = 2, > omp_sched_guided = 3, > omp_sched_auto = 4, > omp_sched_monotonic = 0x80000000U >} omp_sched_t; > >typedef enum omp_proc_bind_t >{ > omp_proc_bind_false = 0, > omp_proc_bind_true = 1, > omp_proc_bind_primary = 2, > omp_proc_bind_master > = omp_proc_bind_primary, > omp_proc_bind_close = 3, > omp_proc_bind_spread = 4 >} omp_proc_bind_t; > >typedef enum omp_sync_hint_t >{ > omp_sync_hint_none = 0, > omp_lock_hint_none = omp_sync_hint_none, > omp_sync_hint_uncontended = 1, > omp_lock_hint_uncontended = omp_sync_hint_uncontended, > omp_sync_hint_contended = 2, > omp_lock_hint_contended = omp_sync_hint_contended, > omp_sync_hint_nonspeculative = 4, > omp_lock_hint_nonspeculative > = omp_sync_hint_nonspeculative, > omp_sync_hint_speculative = 8, > omp_lock_hint_speculative = omp_sync_hint_speculative >} omp_sync_hint_t; > >typedef omp_sync_hint_t omp_lock_hint_t; > >typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t >{ > char __omp_depend_t__[2 * sizeof (void *)]; >} omp_depend_t; > >typedef enum omp_pause_resource_t >{ > omp_pause_soft = 1, > omp_pause_hard = 2 >} omp_pause_resource_t; > >typedef long unsigned int omp_uintptr_t; > > > > > > > >typedef enum omp_memspace_handle_t : omp_uintptr_t >{ > omp_default_mem_space = 0, > omp_large_cap_mem_space = 1, > omp_const_mem_space = 2, > omp_high_bw_mem_space = 3, > omp_low_lat_mem_space = 4, > __omp_memspace_handle_t_max__ = 0xffffffffffffffffUL >} omp_memspace_handle_t; > >typedef enum omp_allocator_handle_t : omp_uintptr_t >{ > omp_null_allocator = 0, > omp_default_mem_alloc = 1, > omp_large_cap_mem_alloc = 2, > omp_const_mem_alloc = 3, > omp_high_bw_mem_alloc = 4, > omp_low_lat_mem_alloc = 5, > omp_cgroup_mem_alloc = 6, > omp_pteam_mem_alloc = 7, > omp_thread_mem_alloc = 8, > __omp_allocator_handle_t_max__ = 0xffffffffffffffffUL >} omp_allocator_handle_t; > >typedef enum omp_alloctrait_key_t >{ > omp_atk_sync_hint = 1, > omp_atk_alignment = 2, > omp_atk_access = 3, > omp_atk_pool_size = 4, > omp_atk_fallback = 5, > omp_atk_fb_data = 6, > omp_atk_pinned = 7, > omp_atk_partition = 8 >} omp_alloctrait_key_t; > >typedef enum omp_alloctrait_value_t >{ > omp_atv_default = (long unsigned int) -1, > omp_atv_false = 0, > omp_atv_true = 1, > omp_atv_contended = 3, > omp_atv_uncontended = 4, > omp_atv_serialized = 5, > omp_atv_sequential = omp_atv_serialized, > omp_atv_private = 6, > omp_atv_all = 7, > omp_atv_thread = 8, > omp_atv_pteam = 9, > omp_atv_cgroup = 10, > omp_atv_default_mem_fb = 11, > omp_atv_null_fb = 12, > omp_atv_abort_fb = 13, > omp_atv_allocator_fb = 14, > omp_atv_environment = 15, > omp_atv_nearest = 16, > omp_atv_blocked = 17, > omp_atv_interleaved = 18 >} omp_alloctrait_value_t; > >typedef struct omp_alloctrait_t >{ > omp_alloctrait_key_t key; > omp_uintptr_t value; >} omp_alloctrait_t; > >typedef enum omp_event_handle_t : omp_uintptr_t >{ > __omp_event_handle_t_max__ = 0xffffffffffffffffUL >} omp_event_handle_t; > >enum >{ > omp_initial_device = -1, > omp_invalid_device = -4 >}; > > >extern "C" { > > > > > > > >extern void omp_set_num_threads (int) throw (); >extern int omp_get_num_threads (void) throw (); >extern int omp_get_max_threads (void) throw (); >extern int omp_get_thread_num (void) throw (); >extern int omp_get_num_procs (void) throw (); > >extern int omp_in_parallel (void) throw (); > >extern void omp_set_dynamic (int) throw (); >extern int omp_get_dynamic (void) throw (); > >extern void omp_set_nested (int) throw () ; >extern int omp_get_nested (void) throw () ; > >extern void omp_init_lock (omp_lock_t *) throw (); >extern void omp_init_lock_with_hint (omp_lock_t *, omp_sync_hint_t) > throw (); >extern void omp_destroy_lock (omp_lock_t *) throw (); >extern void omp_set_lock (omp_lock_t *) throw (); >extern void omp_unset_lock (omp_lock_t *) throw (); >extern int omp_test_lock (omp_lock_t *) throw (); > >extern void omp_init_nest_lock (omp_nest_lock_t *) throw (); >extern void omp_init_nest_lock_with_hint (omp_nest_lock_t *, omp_sync_hint_t) > throw (); >extern void omp_destroy_nest_lock (omp_nest_lock_t *) throw (); >extern void omp_set_nest_lock (omp_nest_lock_t *) throw (); >extern void omp_unset_nest_lock (omp_nest_lock_t *) throw (); >extern int omp_test_nest_lock (omp_nest_lock_t *) throw (); > >extern double omp_get_wtime (void) throw (); >extern double omp_get_wtick (void) throw (); > >extern void omp_set_schedule (omp_sched_t, int) throw (); >extern void omp_get_schedule (omp_sched_t *, int *) throw (); >extern int omp_get_thread_limit (void) throw (); >extern void omp_set_max_active_levels (int) throw (); >extern int omp_get_max_active_levels (void) throw (); >extern int omp_get_supported_active_levels (void) throw (); >extern int omp_get_level (void) throw (); >extern int omp_get_ancestor_thread_num (int) throw (); >extern int omp_get_team_size (int) throw (); >extern int omp_get_active_level (void) throw (); > >extern int omp_in_final (void) throw (); >extern int omp_in_explicit_task (void) throw (); > >extern int omp_get_cancellation (void) throw (); >extern omp_proc_bind_t omp_get_proc_bind (void) throw (); >extern int omp_get_num_places (void) throw (); >extern int omp_get_place_num_procs (int) throw (); >extern void omp_get_place_proc_ids (int, int *) throw (); >extern int omp_get_place_num (void) throw (); >extern int omp_get_partition_num_places (void) throw (); >extern void omp_get_partition_place_nums (int *) throw (); > >extern void omp_set_default_device (int) throw (); >extern int omp_get_default_device (void) throw (); >extern int omp_get_num_devices (void) throw (); >extern int omp_get_device_num (void) throw (); >extern int omp_get_num_teams (void) throw (); >extern int omp_get_team_num (void) throw (); > >extern int omp_is_initial_device (void) throw (); >extern int omp_get_initial_device (void) throw (); >extern int omp_get_max_task_priority (void) throw (); > >extern void omp_fulfill_event (omp_event_handle_t) throw (); > >extern void omp_set_num_teams (int) throw (); >extern int omp_get_max_teams (void) throw (); >extern void omp_set_teams_thread_limit (int) throw (); >extern int omp_get_teams_thread_limit (void) throw (); > >extern void *omp_target_alloc (long unsigned int, int) throw (); >extern void omp_target_free (void *, int) throw (); >extern int omp_target_is_present (const void *, int) throw (); >extern int omp_target_memcpy (void *, const void *, long unsigned int, > long unsigned int, long unsigned int, int, int) > throw (); >extern int omp_target_memcpy_async (void *, const void *, long unsigned int, > long unsigned int, long unsigned int, int, int, > int, omp_depend_t *) > throw (); >extern int omp_target_memcpy_rect (void *, const void *, long unsigned int, int, > const long unsigned int *, > const long unsigned int *, > const long unsigned int *, > const long unsigned int *, > const long unsigned int *, int, int) > throw (); >extern int omp_target_memcpy_rect_async (void *, const void *, long unsigned int, > int, const long unsigned int *, > const long unsigned int *, > const long unsigned int *, > const long unsigned int *, > const long unsigned int *, int, int, int, > omp_depend_t *) > throw (); >extern int omp_target_associate_ptr (const void *, const void *, long unsigned int, > long unsigned int, int) throw (); >extern int omp_target_disassociate_ptr (const void *, int) throw (); >extern void *omp_get_mapped_ptr (const void *, int) throw (); >extern int omp_target_is_accessible (const void *, long unsigned int, int) > throw (); > >extern void omp_set_affinity_format (const char *) throw (); >extern long unsigned int omp_get_affinity_format (char *, long unsigned int) > throw (); >extern void omp_display_affinity (const char *) throw (); >extern long unsigned int omp_capture_affinity (char *, long unsigned int, const char *) > throw (); > >extern int omp_pause_resource (omp_pause_resource_t, int) throw (); >extern int omp_pause_resource_all (omp_pause_resource_t) throw (); > >extern omp_allocator_handle_t omp_init_allocator (omp_memspace_handle_t, > int, > const omp_alloctrait_t []) > throw (); >extern void omp_destroy_allocator (omp_allocator_handle_t) throw (); >extern void omp_set_default_allocator (omp_allocator_handle_t) throw (); >extern omp_allocator_handle_t omp_get_default_allocator (void) throw (); >extern void omp_free (void *, > omp_allocator_handle_t = omp_null_allocator) > throw (); >extern void *omp_alloc (long unsigned int, > omp_allocator_handle_t = omp_null_allocator) > throw () __attribute__((__malloc__, __malloc__ (omp_free), > __alloc_size__ (1))); >extern void *omp_aligned_alloc (long unsigned int, long unsigned int, > omp_allocator_handle_t > = omp_null_allocator) > throw () __attribute__((__malloc__, __malloc__ (omp_free), > __alloc_size__ (2), __alloc_align__ (1))); >extern void *omp_calloc (long unsigned int, long unsigned int, > omp_allocator_handle_t = omp_null_allocator) > throw () __attribute__((__malloc__, __malloc__ (omp_free), > __alloc_size__ (1, 2))); >extern void *omp_aligned_calloc (long unsigned int, long unsigned int, long unsigned int, > omp_allocator_handle_t > = omp_null_allocator) > throw () __attribute__((__malloc__, __malloc__ (omp_free), > __alloc_size__ (2, 3), __alloc_align__ (1))); >extern void *omp_realloc (void *, long unsigned int, > omp_allocator_handle_t = omp_null_allocator, > omp_allocator_handle_t = omp_null_allocator) > throw () __attribute__((__malloc__ (omp_free), __alloc_size__ (2))); > >extern void omp_display_env (int) throw (); > > >} ># 20 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 2 ># 1 "/usr/include/c++/13/queue" 1 3 ># 58 "/usr/include/c++/13/queue" 3 > ># 59 "/usr/include/c++/13/queue" 3 > > > > > > > ># 1 "/usr/include/c++/13/bits/stl_queue.h" 1 3 ># 65 "/usr/include/c++/13/bits/stl_queue.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 95 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _Tp, typename _Sequence = deque<_Tp> > > class queue > { ># 109 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _Tp1, typename _Seq1> > friend bool > operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); > > template<typename _Tp1, typename _Seq1> > friend bool > operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); ># 124 "/usr/include/c++/13/bits/stl_queue.h" 3 > 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: ># 153 "/usr/include/c++/13/bits/stl_queue.h" 3 > _Sequence c; > > public: ># 164 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _Seq = _Sequence, typename _Requires = typename > enable_if<is_default_constructible<_Seq>::value>::type> > queue() > : c() { } > > explicit > queue(const _Sequence& __c) > : c(__c) { } > > explicit > queue(_Sequence&& __c) > : c(std::move(__c)) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > explicit > queue(const _Alloc& __a) > : c(__a) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > queue(const _Sequence& __c, const _Alloc& __a) > : c(__c, __a) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > queue(_Sequence&& __c, const _Alloc& __a) > : c(std::move(__c), __a) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > queue(const queue& __q, const _Alloc& __a) > : c(__q.c, __a) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > queue(queue&& __q, const _Alloc& __a) > : c(std::move(__q.c), __a) { } ># 217 "/usr/include/c++/13/bits/stl_queue.h" 3 > [[__nodiscard__]] bool > empty() const > { return c.empty(); } > > > [[__nodiscard__]] > size_type > size() const > { return c.size(); } > > > > > > [[__nodiscard__]] > reference > front() > { > ; > return c.front(); > } > > > > > > [[__nodiscard__]] > const_reference > front() const > { > ; > return c.front(); > } > > > > > > [[__nodiscard__]] > reference > back() > { > ; > return c.back(); > } > > > > > > [[__nodiscard__]] > const_reference > back() const > { > ; > return c.back(); > } ># 284 "/usr/include/c++/13/bits/stl_queue.h" 3 > void > push(const value_type& __x) > { c.push_back(__x); } > > > void > push(value_type&& __x) > { c.push_back(std::move(__x)); } > > > template<typename... _Args> > decltype(auto) > emplace(_Args&&... __args) > { return c.emplace_back(std::forward<_Args>(__args)...); } ># 317 "/usr/include/c++/13/bits/stl_queue.h" 3 > void > pop() > { > ; > c.pop_front(); > } > > > void > swap(queue& __q) > > noexcept(__is_nothrow_swappable<_Sequence>::value) > > > > { > using std::swap; > swap(c, __q.c); > } > > }; > > > template<typename _Container, > typename = _RequireNotAllocator<_Container>> > queue(_Container) -> queue<typename _Container::value_type, _Container>; > > template<typename _Container, typename _Allocator, > typename = _RequireNotAllocator<_Container>> > queue(_Container, _Allocator) > -> queue<typename _Container::value_type, _Container>; ># 377 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) > { return __x.c == __y.c; } ># 396 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) > { return __x.c < __y.c; } > > > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) > { return !(__x == __y); } > > > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) > { return __y < __x; } > > > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) > { return !(__y < __x); } > > > template<typename _Tp, typename _Seq> > [[__nodiscard__]] > inline bool > operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) > { return !(__x < __y); } ># 439 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _Tp, typename _Seq> > inline > > > typename enable_if<__is_swappable<_Seq>::value>::type > > > > swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > template<typename _Tp, typename _Seq, typename _Alloc> > struct uses_allocator<queue<_Tp, _Seq>, _Alloc> > : public uses_allocator<_Seq, _Alloc>::type { }; ># 496 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _Tp, typename _Sequence = vector<_Tp>, > typename _Compare = less<typename _Sequence::value_type> > > class priority_queue > { ># 514 "/usr/include/c++/13/bits/stl_queue.h" 3 > 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; > > > typedef _Compare value_compare; > > protected: > > _Sequence c; > _Compare comp; > > public: ># 553 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _Seq = _Sequence, typename _Requires = typename > enable_if<__and_<is_default_constructible<_Compare>, > is_default_constructible<_Seq>>::value>::type> > priority_queue() > : c(), comp() { } > > explicit > priority_queue(const _Compare& __x, const _Sequence& __s) > : c(__s), comp(__x) > { std::make_heap(c.begin(), c.end(), comp); } > > explicit > priority_queue(const _Compare& __x, _Sequence&& __s = _Sequence()) > : c(std::move(__s)), comp(__x) > { std::make_heap(c.begin(), c.end(), comp); } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > explicit > priority_queue(const _Alloc& __a) > : c(__a), comp() { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > priority_queue(const _Compare& __x, const _Alloc& __a) > : c(__a), comp(__x) { } > > > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > priority_queue(const _Compare& __x, const _Sequence& __c, > const _Alloc& __a) > : c(__c, __a), comp(__x) > { std::make_heap(c.begin(), c.end(), comp); } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > priority_queue(const _Compare& __x, _Sequence&& __c, const _Alloc& __a) > : c(std::move(__c), __a), comp(__x) > { std::make_heap(c.begin(), c.end(), comp); } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > priority_queue(const priority_queue& __q, const _Alloc& __a) > : c(__q.c, __a), comp(__q.comp) { } > > template<typename _Alloc, typename _Requires = _Uses<_Alloc>> > priority_queue(priority_queue&& __q, const _Alloc& __a) > : c(std::move(__q.c), __a), comp(std::move(__q.comp)) { } ># 629 "/usr/include/c++/13/bits/stl_queue.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > priority_queue(_InputIterator __first, _InputIterator __last, > const _Compare& __x = _Compare()) > : c(__first, __last), comp(__x) > { std::make_heap(c.begin(), c.end(), comp); } > > > > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > priority_queue(_InputIterator __first, _InputIterator __last, > const _Compare& __x, const _Sequence& __s) > : c(__s), comp(__x) > { > ; > c.insert(c.end(), __first, __last); > std::make_heap(c.begin(), c.end(), comp); > } > > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > priority_queue(_InputIterator __first, _InputIterator __last, > const _Compare& __x, _Sequence&& __s) > : c(std::move(__s)), comp(__x) > { > ; > c.insert(c.end(), __first, __last); > std::make_heap(c.begin(), c.end(), comp); > } > > > > template<typename _InputIterator, typename _Alloc, > typename = std::_RequireInputIter<_InputIterator>, > typename _Requires = _Uses<_Alloc>> > priority_queue(_InputIterator __first, _InputIterator __last, > const _Alloc& __alloc) > : c(__first, __last, __alloc), comp() > { std::make_heap(c.begin(), c.end(), comp); } > > template<typename _InputIterator, typename _Alloc, > typename = std::_RequireInputIter<_InputIterator>, > typename _Requires = _Uses<_Alloc>> > priority_queue(_InputIterator __first, _InputIterator __last, > const _Compare& __x, const _Alloc& __alloc) > : c(__first, __last, __alloc), comp(__x) > { std::make_heap(c.begin(), c.end(), comp); } > > template<typename _InputIterator, typename _Alloc, > typename = std::_RequireInputIter<_InputIterator>, > typename _Requires = _Uses<_Alloc>> > priority_queue(_InputIterator __first, _InputIterator __last, > const _Compare& __x, const _Sequence& __s, > const _Alloc& __alloc) > : c(__s, __alloc), comp(__x) > { > ; > c.insert(c.end(), __first, __last); > std::make_heap(c.begin(), c.end(), comp); > } > > template<typename _InputIterator, typename _Alloc, > typename _Requires = _Uses<_Alloc>> > priority_queue(_InputIterator __first, _InputIterator __last, > const _Compare& __x, _Sequence&& __s, > const _Alloc& __alloc) > : c(std::move(__s), __alloc), comp(__x) > { > ; > c.insert(c.end(), __first, __last); > std::make_heap(c.begin(), c.end(), comp); > } > > > > > > [[__nodiscard__]] bool > empty() const > { return c.empty(); } > > > [[__nodiscard__]] > size_type > size() const > { return c.size(); } > > > > > > [[__nodiscard__]] > const_reference > top() const > { > ; > return c.front(); > } ># 737 "/usr/include/c++/13/bits/stl_queue.h" 3 > void > push(const value_type& __x) > { > c.push_back(__x); > std::push_heap(c.begin(), c.end(), comp); > } > > > void > push(value_type&& __x) > { > c.push_back(std::move(__x)); > std::push_heap(c.begin(), c.end(), comp); > } > > template<typename... _Args> > void > emplace(_Args&&... __args) > { > c.emplace_back(std::forward<_Args>(__args)...); > std::push_heap(c.begin(), c.end(), comp); > } ># 772 "/usr/include/c++/13/bits/stl_queue.h" 3 > void > pop() > { > ; > std::pop_heap(c.begin(), c.end(), comp); > c.pop_back(); > } > > > void > swap(priority_queue& __pq) > noexcept(__and_< > > __is_nothrow_swappable<_Sequence>, > > > > __is_nothrow_swappable<_Compare> > >::value) > { > using std::swap; > swap(c, __pq.c); > swap(comp, __pq.comp); > } > > }; > > > template<typename _Compare, typename _Container, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireNotAllocator<_Container>> > priority_queue(_Compare, _Container) > -> priority_queue<typename _Container::value_type, _Container, _Compare>; > > template<typename _InputIterator, typename _ValT > = typename iterator_traits<_InputIterator>::value_type, > typename _Compare = less<_ValT>, > typename _Container = vector<_ValT>, > typename = _RequireInputIter<_InputIterator>, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireNotAllocator<_Container>> > priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), > _Container = _Container()) > -> priority_queue<_ValT, _Container, _Compare>; > > template<typename _Compare, typename _Container, typename _Allocator, > typename = _RequireNotAllocator<_Compare>, > typename = _RequireNotAllocator<_Container>> > priority_queue(_Compare, _Container, _Allocator) > -> priority_queue<typename _Container::value_type, _Container, _Compare>; > > > > > > template<typename _Tp, typename _Sequence, typename _Compare> > inline > > > typename enable_if<__and_<__is_swappable<_Sequence>, > __is_swappable<_Compare>>::value>::type > > > > swap(priority_queue<_Tp, _Sequence, _Compare>& __x, > priority_queue<_Tp, _Sequence, _Compare>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > template<typename _Tp, typename _Sequence, typename _Compare, > typename _Alloc> > struct uses_allocator<priority_queue<_Tp, _Sequence, _Compare>, _Alloc> > : public uses_allocator<_Sequence, _Alloc>::type { }; > > > >} ># 67 "/usr/include/c++/13/queue" 2 3 ># 21 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 2 > > > ># 1 "/usr/include/c++/13/typeindex" 1 3 ># 32 "/usr/include/c++/13/typeindex" 3 > ># 33 "/usr/include/c++/13/typeindex" 3 ># 43 "/usr/include/c++/13/typeindex" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 55 "/usr/include/c++/13/typeindex" 3 > struct type_index > { > type_index(const type_info& __rhs) noexcept > : _M_target(&__rhs) { } > > bool > operator==(const type_index& __rhs) const noexcept > { return *_M_target == *__rhs._M_target; } > > > bool > operator!=(const type_index& __rhs) const noexcept > { return *_M_target != *__rhs._M_target; } > > > bool > operator<(const type_index& __rhs) const noexcept > { return _M_target->before(*__rhs._M_target); } > > bool > operator<=(const type_index& __rhs) const noexcept > { return !__rhs._M_target->before(*_M_target); } > > bool > operator>(const type_index& __rhs) const noexcept > { return __rhs._M_target->before(*_M_target); } > > bool > operator>=(const type_index& __rhs) const noexcept > { return !_M_target->before(*__rhs._M_target); } ># 98 "/usr/include/c++/13/typeindex" 3 > size_t > hash_code() const noexcept > { return _M_target->hash_code(); } > > const char* > name() const noexcept > { return _M_target->name(); } > > 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 > { return __ti.hash_code(); } > }; > > >} ># 25 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 2 > > > > > > ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/ArrayTools.hpp" 1 > > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 5 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/ArrayTools.hpp" 2 > > > > > ># 1 "../../subprojects/edfst/3pty/networkit/src/extlibs/tlx/tlx/math/integer_log2.hpp" 1 ># 14 "../../subprojects/edfst/3pty/networkit/src/extlibs/tlx/tlx/math/integer_log2.hpp" > ># 14 "../../subprojects/edfst/3pty/networkit/src/extlibs/tlx/tlx/math/integer_log2.hpp" >namespace tlx { ># 23 "../../subprojects/edfst/3pty/networkit/src/extlibs/tlx/tlx/math/integer_log2.hpp" >template <typename IntegerType> >static inline unsigned integer_log2_floor_template(IntegerType i) { > unsigned p = 0; > while (i >= 65536) i >>= 16, p += 16; > while (i >= 256) i >>= 8, p += 8; > while (i >>= 1) ++p; > return p; >} > > > > > > > >static inline unsigned integer_log2_floor(int i) { > if (i == 0) return 0; > return 8 * sizeof(int) - 1 - __builtin_clz(i); >} > > >static inline unsigned integer_log2_floor(unsigned int i) { > if (i == 0) return 0; > return 8 * sizeof(unsigned) - 1 - __builtin_clz(i); >} > > >static inline unsigned integer_log2_floor(long i) { > if (i == 0) return 0; > return 8 * sizeof(long) - 1 - __builtin_clzl(i); >} > > >static inline unsigned integer_log2_floor(unsigned long i) { > if (i == 0) return 0; > return 8 * sizeof(unsigned long) - 1 - __builtin_clzl(i); >} > > >static inline unsigned integer_log2_floor(long long i) { > if (i == 0) return 0; > return 8 * sizeof(long long) - 1 - __builtin_clzll(i); >} > > >static inline unsigned integer_log2_floor(unsigned long long i) { > if (i == 0) return 0; > return 8 * sizeof(unsigned long long) - 1 - __builtin_clzll(i); >} ># 111 "../../subprojects/edfst/3pty/networkit/src/extlibs/tlx/tlx/math/integer_log2.hpp" >static inline unsigned integer_log2_ceil(int i) { > if (i <= 1) return 0; > return integer_log2_floor(i - 1) + 1; >} > > >static inline unsigned integer_log2_ceil(unsigned int i) { > if (i <= 1) return 0; > return integer_log2_floor(i - 1) + 1; >} > > >static inline unsigned integer_log2_ceil(long i) { > if (i <= 1) return 0; > return integer_log2_floor(i - 1) + 1; >} > > >static inline unsigned integer_log2_ceil(unsigned long i) { > if (i <= 1) return 0; > return integer_log2_floor(i - 1) + 1; >} > > >static inline unsigned integer_log2_ceil(long long i) { > if (i <= 1) return 0; > return integer_log2_floor(i - 1) + 1; >} > > >static inline unsigned integer_log2_ceil(unsigned long long i) { > if (i <= 1) return 0; > return integer_log2_floor(i - 1) + 1; >} > > > >} ># 11 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/ArrayTools.hpp" 2 > >namespace Aux { >namespace ArrayTools { > >template <class ArrayIt, class PermIt> >void applyPermutation(ArrayIt first, ArrayIt last, PermIt permFirst) { > > using PermType = typename std::iterator_traits<PermIt>::value_type; > static_assert(std::is_integral<PermType>::value, "Elements of permutation must be integral."); > > const size_t arraySize = > static_cast<typename std::iterator_traits<ArrayIt>::difference_type>(last - first); > > const size_t usedBitsInPerm = tlx::integer_log2_ceil(arraySize); > > const size_t bitsInPerm = sizeof(PermType) * 8 - (std::is_signed<PermType>::value ? 1 : 0); > > if (bitsInPerm == usedBitsInPerm) { > > std::vector<bool> swapped(arraySize); > for (size_t i = 0; i < arraySize; ++i) { > if (swapped[i]) > continue; > > size_t cur = i; > swapped[cur] = true; > auto tmp = std::move(first[cur]); > > while (static_cast<size_t>(permFirst[cur]) != i) { > first[cur] = std::move(first[permFirst[cur]]); > cur = permFirst[cur]; > swapped[cur] = true; > } > > first[cur] = std::move(tmp); > } > } else { > > > const auto mask = PermType{1} << (bitsInPerm - (std::is_signed<PermType>::value ? 2 : 1)); > > const auto swapped = [&permFirst, mask = mask](size_t i) -> bool { > return (permFirst[i] & mask) != 0; > }; > > const auto markSwapped = [&permFirst, mask = mask](size_t i) -> void { > permFirst[i] |= mask; > }; > > for (size_t i = 0; i < arraySize; ++i) { > if (swapped(i)) > continue; > > size_t cur = i; > markSwapped(cur); > auto tmp = std::move(first[cur]); > > while (static_cast<size_t>(permFirst[cur] & ~mask) != i) { > first[cur] = std::move(first[permFirst[cur] & ~mask]); > cur = permFirst[cur] & ~mask; > markSwapped(cur); > } > > first[cur] = std::move(tmp); > } > > for (size_t i = 0; i < arraySize; ++i) > permFirst[i] &= ~mask; > } >} > >} >} ># 32 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/FunctionTraits.hpp" 1 > > > > > > >namespace Aux { > > > > >template <class F> >struct FunctionTraits; > > >template <class R, class... Args> >struct FunctionTraits<R (*)(Args...)> : public FunctionTraits<R(Args...)> {}; > >template <class R, class... Args> >struct FunctionTraits<R(Args...)> { > using result_type = R; > > static constexpr size_t arity = sizeof...(Args); > > template <size_t N, bool> > struct arg_impl; > template <size_t N> > struct arg_impl<N, false> {}; > template <size_t N> > struct arg_impl<N, true> { > using type = typename std::tuple_element<N, std::tuple<Args...>>::type; > }; > > template <size_t N> > using arg = arg_impl < N, > N<arity>; >}; > > >template <class C, class R, class... Args> >struct FunctionTraits<R (C::*)(Args...)> : public FunctionTraits<R(C &, Args...)> {}; > > >template <class C, class R, class... Args> >struct FunctionTraits<R (C::*)(Args...) const> : public FunctionTraits<R(C &, Args...)> {}; > > >template <class C, class R> >struct FunctionTraits<R(C::*)> : public FunctionTraits<R(C &)> {}; > > >template <class F> >struct FunctionTraits { >private: > using call_type = FunctionTraits<decltype(&F::operator())>; > >public: > using result_type = typename call_type::result_type; > > static constexpr size_t arity = call_type::arity - 1; > > template <size_t N> > using arg = typename call_type::template arg<N + 1>; >}; > >template <class F> >struct FunctionTraits<F &> : public FunctionTraits<F> {}; > >template <class F> >struct FunctionTraits<F &&> : public FunctionTraits<F> {}; > >} ># 33 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Log.hpp" 1 > > > > > > ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 1 > > > > ># 1 "/usr/include/c++/13/cassert" 1 3 ># 41 "/usr/include/c++/13/cassert" 3 > ># 42 "/usr/include/c++/13/cassert" 3 > > ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 > ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 45 "/usr/include/c++/13/cassert" 2 3 ># 6 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 2 ># 14 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/TemplateUtils.hpp" 1 ># 38 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/TemplateUtils.hpp" > ># 38 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/TemplateUtils.hpp" >namespace Aux { > > > > >template <typename T> >using decay_t = typename std::decay<T>::type; > > > > > >template <bool B> >using boolToType = std::integral_constant<bool, B>; > > > > > > > >template <typename T1, typename T2> >constexpr bool isSame() { > return std::is_same<T1, T2>::value; >} > > > > > > >template <typename Base, typename Derived> >constexpr bool isBaseOrSame() { > return isSame<Base, Derived>() || std::is_base_of<Base, Derived>::value; >} > >} ># 15 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 2 > >namespace Aux { > >template <typename... T> >std::string toString(const T &...args); > >template <typename... T> >std::ostream &printToStream(std::ostream &stream, const T &...args); > >template <typename... T> >std::string toStringF(const std::string &format, const T &...args); > >template <typename... T> >std::ostream &printToStreamF(std::ostream &stream, const std::string &format, const T &...args); > > > > >namespace Impl { > > >enum class PrintableCategory { > UNPRINTABLE, > ITERATABLE, > PAIR, > TUPLE, > STREAMABLE, > Unprintable = UNPRINTABLE, > Iteratable = ITERATABLE, > Pair = PAIR, > Tuple = TUPLE, > Streamable = STREAMABLE >}; > >template <typename T> >constexpr bool isStreamable(); >template <typename T> >constexpr bool isPair(); >template <typename T> >constexpr bool isTuple(); >template <typename T> >constexpr bool isIteratable(); > >template <typename T> >constexpr PrintableCategory getPrintableCategory() { > return isStreamable<T>() ? PrintableCategory::STREAMABLE > : isPair<T>() ? PrintableCategory::PAIR > : isTuple<T>() ? PrintableCategory::TUPLE > : isIteratable<T>() ? PrintableCategory::ITERATABLE > : > PrintableCategory::UNPRINTABLE; >} >template <PrintableCategory Tag> >struct PrintableCategoryTag {}; >using IteratableTag = PrintableCategoryTag<PrintableCategory::ITERATABLE>; >using PairTag = PrintableCategoryTag<PrintableCategory::PAIR>; >using TupleTag = PrintableCategoryTag<PrintableCategory::TUPLE>; >using StreamableTag = PrintableCategoryTag<PrintableCategory::STREAMABLE>; >using UnprintableTag = PrintableCategoryTag<PrintableCategory::UNPRINTABLE>; > >template <typename T, typename... Args> >void printToStream(std::ostream &stream, const T &, const Args &...); >inline void printToStream(std::ostream &) {} > >template <typename T> >void printToStreamTagged(std::ostream &stream, const T &, IteratableTag); >template <typename T> >void printToStreamTagged(std::ostream &stream, const T &, PairTag); >template <typename T> >void printToStreamTagged(std::ostream &stream, const T &, TupleTag); >template <typename T> >void printToStreamTagged(std::ostream &stream, const T &, StreamableTag); > > > > >template <typename T> >extern void printToStreamTagged(std::ostream &, const T &, UnprintableTag); > >template <typename T, typename... Args> >void printToStream(std::ostream &stream, const T &arg, const Args &...args) { > static_assert(getPrintableCategory<T>() != PrintableCategory::UNPRINTABLE, > "printToStream must not be called with an unprintable argument"); > printToStreamTagged(stream, arg, PrintableCategoryTag<getPrintableCategory<T>()>{}); > printToStream(stream, args...); >} > >inline std::tuple<std::string::const_iterator, bool> >printFormatPartToStream(std::ostream &stream, std::string::const_iterator begin, > std::string::const_iterator end); > >inline void printToStreamF(std::ostream &stream, std::string::const_iterator format_begin, > std::string::const_iterator format_end) { > bool printArgument; > using iterator = std::string::const_iterator; > iterator it; > std::tie(it, printArgument) = printFormatPartToStream(stream, format_begin, format_end); > if (printArgument) { > throw std::invalid_argument{"formatstring requests more arguments then provided"}; > } >} >template <typename T, typename... Args> >void printToStreamF(std::ostream &stream, std::string::const_iterator format_begin, > std::string::const_iterator format_end, const T &arg, const Args &...args) { > bool printArgument; > using iterator = std::string::const_iterator; > iterator it; > std::tie(it, printArgument) = printFormatPartToStream(stream, format_begin, format_end); > if (printArgument) { > printToStream(stream, arg); > printToStreamF(stream, it, format_end, args...); > } else { > ># 127 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 3 4 > (static_cast <bool> ( ># 127 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" > it == format_end ># 127 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 127 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" > "it == format_end" ># 127 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp", 127, __extension__ __PRETTY_FUNCTION__)) ># 127 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" > ; > return; > } >} ># 139 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" >inline auto printFormatPartToStream(std::ostream &stream, std::string::const_iterator begin, > std::string::const_iterator end) > -> std::tuple<std::string::const_iterator, bool> { > auto it = begin; > while (it != end) { > auto nextPercent = std::find(it, end, '%'); > stream.write(&*it, std::distance(it, nextPercent)); > > if (nextPercent == end) { > it = nextPercent; > break; > } > > it = ++nextPercent; > > if (it == end) { > throw std::invalid_argument{"formatstrings must not end on unmatched '%'"}; > } else if (*it == '%') { > stream.put('%'); > ++it; > } else if (*it == 's') { > ++it; > return std::make_tuple(it, true); > } else { > throw std::invalid_argument{"formatstring contains illegal format-specifier"}; > } > } > ># 166 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 3 4 > (static_cast <bool> ( ># 166 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" > it == end ># 166 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 166 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" > "it == end" ># 166 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp", 166, __extension__ __PRETTY_FUNCTION__)) ># 166 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/StringBuilder.hpp" > ; > return std::make_tuple(end, false); >} > > > > > >struct IsIteratableHelper { > static std::false_type isIteratable(...); > > template < > typename T, class Iterator = decltype(std::begin(std::declval<T>())), > class EndIteratorValid = typename ::std::enable_if<isSame<Iterator, decltype(std::end(std::declval<T>()))>()>::type, > class HasInputIterator = typename ::std::enable_if<isBaseOrSame<std::input_iterator_tag, typename std::iterator_traits<Iterator>::iterator_category>()>::type > > > > static std::true_type isIteratable(const T &); >}; >template <typename T> >constexpr bool isIteratable() { > return decltype(IsIteratableHelper::isIteratable(std::declval<T>()))::value; >} > > >template <typename T> >struct IsPairHelper : std::false_type {}; >template <typename T1, typename T2> >struct IsPairHelper<std::pair<T1, T2>> : std::true_type {}; >template <typename T> >constexpr bool isPair() { > return IsPairHelper<T>::value; >} > > >template <typename T> >struct IsTupleHelper : std::false_type {}; >template <typename... T> >struct IsTupleHelper<std::tuple<T...>> : std::true_type {}; >template <typename T> >constexpr bool isTuple() { > return IsTupleHelper<T>::value; >} > > >struct IsStreamableHelper { > static std::false_type isStreamable(...); > > template < > typename T, > typename _streamT = typename std::decay<decltype(std::declval<std::ostream &>() > << std::declval<const T &>())>::type, > typename std::enable_if<std::is_same<std::ostream, _streamT>::value > || std::is_base_of<std::ostream, _streamT>::value> * = nullptr> > static std::true_type isStreamable(const T &); >}; >template <typename T> >constexpr bool isStreamable() { > return decltype(IsStreamableHelper::isStreamable(std::declval<T>()))::value; >} > > > > > >template <typename T> >void printToStreamTagged(std::ostream &stream, const T &arg, StreamableTag) { > stream << arg; >} > > >template <typename T> >void printToStreamTagged(std::ostream &stream, const T &arg, PairTag) { > stream << '('; > printToStream(stream, arg.first); > stream << ", "; > printToStream(stream, arg.second); > stream << ')'; >} > > >template <typename Tuple, int I, int TupleSize> >struct printTupleHelper { > static void print(std::ostream &stream, const Tuple &arg) { > printToStream(stream, std::get<I - 1>(arg)); > stream << ", "; > printTupleHelper<Tuple, I + 1, TupleSize>::print(stream, arg); > } >}; >template <typename Tuple, int I> >struct printTupleHelper<Tuple, I, I> { > static void print(std::ostream &stream, const Tuple &arg) { > printToStream(stream, std::get<I - 1>(arg)); > } >}; >template <typename T> >void printToStreamTagged(std::ostream &stream, const T &arg, TupleTag) { > stream << '('; > printTupleHelper<T, 1, std::tuple_size<T>::value>::print(stream, arg); > stream << ')'; >} > > >template <typename T> >void printToStreamTagged(std::ostream &stream, const T &arg, IteratableTag) { > auto it = std::begin(arg); > auto end = std::end(arg); > bool firstpass = true; > stream << '['; > while (it != end) { > if (firstpass) { > firstpass = false; > } else { > stream << ", "; > } > printToStream(stream, *it); > ++it; > } > stream << ']'; >} > >} > > > > >template <typename... T> >std::string toString(const T &...args) { > std::stringstream stream; > printToStream(stream, args...); > return stream.str(); >} > >template <typename... T> >std::ostream &printToStream(std::ostream &stream, const T &...args) { > Impl::printToStream(stream, args...); > return stream; >} > >template <typename... T> >std::string toStringF(const std::string &format, const T &...args) { > std::stringstream stream; > printToStreamF(stream, format, args...); > return stream.str(); >} > >template <typename... T> >std::ostream &printToStreamF(std::ostream &stream, const std::string &format, const T &...args) { > Impl::printToStreamF(stream, format.begin(), format.end(), args...); > return stream; >} > >} ># 8 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Log.hpp" 2 ># 55 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Log.hpp" >namespace Aux { >namespace Log { > >struct Location { > const char *file; > const char *function; > const int line; >}; > >enum class LogLevel { > TRACE, > DEBUG, > INFO, > WARN, > ERROR, > FATAL, > QUIET, > trace = TRACE, > debug = DEBUG, > info = INFO, > warn = WARN, > error = ERROR, > fatal = FATAL, > quiet = QUIET >}; > > > > > >void setLogLevel(const std::string &logLevel); > > > > >std::string getLogLevel(); > >namespace Impl { >void log(const Location &loc, LogLevel p, const std::string &msg); >} > > >bool isLogLevelEnabled(LogLevel p) noexcept; > >template <typename... T> >void log(const Location &loc, LogLevel p, const T &...args) { > if (!isLogLevelEnabled(p)) > return; > > std::stringstream stream; > printToStream(stream, args...); > Impl::log(loc, p, stream.str()); >} > >template <typename... T> >void logF(const Location &loc, LogLevel p, const std::string &format, const T &...args) { > if (!isLogLevelEnabled(p)) > return; > > std::stringstream stream; > printToStreamF(stream, format, args...); > Impl::log(loc, p, stream.str()); >} > >} >} ># 34 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" 1 ># 11 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" ># 1 "/usr/include/c++/13/cassert" 1 3 ># 41 "/usr/include/c++/13/cassert" 3 > ># 42 "/usr/include/c++/13/cassert" 3 > > ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 > ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 45 "/usr/include/c++/13/cassert" 2 3 ># 12 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" 2 > > > > > > ># 17 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" >namespace Aux { > > > > > > >namespace Random { > > > > > > >void setSeed(uint64_t seed, bool useThreadId); > > > > >uint64_t getSeed(); > > > > >std::mt19937_64 &getURNG(); ># 53 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" >uint64_t integer(); >uint64_t integer(uint64_t upperBound); >uint64_t integer(uint64_t lowerBound, uint64_t upperBound); ># 67 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" >double real(); >double real(double upperBound); >double real(double lowerBound, double upperBound); ># 80 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" >double probability(); > > > > > >std::size_t index(std::size_t max); > > > > >template <typename Container> >typename Container::const_reference choice(const Container &container) { > return container[index(container.size())]; >} > > > > >template <typename Element> >const Element &weightedChoice(const std::vector<std::pair<Element, double>> &weightedElements) { > if (weightedElements.empty()) > throw std::runtime_error("Random::weightedChoice: input size equal to 0"); > double total = 0.0; > for (const auto &entry : weightedElements) { > ># 105 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" 3 4 > (static_cast <bool> ( ># 105 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" > entry.second >= 0.0 && "This algorithm only works with non-negative weights" ># 105 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 105 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" > "entry.second >= 0.0 && \"This algorithm only works with non-negative weights\"" ># 105 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp", 105, __extension__ __PRETTY_FUNCTION__)) ># 105 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/Random.hpp" > ; > total += entry.second; > } > double r = Aux::Random::real(total); > for (const auto &entry : weightedElements) { > if (r < entry.second) { > return entry.first; > } > r -= entry.second; > } > throw std::runtime_error( > "Random::weightedChoice: should never get here"); >} > >} >} ># 35 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 2 > >namespace NetworKit { > >struct Edge { > node u, v; > > Edge() : u(none), v(none) {} > > Edge(node _u, node _v, bool sorted = false) { > u = sorted ? std::min(_u, _v) : _u; > v = sorted ? std::max(_u, _v) : _v; > } >}; > > > > > >struct WeightedEdge : Edge { > edgeweight weight; > > > WeightedEdge() : Edge(), weight(std::numeric_limits<edgeweight>::max()) {} > > WeightedEdge(node u, node v, edgeweight w) : Edge(u, v), weight(w) {} >}; > >struct WeightedEdgeWithId : WeightedEdge { > edgeid eid; > > WeightedEdgeWithId(node u, node v, edgeweight w, edgeid eid) > : WeightedEdge(u, v, w), eid(eid) {} >}; > >inline bool operator==(const Edge &e1, const Edge &e2) { > return e1.u == e2.u && e1.v == e2.v; >} > >inline bool operator<(const WeightedEdge &e1, const WeightedEdge &e2) { > return e1.weight < e2.weight; >} > >struct Unsafe {}; >static constexpr Unsafe unsafe{}; >} > >namespace std { >template <> >struct hash<NetworKit::Edge> { > size_t operator()(const NetworKit::Edge &e) const { return hash_node(e.u) ^ hash_node(e.v); } > > hash<NetworKit::node> hash_node; >}; >} > >namespace NetworKit { > > >namespace CurveballDetails { >class CurveballMaterialization; >} > > > > > >class Graph final { > > > > count n; > > count m; > > > > count storedNumberOfSelfLoops; > > > node z; > > edgeid omega; > > count t; > > > bool weighted; > > bool directed; > > bool edgesIndexed; > > > > std::vector<bool> exists; > > > > std::vector<std::vector<node>> inEdges; > > > std::vector<std::vector<node>> outEdges; > > > std::vector<std::vector<edgeweight>> inEdgeWeights; > > std::vector<std::vector<edgeweight>> outEdgeWeights; > > > std::vector<std::vector<edgeid>> inEdgeIds; > > std::vector<std::vector<edgeid>> outEdgeIds; > >private: ># 157 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > class NodeAttributeStorageBase { > public: > NodeAttributeStorageBase(const Graph *graph, std::string name, std::type_index type) > : name{std::move(name)}, type{type}, theGraph{graph}, validStorage{true} {} > > void invalidateStorage() { validStorage = false; } > > const std::string &getName() const noexcept { return name; } > > std::type_index getType() const noexcept { return type; } > > bool isValid(node n) const noexcept { return n < valid.size() && valid[n]; } > > > void invalidate(node n) { > if (isValid(n)) { > valid[n] = false; > --validElements; > } > } > > protected: > void markValid(node n) { > if (!theGraph->hasNode(n)) > throw std::runtime_error("This node does not exist"); > > if (n >= valid.size()) > valid.resize(n + 1); > > if (!valid[n]) { > valid[n] = true; > ++validElements; > } > } > > void checkIndex(node n) const { > if (!theGraph->hasNode(n)) { > throw std::runtime_error("This node does not exist"); > } > if (!isValid(n)) { > throw std::runtime_error("Invalid attribute value"); > } > } > > private: > std::string name; > std::type_index type; > std::vector<bool> valid; > protected: > index validElements = 0; > const Graph *theGraph; > bool validStorage; > > }; > > template <typename T> > class NodeAttribute; > > template <typename T> > class NodeAttributeStorage : public NodeAttributeStorageBase { > public: > NodeAttributeStorage(const Graph *theGraph, std::string name) > : NodeAttributeStorageBase{theGraph, std::move(name), typeid(T)} {} > > void resize(node i) { > if (i >= values.size()) > values.resize(i + 1); > } > > auto size() const noexcept { return validElements; } > > void set(node i, T &&v) { > markValid(i); > resize(i); > values[i] = std::move(v); > } > > > > > T get(node i) const { > checkIndex(i); > return values[i]; > } > > > T get(node i, T defaultT) const noexcept { > if (i >= values.size() || !isValid(i)) > return defaultT; > return values[i]; > } > > friend NodeAttribute<T>; > > private: > using NodeAttributeStorageBase::theGraph; > std::vector<T> values; > }; > > template <typename T> > class NodeAttribute { > public: > class Iterator { > public: > > > using value_type = T; > > > using reference = value_type &; > > > using pointer = value_type *; > > > using iterator_category = std::forward_iterator_tag; > > > > using difference_type = ptrdiff_t; > > Iterator() : storage{nullptr}, idx{0} {} > Iterator(NodeAttributeStorage<T> *storage) : storage{storage}, idx{0} { > if (storage) { > nextValid(); > } > } > > Iterator &nextValid() { > while (storage && !storage->isValid(idx)) { > if (idx >= storage->values.size()) { > storage = nullptr; > return *this; > } > ++idx; > } > return *this; > } > > Iterator &operator++() { > if (!storage) { > throw std::runtime_error("Invalid attribute iterator"); > } > ++idx; > return nextValid(); > } > > auto operator*() const { > if (!storage) { > throw std::runtime_error("Invalid attribute iterator"); > } > return std::make_pair(idx, storage->values[idx]); > } > > bool operator==(Iterator const &iter) const noexcept { > if (storage == nullptr && iter.storage == nullptr) { > return true; > } > return storage == iter.storage && idx == iter.idx; > } > > bool operator!=(Iterator const &iter) const noexcept { return !(*this == iter); } > > private: > NodeAttributeStorage<T> *storage; > index idx; > }; > > private: > class IndexProxy { > > > > > > > public: > IndexProxy(NodeAttributeStorage<T> *storage, index idx) : storage{storage}, idx{idx} {} > > > operator T() const { > storage->checkIndex(idx); > return storage->values[idx]; > } > > > T &operator=(T &&other) { > storage->set(idx, std::move(other)); > return storage->values[idx]; > } > > private: > NodeAttributeStorage<T> *storage; > index idx; > }; > public: > explicit NodeAttribute(std::shared_ptr<NodeAttributeStorage<T>> ownedStorage = nullptr) > : ownedStorage{ownedStorage}, valid{ownedStorage != nullptr} {} > > NodeAttribute(NodeAttribute const &other) > : ownedStorage{other.ownedStorage}, valid{other.valid} {} > > NodeAttribute &operator=(NodeAttribute other) { > this->swap(other); > return *this; > } > > void swap(NodeAttribute &other) { > std::swap(ownedStorage, other.ownedStorage); > std::swap(valid, other.valid); > } > > NodeAttribute(NodeAttribute &&other) noexcept > : ownedStorage{std::move(other.ownedStorage)}, valid{other.valid} { > other.valid = false; > } > > auto begin() const { > checkAttribute(); > return Iterator(ownedStorage.get()).nextValid(); > } > > auto end() const { return Iterator(nullptr); } > > auto size() const noexcept { return ownedStorage->size(); } > > void set(node i, T v) { > checkAttribute(); > ownedStorage->set(i, std::move(v)); > } > > auto get(node i) const { > checkAttribute(); > return ownedStorage->get(i); > } > > auto get(node i, T defaultT) const { > checkAttribute(); > return ownedStorage->get(i, defaultT); > } > > IndexProxy operator[](node i) const { > checkAttribute(); > return IndexProxy(ownedStorage.get(), i); > } > > void checkAttribute() const { > if (!ownedStorage->validStorage) > throw std::runtime_error("Invalid attribute"); > } > > void write(std::string const &filename) const { > std::ofstream out(filename); > if (!out) > ::Aux::Log::log({"../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", __PRETTY_FUNCTION__, 411}, ::Aux::Log::LogLevel::ERROR, "cannot open ", filename, " for writing"); > > for (auto it = begin(); it != end(); ++it) { > auto pair = *it; > auto n = pair.first; > auto v = pair.second; > out << n << "\t" << v << "\n"; > } > out.close(); > } > > void read(const std::string &filename) { > std::ifstream in(filename); > if (!in) { > ::Aux::Log::log({"../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", __PRETTY_FUNCTION__, 425}, ::Aux::Log::LogLevel::ERROR, "cannot open ", filename, " for reading"); > } > node n; > T v; > std::string line; > while (std::getline(in, line)) { > std::istringstream istring(line); > istring >> n >> v; > set(n, v); > } > } > > private: > std::shared_ptr<NodeAttributeStorage<T>> ownedStorage; > bool valid; > }; > > class NodeAttributeMap { > friend Graph; > const Graph *theGraph; > > public: > std::unordered_map<std::string, std::shared_ptr<NodeAttributeStorageBase>> attrMap; > > NodeAttributeMap(const Graph *g) : theGraph{g} {} > > auto find(std::string const &name) { > auto it = attrMap.find(name); > if (it == attrMap.end()) { > throw std::runtime_error("No such attribute"); > } > return it; > } > > template <typename T> > auto attach(const std::string &name) { > auto ownedPtr = std::make_shared<NodeAttributeStorage<T>>(theGraph, std::string{name}); > auto insertResult = attrMap.emplace(ownedPtr->getName(), ownedPtr); > auto success = insertResult.second; > if (!success) { > throw std::runtime_error("Attribute with same name already exists"); > } > return NodeAttribute<T>{ownedPtr}; > } > > void detach(const std::string &name) { > auto it = find(name); > auto storage = it->second.get(); > storage->invalidateStorage(); > it->second.reset(); > attrMap.erase(name); > } > > template <typename T> > auto get(const std::string &name) { > auto it = find(name); > if (it->second.get()->getType() != typeid(T)) > throw std::runtime_error("Type mismatch in nodeAttributes().get()"); > return NodeAttribute<T>{std::static_pointer_cast<NodeAttributeStorage<T>>(it->second)}; > } > > }; > NodeAttributeMap nodeAttributeMap; > >public: > auto &nodeAttributes() noexcept { return nodeAttributeMap; } > > > > auto attachNodeIntAttribute(const std::string &name) { > nodeAttributes().theGraph = this; > return nodeAttributes().attach<int>(name); > } > > auto attachNodeDoubleAttribute(const std::string &name) { > nodeAttributes().theGraph = this; > return nodeAttributes().attach<double>(name); > } > > auto attachNodeStringAttribute(const std::string &name) { > nodeAttributes().theGraph = this; > return nodeAttributes().attach<std::string>(name); > } > > void detachNodeAttribute(std::string const &name) { > nodeAttributes().theGraph = this; > nodeAttributes().detach(name); > } > > void detach(std::string const &name) { nodeAttributes().detach(name); } > > using NodeIntAttribute = NodeAttribute<int>; > using NodeDoubleAttribute = NodeAttribute<double>; > using NodeStringAttribute = NodeAttribute<std::string>; > >private: > > > > > > index indexInInEdgeArray(node v, node u) const; > > > > > index indexInOutEdgeArray(node u, node v) const; ># 542 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > edgeweight computeWeightedDegree(node u, bool inDegree = false, > bool countSelfLoopsTwice = false) const; ># 553 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool hasWeights> > inline edgeweight getOutEdgeWeight(node u, index i) const; ># 564 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool hasWeights> > inline edgeweight getInEdgeWeight(node u, index i) const; ># 575 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool graphHasEdgeIds> > inline edgeid getOutEdgeId(node u, index i) const; ># 586 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool graphHasEdgeIds> > inline edgeid getInEdgeId(node u, index i) const; ># 598 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool graphIsDirected> > inline bool useEdgeInIteration(node u, node v) const; ># 611 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> > inline void forOutEdgesOfImpl(node u, L handle) const; ># 624 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> > inline void forInEdgesOfImpl(node u, L handle) const; > > > > > > > > template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> > inline void forEdgeImpl(L handle) const; ># 643 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> > inline void parallelForEdgesImpl(L handle) const; ># 653 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> > inline double parallelSumForEdgesImpl(L handle) const; ># 678 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <class F, void * = (void *)0> > typename Aux::FunctionTraits<F>::result_type edgeLambda(F &, ...) const { > > > static_assert(!std::is_same<F, F>::value, > "Your lambda does not support the required parameters or the " > "parameters have the wrong type."); > return std::declval<typename Aux::FunctionTraits<F>::result_type>(); > > > } > > > > > > > template <class F, > typename std::enable_if< > (Aux::FunctionTraits<F>::arity >= 3) > && std::is_same<edgeweight, > typename Aux::FunctionTraits<F>::template arg<2>::type>::value > && std::is_same<edgeid, typename Aux::FunctionTraits<F>::template arg<3>::type>:: > value>::type * = (void *)0> > auto edgeLambda(F &f, node u, node v, edgeweight ew, edgeid id) const > -> decltype(f(u, v, ew, id)) { > return f(u, v, ew, id); > } > > > > > > > template < > class F, > typename std::enable_if< > (Aux::FunctionTraits<F>::arity >= 2) > && std::is_same<edgeid, typename Aux::FunctionTraits<F>::template arg<2>::type>::value > && std::is_same<node, typename Aux::FunctionTraits<F>::template arg<1>::type>:: > value > > >::type * = (void *)0> > auto edgeLambda(F &f, node u, node v, edgeweight, edgeid id) const -> decltype(f(u, v, id)) { > return f(u, v, id); > } > > > > > > > template <class F, > typename std::enable_if< > (Aux::FunctionTraits<F>::arity >= 2) > && std::is_same<edgeweight, typename Aux::FunctionTraits<F>::template arg< > 2>::type>::value>::type * = (void *)0> > auto edgeLambda(F &f, node u, node v, edgeweight ew, edgeid ) const > -> decltype(f(u, v, ew)) { > return f(u, v, ew); > } > > > > > > > template <class F, typename std::enable_if< > (Aux::FunctionTraits<F>::arity >= 1) > && std::is_same<node, typename Aux::FunctionTraits<F>::template arg< > 1>::type>::value>::type * = (void *)0> > auto edgeLambda(F &f, node u, node v, edgeweight , edgeid ) const > -> decltype(f(u, v)) { > return f(u, v); > } > > > > > > > > template <class F, > typename std::enable_if< > (Aux::FunctionTraits<F>::arity >= 1) > && std::is_same<edgeweight, typename Aux::FunctionTraits<F>::template arg< > 1>::type>::value>::type * = (void *)0> > auto edgeLambda(F &f, node, node v, edgeweight ew, edgeid ) const -> decltype(f(v, ew)) { > return f(v, ew); > } > > > > > > template <class F, void * = (void *)0> > auto edgeLambda(F &f, node, node v, edgeweight, edgeid) const -> decltype(f(v)) { > return f(v); > } > > > > > template <class F> > auto callBFSHandle(F &f, node u, count dist) const -> decltype(f(u, dist)) { > return f(u, dist); > } > > > > > template <class F> > auto callBFSHandle(F &f, node u, count) const -> decltype(f(u)) { > return f(u); > } > >public: > > > > class NodeIterator { > > const Graph *G; > node u; > > public: > > > using value_type = node; > > > using reference = value_type &; > > > using pointer = value_type *; > > > using iterator_category = std::forward_iterator_tag; > > > > using difference_type = ptrdiff_t; > > > using self = NodeIterator; > > NodeIterator(const Graph *G, node u) : G(G), u(u) { > if (!G->hasNode(u) && u < G->upperNodeIdBound()) { > ++(*this); > } > } > > > > > > NodeIterator() : G(nullptr) {} > > ~NodeIterator() = default; > > NodeIterator &operator++() { > ># 839 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 839 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > u < G->upperNodeIdBound() ># 839 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 839 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "u < G->upperNodeIdBound()" ># 839 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 839, __extension__ __PRETTY_FUNCTION__)) ># 839 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > do { > ++u; > } while (!(G->hasNode(u) || u >= G->upperNodeIdBound())); > return *this; > } > > NodeIterator operator++(int) { > const auto tmp = *this; > ++(*this); > return tmp; > } > > NodeIterator operator--() { > ># 853 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 853 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > u ># 853 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 853 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "u" ># 853 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 853, __extension__ __PRETTY_FUNCTION__)) ># 853 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > do { > --u; > } while (!G->hasNode(u)); > return *this; > } > > NodeIterator operator--(int) { > const auto tmp = *this; > --(*this); > return tmp; > } > > bool operator==(const NodeIterator &rhs) const noexcept { return u == rhs.u; } > > bool operator!=(const NodeIterator &rhs) const noexcept { return !(*this == rhs); } > > node operator*() const noexcept { > ># 871 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 871 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > u < G->upperNodeIdBound() ># 871 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 871 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "u < G->upperNodeIdBound()" ># 871 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 871, __extension__ __PRETTY_FUNCTION__)) ># 871 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return u; > } > }; > > > > > class NodeRange { > > const Graph *G; > > public: > NodeRange(const Graph &G) : G(&G) {} > > NodeRange() : G(nullptr){}; > > ~NodeRange() = default; > > NodeIterator begin() const noexcept { > ># 891 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 891 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 891 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 891 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 891 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 891, __extension__ __PRETTY_FUNCTION__)) ># 891 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return NodeIterator(G, node{0}); > } > > NodeIterator end() const noexcept { > ># 896 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 896 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 896 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 896 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 896 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 896, __extension__ __PRETTY_FUNCTION__)) ># 896 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return NodeIterator(G, G->upperNodeIdBound()); > } > }; > > > class EdgeIterator; > class EdgeWeightIterator; > > class EdgeIteratorBase { > friend class EdgeIterator; > friend class EdgeWeightIterator; > > const Graph *G; > NodeIterator nodeIter; > index i; > > bool validEdge() const noexcept { > return G->isDirected() || (*nodeIter <= G->outEdges[*nodeIter][i]); > } > > void nextEdge() { > do { > if (++i >= G->degree(*nodeIter)) { > i = 0; > do { > ># 922 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 922 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > nodeIter != G->nodeRange().end() ># 922 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 922 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "nodeIter != G->nodeRange().end()" ># 922 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 922, __extension__ __PRETTY_FUNCTION__)) ># 922 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > ++nodeIter; > if (nodeIter == G->nodeRange().end()) { > return; > } > } while (!G->degree(*nodeIter)); > } > } while (!validEdge()); > } > > void prevEdge() { > do { > if (!i) { > do { > ># 936 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 936 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > nodeIter != G->nodeRange().begin() ># 936 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 936 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "nodeIter != G->nodeRange().begin()" ># 936 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 936, __extension__ __PRETTY_FUNCTION__)) ># 936 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > --nodeIter; > } while (!G->degree(*nodeIter)); > > i = G->degree(*nodeIter); > } > --i; > } while (!validEdge()); > } > > EdgeIteratorBase(const Graph *G, NodeIterator nodeIter) > : G(G), nodeIter(nodeIter), i(index{0}) { > if (nodeIter != G->nodeRange().end() && !G->degree(*nodeIter)) { > nextEdge(); > } > } > > > > > > EdgeIteratorBase() : G(nullptr) {} > > virtual ~EdgeIteratorBase() = default; > > bool operator==(const EdgeIteratorBase &rhs) const noexcept { > return nodeIter == rhs.nodeIter && i == rhs.i; > } > > bool operator!=(const EdgeIteratorBase &rhs) const noexcept { return !(*this == rhs); } > }; > > > > > > class EdgeIterator : public EdgeIteratorBase { > > public: > > using value_type = Edge; > > > using reference = value_type &; > > > using pointer = value_type *; > > > using iterator_category = std::forward_iterator_tag; > > > > using difference_type = ptrdiff_t; > > > using self = EdgeIterator; > > EdgeIterator(const Graph *G, NodeIterator nodeIter) : EdgeIteratorBase(G, nodeIter) {} > > EdgeIterator() : EdgeIteratorBase() {} > > bool operator==(const EdgeIterator &rhs) const noexcept { > return this->EdgeIteratorBase::operator==(static_cast<EdgeIteratorBase>(rhs)); > } > > bool operator!=(const EdgeIterator &rhs) const noexcept { return !(*this == rhs); } > > Edge operator*() const noexcept { > ># 1005 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1005 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > nodeIter != G->nodeRange().end() ># 1005 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1005 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "nodeIter != G->nodeRange().end()" ># 1005 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1005, __extension__ __PRETTY_FUNCTION__)) ># 1005 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return Edge(*nodeIter, G->outEdges[*nodeIter][i]); > } > > EdgeIterator &operator++() { > nextEdge(); > return *this; > } > > EdgeIterator operator++(int) { > const auto tmp = *this; > ++(*this); > return tmp; > } > > EdgeIterator operator--() { > prevEdge(); > return *this; > } > > EdgeIterator operator--(int) { > const auto tmp = *this; > --(*this); > return tmp; > } > }; > > > > > > class EdgeWeightIterator : public EdgeIteratorBase { > public: > > > using value_type = WeightedEdge; > > > using reference = value_type &; > > > using pointer = value_type *; > > > using iterator_category = std::forward_iterator_tag; > > > > using difference_type = ptrdiff_t; > > > using self = EdgeWeightIterator; > > EdgeWeightIterator(const Graph *G, NodeIterator nodeIter) : EdgeIteratorBase(G, nodeIter) {} > > > > > > EdgeWeightIterator() : EdgeIteratorBase() {} > > bool operator==(const EdgeWeightIterator &rhs) const noexcept { > return this->EdgeIteratorBase::operator==(static_cast<EdgeIteratorBase>(rhs)); > } > > bool operator!=(const EdgeWeightIterator &rhs) const noexcept { return !(*this == rhs); } > > EdgeWeightIterator &operator++() { > nextEdge(); > return *this; > } > > EdgeWeightIterator operator++(int) { > const auto tmp = *this; > ++(*this); > return tmp; > } > > EdgeWeightIterator operator--() { > prevEdge(); > return *this; > } > > EdgeWeightIterator operator--(int) { > const auto tmp = *this; > --(*this); > return tmp; > } > > WeightedEdge operator*() const noexcept { > ># 1095 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1095 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > nodeIter != G->nodeRange().end() ># 1095 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1095 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "nodeIter != G->nodeRange().end()" ># 1095 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1095, __extension__ __PRETTY_FUNCTION__)) ># 1095 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return WeightedEdge(*nodeIter, G->outEdges[*nodeIter][i], > G->isWeighted() ? G->outEdgeWeights[*nodeIter][i] : 1); > } > }; > > > > > class EdgeRange { > > const Graph *G; > > public: > EdgeRange(const Graph &G) : G(&G) {} > > EdgeRange() : G(nullptr){}; > > ~EdgeRange() = default; > > EdgeIterator begin() const { > ># 1116 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1116 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 1116 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1116 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 1116 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1116, __extension__ __PRETTY_FUNCTION__)) ># 1116 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return EdgeIterator(G, G->nodeRange().begin()); > } > > EdgeIterator end() const { > ># 1121 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1121 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 1121 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1121 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 1121 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1121, __extension__ __PRETTY_FUNCTION__)) ># 1121 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return EdgeIterator(G, G->nodeRange().end()); > } > }; > > > > > class EdgeWeightRange { > > const Graph *G; > > public: > EdgeWeightRange(const Graph &G) : G(&G) {} > > EdgeWeightRange() : G(nullptr){}; > > ~EdgeWeightRange() = default; > > EdgeWeightIterator begin() const { > ># 1141 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1141 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 1141 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1141 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 1141 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1141, __extension__ __PRETTY_FUNCTION__)) ># 1141 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return EdgeWeightIterator(G, G->nodeRange().begin()); > } > > EdgeWeightIterator end() const { > ># 1146 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1146 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 1146 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1146 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 1146 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1146, __extension__ __PRETTY_FUNCTION__)) ># 1146 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return EdgeWeightIterator(G, G->nodeRange().end()); > } > }; > > > > > class NeighborIterator { > > std::vector<node>::const_iterator nIter; > > public: > > > using value_type = node; > > > using reference = value_type &; > > > using pointer = value_type *; > > > using iterator_category = std::forward_iterator_tag; > > > > using difference_type = ptrdiff_t; > > > using self = NeighborIterator; > > NeighborIterator(std::vector<node>::const_iterator nodesIter) : nIter(nodesIter) {} > > > > > > NeighborIterator() {} > > NeighborIterator &operator++() { > ++nIter; > return *this; > } > > NeighborIterator operator++(int) { > const auto tmp = *this; > ++nIter; > return tmp; > } > > NeighborIterator operator--() { > const auto tmp = *this; > --nIter; > return tmp; > } > > NeighborIterator operator--(int) { > --nIter; > return *this; > } > > bool operator==(const NeighborIterator &rhs) const { return nIter == rhs.nIter; } > > bool operator!=(const NeighborIterator &rhs) const { return !(nIter == rhs.nIter); } > > node operator*() const { return *nIter; } > }; > > > > > > class NeighborWeightIterator { > > std::vector<node>::const_iterator nIter; > std::vector<edgeweight>::const_iterator wIter; > > public: > > > using value_type = std::pair<node, edgeweight>; > > > using reference = value_type &; > > > using pointer = value_type *; > > > using iterator_category = std::forward_iterator_tag; > > > > using difference_type = ptrdiff_t; > > > using self = NeighborWeightIterator; > > NeighborWeightIterator(std::vector<node>::const_iterator nodesIter, > std::vector<edgeweight>::const_iterator weightIter) > : nIter(nodesIter), wIter(weightIter) {} > > > > > > NeighborWeightIterator() {} > > NeighborWeightIterator &operator++() { > ++nIter; > ++wIter; > return *this; > } > > NeighborWeightIterator operator++(int) { > const auto tmp = *this; > ++(*this); > return tmp; > } > > NeighborWeightIterator operator--() { > --nIter; > --wIter; > return *this; > } > > NeighborWeightIterator operator--(int) { > const auto tmp = *this; > --(*this); > return tmp; > } > > bool operator==(const NeighborWeightIterator &rhs) const { > return nIter == rhs.nIter && wIter == rhs.wIter; > } > > bool operator!=(const NeighborWeightIterator &rhs) const { return !(*this == rhs); } > > std::pair<node, edgeweight> operator*() const { return std::make_pair(*nIter, *wIter); } > }; > > > > > > template <bool InEdges = false> > class NeighborRange { > const Graph *G; > node u; > > public: > NeighborRange(const Graph &G, node u) : G(&G), u(u) { ># 1299 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1299 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G.hasNode(u) ># 1299 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1299 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G.hasNode(u)" ># 1299 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1299, __extension__ __PRETTY_FUNCTION__)) ># 1299 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; }; > > NeighborRange() : G(nullptr){}; > > NeighborIterator begin() const { > ># 1304 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1304 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 1304 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1304 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 1304 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1304, __extension__ __PRETTY_FUNCTION__)) ># 1304 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return InEdges ? NeighborIterator(G->inEdges[u].begin()) > : NeighborIterator(G->outEdges[u].begin()); > } > > NeighborIterator end() const { > ># 1310 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1310 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 1310 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1310 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 1310 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1310, __extension__ __PRETTY_FUNCTION__)) ># 1310 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return InEdges ? NeighborIterator(G->inEdges[u].end()) > : NeighborIterator(G->outEdges[u].end()); > } > }; > > using OutNeighborRange = NeighborRange<false>; > > using InNeighborRange = NeighborRange<true>; > > > > > > template <bool InEdges = false> > class NeighborWeightRange { > > const Graph *G; > node u; > > public: > NeighborWeightRange(const Graph &G, node u) : G(&G), u(u) { ># 1331 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1331 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G.hasNode(u) ># 1331 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1331 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G.hasNode(u)" ># 1331 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1331, __extension__ __PRETTY_FUNCTION__)) ># 1331 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; }; > > NeighborWeightRange() : G(nullptr){}; > > NeighborWeightIterator begin() const { > ># 1336 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1336 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 1336 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1336 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 1336 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1336, __extension__ __PRETTY_FUNCTION__)) ># 1336 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return InEdges > ? NeighborWeightIterator(G->inEdges[u].begin(), G->inEdgeWeights[u].begin()) > : NeighborWeightIterator(G->outEdges[u].begin(), > G->outEdgeWeights[u].begin()); > } > > NeighborWeightIterator end() const { > ># 1344 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1344 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > G ># 1344 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1344 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "G" ># 1344 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1344, __extension__ __PRETTY_FUNCTION__)) ># 1344 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return InEdges > ? NeighborWeightIterator(G->inEdges[u].end(), G->inEdgeWeights[u].end()) > : NeighborWeightIterator(G->outEdges[u].end(), G->outEdgeWeights[u].end()); > } > }; > > using OutNeighborWeightRange = NeighborWeightRange<false>; > > using InNeighborWeightRange = NeighborWeightRange<true>; ># 1364 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > Graph(count n = 0, bool weighted = false, bool directed = false, bool edgesIndexed = false); > > Graph(const Graph &G, bool weighted, bool directed, bool edgesIndexed = false); > > > > > > > > Graph(std::initializer_list<WeightedEdge> edges); > > > > > > Graph(const Graph &other) = default; > > > Graph(Graph &&other) noexcept = default; > > > ~Graph() = default; > > > Graph &operator=(Graph &&other) noexcept = default; > > > Graph &operator=(const Graph &other) = default; ># 1403 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void preallocateUndirected(node u, size_t size); ># 1415 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void preallocateDirected(node u, size_t outSize, size_t inSize); ># 1426 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void preallocateDirectedOutEdges(node u, size_t outSize); ># 1437 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void preallocateDirectedInEdges(node u, size_t inSize); ># 1447 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void indexEdges(bool force = false); > > > > > > > bool hasEdgeIds() const noexcept { return edgesIndexed; } > > > > > edgeid edgeId(node u, node v) const; > > > > > > index upperEdgeIdBound() const noexcept { return omega; } ># 1474 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void shrinkToFit(); > > > > > > void compactEdges(); > > > > > > void sortEdges(); > > > > > > > > template <class Lambda> > void sortEdges(Lambda lambda); > > > > > > void setEdgeCount(Unsafe, count edges) { m = edges; } > > > > > > > void setUpperEdgeIdBound(Unsafe, edgeid newBound) { omega = newBound; } > > > > > > > void setNumberOfSelfLoops(Unsafe, count loops) { storedNumberOfSelfLoops = loops; } > > > > > > > > node addNode(); > > > > > > > node addNodes(count numberOfNewNodes); ># 1539 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void removeNode(node v); > > > > > > > > void removePartialOutEdges(Unsafe, node u) { > ># 1548 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1548 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > hasNode(u) ># 1548 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1548 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "hasNode(u)" ># 1548 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1548, __extension__ __PRETTY_FUNCTION__)) ># 1548 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > outEdges[u].clear(); > if (isWeighted()) { > outEdgeWeights[u].clear(); > } > if (hasEdgeIds()) { > outEdgeIds[u].clear(); > } > } > > > > > > > > void removePartialInEdges(Unsafe, node u) { > ># 1565 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1565 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > hasNode(u) ># 1565 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1565 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "hasNode(u)" ># 1565 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1565, __extension__ __PRETTY_FUNCTION__)) ># 1565 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > inEdges[u].clear(); > if (isWeighted()) { > inEdgeWeights[u].clear(); > } > if (hasEdgeIds()) { > inEdgeIds[u].clear(); > } > } ># 1582 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > bool hasNode(node v) const noexcept { return (v < z) && this->exists[v]; } ># 1592 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void restoreNode(node v); ># 1602 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > count degree(node v) const { return outEdges[v].size(); } ># 1611 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > count degreeIn(node v) const { return directed ? inEdges[v].size() : outEdges[v].size(); } > > > > > > > > count degreeOut(node v) const { return outEdges[v].size(); } > > > > > > > bool isIsolated(node v) const { > if (!exists[v]) > throw std::runtime_error("Error, the node does not exist!"); > return outEdges[v].empty() && (!directed || inEdges[v].empty()); > } ># 1640 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > edgeweight weightedDegree(node u, bool countSelfLoopsTwice = false) const; ># 1650 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > edgeweight weightedDegreeIn(node u, bool countSelfLoopsTwice = false) const; ># 1669 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > bool addEdge(node u, node v, edgeweight ew = defaultEdgeWeight, bool checkMultiEdge = false); ># 1688 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > bool addPartialEdge(Unsafe, node u, node v, edgeweight ew = defaultEdgeWeight, > uint64_t index = 0, bool checkForMultiEdges = false); ># 1707 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > bool addPartialInEdge(Unsafe, node u, node v, edgeweight ew = defaultEdgeWeight, > uint64_t index = 0, bool checkForMultiEdges = false); ># 1726 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > bool addPartialOutEdge(Unsafe, node u, node v, edgeweight ew = defaultEdgeWeight, > uint64_t index = 0, bool checkForMultiEdges = false); > > > > > > > void removeEdge(node u, node v); > > > > > void removeAllEdges(); ># 1751 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename Condition> > std::pair<count, count> removeAdjacentEdges(node u, Condition condition, bool edgesIn = false); > > > > > void removeSelfLoops(); > > > > > void removeMultiEdges(); ># 1778 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void swapEdge(node s1, node t1, node s2, node t2); ># 1787 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > bool hasEdge(node u, node v) const noexcept; ># 1797 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > bool isWeighted() const noexcept { return weighted; } > > > > > > bool isDirected() const noexcept { return directed; } > > > > > > bool isEmpty() const noexcept { return !n; } > > > > > > count numberOfNodes() const noexcept { return n; } > > > > > > count numberOfEdges() const noexcept { return m; } > > > > > > > > count numberOfSelfLoops() const noexcept { return storedNumberOfSelfLoops; } > > > > > > index upperNodeIdBound() const noexcept { return z; } > > > > > > bool checkConsistency() const; ># 1850 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void timeStep() { > ::Aux::Log::log({"../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", __PRETTY_FUNCTION__, 1851}, ::Aux::Log::LogLevel::WARN, "Graph::timeStep should not be used and will be deprecated in the future."); > t++; > } > > > > > > > > count time() { > ::Aux::Log::log({"../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", __PRETTY_FUNCTION__, 1862}, ::Aux::Log::LogLevel::WARN, "Graph::time should not be used and will be deprecated in the future."); > return t; > } ># 1874 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > edgeweight weight(node u, node v) const; ># 1884 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void setWeight(node u, node v, edgeweight ew); ># 1893 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void setWeightAtIthNeighbor(Unsafe, node u, index i, edgeweight ew); ># 1903 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > void increaseWeight(node u, node v, edgeweight ew); > > > > > > > > edgeweight totalEdgeWeight() const noexcept; > > > > > > > NodeRange nodeRange() const noexcept { return NodeRange(*this); } > > > > > > > EdgeRange edgeRange() const noexcept { return EdgeRange(*this); } > > > > > > > EdgeWeightRange edgeWeightRange() const noexcept { return EdgeWeightRange(*this); } > > > > > > > > NeighborRange<false> neighborRange(node u) const { > ># 1941 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1941 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > exists[u] ># 1941 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1941 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "exists[u]" ># 1941 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1941, __extension__ __PRETTY_FUNCTION__)) ># 1941 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return NeighborRange<false>(*this, u); > } ># 1953 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > NeighborWeightRange<false> weightNeighborRange(node u) const { > ># 1954 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1954 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > isWeighted() ># 1954 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1954 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "isWeighted()" ># 1954 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1954, __extension__ __PRETTY_FUNCTION__)) ># 1954 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > ># 1955 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1955 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > exists[u] ># 1955 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1955 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "exists[u]" ># 1955 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1955, __extension__ __PRETTY_FUNCTION__)) ># 1955 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return NeighborWeightRange<false>(*this, u); > } > > > > > > > > NeighborRange<true> inNeighborRange(node u) const { > ># 1966 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1966 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > isDirected() ># 1966 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1966 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "isDirected()" ># 1966 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1966, __extension__ __PRETTY_FUNCTION__)) ># 1966 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > ># 1967 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1967 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > exists[u] ># 1967 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1967 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "exists[u]" ># 1967 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1967, __extension__ __PRETTY_FUNCTION__)) ># 1967 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return NeighborRange<true>(*this, u); > } ># 1979 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > NeighborWeightRange<true> weightInNeighborRange(node u) const { > ># 1980 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1980 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > isDirected() && isWeighted() ># 1980 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1980 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "isDirected() && isWeighted()" ># 1980 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1980, __extension__ __PRETTY_FUNCTION__)) ># 1980 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > ># 1981 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 1981 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > exists[u] ># 1981 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 1981 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "exists[u]" ># 1981 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 1981, __extension__ __PRETTY_FUNCTION__)) ># 1981 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > return NeighborWeightRange<true>(*this, u); > } ># 1992 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > index indexOfNeighbor(node u, node v) const { return indexInOutEdgeArray(u, v); } ># 2002 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > node getIthNeighbor(node u, index i) const { > if (!hasNode(u) || i >= outEdges[u].size()) > return none; > return outEdges[u][i]; > } ># 2016 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > edgeweight getIthNeighborWeight(node u, index i) const { > if (!hasNode(u) || i >= outEdges[u].size()) > return nullWeight; > return isWeighted() ? outEdgeWeights[u][i] : defaultEdgeWeight; > } ># 2030 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > std::pair<node, edgeweight> getIthNeighborWithWeight(node u, index i) const { > if (!hasNode(u) || i >= outEdges[u].size()) > return {none, none}; > return getIthNeighborWithWeight(unsafe, u, i); > } ># 2044 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > std::pair<node, edgeweight> getIthNeighborWithWeight(Unsafe, node u, index i) const { > if (!isWeighted()) > return {outEdges[u][i], defaultEdgeWeight}; > return {outEdges[u][i], outEdgeWeights[u][i]}; > } ># 2058 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > std::pair<node, edgeid> getIthNeighborWithId(node u, index i) const { > ># 2059 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > (static_cast <bool> ( ># 2059 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > hasEdgeIds() ># 2059 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 2059 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > "hasEdgeIds()" ># 2059 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp", 2059, __extension__ __PRETTY_FUNCTION__)) ># 2059 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > ; > if (!hasNode(u) || i >= outEdges[u].size()) > return {none, none}; > return {outEdges[u][i], outEdgeIds[u][i]}; > } ># 2073 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename L> > void forNodes(L handle) const; > > > > > > > > template <typename L> > void parallelForNodes(L handle) const; ># 2092 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename C, typename L> > void forNodesWhile(C condition, L handle) const; > > > > > > > > template <typename L> > void forNodesInRandomOrder(L handle) const; ># 2111 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename L> > void balancedParallelForNodes(L handle) const; > > > > > > > > template <typename L> > void forNodePairs(L handle) const; > > > > > > > > template <typename L> > void parallelForNodePairs(L handle) const; ># 2142 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename L> > void forEdges(L handle) const; ># 2153 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename L> > void parallelForEdges(L handle) const; ># 2169 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename L> > void forNeighborsOf(node u, L handle) const; ># 2184 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename L> > void forEdgesOf(node u, L handle) const; > > > > > > template <typename L> > void forInNeighborsOf(node u, L handle) const; ># 2202 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/Graph.hpp" > template <typename L> > void forInEdgesOf(node u, L handle) const; > > > > > > > > template <typename L> > double parallelSumForNodes(L handle) const; > > > > > > template <typename L> > double parallelSumForEdges(L handle) const; >}; > > > >template <typename L> >void Graph::forNodes(L handle) const { > for (node v = 0; v < z; ++v) { > if (exists[v]) { > handle(v); > } > } >} > >template <typename L> >void Graph::parallelForNodes(L handle) const { >#pragma omp parallel for > for (omp_index v = 0; v < static_cast<omp_index>(z); ++v) { > if (exists[v]) { > handle(v); > } > } >} > >template <typename C, typename L> >void Graph::forNodesWhile(C condition, L handle) const { > for (node v = 0; v < z; ++v) { > if (exists[v]) { > if (!condition()) { > break; > } > handle(v); > } > } >} > >template <typename L> >void Graph::forNodesInRandomOrder(L handle) const { > std::vector<node> randVec; > randVec.reserve(numberOfNodes()); > forNodes([&](node u) { randVec.push_back(u); }); > std::shuffle(randVec.begin(), randVec.end(), Aux::Random::getURNG()); > for (node v : randVec) { > handle(v); > } >} > >template <typename L> >void Graph::balancedParallelForNodes(L handle) const { > >#pragma omp parallel for schedule(guided) > for (omp_index v = 0; v < static_cast<omp_index>(z); ++v) { > if (exists[v]) { > handle(v); > } > } >} > >template <typename L> >void Graph::forNodePairs(L handle) const { > for (node u = 0; u < z; ++u) { > if (exists[u]) { > for (node v = u + 1; v < z; ++v) { > if (exists[v]) { > handle(u, v); > } > } > } > } >} > >template <typename L> >void Graph::parallelForNodePairs(L handle) const { >#pragma omp parallel for schedule(guided) > for (omp_index u = 0; u < static_cast<omp_index>(z); ++u) { > if (exists[u]) { > for (node v = u + 1; v < z; ++v) { > if (exists[v]) { > handle(u, v); > } > } > } > } >} > > > > > >template <typename T> >void erase(node u, index idx, std::vector<std::vector<T>> &vec); > >template <bool hasWeights> >inline edgeweight Graph::getOutEdgeWeight(node u, index i) const { > return outEdgeWeights[u][i]; >} > > >template <> >inline edgeweight Graph::getOutEdgeWeight<false>(node, index) const { > return defaultEdgeWeight; >} > > >template <bool hasWeights> >inline edgeweight Graph::getInEdgeWeight(node u, index i) const { > return inEdgeWeights[u][i]; >} > > >template <> >inline edgeweight Graph::getInEdgeWeight<false>(node, index) const { > return defaultEdgeWeight; >} > > >template <bool graphHasEdgeIds> >inline edgeid Graph::getOutEdgeId(node u, index i) const { > return outEdgeIds[u][i]; >} > > >template <> >inline edgeid Graph::getOutEdgeId<false>(node, index) const { > return none; >} > > >template <bool graphHasEdgeIds> >inline edgeid Graph::getInEdgeId(node u, index i) const { > return inEdgeIds[u][i]; >} > > >template <> >inline edgeid Graph::getInEdgeId<false>(node, index) const { > return none; >} > > >template <bool graphIsDirected> >inline bool Graph::useEdgeInIteration(node , node ) const { > return true; >} > > >template <> >inline bool Graph::useEdgeInIteration<false>(node u, node v) const { > return u >= v; >} > >template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> >inline void Graph::forOutEdgesOfImpl(node u, L handle) const { > for (index i = 0; i < outEdges[u].size(); ++i) { > node v = outEdges[u][i]; > > if (useEdgeInIteration<graphIsDirected>(u, v)) { > edgeLambda<L>(handle, u, v, getOutEdgeWeight<hasWeights>(u, i), > getOutEdgeId<graphHasEdgeIds>(u, i)); > } > } >} > >template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> >inline void Graph::forInEdgesOfImpl(node u, L handle) const { > if (graphIsDirected) { > for (index i = 0; i < inEdges[u].size(); i++) { > node v = inEdges[u][i]; > > if (useEdgeInIteration<true>(u, v)) { > edgeLambda<L>(handle, u, v, getInEdgeWeight<hasWeights>(u, i), > getInEdgeId<graphHasEdgeIds>(u, i)); > } > } > } else { > for (index i = 0; i < outEdges[u].size(); ++i) { > node v = outEdges[u][i]; > > if (useEdgeInIteration<true>(u, v)) { > edgeLambda<L>(handle, u, v, getOutEdgeWeight<hasWeights>(u, i), > getOutEdgeId<graphHasEdgeIds>(u, i)); > } > } > } >} > >template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> >inline void Graph::forEdgeImpl(L handle) const { > for (node u = 0; u < z; ++u) { > forOutEdgesOfImpl<graphIsDirected, hasWeights, graphHasEdgeIds, L>(u, handle); > } >} > >template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> >inline void Graph::parallelForEdgesImpl(L handle) const { >#pragma omp parallel for schedule(guided) > for (omp_index u = 0; u < static_cast<omp_index>(z); ++u) { > forOutEdgesOfImpl<graphIsDirected, hasWeights, graphHasEdgeIds, L>(u, handle); > } >} > >template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L> >inline double Graph::parallelSumForEdgesImpl(L handle) const { > double sum = 0.0; > >#pragma omp parallel for reduction(+ : sum) > for (omp_index u = 0; u < static_cast<omp_index>(z); ++u) { > for (index i = 0; i < outEdges[u].size(); ++i) { > node v = outEdges[u][i]; > > > > if (useEdgeInIteration<graphIsDirected>(u, v)) { > sum += edgeLambda<L>(handle, u, v, getOutEdgeWeight<hasWeights>(u, i), > getOutEdgeId<graphHasEdgeIds>(u, i)); > } > } > } > > return sum; >} > >template <typename L> >void Graph::forEdges(L handle) const { > switch (weighted + 2 * directed + 4 * edgesIndexed) { > case 0: > forEdgeImpl<false, false, false, L>(handle); > break; > > case 1: > forEdgeImpl<false, true, false, L>(handle); > break; > > case 2: > forEdgeImpl<true, false, false, L>(handle); > break; > > case 3: > forEdgeImpl<true, true, false, L>(handle); > break; > > case 4: > forEdgeImpl<false, false, true, L>(handle); > break; > > case 5: > forEdgeImpl<false, true, true, L>(handle); > break; > > case 6: > forEdgeImpl<true, false, true, L>(handle); > break; > > case 7: > forEdgeImpl<true, true, true, L>(handle); > break; > } >} > >template <typename L> >void Graph::parallelForEdges(L handle) const { > switch (weighted + 2 * directed + 4 * edgesIndexed) { > case 0: > parallelForEdgesImpl<false, false, false, L>(handle); > break; > > case 1: > parallelForEdgesImpl<false, true, false, L>(handle); > break; > > case 2: > parallelForEdgesImpl<true, false, false, L>(handle); > break; > > case 3: > parallelForEdgesImpl<true, true, false, L>(handle); > break; > > case 4: > parallelForEdgesImpl<false, false, true, L>(handle); > break; > > case 5: > parallelForEdgesImpl<false, true, true, L>(handle); > break; > > case 6: > parallelForEdgesImpl<true, false, true, L>(handle); > break; > > case 7: > parallelForEdgesImpl<true, true, true, L>(handle); > break; > } >} > > > >template <typename L> >void Graph::forNeighborsOf(node u, L handle) const { > forEdgesOf(u, handle); >} > >template <typename L> >void Graph::forEdgesOf(node u, L handle) const { > switch (weighted + 2 * edgesIndexed) { > case 0: > forOutEdgesOfImpl<true, false, false, L>(u, handle); > break; > > case 1: > forOutEdgesOfImpl<true, true, false, L>(u, handle); > break; > > case 2: > forOutEdgesOfImpl<true, false, true, L>(u, handle); > break; > > case 3: > forOutEdgesOfImpl<true, true, true, L>(u, handle); > break; > } >} > >template <typename L> >void Graph::forInNeighborsOf(node u, L handle) const { > forInEdgesOf(u, handle); >} > >template <typename L> >void Graph::forInEdgesOf(node u, L handle) const { > switch (weighted + 2 * directed + 4 * edgesIndexed) { > case 0: > forInEdgesOfImpl<false, false, false, L>(u, handle); > break; > > case 1: > forInEdgesOfImpl<false, true, false, L>(u, handle); > break; > > case 2: > forInEdgesOfImpl<true, false, false, L>(u, handle); > break; > > case 3: > forInEdgesOfImpl<true, true, false, L>(u, handle); > break; > > case 4: > forInEdgesOfImpl<false, false, true, L>(u, handle); > break; > > case 5: > forInEdgesOfImpl<false, true, true, L>(u, handle); > break; > > case 6: > forInEdgesOfImpl<true, false, true, L>(u, handle); > break; > > case 7: > forInEdgesOfImpl<true, true, true, L>(u, handle); > break; > } >} > > > >template <typename L> >double Graph::parallelSumForNodes(L handle) const { > double sum = 0.0; > >#pragma omp parallel for reduction(+ : sum) > for (omp_index v = 0; v < static_cast<omp_index>(z); ++v) { > if (exists[v]) { > sum += handle(v); > } > } > > return sum; >} > >template <typename L> >double Graph::parallelSumForEdges(L handle) const { > double sum = 0.0; > > switch (weighted + 2 * directed + 4 * edgesIndexed) { > case 0: > sum = parallelSumForEdgesImpl<false, false, false, L>(handle); > break; > > case 1: > sum = parallelSumForEdgesImpl<false, true, false, L>(handle); > break; > > case 2: > sum = parallelSumForEdgesImpl<true, false, false, L>(handle); > break; > > case 3: > sum = parallelSumForEdgesImpl<true, true, false, L>(handle); > break; > > case 4: > sum = parallelSumForEdgesImpl<false, false, true, L>(handle); > break; > > case 5: > sum = parallelSumForEdgesImpl<false, true, true, L>(handle); > break; > > case 6: > sum = parallelSumForEdgesImpl<true, false, true, L>(handle); > break; > > case 7: > sum = parallelSumForEdgesImpl<true, true, true, L>(handle); > break; > } > > return sum; >} > > > >template <typename Condition> >std::pair<count, count> Graph::removeAdjacentEdges(node u, Condition condition, bool edgesIn) { > count removedEdges = 0; > count removedSelfLoops = 0; > > > > auto &edges_ = edgesIn ? inEdges[u] : outEdges[u]; > for (index vi = 0; vi < edges_.size();) { > if (condition(edges_[vi])) { > const auto isSelfLoop = (edges_[vi] == u); > removedSelfLoops += isSelfLoop; > removedEdges += !isSelfLoop; > edges_[vi] = edges_.back(); > edges_.pop_back(); > if (isWeighted()) { > auto &weights_ = edgesIn ? inEdgeWeights[u] : outEdgeWeights[u]; > weights_[vi] = weights_.back(); > weights_.pop_back(); > } > if (hasEdgeIds()) { > auto &edgeIds_ = edgesIn ? inEdgeIds[u] : outEdgeIds[u]; > edgeIds_[vi] = edgeIds_.back(); > edgeIds_.pop_back(); > } > } else { > ++vi; > } > } > > return {removedEdges, removedSelfLoops}; >} > >template <class Lambda> >void Graph::sortEdges(Lambda lambda) { > > std::vector<std::vector<index>> indicesGlobal(omp_get_max_threads()); > > const auto sortAdjacencyArrays = [&](node u, std::vector<node> &adjList, > std::vector<edgeweight> &weights, > std::vector<edgeid> &edgeIds) -> void { > auto &indices = indicesGlobal[omp_get_thread_num()]; > if (adjList.size() > indices.size()) > indices.resize(adjList.size()); > > const auto indicesEnd = > indices.begin() > + static_cast< > std::iterator_traits<std::vector<index>::const_iterator>::difference_type>( > adjList.size()); > std::iota(indices.begin(), indicesEnd, 0); > > if (isWeighted()) { > if (hasEdgeIds()) > std::sort(indices.begin(), indicesEnd, [&](auto a, auto b) -> bool { > return lambda(WeightedEdgeWithId{u, adjList[a], weights[a], edgeIds[a]}, > WeightedEdgeWithId{u, adjList[b], weights[b], edgeIds[b]}); > }); > else > std::sort(indices.begin(), indicesEnd, [&](auto a, auto b) -> bool { > return lambda(WeightedEdgeWithId{u, adjList[a], weights[a], 0}, > WeightedEdgeWithId{u, adjList[b], weights[b], 0}); > }); > } else if (hasEdgeIds()) > std::sort(indices.begin(), indicesEnd, [&](auto a, auto b) -> bool { > return lambda(WeightedEdgeWithId{u, adjList[a], defaultEdgeWeight, edgeIds[a]}, > WeightedEdgeWithId{u, adjList[b], defaultEdgeWeight, edgeIds[b]}); > }); > else > std::sort(indices.begin(), indicesEnd, [&](auto a, auto b) -> bool { > return lambda(WeightedEdgeWithId{u, adjList[a], defaultEdgeWeight, 0}, > WeightedEdgeWithId{u, adjList[b], defaultEdgeWeight, 0}); > }); > > Aux::ArrayTools::applyPermutation(adjList.begin(), adjList.end(), indices.begin()); > > if (isWeighted()) > Aux::ArrayTools::applyPermutation(weights.begin(), weights.end(), indices.begin()); > > if (hasEdgeIds()) > Aux::ArrayTools::applyPermutation(edgeIds.begin(), edgeIds.end(), indices.begin()); > }; > > balancedParallelForNodes([&](const node u) { > if (degree(u) < 2) > return; > > std::vector<edgeweight> dummyEdgeWeights; > std::vector<edgeid> dummyEdgeIds; > sortAdjacencyArrays(u, outEdges[u], isWeighted() ? outEdgeWeights[u] : dummyEdgeWeights, > hasEdgeIds() ? outEdgeIds[u] : dummyEdgeIds); > > if (isDirected()) > sortAdjacencyArrays(u, inEdges[u], isWeighted() ? inEdgeWeights[u] : dummyEdgeWeights, > hasEdgeIds() ? inEdgeIds[u] : dummyEdgeIds); > }); >} > >} ># 14 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 2 > > ># 1 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 1 > > > > >namespace dual_graph >{ >namespace GraphSpecification >{ >using ConfigurationSchema::DefineFieldSet; >using ConfigurationSchema::TupleJunction; >using ConfigurationSchema::PropertyTree; > >enum class Id { > K, > Block, > ErdosRenyi, > BarabasiAlbert, > RandomClustered, > EndpointDistribution, > EdgeDensityDistribution >}; > >static inline std::string >spellId(Id id) >{ > switch (id) > { > case Id::K: > return "K"; > > case Id::Block: > return "Block"; > > case Id::ErdosRenyi: > return "Erdos-Renyi"; > > case Id::BarabasiAlbert: > return "Barabasi-Albert"; > > case Id::RandomClustered: > return "Random-Clustered"; > > case Id::EndpointDistribution: > return "Endpoint-Distribution"; > > case Id::EdgeDensityDistribution: > return "Edge-Density-Distribution"; > } > > ># 50 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > throw ># 50 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > FacileException ># 50 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ("../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp", 50) ># 50 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > << "unreachable"; >} > >enum class Engine { > K, > Block, > NetworKit, > Expansion >}; > >static inline std::string >spellEngine(Engine engine) >{ > switch (engine) > { > case Engine::K: > return "K"; > > case Engine::Block: > return "Block"; > > case Engine::NetworKit: > return "NetworKit"; > > case Engine::Expansion: > return "Expansion"; > } > > ># 78 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp", 78) ># 78 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > << "unreachable" << ># 78 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::RequireException::require_sentinel ># 78 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ; >} > >enum class Arity { > none, > nullary, > unary, > binary, > nary >}; > >static inline std::string >spellArity(Arity a) >{ > switch (a) > { > case Arity::none: > return "unassigned"; > > case Arity::nullary: > return "nullary"; > > case Arity::unary: > return "Unary"; > > case Arity::binary: > return "binary"; > > case Arity::nary: > return "nary"; > } > > ># 110 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp", 110) ># 110 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > << "unreachable" << ># 110 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::RequireException::require_sentinel ># 110 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ; >} > >static inline std::string >tagArity(Arity a) >{ > switch (a) > { > case Arity::none: > return "-"; > > case Arity::nullary: > return "0"; > > case Arity::unary: > return "U"; > > case Arity::binary: > return "B"; > > case Arity::nary: > return "N"; > } > > ># 134 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp", 134) ># 134 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > << "unreachable" << ># 134 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::RequireException::require_sentinel ># 134 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ; >} > >inline std::ostream& >operator <<(std::ostream& o, Arity arity) >{ > return o << spellArity(arity); >} > >template<typename GraphConstraints> >class ArityConstraintBase >{ >public: > using Map = std::vector<Arity>; > > struct Composition { > Composition() > { > _ratios.at(Arity::none) = 1.0; > } > > double > at(Arity arity) { return _ratios.at(arity); } > > void > set(Arity arity, double ratio) > { > double current = _ratios.at(arity); > if (ratio > current) { > double delta = (ratio - current); > > ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ( ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > delta <= _ratios.at(Arity::none) ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp", 165) << ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > std::endl ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > << "⢠Condition [" << ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "delta <= _ratios.at(Arity::none)" ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > << "] " << ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > std::endl ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > << "⢠" ># 165 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > << "Cannot allocate an additional " << delta << " to " << spellArity(arity) > << " with only " << _ratios.at(Arity::none) << " unassigned." << ># 166 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::RequireException::require_sentinel ># 166 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ; > > _ratios.at(arity) = ratio; > _ratios.at(Arity::none) -= delta; > } else if (ratio < current) { > double delta = (current - ratio); > > ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ( ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > delta <= _ratios.at(arity) ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp", 173) << ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > std::endl ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > << "⢠Condition [" << ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "delta <= _ratios.at(arity)" ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > << "] " << ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > std::endl ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > << "⢠" ># 173 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > << "Cannot deallocate " << delta << " from " << spellArity(arity) > << " which has only " << _ratios.at(arity) << "." << ># 174 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::RequireException::require_sentinel ># 174 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ; > > _ratios.at(arity) = ratio; > _ratios.at(Arity::none) += delta; > } > } > > private: > EnumerationIndexArray<double, Arity, 4> _ratios; > } > composition; > > void > map(uint32_t id, Arity arity) > { > if (id > point_util::lastOfQuantity(_map.size())) > _map.resize(point_util::quantifyByIndex(id), Arity::none); > > _map.at(id) = arity; > } > >private: > Map _map; >}; > >template<template<typename> class ... Constraints> >class GraphConstraintsBase { >using GraphConstraints = GraphConstraintsBase<Constraints ...>; >using ConstraintSet = TemplateCompositionBase<GraphConstraints, OwnerInterface, Constraints ...>; > >public: > template<unsigned int index> > using ConstraintTypeAt = typename ConstraintSet::ComponentTypeAt<index>; > > > > template<typename ConstraintType> > loan<ConstraintType> > constraint() { return _constraints.template component<ConstraintType>(); } > > template<unsigned int index, typename ConstraintType = typename ConstraintSet::AccessTypeAt<index>> > ConstraintType > constraintAt() { return _constraints.template componentAt<index>(); } > > template<typename ConstraintType> > inline void > setConstraint(ConstraintType constraint) { _constraints.setComponent(std::move(constraint)); } > >private: > ConstraintSet _constraints; >}; > >struct Generator { > Generator(Id id, Engine engine) : > id(id), > engine(engine) > {} > > virtual > ~Generator() = default; > > const Id id; > const Engine engine; >}; > >struct K : > public Generator { > struct Configurable { > uint32_t nodeCount; > uint32_t edgeCount; > > using Fields = decltype(DefineFieldSet(nodeCount, edgeCount))::Type; > Fields fields; > > Configurable() : > edgeCount(0), > fields( ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "nodeCount" ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > nodeCount ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "edgeCount" ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > edgeCount ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 250 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > }; > > > K(handle<Configurable> configurable) : > Generator(Id::K, Engine::K), > _configurable(configurable) > {} > > handle<Configurable> > configurable() const { return _configurable; } > > private: > handle<Configurable> _configurable; >}; > >struct Block : > public Generator { > struct Configurable { > struct Frequencies { > double unaryEdgeDensity; > double binaryEdgeDensity; > double leftBias; > > struct Loopbacks { > double density; > double multiBlockDensity; > > using Fields = decltype(DefineFieldSet(density, multiBlockDensity))::Type; > Fields fields; > > Loopbacks() : > fields( ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "density" ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > density ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "multiBlockDensity" ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > multiBlockDensity ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 283 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > } > loopbacks; > > using Fields = decltype(DefineFieldSet(unaryEdgeDensity, binaryEdgeDensity, leftBias, loopbacks))::Type; > Fields fields; > > Frequencies() : > fields( ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "unaryEdgeDensity" ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > unaryEdgeDensity ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "binaryEdgeDensity" ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > binaryEdgeDensity ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "leftBias" ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > leftBias ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "loopbacks" ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > loopbacks ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 292 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > } > frequencies; > struct Subblocks { > uint32_t nodeCount; > uint32_t subblockCount; > uint32_t maxDepth; > uint32_t maxWidth; > > using Fields = decltype(DefineFieldSet(nodeCount, subblockCount, maxDepth, maxWidth))::Type; > Fields fields; > > Subblocks() : > fields( ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "nodeCount" ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > nodeCount ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "subblockCount" ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > subblockCount ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "maxDepth" ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > maxDepth ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "maxWidth" ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > maxWidth ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 306 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > } > subblocks; > > > > > using Fields = decltype(DefineFieldSet(frequencies, subblocks))::Type; > Fields fields; > > Configurable() : > fields( ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "frequencies" ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > frequencies ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "subblocks" ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > subblocks ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 318 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > }; > > Block(handle<Configurable> configurable) : > Generator(Id::Block, Engine::Block), > _configurable(configurable) > {} > > handle<Configurable> > configurable() const { return _configurable; } > > private: > handle<Configurable> _configurable; >}; > >struct ErdosRenyi : > public Generator { > struct Configurable { > uint32_t nodeCount; > double edgeDensity; > > using Fields = decltype(DefineFieldSet(nodeCount, edgeDensity))::Type; > Fields fields; > > Configurable() : > fields( ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "nodeCount" ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > nodeCount ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "edgeDensity" ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > edgeDensity ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 344 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > }; > > ErdosRenyi(handle<Configurable> configurable) : > Generator(Id::ErdosRenyi, Engine::NetworKit), > _configurable(configurable) > {} > > handle<Configurable> > configurable() const { return _configurable; } > > private: > handle<Configurable> _configurable; >}; > >struct BarabasiAlbert : > public Generator { > struct Configurable { > uint32_t nodeCount; > > using Fields = decltype(DefineFieldSet(nodeCount))::Type; > Fields fields; > > Configurable() : > fields( ># 369 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 369 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "nodeCount" ># 369 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 369 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > nodeCount ># 369 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 369 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > }; > > BarabasiAlbert(handle<Configurable> configurable) : > Generator(Id::BarabasiAlbert, Engine::NetworKit), > _configurable(configurable) > {} > > handle<Configurable> > configurable() const { return _configurable; } > > private: > handle<Configurable> _configurable; >}; > >struct RandomClustered : > public Generator { > struct Configurable { > uint32_t clusterCount; > double intraEdgeDensity; > double interEdgeDensity; > > > using Fields = decltype(DefineFieldSet(clusterCount, intraEdgeDensity, interEdgeDensity))::Type; > Fields fields; > > Configurable() : > fields( ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "clusterCount" ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > clusterCount ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "intraEdgeDensity" ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > intraEdgeDensity ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "interEdgeDensity" ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > interEdgeDensity ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 397 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > }; > > RandomClustered(handle<Configurable> configurable) : > Generator(Id::RandomClustered, Engine::NetworKit), > _configurable(configurable) > {} > > handle<Configurable> > configurable() const { return _configurable; } > > private: > handle<Configurable> _configurable; >}; > >struct EndpointDistribution : > public Generator { > struct Configurable { > struct Domain { > uint32_t vertexTotal; > uint32_t edgeLimit; > > using Fields = decltype(DefineFieldSet(vertexTotal, edgeLimit))::Type; > Fields fields; > > Domain() : > fields( ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "vertexTotal" ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > vertexTotal ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "edgeLimit" ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > edgeLimit ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 424 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > } > domain; > > struct Ratios { > uint32_t newVertex; > uint32_t expansion; > uint32_t gate; > > using Fields = decltype(DefineFieldSet(newVertex, expansion, gate))::Type; > Fields fields; > > Ratios() : > fields( ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "newVertex" ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > newVertex ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "expansion" ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > expansion ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "gate" ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > gate ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 438 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > } > ratios; > > using Fields = typename decltype(DefineFieldSet(domain, ratios))::Type; > Fields fields; > > Configurable() : > fields( ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "domain" ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > domain ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "ratios" ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ratios ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 447 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > }; > > EndpointDistribution(handle<Configurable> configurable) : > Generator(Id::EndpointDistribution, Engine::Expansion), > _configurable(configurable) > {} > > handle<Configurable> > configurable() const { return _configurable; } > > private: > handle<Configurable> _configurable; >}; ># 479 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" >struct EdgeDensityDistribution : > public Generator { > struct Configurable { > struct Domain { > uint32_t vertexTotal; > uint32_t edgeLimit; > > using Fields = decltype(DefineFieldSet(vertexTotal, edgeLimit))::Type; > Fields fields; > > Domain() : > fields( ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "vertexTotal" ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > vertexTotal ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "edgeLimit" ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > edgeLimit ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 490 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > } > domain; > > struct Frontier { > uint32_t root; > uint32_t min; > uint32_t max; > uint32_t decay; > uint32_t span; > > uint32_t expansion; > uint32_t gate; > > using Fields = decltype(DefineFieldSet(root, min, max, decay, span, expansion, gate))::Type; > Fields fields; > > Frontier() : > fields( ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "root" ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > root ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "min" ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > min ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "max" ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > max ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "decay" ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > decay ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "span" ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > span ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "expansion" ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > expansion ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "gate" ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > gate ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 509 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > } > frontier; > > using Fields = typename decltype(DefineFieldSet(domain, frontier))::Type; > Fields fields; > > Configurable() : > fields( ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "domain" ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > domain ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "frontier" ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > frontier ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 518 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > ) > {} > }; > > EdgeDensityDistribution(handle<Configurable> configurable) : > Generator(Id::EdgeDensityDistribution, Engine::Expansion), > _configurable(configurable) > {} > > handle<Configurable> > configurable() const { return _configurable; } > > private: > handle<Configurable> _configurable; >}; > >struct GeneratorFactory { > struct Configurable { > K::Configurable k; > Block::Configurable block; > ErdosRenyi::Configurable erdosRenyi; > BarabasiAlbert::Configurable barabasiAlbert; > RandomClustered::Configurable randomClustered; > EndpointDistribution::Configurable endpointDistribution; > EdgeDensityDistribution::Configurable edgeDensityDistribution; > > using Fields = decltype(DefineFieldSet(k, > block, > erdosRenyi, > barabasiAlbert, > randomClustered, > endpointDistribution, > edgeDensityDistribution))::Type; > Fields fields; > > Configurable() : > fields( ># 554 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 554 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "k" ># 554 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 554 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > k ># 554 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 554 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , > ># 555 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 555 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "block" ># 555 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 555 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > block ># 555 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 555 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , > ># 556 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 556 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "erdosRenyi" ># 556 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 556 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > erdosRenyi ># 556 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 556 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , > ># 557 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 557 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "barabasiAlbert" ># 557 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 557 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > barabasiAlbert ># 557 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 557 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , > ># 558 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 558 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "randomClustered" ># 558 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 558 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > randomClustered ># 558 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 558 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , > ># 559 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 559 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "endpointDistribution" ># 559 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 559 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > endpointDistribution ># 559 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 559 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , > ># 560 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > facile::NamedVariable( ># 560 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > "edgeDensityDistribution" ># 560 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > , ># 560 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > edgeDensityDistribution ># 560 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" 3 > ) ># 560 "../../subprojects/edfst/src/edfst/sim/GraphSpecification.hpp" > , > TupleJunction::one) > {} > }; > > static owner<Generator> > make(handle<Configurable> configurable) > { > struct { > owner<Generator> g; > > void > operator ()(PropertyTree<K::Configurable> k) > { > if (k.isSpecified()) > g = owner<GraphSpecification::K>::make(k.value()); > } > > void > operator ()(PropertyTree<Block::Configurable> block) > { > if (block.isSpecified()) > g = owner<GraphSpecification::Block>::make(block.value()); > } > > void > operator ()(PropertyTree<ErdosRenyi::Configurable> er) > { > if (er.isSpecified()) > g = owner<GraphSpecification::ErdosRenyi>::make(er.value()); > } > > void > operator ()(PropertyTree<BarabasiAlbert::Configurable> ba) > { > if (ba.isSpecified()) > g = owner<GraphSpecification::BarabasiAlbert>::make(ba.value()); > } > > void > operator ()(PropertyTree<RandomClustered::Configurable> rc) > { > if (rc.isSpecified()) > g = owner<GraphSpecification::RandomClustered>::make(rc.value()); > } > > void > operator ()(PropertyTree<EndpointDistribution::Configurable> rc) > { > if (rc.isSpecified()) > g = owner<GraphSpecification::EndpointDistribution>::make(rc.value()); > } > > void > operator ()(PropertyTree<EdgeDensityDistribution::Configurable> rc) > { > if (rc.isSpecified()) > g = owner<GraphSpecification::EdgeDensityDistribution>::make(rc.value()); > } > } > factory; > > configurable->fields.constDispatch(factory); > return std::move(factory.g); > } >}; >} >} ># 17 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 2 > >namespace dual_graph >{ >namespace EdgeStream >{ > >struct IEdgeStreamPoint { > using IEdgeStreamPointTag = IEdgeStreamPoint; > using Id = uint32_t; > > virtual ~IEdgeStreamPoint() {} > > virtual Id > id() const = 0; > > > static Id > index(const IEdgeStreamPoint& e) { return e.id(); } >}; > >class IdEndpoint : > public IEdgeStreamPoint >{ >public: > using Id = uint32_t; > > IdEndpoint(Id id = 0) : > _id(id) > {} > > inline Id > id() const override { return _id; } > > > > > void > clear() { _id = 0; } > > bool > operator ==(const IdEndpoint& other) const { return _id == other._id; } > > bool > operator !=(const IdEndpoint& other) const { return _id != other._id; } > > friend std::ostream& > operator <<(std::ostream& o, const IdEndpoint& e) { return o << e._id; } > > friend std::istream& > operator >>(std::istream& i, IdEndpoint& e) { return i >> e._id; } > >private: > Id _id; >}; > >template<typename tPoint> >class EdgeEndpointBase { >using EdgeEndpoint = EdgeEndpointBase<tPoint>; > >compliance<typename IEdgeStreamPoint::IEdgeStreamPointTag, tPoint> checkEdgeStreamPoint; > >public: > using Id = typename tPoint::Id; > using Atom = tPoint; > > EdgeEndpointBase() : > _point(nullptr) > {} > > EdgeEndpointBase(unit<tPoint> point) : > _point(point) > {} > > EdgeEndpointBase(const EdgeEndpoint& e) : > _point(e._point) > {} > > EdgeEndpointBase(nullptr_t null) : > _point(null) > {} > > inline Id > id() const { return _point == nullptr ? 0 : _point->id(); } > > inline unit<tPoint> > point() const { return _point; } > > void > clear() { _point = nullptr; } > > EdgeEndpoint& > operator =(const EdgeEndpoint& e) > { > _point = e._point; > return *this; > } > > bool > operator ==(const EdgeEndpoint& other) const { return _point == other._point; } > > bool > operator ==(nullptr_t null) const { return _point == null; } > > bool > operator !=(const EdgeEndpoint& other) const { return _point != other._point; } > > bool > operator !=(nullptr_t null) const { return _point != null; } > > friend std::ostream& > operator <<(std::ostream& o, const EdgeEndpoint& e) { return o << e._point->id(); } > > > > friend std::istream& > operator >>(__attribute__((unused)) std::istream& i, __attribute__((unused)) EdgeEndpoint& e) { ># 132 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 132) ># 132 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "NYI" << ># 132 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 132 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; } > >private: > unit<tPoint> _point; >}; > >template<typename tEndpoint> >struct StreamEdgeBase { > using Endpoint = tEndpoint; > using StreamEdge = StreamEdgeBase<tEndpoint>; > using Id = typename tEndpoint::Id; > > static constexpr int FacileStreamTokenTag = 0; > > union Key { > using Index = uint64_t; > > Index index; > struct Edge { > Id head; > Id tail; > } > edge; > > Key() : > index(0) > {} > > Key(StreamEdge edge) : > edge{ edge.head.id(), edge.tail.id() } > {} > > Key(Id tailId, Id headId) : > edge { headId, tailId } > {} > > Key(Index i) : > index(i) > {} > > Key& > operator =(Index i) > { > index = i; > return *this; > } > > static Index > fuseIndex(StreamEdge e) { return Key(e).index; } > > static Index > fuseIndex(Id tailId, Id headId) { return Key(tailId, headId).index; } > > static Index > fuseHash(StreamEdge e) { return Key(e).index; } > }; > > footprint::match<Key, sizeof(typename Key::Index)> KeyIntegrityCheck; > > tEndpoint tail; > tEndpoint head; > > StreamEdgeBase() : > tail(0), > head(0) > {} > > StreamEdgeBase(tEndpoint tail, tEndpoint head) : > tail(tail), > head(head) > {} > > StreamEdge& > assign(tEndpoint newTail, tEndpoint newHead) > { > tail = newTail; > head = newHead; > > return *this; > } > > bool > isReflexive() { return tail == head; } > > > typename Key::Index > key() { return Key::fuseIndex(*this); } > > > typename Key::Index > hash() { return Key::fuseHash(*this); } > > std::ostream& > print(std::ostream& o) const { return o << "(" << tail << " -> " << head << ")"; } >}; > >using IdStreamEdge = StreamEdgeBase<IdEndpoint>; > >template<typename tEndpoint> >struct VertexExpansionBase { > using VertexExpansion = VertexExpansionBase<tEndpoint>; > using Endpoint = tEndpoint; > using StreamEdge = StreamEdgeBase<Endpoint>; > > tEndpoint initiator; > tEndpoint origin; > tEndpoint expansion; > > VertexExpansionBase() : > initiator(), > origin(), > expansion() > {} > > > VertexExpansionBase(tEndpoint o, tEndpoint x) : > initiator(o), > origin(o), > expansion(x) > {} > > VertexExpansionBase(tEndpoint i, tEndpoint o, tEndpoint x) : > initiator(i), > origin(o), > expansion(x) > {} > > VertexExpansion& > assign(tEndpoint i, tEndpoint o, tEndpoint x) > { > initiator = i; > origin = o; > expansion = x; > return *this; > } > > StreamEdge > originEdge() { return StreamEdge(origin, expansion); } > > StreamEdge > initiatorEdge() { return StreamEdge(initiator, expansion); } > > friend std::ostream& > operator <<(std::ostream& o, VertexExpansion x) > { > if (x.initiator == x.origin) > return o << " x[ " << x.origin << " *-> " << x.expansion << " ]"; > else > return o << " x[ " << x.initiator << " -- " << x.origin << " *-> " << x.expansion << " ]"; > } >}; > >template<typename tEndpoint> >struct VertexGateBase : > public StreamEdgeBase<tEndpoint> { > using super = StreamEdgeBase<tEndpoint>; > using VertexGate = VertexGateBase<tEndpoint>; > VertexGateBase() : > super() > {} > > VertexGateBase(tEndpoint tail, tEndpoint head) : > super(tail, head) > {} > > VertexGate& > assign(tEndpoint newTail, tEndpoint newHead) > { > super::tail = newTail; > super::head = newHead; > > return *this; > } > > friend std::ostream& > operator <<(std::ostream& o, VertexGate g) { return o << " g[ *" << g.tail << " -> " << g.head << " ]"; } >}; > >enum class PathElementType { > edge, > token, > eof >}; > >inline std::ostream& >operator <<(std::ostream& o, PathElementType t) >{ > switch (t) > { > case PathElementType::edge: > return o << "E"; > > case PathElementType::token: > return o << "T"; > > default: > ; > } > > ># 331 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 331) ># 331 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "unreachable" << ># 331 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 331 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; >} > >inline PathElementType >parsePathElementType(char c) >{ > switch (c) > { > case 'E': > return PathElementType::edge; > > case 'T': > return PathElementType::token; > } > > ># 346 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 346) ># 346 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "unreachable" << ># 346 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 346 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; >} > >enum class Token { > sentinel >}; > >inline std::ostream& >operator <<(std::ostream& o, Token t) >{ > switch (t) > { > case Token::sentinel: > return o << "----"; > } > > ># 362 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 362) ># 362 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "unreachable" << ># 362 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 362 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; >} > >inline Token >parseToken(const std::string& s) >{ > if (s == "----") > return Token::sentinel; > > ># 371 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 371) ># 371 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "unreachable" << ># 371 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 371 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; >} > > > > >template<typename StreamEdge, unsigned int NodeIdOffset = 1> >class CompactEdgeMapBase >{ >using CompactEdgeMap = CompactEdgeMapBase<StreamEdge, NodeIdOffset>; > >public: > using EdgeType = StreamEdge; > > > > > static owner<CompactEdgeMap> > make(const NetworKit::Graph& g) > { > owner<CompactEdgeMap> map = owner<CompactEdgeMap>::make(); > g.forEdges([&map](NetworKit::node a, NetworKit::node b) { map->append(a, b); }); > return map; > } > > uint32_t > getEdgeCount() const { return _edges.size(); } > > StreamEdge > getEdge(uint32_t index) const { return _edges.at(index); } > > void > append(uint32_t tail, uint32_t head) { _edges.emplace_back(tail + NodeIdOffset, head + NodeIdOffset); } > > void > swapEdges(uint32_t fromIndex, uint32_t toIndex) > { > StreamEdge swap = _edges.at(fromIndex); > _edges.at(fromIndex) = _edges.at(toIndex); > _edges.at(toIndex) = swap; > } > >private: > std::vector<StreamEdge> _edges; >}; > >using CompactEdgeMap = CompactEdgeMapBase<IdStreamEdge>; > >template<unsigned int NodeIdOffset = 1> >class CompleteEdgeMapBase >{ >using StreamEdge = IdStreamEdge; >using SwapMap = std::unordered_map<uint32_t, uint32_t>; > >public: > using EdgeType = StreamEdge; > > CompleteEdgeMapBase(uint32_t nodeCount) : > _nodeCount(nodeCount) > {} > > uint32_t > getEdgeCount() const { return _nodeCount * _nodeCount; } > > StreamEdge > getEdge(uint32_t index) const > { > uint32_t mapped = resolveIndex(index); > return StreamEdge((mapped / _nodeCount) + NodeIdOffset, (mapped % _nodeCount) + NodeIdOffset); > } > > void > swapEdges(uint32_t fromIndex, uint32_t toIndex) > { > uint32_t from = resolveIndex(fromIndex), to = resolveIndex(toIndex); > mapIndex(toIndex, from); > mapIndex(fromIndex, to); > } > > uint32_t > getIndex(StreamEdge edge) { return ((edge.tail.id() - NodeIdOffset) * _nodeCount) + (edge.head.id() - NodeIdOffset); } > >private: > uint32_t > resolveIndex(uint32_t index) const > { > SwapMap::const_iterator mapped = _swapMap.find(index); > if (mapped == _swapMap.end()) > return index; > else > return mapped->second; > } > > void > mapIndex(uint32_t index, uint32_t swap) > { > SwapMap::iterator mapped = _swapMap.find(index); > if (mapped != _swapMap.end()) > _swapMap.erase(mapped); > _swapMap.emplace(index, swap); > } > > uint32_t _nodeCount; > SwapMap _swapMap; >}; > >using CompleteEdgeMap = CompleteEdgeMapBase<>; ># 486 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" >template<typename EdgeMap, typename Chooser> >class EdgeStream >{ >public: > using StreamEdge = typename EdgeMap::EdgeType; > > EdgeStream(loan<EdgeMap> edgeMap, loan<Chooser> chooser) : > _edgeMap(edgeMap), > _chooser(chooser) > {} > > void > begin() > { > _cursor = 0; > _totalEdges = _edgeMap->getEdgeCount(); > } > > StreamEdge > next() > { > uint32_t random = _chooser->choose(0, point_util::lastOfQuantity(_totalEdges) - _cursor); > if (random > 0) > _edgeMap->swapEdges(_cursor, _cursor + random); > > StreamEdge edge = _edgeMap->getEdge(_cursor++); > ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > ( ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > edge.tail.id() != 0 && edge.head.id() != 0 ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 512) << ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > std::endl ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > << "⢠Condition [" << ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > "edge.tail.id() != 0 && edge.head.id() != 0" ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > << "] " << ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > std::endl ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > << "⢠" ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 512 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; > return edge; > } > > bool > hasNext() { return _cursor < _totalEdges; } > >private: > uint32_t _cursor; > uint32_t _totalEdges; > > loan<EdgeMap> _edgeMap; > loan<Chooser> _chooser; >}; > >enum class StreamEventType { > none, > edge, > expansion, > gate >}; > >static inline std::istream& >operator >>(std::istream& i, StreamEventType& type) >{ > char code; > i >> code; > > if (i.peek() == ># 540 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 4 > (-1) ># 540 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ) { > type = StreamEventType::none; > } else { > switch (code) > { > case 'E': > type = StreamEventType::edge; > break; > > case 'X': > type = StreamEventType::expansion; > break; > > case 'G': > type = StreamEventType::gate; > break; > > default: > ># 558 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 558) ># 558 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "Failed to parse '" << code << "' as a StreamEventType" << ># 558 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 558 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; > > > > > } > } > > return i; >} > >static inline std::ostream& >operator <<(std::ostream& o, StreamEventType type) >{ > switch (type) > { > case StreamEventType::edge: > return o << "E"; > > case StreamEventType::expansion: > return o << "X"; > > case StreamEventType::gate: > return o << "G"; > > default: > ># 584 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 584) ># 584 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "Cannot write event type " << hex(narrow<uint32_t>(type)) << " as a StreamEventType" << ># 584 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 584 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; > } >} > >template<typename tEndpoint, typename Position> >struct IEventStreamCorpus { > using IEventStreamCorpusTag = IEventStreamCorpus<tEndpoint, Position>; > using Endpoint = tEndpoint; > using Id = typename Endpoint::Id; > > virtual ~IEventStreamCorpus() {} > > virtual Endpoint > nextVertex() = 0; > > virtual Endpoint > getVertex(Position i) = 0; > > virtual Endpoint > drawVertex(uint32_t draw) const = 0; > > virtual uint32_t > drawOrder() const = 0; > > virtual uint32_t > vertexCount() = 0; > > virtual uint32_t > referenceCount(Endpoint e) const = 0; > > > > > virtual Endpoint > consumeFrontier(Endpoint tail) = 0; > > virtual Endpoint > expandFrontier(Endpoint initiator, Endpoint origin) = 0; > > virtual Endpoint > consumeEdge(Endpoint tail, uint32_t selection) = 0; > > virtual uint32_t > edgeCount(Endpoint e) = 0; > > virtual Endpoint > edgeAt(Endpoint e, uint32_t i) = 0; > > > > >}; > >template<typename tEndpoint> >struct IVertexSource { > using IVertexSourceTag = IVertexSource<tEndpoint>; > using Id = typename tEndpoint::Id; > using Endpoint = tEndpoint; > > virtual ~IVertexSource() {} > > virtual Endpoint > getVertex(Id id) = 0; >}; > >struct IdVertexSource : > public IVertexSource<IdEndpoint> { > Endpoint > getVertex(Id id) override { return IdEndpoint(id); } >}; > >template<typename xNode, typename oStreamEdge, typename Chooser> >struct INavigator { > using INavigatorTag = INavigator<xNode, oStreamEdge, Chooser>; > using Node = xNode; > > virtual ~INavigator() {} > > virtual uint64_t > maxLength() const = 0; > > virtual uint32_t > maxIterations() const = 0; > > virtual xNode > chooseRoot(loan<Chooser> chooser) const = 0; > > virtual uint32_t > successorCount(xNode tail) const = 0; > > virtual xNode > successorAt(xNode tail, uint32_t successorIndex) const = 0; > > virtual bool > isLoopMember(xNode loop, xNode member) = 0; > > virtual oStreamEdge > edge(xNode tail, xNode head) = 0; >}; > >template<typename Navigator, typename Endpoint, template<typename> class ChooserTemplate> >class PathStream >{ >compliance<typename Navigator::INavigatorTag, Navigator> check; > >using Node = typename Navigator::Node; >using ChooserType = uint32_t; > >enum LoopMode { > none, > forge, > follow >}; > >friend std::ostream& >operator <<(std::ostream& o, LoopMode mode) >{ > switch (mode) > { > case LoopMode::none: > return o << "loopless"; > > case LoopMode::forge: > return o << "loop forge"; > > case LoopMode::follow: > return o << "loop follow"; > } > > ># 713 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 713) ># 713 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "unreachable" << ># 713 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 713 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; >} > >public: > using StreamEdge = StreamEdgeBase<Endpoint>; > using Chooser = ChooserTemplate<ChooserType>; > > PathStream(loan<Navigator> n, loan<Chooser> chooser) : > _loop(n), > _n(n), > _chooser(chooser) > {} > > void > begin() { reset(); } > > void > reset() > { > _cursor = _n->chooseRoot(_chooser); > _length = 0; > > _maxLength = _n->maxLength(); > _maxIterations = _n->maxIterations(); > > _loopEntry = nullptr; > _loopMode = LoopMode::none; > } > > StreamEdge > next() > { > Node tail = _cursor, head; > > if (_loopMode == LoopMode::follow) { > head = _loop.follow(); > if (head == nullptr) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 750, facile::StreamLogLevel::Status) << "Exit the forged loop at " << tail->atom()->token() << std::endl; > > head = _loopEntry; > _loopEntry = nullptr; > _loopMode = LoopMode::none; > } else { > facile::StreamLog::log(__PRETTY_FUNCTION__, 756, facile::StreamLogLevel::Status) << "Follow forged loop to " << head->atom()->token() << std::endl; > } > } > > if (head == nullptr) { > uint32_t successorIndex = _chooser->choose(0, point_util::lastOfQuantity(_n->successorCount(tail))); > head = _n->successorAt(tail, successorIndex); > if (_loopMode == LoopMode::forge) { > while (true) { > if (_n->isLoopMember(_loopEntry, head)) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 766, facile::StreamLogLevel::Status) << "Forge loop member " << head->atom()->token() << std::endl; > > _loop.trace(head); > break; > } else if (head == _loopEntry) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 771, facile::StreamLogLevel::Status) << "Begin following the forged loop at " << head->atom()->token() << std::endl; > > _loopMode = LoopMode::follow; > _loop.startFollow(_chooser->choose(1, _maxIterations)); > break; > } > successorIndex = ((successorIndex + 1) % _n->successorCount(tail)); > head = _n->successorAt(tail, successorIndex); > } > } else if ((_n->loopAt(head) == tail) && (_maxIterations > 0)) { > if (_chooser->choose(0, 9) == 0) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 782, facile::StreamLogLevel::Status) << "Begin forging a loop at " << head->atom()->token() << std::endl; > > _loopEntry = tail; > _loopMode = LoopMode::forge; > _loop.startTrace(tail, head); > } > } > } > > _cursor = head; > _length++; > > ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > ( ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > tail != head ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp", 794) << ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > std::endl ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > << "⢠Condition [" << ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > "tail != head" ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > << "] " << ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > std::endl ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > << "⢠" ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > << "PathStream generates a self loop at " << tail->atom()->token() << " in " << _loopMode << " mode" << ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" 3 > facile::RequireException::require_sentinel ># 794 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" > ; > > return _n->edge(tail, head); > } > > bool > hasNext() > { > if ((_maxLength > 0) && (_length >= _maxLength)) > return false; > else > return _n->successorCount(_cursor) > 0; > } > >private: > class LoopFollow { > public: > LoopFollow(loan<Navigator> n) : > _n(n) > {} > > void > startTrace(Node tail, Node head) > { > _loop.clear(); > _loop.push_back(tail); > _loop.push_back(head); > } > > void > trace(Node node) { _loop.push_back(node); } > > void > startFollow(uint32_t iterationCount) > { > _cursor = _loop.begin() + 1; > _iteration = iterationCount; > } > > Node > follow() > { > if (_cursor == _loop.end()) { > if (_iteration == 0) > return nullptr; > else > _iteration -= 1, _cursor = _loop.begin(); > } > > return *(_cursor++); > } > > private: > using LoopPath = std::vector<Node>; > > loan<Navigator> _n; > > uint32_t _iteration; > LoopPath _loop; > typename LoopPath::iterator _cursor; > } > _loop; > > inline uint32_t > nodeId(Node n) { return n.id() + 1; } > > Node _cursor; > uint64_t _length; > LoopMode _loopMode; > Node _loopEntry; > > uint64_t _maxLength; > uint64_t _maxIterations; > loan<Navigator> _n; > loan<Chooser> _chooser; >}; > >class NetworKitGraphNavigator >{ >using Endpoint = IdEndpoint; >using StreamEdge = IdStreamEdge; > >public: > NetworKitGraphNavigator(loan<NetworKit::Graph> g, uint64_t maxLength = 0) : > _g(g), > _maxLength(maxLength) > {} > > uint64_t > maxLength() { return _maxLength; } > > uint32_t > maxIterations() { return 0; } > > template<typename Chooser> > Endpoint > chooseRoot(loan<Chooser> chooser) { return successorAt(Endpoint(0), chooser->choose(0, successorCount(Endpoint(0)))); } > > uint32_t > successorCount(Endpoint tail) { return _g->degree(tail.id()); } > > Endpoint > successorAt(Endpoint tail, uint32_t successorIndex) { return Endpoint(_g->getIthNeighbor(tail.id(), successorIndex)); } > > StreamEdge > edge(const NetworKit::node& tail, const NetworKit::node& head) { return StreamEdge(Endpoint(tail), Endpoint(head)); } ># 910 "../../subprojects/edfst/src/edfst/sim/EdgeStream.hpp" >private: > loan<NetworKit::Graph> _g; > uint64_t _maxLength; >}; > >template<template<typename> class EdgeSelector> >using NetworKitPathStream = PathStream<NetworKitGraphNavigator, NetworKit::node, EdgeSelector>; >} >} ># 5 "../../subprojects/edfst/src/edfst/graph/Vertex.hpp" 2 > >namespace dual_graph >{ >template<typename LinkSetType, typename CompleteExtensionSet> >class VertexBase >{ >public: using IdType = Id32; > >private: const IdType _id; > >protected: > using VertexType = VertexBase<LinkSetType, CompleteExtensionSet>; > > struct PrintToken { > ># 19 "../../subprojects/edfst/src/edfst/graph/Vertex.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 19 "../../subprojects/edfst/src/edfst/graph/Vertex.hpp" > ; > > using VertexPrinter = typename CompleteExtensionSet::VertexPrinter; > > std::ostream& > print(std::ostream& o) const { return o << "Vâ¢" << VertexPrinter::id(_v); } > > PrintToken(unit<VertexType> v) : > _v(v) > {} > > PrintToken() : > _v(nullptr) > {} > > protected: > unit<VertexType> _v; > }; > > CompleteExtensionSet _extensionSet; > >public: > template<unsigned int index> > using ExtensionTypeAt = typename CompleteExtensionSet::ComponentTypeAt<index>; > > struct Types { > using LinkSet = LinkSetType; > using ExtensionSet = CompleteExtensionSet; > }; > > VertexBase(IdType id, unit<LinkSetType> links) : > _id(id), > links(links) > {} > > unit<LinkSetType> links; > > IdType > id() const { return _id; } > > IdType > instanceId() { return _id; } > > bool > isDisjoint() const { return links->referenceCount() == 0; } > > template<typename ExtensionType> > unit<ExtensionType> > extension() const { return _extensionSet.template component<ExtensionType>(); } > > template<unsigned int index, typename ExtensionType = typename Types::ExtensionSet::AccessTypeAt<index>> > ExtensionType > extensionAt() const { return _extensionSet.template componentAt<index>(); } > > template<unsigned int index, typename ExtensionType = typename Types::ExtensionSet::ComponentTypeAt<index>> > inline void > setExtensionAt(ExtensionType extension) { _extensionSet.template setComponentAt<index>(extension); } > > template<typename ExtensionType> > inline void > setExtension(ExtensionType extension) { _extensionSet.setComponent(extension); } > > template<typename Functor, typename ... Args> > void > dispatch(Args&& ... args) > { > Functor f; > _extensionSet.dispatch(f, std::forward<Args>(args) ...); > } > > template<typename Functor, typename ... Args> > void > dispatch(Functor& f, Args&& ... args) { _extensionSet.dispatch(f, std::forward<Args>(args) ...); } > > template<template<typename> class Functor, typename ... Args> > static void > mux(Args&& ... args) { CompleteExtensionSet::template mux<Functor>(std::forward<Args>(args) ...); } > > inline PrintToken > token() { return PrintToken(unit<VertexType>::wrap(this)); } > > template<typename EdgeType> > void > printEdges() > { > facile::StreamLog::log(__PRETTY_FUNCTION__, 104, facile::StreamLogLevel::Status) << "Edges of v" << _id << ":" << std::endl; > for (EdgeType& edge : links->iterateEdges()) > facile::StreamLog::log(__PRETTY_FUNCTION__, 106, facile::StreamLogLevel::Status) << "\tv" << edge.endpoint()->id() << " (dual " << edge.dualPosition() << ")" << std::endl; > } > > template<typename ReferenceType> > void > printReferences() > { > facile::StreamLog::log(__PRETTY_FUNCTION__, 113, facile::StreamLogLevel::Status) << "References of v" << _id << ":" << std::endl; > for (ReferenceType& reference : links->iterateReferences()) > facile::StreamLog::log(__PRETTY_FUNCTION__, 115, facile::StreamLogLevel::Status) << "\tv" << reference.endpoint()->id() << " (dual " << reference.dualPosition() << ")" << std::endl; > } >}; > >template<typename VertexType> >struct VertexIdHash { > size_t > operator ()(unit<VertexType> v) const { return widen<size_t>(v->id().index()); } > > bool > operator ()(unit<VertexType> a, unit<VertexType> b) const { return a->id() == b->id(); } >}; > >template<typename VertexType> >struct VertexSet { > using Writer = std::unordered_set<unit<VertexType>, VertexIdHash<VertexType>, VertexIdHash<VertexType>>; > using Reader = SetAccessorBase<unit<VertexType>, Writer>; >}; > >template<typename VertexType, typename Endpoint> >struct IExtensionFactory { > using IExtensionFactoryTag = IExtensionFactory<VertexType, Endpoint>; > > virtual ~IExtensionFactory() {} > > virtual void > initialize(unit<VertexType>, Endpoint) = 0; >}; > >template<typename Endpoint, typename VertexType, typename ExtensionFactory> >struct VertexFactoryBase { > compliance<typename ExtensionFactory::IExtensionFactoryTag, ExtensionFactory> checkFactory; > > using IdType = typename VertexType::IdType; > using LinkSetType = typename VertexType::Types::LinkSet; > using ExtensionSet = typename VertexType::Types::ExtensionSet; > using LinearMap = FactoryMap::Vector<VertexType, IdType>; > using Iterator = typename LinearMap::iterator; > using LinkSetFactory = ObjectBlock<LinkSetType>; > > LinearMap vertexMap; > LinkSetFactory linkSetFactory; > > VertexFactoryBase(uint initialMagnitude = 6, loan<ExtensionFactory> extensionFactory = nullptr) : > vertexMap(initialMagnitude), > linkSetFactory(initialMagnitude), > _extensionFactory(extensionFactory) > {} > > template<typename ... A> > std::pair<unit<VertexType>, bool> > > emplaceMeta(IdType id, A&& ... args) > { > bool constructed = false; > unit<VertexType> v = vertexMap.find(id); > if (v == nullptr) { > constructed = true; > unit<LinkSetType> links = linkSetFactory.acquireUnit(); > v = vertexMap.emplace(id, links, std::forward<A>(args) ...); > links.make(v); > > if (_extensionFactory != nullptr) > _extensionFactory->initialize(v, Endpoint()); > } > return std::make_pair(v, constructed); > } > > template<typename ... A> > std::pair<unit<VertexType>, bool> > emplace(Endpoint e, A&& ... args) > { > bool constructed = false; > unit<VertexType> v = vertexMap.find(e.id()); > if (v == nullptr) { > constructed = true; > unit<LinkSetType> links = linkSetFactory.acquireUnit(); > v = vertexMap.emplace(e.id(), links, std::forward<A>(args) ...); > links.make(v); > > if (_extensionFactory != nullptr) > _extensionFactory->initialize(v, e); > } > return std::make_pair(v, constructed); > } > > void > releaseAll() > { > vertexMap.releaseAll(); > linkSetFactory.releaseAll(); > } > > private: > loan<ExtensionFactory> _extensionFactory; >}; > >template<typename VertexType, typename StreamEdgeEndpoint = EdgeStream::IdEndpoint> >struct VoidVertexExtensionFactory : > public IExtensionFactory<VertexType, StreamEdgeEndpoint> { > void > initialize(__attribute__((unused)) unit<VertexType> v, __attribute__((unused)) StreamEdgeEndpoint e) override {} >}; > >struct IdVertexPrinter { > template<typename VertexType> > struct DecimalIdentity { > unit<VertexType> v; > > friend std::ostream& > operator <<(std::ostream& o, const DecimalIdentity& id) { return o << id.v->id(); } > }; > > template<typename VertexType> > static DecimalIdentity<VertexType> > id(unit<VertexType> v) { return DecimalIdentity<VertexType>{ v }; } >}; > >template<typename VertexType, typename StreamEdgeEndpoint = EdgeStream::IdEndpoint> >struct EmptyExtensionSet : > EmptyTemplateComposition<VertexType> { > using Factory = VoidVertexExtensionFactory<VertexType, StreamEdgeEndpoint>; > using EdgeStreamEndpoint = StreamEdgeEndpoint; > > template<typename Nothing> > using TreeTableColumns = std::tuple<>; > > using VertexPrinter = IdVertexPrinter; >}; >} ># 5 "../../subprojects/edfst/src/edfst/graph/Link.hpp" 2 > >namespace dual_graph >{ >template<typename Endpoint> >class LinkBase >{ >public: > LinkBase() : > _endpoint(nullptr), > _dualPosition(0) > {} > > LinkBase(unit<Endpoint> endpoint) : > LinkBase(endpoint, 0) > {} > > LinkBase(unit<Endpoint> endpoint, uint32_t dualPosition) : > _endpoint(endpoint), > _dualPosition(dualPosition) > {} > > unit<Endpoint> > endpoint() const { return _endpoint; } > > uint32_t > dualPosition() const { return _dualPosition; } > > void > redirect(unit<Endpoint> endpoint) { _endpoint = endpoint; } > > void > redirect(unit<Endpoint> endpoint, uint32_t position) > { > _endpoint = endpoint; > _dualPosition = position; > } > > void > setDualPosition(uint32_t position) { _dualPosition = position; } > >protected: > unit<Endpoint> _endpoint; > uint32_t _dualPosition; >}; >} ># 7 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/graph/DualGraphComponents.hpp" 1 > > > > > > ># 1 "../../subprojects/edfst/src/edfst/graph/Edge.hpp" 1 > > > > > >namespace dual_graph >{ >template<typename Endpoint> >class EdgeBase : > public LinkBase<Endpoint> >{ >using Link = LinkBase<Endpoint>; >using EdgeType = EdgeBase<Endpoint>; > >public: > EdgeBase() : > Link() > {} > > EdgeBase(unit<Endpoint> endpoint) : > EdgeBase(endpoint, 0) > {} > > EdgeBase(unit<Endpoint> endpoint, uint32_t dualPosition) : > Link(endpoint, dualPosition) > {} > >private: >}; >} ># 8 "../../subprojects/edfst/src/edfst/graph/DualGraphComponents.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 1 > > > > > > > >namespace dual_graph >{ >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class LinkSetBase >{ >using LinkSet = LinkSetBase<EdgeClass, ReferenceClass, VertexType>; > >public: > using EdgeType = EdgeClass<VertexType>; > using ReferenceType = ReferenceClass<VertexType>; > > template<typename LinkType> > using LinkIterable = iterable<typename std::vector<LinkType>::iterator>; > > template<typename LinkType> > using LinkScan = scan<typename std::vector<LinkType>::iterator>; > > template<typename LinkType> > struct IExtract { > using IExtractTag = IExtract<LinkType>; > > virtual ~IExtract() {} > > virtual void > transfer(const LinkType&) = 0; > }; > > struct EdgeToken { > static constexpr int FacileStreamTokenTag = 0; > > unit<VertexType> tail; > cell<EdgeType> edge; > > inline std::ostream& > print(std::ostream& o) const > { > o << "(" << tail->id() << " -> "; > if (edge->endpoint() == nullptr) > o << "null"; > else > o << edge->endpoint()->id(); > return o << ")"; > } > > inline EdgeToken(unit<VertexType> tail, cell<EdgeType> edge) : > tail(tail), > edge(edge) > {} > }; > > struct ReferenceToken { > static constexpr int FacileStreamTokenTag = 0; > > unit<VertexType> head; > cell<ReferenceType> reference; > > inline std::ostream& > print(std::ostream& o) const > { > o << "(" << head->id() << " <- "; > if (reference->endpoint() == nullptr) > o << "null"; > else > o << reference->endpoint()->id(); > return o << ")"; > } > > inline ReferenceToken(unit<VertexType> head, cell<ReferenceType> reference) : > head(head), > reference(reference) > {} > }; > > enum class Orientation { > out = 0, > mux = 0, > edge = 0, > in = 1, > demux = 1, > reference = 1 > }; > > LinkSetBase(unit<VertexType> v) : > _isReflexive(false), > _v(v) > { > _in.reserve(0x10); > _out.reserve(0x10); > } > > uint32_t > instanceId() { return _v->instanceId(); } > > bool > isReflexive() const { return _isReflexive; } > > void > setReflexive(bool b = true) { _isReflexive = b; } > > inline uint32_t > degree(Orientation o = Orientation::out) const { return (o == Orientation::out ? _out.size() : _in.size()) + (_isReflexive ? 1 : 0); } > > uint32_t > edgeCount() { return _out.size(); } > > uint32_t > edgeDegree() { return _out.size() + (_isReflexive ? 1 : 0); } > > uint32_t > referenceCount() { return _in.size(); } > > cell<EdgeType> > edgeAt(uint32_t index) { return cell_wrap(_out, index); } > > cell<ReferenceType> > referenceAt(uint32_t index) { return cell_wrap(_in, index); } > > cell<EdgeType> > startEdges() { return cell_wrap(_out); } > > cell<EdgeType> > edgeTail() { return cell<EdgeType>(_out.back()); } > > cell<EdgeType> > edgeSentinel() { return cell_wrap(_out, _out.size()); } > > cell<ReferenceType> > startReferences() { return cell_wrap(_in); } > > cell<ReferenceType> > referenceTail() { return cell<ReferenceType>(_in.back()); } > > cell<ReferenceType> > referenceSentinel() { return cell_wrap(_in, _in.size()); } > > LinkIterable<EdgeType> > iterateEdges() { return LinkIterable<EdgeType>(_out); } > > LinkIterable<ReferenceType> > iterateReferences() { return LinkIterable<ReferenceType>(_in); } > > uint32_t > edgeIndex(EdgeType& edge) { return (&edge) - _out.data(); } > > uint32_t > edgeIndex(cell<EdgeType> edge) { return (edge - _out.data()); } > > uint32_t > referenceIndex(ReferenceType& reference) { return (&reference) - _in.data(); } > > uint32_t > referenceIndex(cell<ReferenceType> reference) { return (reference - _in.data()); } > > cell<EdgeType> > getDual(cell<ReferenceType> reference) { return getDual(reference.read()); } > > cell<EdgeType> > getDual(ReferenceType reference) > { > ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > reference.endpoint() == _v ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 167) << ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "reference.endpoint() == _v" ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 167 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Cannot get the dual of a reference from " << reference.endpoint()->token() > << " via link set of " << _v->token() << ># 168 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 168 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > > return cell_wrap(_out, reference.dualPosition()); > } > > cell<ReferenceType> > getDual(cell<EdgeType> edge) { return getDual(edge.read()); } > > cell<ReferenceType> > getDual(EdgeType edge) > { > ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > edge.endpoint() == _v ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 179) << ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "edge.endpoint() == _v" ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 179 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Cannot get the dual of an edge to " << edge.endpoint()->token() > << " via link set of " << _v->token() << ># 180 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 180 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > > return cell_wrap(_in, edge.dualPosition()); > } > > > std::pair<cell<EdgeType>, cell<ReferenceType>> > addEdge(unit<VertexType> head) > { > ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > head != nullptr ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 189) << ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "head != nullptr" ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Cannot add an edge to void" << ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 189 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > !containsEdge(head) ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 190) << ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "!containsEdge(head)" ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Duplicate edge " << _v->token() << " -> " << head->token() << ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 190 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > > head->links->_in.emplace_back(_v, _out.size()); > _out.emplace_back(head, head->links->_in.size() - 1); > > return std::make_pair(cell_wrap(_out, _out.size() - 1), cell_wrap(head->links->_in, head->links->_in.size() - 1)); > } > > void > transferEdgesTo(unit<VertexType> dst) > { > ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > dst->links->_out.empty() ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 201) << ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "dst->links->_out.empty()" ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Cannot transfer links to a vertex that already has edges" << ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 201 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > > for (cell<EdgeType> walk = cell<EdgeType>::start(_out), sentinel = cell<EdgeType>::sentinel(_out); walk < sentinel; ++walk) { > walk->endpoint()->links->getDual(walk.read())->redirect(dst); > dst->links->_out.push_back(walk.read()); > } > > if (_isReflexive) > dst->links->addEdge(_v); > > _out.clear(); > _isReflexive = false; > } > > void > splice(unit<VertexType> successor, unit<VertexType> segmentTail, unit<VertexType> segmentHead) > { > cell<EdgeType> edge = findEdge(successor); > cell<ReferenceType> reference = successor->links->getDual(edge.read()); > > ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > edge != nullptr ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 221) << ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "edge != nullptr" ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Failed to find an edge with endpoint " << successor->token() << ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 221 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > > edge->redirect(segmentTail); > edge->setDualPosition(segmentTail->links->_in.size()); > segmentTail->links->_in.emplace_back(_v, edgeIndex(edge)); > > reference->redirect(segmentHead); > reference->setDualPosition(segmentHead->links->_out.size()); > segmentHead->links->_out.emplace_back(successor, successor->links->referenceIndex(reference)); > } > > > template<typename Filter> > void > reduceEdges(Filter& f) > { > cell<EdgeType> walk = cell<EdgeType>::start(_out), retain = walk, sentinel = cell<EdgeType>::sentinel(_out); > while (walk < sentinel) { > if (f(walk)) { > unit<VertexType> head = walk->endpoint(); > head->links->removeReference(walk->dualPosition()); > } else { > if (walk > retain) { > retain.write(walk.read()); > retain->endpoint()->links->getDual(retain.read())->setDualPosition(edgeIndex(retain)); > } > retain++; > } > walk++; > } > _out.resize(edgeIndex(retain)); > } > > > template<typename Filter> > void > reduceReferences(Filter& f, bool shallow = false) > { > cell<ReferenceType> walk = cell<ReferenceType>::start(_in), retain = walk, sentinel = cell<ReferenceType>::sentinel(_in); > while (walk < sentinel) { > if (f(walk)) { > unit<VertexType> head = walk->endpoint(); > if (!shallow) > head->links->removeEdge(walk->dualPosition()); > } else { > if (walk > retain) { > retain.write(walk.read()); > retain->endpoint()->links->getDual(retain.read())->setDualPosition(referenceIndex(retain)); > } > retain++; > } > walk++; > } > _in.resize(referenceIndex(retain)); > } > > void > resizeReferences(int32_t count) > { > ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > count >= 0 || (_in.size() >= std::abs(count)) ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 280) << ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "count >= 0 || (_in.size() >= std::abs(count))" ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 280 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Cannot remove " << (-count) << " references from a set of only " > << _in.size() << ># 281 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 281 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > > _in.resize(_in.size() + count); > } > > bool > containsEdge(unit<VertexType> head) > { > if (head == _v) > return _isReflexive; > for (EdgeType& edge : _out) { > if (edge.endpoint() == head) > return true; > } > return false; > } > > bool > containsReference(unit<VertexType> tail) > { > if (tail == _v) > return _isReflexive; > for (ReferenceType& r : _in) { > if (r.endpoint() == tail) > return true; > } > return false; > } > > cell<EdgeType> > findEdge(unit<VertexType> head) > { > for (cell<EdgeType> e = cell_wrap(_out, 0); e < cell_wrap(_out, edgeCount()); e++) { > if (e->endpoint() == head) > return e; > } > return nullptr; > } > > inline EdgeToken > token(cell<EdgeType> edge) { return EdgeToken(_v, edge); } > > inline ReferenceToken > token(cell<ReferenceType> reference) { return ReferenceToken(_v, reference); } ># 338 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" >protected: > void > expandIn() { _in.emplace_back(); } > > void > expandIn(uint32_t count) { _in.resize(_in.size() + count); } > > void > expandOut() { _out.emplace_back(); } > > void > expandOut(uint32_t count) { _out.resize(_out.size() + count); } > > void > shrinkIn() { _in.pop_back(); } > > void > shrinkIn(uint32_t count) { _in.resize(_in.size() - count); } > > void > shrinkOut() { _out.pop_back(); } > > void > shrinkOut(uint32_t count) { _out.resize(_out.size() - count); } > > void > moveInSentinel(cell<ReferenceType> sentinel) { _in.resize(sentinel - _in.data()); } > > void > moveOutSentinel(cell<EdgeType> sentinel) { _out.resize(sentinel - _out.data()); } > > void > emplaceEdge(EdgeType head, cell<EdgeType> position) > { > position.write(head); > > uint32_t index = position.indexIn(_out); > ReferenceType& dual = head.endpoint()->links->_in.at(head.dualPosition()); > dual.setDualPosition(index); > } > > void > emplaceReference(ReferenceType tail, cell<ReferenceType> position) > { > position.write(tail); > > uint32_t index = position.indexIn(_in); > EdgeType& dual = tail.endpoint()->links->_out.at(tail.dualPosition()); > dual.setDualPosition(index); > > ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > index < _in.size() ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 388) << ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "index < _in.size()" ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Incoherent reference emplacement at index " << index << " in a reference set of size " << _in.size() << ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 388 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > } > > void > removeEdge(uint32_t position) > { > if (position < point_util::lastOfQuantity(_out.size())) > _out.at(position) = _out.back(); > > _out.resize(_out.size() - 1); > } > > void > removeReference(uint32_t position) > { > if (position < point_util::lastOfQuantity(_in.size())) > _in.at(position) = _in.back(); > > _in.resize(_in.size() - 1); > } > > template<typename Transform> > void > transferEdgeBlockTo(unit<VertexType> dst, Transform& transformer) > { > ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ( ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > dst->links->_out.empty() ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/graph/LinkSet.hpp", 413) << ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠Condition [" << ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > "dst->links->_out.empty()" ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "] " << ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > std::endl ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > << "⢠" ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > << "Cannot transfer links to a vertex that already has edges" << ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 413 "../../subprojects/edfst/src/edfst/graph/LinkSet.hpp" > ; > > for (cell<EdgeType> walk = cell<EdgeType>::start(_out), sentinel = cell<EdgeType>::sentinel(_out); walk < sentinel; ++walk) { > transformer(walk->endpoint()); > walk->endpoint()->links->getDual(walk.read())->redirect(dst); > dst->links->_out.push_back(walk.read()); > } > > _out.clear(); > _isReflexive = false; > } > > std::vector<ReferenceType> _in; > std::vector<EdgeType> _out; > bool _isReflexive; > > const unit<VertexType> _v; >}; >} ># 9 "../../subprojects/edfst/src/edfst/graph/DualGraphComponents.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/graph/Reference.hpp" 1 > > > > > >namespace dual_graph >{ >template<typename Endpoint> >class ReferenceBase : > public LinkBase<Endpoint> >{ >using Link = LinkBase<Endpoint>; > >public: > ReferenceBase() : > Link() > {} > > ReferenceBase(unit<Endpoint> endpoint, uint32_t dualPosition) : > Link(endpoint, dualPosition) > {} > >private: >}; >} ># 10 "../../subprojects/edfst/src/edfst/graph/DualGraphComponents.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/graph/Graph.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/graph/DualGraphComposition.hpp" 1 > > > > > > > > >namespace dual_graph >{ >template<template<typename> class ExtensionSetBase = EmptyExtensionSet> >struct DualGraphComposition { > template<typename LinkSetType> > class GraphVertexBase : > public VertexBase<LinkSetType, ExtensionSetBase<GraphVertexBase<LinkSetType>>> { > using ExtensionSet = ExtensionSetBase<GraphVertexBase<LinkSetType>>; > using super = VertexBase<LinkSetType, ExtensionSet>; > > public: > GraphVertexBase(Id32 id, unit<LinkSetType> links) : > super(id, links) > {} > }; > > class LinkSet : > public LinkSetBase<EdgeBase, ReferenceBase, GraphVertexBase<LinkSet>> > { > using VertexType = GraphVertexBase<LinkSet>; > using super = LinkSetBase<EdgeBase, ReferenceBase, VertexType>; > > public: > LinkSet(unit<VertexType> v) : > super(v) > {} > }; > > using Vertex = GraphVertexBase<LinkSet>; > using Edge = EdgeBase<Vertex>; > using Reference = ReferenceBase<Vertex>; > using EdgeStreamEndpoint = EdgeStream::IdEndpoint; > using ExtensionFactory = typename ExtensionSetBase<Vertex>::Factory; > using VertexFactory = VertexFactoryBase<EdgeStreamEndpoint, Vertex, ExtensionFactory>; >}; > >using DualGraphCompositionBase = DualGraphComposition<EmptyExtensionSet>; >} ># 5 "../../subprojects/edfst/src/edfst/graph/Graph.hpp" 2 > > >namespace dual_graph >{ >template<typename GraphComposition = DualGraphCompositionBase> >class GraphBase >{ >using GraphVertex = typename GraphComposition::Vertex; >using VertexFactory = typename GraphComposition::VertexFactory; > >public: > using EdgeStreamEndpoint = typename GraphComposition::EdgeStreamEndpoint; > using StreamEdge = EdgeStream::StreamEdgeBase<EdgeStreamEndpoint>; > > GraphBase() : > _factory(6) > {} > > ~GraphBase() { _factory.releaseAll(); } > > uint32_t > vertexCount() const { return _factory.vertexMap.occupancy(); } > > unit<GraphVertex> > getVertex(uint32_t id) const { return _factory.vertexMap.get(id); } > > unit<GraphVertex> > findVertex(uint32_t id) const { return _factory.vertexMap.find(id); } > > unit<GraphVertex> > findVertex(Id32 id) const { return _factory.vertexMap.find(id.index()); } > > template<typename ... Args> > std::pair<unit<GraphVertex>, bool> > emplaceVertex(Args&& ... args) { return _factory.emplace(std::forward<Args>(args) ...); } > > iterable<typename VertexFactory::Iterator> > iterateVertices() const { return _factory.vertexMap.iterate(); } > >private: > VertexFactory _factory; >}; >} ># 11 "../../subprojects/edfst/src/edfst/graph/DualGraphComponents.hpp" 2 ># 5 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 1 > > >namespace edfst >{ >using EpochType = uint32_t; >using RoleType = uint32_t; >using ElasticOrdinal = uint32_t; >using WalkPosition = uint32_t; > >struct WalkTimespan { > WalkPosition in; > WalkPosition out; > > uint32_t > distance() const > { > ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > ( ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > out >= in ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp", 17) << ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > std::endl ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > << "⢠Condition [" << ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > "out >= in" ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > << "] " << ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > std::endl ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > << "⢠" ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > << "Cannot evaluate the distance of an inverted WalkTimespan: [" << in << ", " << out << "]" << ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > facile::RequireException::require_sentinel ># 17 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > ; > > return out - in; > } > > bool > contains(const WalkTimespan& t) const { return in <= t.in && out >= t.out; } >}; > >enum class TreeRelation { > tree, > forward, > cross, > loopback >}; > >static inline EnumToken >label(TreeRelation type) >{ > switch (type) > { > case TreeRelation::tree: > return EnumToken("tree"); > > case TreeRelation::forward: > return EnumToken("forward"); > > case TreeRelation::cross: > return EnumToken("cross"); > > case TreeRelation::loopback: > return EnumToken("loopback"); > } > > ># 51 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp", 51) ># 51 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > << "unreachable" << ># 51 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > facile::RequireException::require_sentinel ># 51 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > ; >} > >inline std::ostream& >operator <<(std::ostream& o, TreeRelation type) >{ > switch (type) > { > case TreeRelation::tree: > return o << "tree"; > > case TreeRelation::forward: > return o << "forward"; > > case TreeRelation::cross: > return o << "cross"; > > case TreeRelation::loopback: > return o << "loopback"; > } > > ># 72 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp", 72) ># 72 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > << "unreachable" << ># 72 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 3 > facile::RequireException::require_sentinel ># 72 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" > ; >} > >template<typename VertexType> >struct SiblingWalkPositionBase { > unit<VertexType> anchor; > unit<VertexType> clockSuccessor; > WalkPosition walkPosition; > uint32_t siblingPosition; > > SiblingWalkPositionBase() : > anchor(nullptr), > clockSuccessor(nullptr), > walkPosition(0), > siblingPosition(0) > {} >}; >} > ># 1 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 1 > > > > >namespace edfst >{ >template<typename T> >class PartitionEnum { >template<typename enumClassInQuestion> >static std::true_type check(decltype(enumClassInQuestion::PartitionEnumTag) *); > >template<typename CatchAll> >static std::false_type >check(...); > >typedef decltype (check<T>(0)) is_partition_enum; > >public: > static const bool value = std::is_enum<T>::value && is_partition_enum::value; >}; > >enum class OrdinalReferencePartition { > PartitionEnumTag, > forward = 0, > cross, > loopback, > clock >}; > >enum class OrdinalEdgePartition { > PartitionEnumTag, > tree = 0, > forward, > cross, > loopback, > clock >}; > >enum class RevertEdgePartition { > PartitionEnumTag, > delta = 0, > visited > >}; > >template<typename E> >inline std::enable_if_t<PartitionEnum<E>::value, uint32_t> >operator -(E first, E second) >{ > return static_cast<uint32_t>(first) - static_cast<uint32_t>(second); >} > >template<typename E, typename T> >inline std::enable_if_t<PartitionEnum<E>::value, E> >operator -(E partition, T amount) >{ > return static_cast<E>(static_cast<uint32_t>(partition) - amount); >} > >template<typename E, typename T> >inline std::enable_if_t<PartitionEnum<E>::value, E> >operator +(E partition, T amount) >{ > return static_cast<E>(static_cast<uint32_t>(partition) + amount); >} > >template<typename E> >inline std::enable_if_t<PartitionEnum<E>::value, E> >operator --(E& partition) >{ > return (partition = static_cast<E>(static_cast<uint32_t>(partition) - 1)); >} > >template<typename E> >inline std::enable_if_t<PartitionEnum<E>::value, E> >operator --(E& partition, __attribute__((unused)) int postfixDisambiguator) >{ > E original = partition; > partition = static_cast<E>(static_cast<uint32_t>(partition) - 1); > return original; >} > >template<typename E> >inline std::enable_if_t<PartitionEnum<E>::value, E> >operator ++(E& partition) >{ > return (partition = static_cast<E>(static_cast<uint32_t>(partition) + 1)); >} > >template<typename E> >inline std::enable_if_t<PartitionEnum<E>::value, E> >operator ++(E& partition, __attribute__((unused)) int postfixDisambiguator) >{ > E original = partition; > partition = static_cast<E>(static_cast<uint32_t>(partition) + 1); > return original; >} > >struct OrdinalPartition { > static inline OrdinalEdgePartition > getDual(OrdinalReferencePartition rp) > { > switch (rp) > { > case OrdinalReferencePartition::forward: > return OrdinalEdgePartition::forward; > > case OrdinalReferencePartition::cross: > return OrdinalEdgePartition::cross; > > case OrdinalReferencePartition::loopback: > return OrdinalEdgePartition::loopback; > > case OrdinalReferencePartition::clock: > return OrdinalEdgePartition::clock; > } > ># 117 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 117) ># 117 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "unreachable" << ># 117 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > facile::RequireException::require_sentinel ># 117 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > ; > } > > static inline OrdinalReferencePartition > getDual(OrdinalEdgePartition ep) > { > switch (ep) > { > case OrdinalEdgePartition::tree: > case OrdinalEdgePartition::forward: > return OrdinalReferencePartition::forward; > > case OrdinalEdgePartition::cross: > return OrdinalReferencePartition::cross; > > case OrdinalEdgePartition::loopback: > return OrdinalReferencePartition::loopback; > > case OrdinalEdgePartition::clock: > return OrdinalReferencePartition::clock; > } > ># 138 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 138) ># 138 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "unreachable" << ># 138 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > facile::RequireException::require_sentinel ># 138 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > ; > } >}; > >static inline EnumToken >tag(OrdinalEdgePartition partition) >{ > switch (partition) > { > case OrdinalEdgePartition::tree: > return EnumToken("T"); > > case OrdinalEdgePartition::forward: > return EnumToken("F"); > > case OrdinalEdgePartition::cross: > return EnumToken("X"); > > case OrdinalEdgePartition::loopback: > return EnumToken("B"); > > case OrdinalEdgePartition::clock: > return EnumToken("C"); > } > ># 162 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 162) ># 162 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "unreachable" << ># 162 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > facile::RequireException::require_sentinel ># 162 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > ; >} > >static inline EnumToken >label(OrdinalEdgePartition partition) >{ > switch (partition) > { > case OrdinalEdgePartition::tree: > return EnumToken("tree"); > > case OrdinalEdgePartition::forward: > return EnumToken("forward"); > > case OrdinalEdgePartition::cross: > return EnumToken("cross"); > > case OrdinalEdgePartition::loopback: > return EnumToken("loopback"); > > case OrdinalEdgePartition::clock: > return EnumToken("clock"); > } > > ># 186 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 186) ># 186 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "unreachable" << ># 186 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > facile::RequireException::require_sentinel ># 186 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > ; >} > >static inline EnumToken >tag(OrdinalReferencePartition partition) >{ > switch (partition) > { > case OrdinalReferencePartition::forward: > return EnumToken("F"); > > case OrdinalReferencePartition::cross: > return EnumToken("X"); > > case OrdinalReferencePartition::loopback: > return EnumToken("B"); > > case OrdinalReferencePartition::clock: > return EnumToken("C"); > } > > ># 207 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 207) ># 207 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "unreachable" << ># 207 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > facile::RequireException::require_sentinel ># 207 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > ; >} > >static inline EnumToken >label(OrdinalReferencePartition partition) >{ > switch (partition) > { > case OrdinalReferencePartition::forward: > return EnumToken("forward"); > > case OrdinalReferencePartition::cross: > return EnumToken("cross"); > > case OrdinalReferencePartition::loopback: > return EnumToken("loopback"); > > case OrdinalReferencePartition::clock: > return EnumToken("clock"); > } > > ># 228 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 228) ># 228 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "unreachable" << ># 228 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > facile::RequireException::require_sentinel ># 228 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > ; >} > >struct OrdinalEdgePartitionAdapter { > static inline OrdinalEdgePartition > from(TreeRelation relation) > { > switch (relation) > { > case TreeRelation::tree: > return OrdinalEdgePartition::tree; > > case TreeRelation::forward: > return OrdinalEdgePartition::forward; > > case TreeRelation::cross: > return OrdinalEdgePartition::cross; > > case TreeRelation::loopback: > return OrdinalEdgePartition::loopback; > } > > ># 250 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw ># 250 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > FacileException ># 250 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 250) ># 250 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "unreachable" << std::endl; > } >}; > >struct TreeRelationAdapter { > static inline TreeRelation > from(OrdinalEdgePartition partition) > { > switch (partition) > { > case OrdinalEdgePartition::tree: > return TreeRelation::tree; > > case OrdinalEdgePartition::forward: > return TreeRelation::forward; > > case OrdinalEdgePartition::cross: > return TreeRelation::cross; > > case OrdinalEdgePartition::loopback: > return TreeRelation::loopback; > > default: > ># 273 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 273) ># 273 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "Cannot determine a TreeRelation corresponding to partition " << label(partition) << ># 273 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > facile::RequireException::require_sentinel ># 273 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > ; > } > > ># 276 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > throw ># 276 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > FacileException ># 276 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp", 276) ># 276 "../../subprojects/edfst/src/edfst/tree/LinkPartition.hpp" > << "unreachable" << std::endl; > } >}; > >template<typename LinkType> >struct IExtract { > using IExtractTag = IExtract<LinkType>; > > virtual ~IExtract() {} > > virtual void > transfer(const LinkType&) = 0; >}; > >template<typename LinkType, typename PartitionType> >struct IPartitionExtract : > public IExtract<LinkType> { > using IPartitionExtractTag = IPartitionExtract<LinkType, PartitionType>; > > virtual ~IPartitionExtract() {} > > virtual void > part(PartitionType) = 0; >}; >} ># 92 "../../subprojects/edfst/src/edfst/tree/ElasticTreeDefinitions.hpp" 2 ># 6 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" 1 > > > > ># 1 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 1 > ># 10 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" >namespace edfst >{ >namespace profile >{ >using Count = uint32_t; >using Balance = int32_t; >using Dimension = uint64_t; >using Range = uint64_t; >using Accumulator = uint64_t; > >enum class TreeDimension { > vertex, > edge, > leaf, > contour >}; > >using TreeDimensionIndex = EnumerationIndexArray<Dimension, TreeDimension, 4>; > >class TreeDimensions { >TreeDimensionIndex _index; > >public: > using Index = TreeDimensionIndex; > > ># 35 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 35 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > ; > > Dimension& v; > Dimension& e; > Dimension& leaf; > Dimension& contour; > > bool initialized; > > TreeDimensions() : > _index(), > v(_index[TreeDimension::vertex]), > e(_index[TreeDimension::edge]), > leaf(_index[TreeDimension::leaf]), > contour(_index[TreeDimension::contour]), > initialized(true) > {} > > Dimension& > at(TreeDimension d) { return _index[d]; } > > Dimension > read(TreeDimension d) const { return _index.read(d); } > > TreeDimension > compare(const TreeDimensions& other) const { return _index.compare(other._index); } > > std::ostream& > print(std::ostream& o) const > { > return o << "[V " << v << ", E " << e << ", L " << leaf << ", C " << contour << "]"; > } > > void > clear() { v = e = leaf = contour = 0; } >}; > >struct SubtreeMetrics { > struct EdgeHistogram { > Count tree; > Count free; > Range unoccupiedInternal; > Range unoccupiedFree; > > void > clear() > { > tree = free = 0; > unoccupiedInternal = unoccupiedFree = 0; > } > > void > update(TreeDimensions& d, Count treeVertices) > { > tree = (d.v - 1); > free = (d.e - tree); > unoccupiedInternal = ((d.v * (d.v - 1)) - d.e); > unoccupiedFree = ((d.v * (treeVertices - 1)) - tree); > } > } > edges; > > double freeEdgeOccupancy; > double relativeSize; > > struct InternalRebind { > Range scenarios; > double frequency; > > void > clear() > { > scenarios = 0; > frequency = 0.0; > } > > void > update(TreeDimensions& d, Range unoccupiedInternal) > { > double baselineRebind = Arithmetic::ratio<Range>(d.leaf * Range(d.leaf - 1), 2); > Count maxPathLength = (d.v - d.leaf + 1); > Dimension maxContour = (((maxPathLength * (maxPathLength - 1)) / 2) * ((d.leaf - 1) * maxPathLength)); > > scenarios = baselineRebind + (maxContour - d.contour); > frequency = Arithmetic::ratio(scenarios, unoccupiedInternal); > } > } > internalRebind; > > void > clear() > { > edges.clear(); > freeEdgeOccupancy = relativeSize = 0.0; > internalRebind.clear(); > } > > void > update(TreeDimensions& d, Count treeVertices) > { > edges.update(d, treeVertices); > freeEdgeOccupancy = Arithmetic::ratio<double>(edges.free, edges.unoccupiedFree); > relativeSize = Arithmetic::ratio<double>(d.v, treeVertices); > internalRebind.update(d, edges.unoccupiedInternal); > } >}; > >struct TreeState { > EpochType epoch; > Count v; >}; > >struct OrdinalTreeProfile { > TreeDimensions d; > > SubtreeMetrics m; > > struct Histogram { > Balance balance; > Count bypassCount; > > struct Insert { > Count cursor; > double potential; > > void > clear() > { > cursor = 0; > potential = 0.0; > } > } > insert; > > void > clear() > { > balance = 0; > bypassCount = 0; > insert.clear(); > } > } > histogram; > > struct Projection { > double efficiency; > struct FreeEdge { > double equilibrium; > double density; > > void > clear() { equilibrium = density = 0.0; } > } > free; > > void > clear() > { > efficiency = 0.0; > free.clear(); > } > > void > update(TreeDimensions& d, Count freeEdges) > { > free.density = Arithmetic::ratio<double>(freeEdges, d.v); > free.equilibrium = Arithmetic::ratio<double>(d.v, d.v - d.leaf); > efficiency = (free.equilibrium - free.density); > } > } > projection; > > OrdinalTreeProfile() : > d(), > _evaluationEpoch(0) > { clear(); } > > void > clear() > { > d.clear(); > m.clear(); > histogram.clear(); > projection.clear(); > } > > void > evaluate(TreeState treeState) > { > if (treeState.epoch == _evaluationEpoch) > return; > > m.update(d, treeState.v); > projection.update(d, m.edges.free); > > _evaluationEpoch = treeState.epoch; > } > > void > requireEmpty() > { > ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > ( ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > d.v == 0 ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp", 236) << ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > std::endl ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "⢠Condition [" << ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > "d.v == 0" ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "] " << ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > std::endl ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "⢠" ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > << ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > facile::RequireException::require_sentinel ># 236 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > ; > ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > ( ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > d.e == 0 ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp", 237) << ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > std::endl ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "⢠Condition [" << ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > "d.e == 0" ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "] " << ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > std::endl ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "⢠" ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > << ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > facile::RequireException::require_sentinel ># 237 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > ; > ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > ( ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > d.leaf == 0 ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp", 238) << ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > std::endl ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "⢠Condition [" << ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > "d.leaf == 0" ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "] " << ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > std::endl ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "⢠" ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > << ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > facile::RequireException::require_sentinel ># 238 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > ; > ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > ( ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > d.contour == 0 ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp", 239) << ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > std::endl ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "⢠Condition [" << ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > "d.contour == 0" ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "] " << ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > std::endl ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > << "⢠" ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > << ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > facile::RequireException::require_sentinel ># 239 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > ; > } > > struct PrintToken { > ># 243 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 243 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > ; > > PrintToken(Id32 id, profile::OrdinalTreeProfile& profile) : > _id(id), > _profile(profile) > {} > > std::ostream& > print(std::ostream& o) const > { > o << std::setprecision(2); > > o << "OrdinalTree " << _id << " profile: " << std::endl; > o << "\td: " << _profile.d << std::endl; > o << "\th: { Balance: " << _profile.histogram.balance << "; Bypasses: " << _profile.histogram.bypassCount > << ", Insert bypass potential: " << _profile.histogram.insert.potential << " }" << std::endl; > o << "\tp: { Efficiency: " << _profile.projection.efficiency << ", Free edges [ Equilibrium: " > << _profile.projection.free.equilibrium << ", Density: " << _profile.projection.free.density << " ] }" << std::endl; > > return o; > } > > private: > Id32 _id; > profile::OrdinalTreeProfile& _profile; > }; > > private: > EpochType _evaluationEpoch; >}; > >struct OrdinalProfile { > TreeDimensions d; > > Count subtrees; > Balance balance; > Balance efficiency; > > struct InsertCredit { > Count instances; > double meanClockPosition; > > void > clear() > { > instances = 0; > meanClockPosition = 0.0; > } > } > insert; > > OrdinalProfile() : > d() > { clear(); } > > void > clear() > { > d.clear(); > subtrees = 0; > balance = efficiency = 0; > insert.clear(); > } >}; > >struct ClockProfile { > TreeDimensions d; > > ClockProfile() : > d() > { clear(); } > > void > clear() { d.clear(); } >}; > >struct TreeProfile { > TreeDimensions d; > > OrdinalProfile ordinal; > ClockProfile clock; > > TreeProfile() : > d() > { clear(); } > > void > clear() > { > d.clear(); > ordinal.clear(); > clock.clear(); > } >}; > >static inline EnumToken >tag(TreeDimension d) >{ > switch (d) > { > case TreeDimension::vertex: > return EnumToken("V"); > > case TreeDimension::edge: > return EnumToken("E"); > > case TreeDimension::leaf: > return EnumToken("L"); > > case TreeDimension::contour: > return EnumToken("C"); > } > > ># 356 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp", 356) ># 356 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > << "unreachable" << ># 356 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > facile::RequireException::require_sentinel ># 356 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > ; >} > >static inline EnumToken >label(TreeDimension d) >{ > switch (d) > { > case TreeDimension::vertex: > return EnumToken("vertex-total"); > > case TreeDimension::edge: > return EnumToken("edge-total"); > > case TreeDimension::leaf: > return EnumToken("leaf-total"); > > case TreeDimension::contour: > return EnumToken("contour"); > } > > ># 377 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp", 377) ># 377 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > << "unreachable" << ># 377 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" 3 > facile::RequireException::require_sentinel ># 377 "../../subprojects/edfst/src/edfst/tree/TreeProfile.hpp" > ; >} >} >} ># 6 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" 2 > >namespace edfst >{ >template<typename VertexType> >class OrdinalTreeBase >{ >using OrdinalTree = OrdinalTreeBase<VertexType>; > >struct PrintToken { > static constexpr int FacileStreamTokenTag = 0; > > std::ostream& > print(std::ostream& o) const { return o << "OT" << _ot->_root->id(); } > > PrintToken(unit<OrdinalTree> ot) : > _ot(ot) > {} > > private: > unit<OrdinalTree> _ot; >}; > >public: > OrdinalTreeBase(unit<VertexType> root) : > _root(root), > _nextOrdinal(0), > _isCrossEntry(false), > _profile() > { > attach(_root); > > } > > inline PrintToken > token() { return PrintToken(unit<OrdinalTree>::wrap(this)); } > > inline void > advanceEpoch(__attribute__((unused)) EpochType epoch) { _isCrossEntry = false; } > > unit<VertexType> > root() const { return _root; } > > unit<VertexType> > anchor() const { return _root->tree(); } > > bool > isCrossEntry() const { return _isCrossEntry; } > > void > setCrossEntry(bool b = true) { _isCrossEntry = b; } > > typename VertexType::IdType > instanceId() { return _root->instanceId(); } > > uint32_t > ordinal() { return _root->ordinal(); } > > inline void > attach(unit<VertexType> v) > { > v->setOrdinalTree(unit<OrdinalTreeBase<VertexType>>::wrap(this)); > v->setOrdinal(nextOrdinal()); > } > > inline void > bounce(unit<VertexType> v) > { > ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" 3 > ( ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" > v->ordinalRoot() == _root ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp", 73) << ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" > std::endl ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" 3 > << "⢠Condition [" << ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" > "v->ordinalRoot() == _root" ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" 3 > << "] " << ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" > std::endl ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" 3 > << "⢠" ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" > << ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 73 "../../subprojects/edfst/src/edfst/tree/OrdinalTree.hpp" > ; > v->setOrdinal(nextOrdinal()); > } > > inline bool > contains(unit<VertexType> v) { return v->mode() == VertexType::Mode::ordinal && v->ordinalTree() == this; } > > inline typename VertexType::Mode > edgeMode(unit<VertexType> head) > { > if ((head->mode() == VertexType::Mode::ordinal) && (head->ordinalTree() == this)) > return VertexType::Mode::ordinal; > else > return VertexType::Mode::clock; > } > > static inline bool > isOrdinalRelation(unit<const VertexType> tail, unit<const VertexType> head) > { > return (tail->mode() == VertexType::Mode::ordinal && > head->mode() == VertexType::Mode::ordinal && > tail->ordinalTree() == head->ordinalTree()); > } > > static inline typename VertexType::Mode > relationMode(unit<VertexType> tail, unit<VertexType> head) > { > return isOrdinalRelation(tail, head) ? VertexType::Mode::ordinal : VertexType::Mode::clock; > } > > > profile::OrdinalTreeProfile& > profile() { return _profile; } > > profile::OrdinalTreeProfile::PrintToken > profileToken() { return profile::OrdinalTreeProfile::PrintToken(_root->id(), _profile); } > >private: > ElasticOrdinal > nextOrdinal() { return ++_nextOrdinal; } > > unit<VertexType> _root; > ElasticOrdinal _nextOrdinal; > > bool _isCrossEntry; > > profile::OrdinalTreeProfile _profile; >}; >} ># 7 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 2 > >namespace edfst >{ >template<typename LinkSetType, template<typename> class ExtensionSetBase, template<typename> class VertexType> >class TreeVertexBase : > public VertexBase<LinkSetType, ExtensionSetBase<VertexType<LinkSetType>>> >{ >protected: > > using TreeVertex = VertexType<LinkSetType>; > using CompleteExtensionSet = ExtensionSetBase<TreeVertex>; > using OrdinalTreeType = OrdinalTreeBase<TreeVertex>; > using super = VertexBase<LinkSetType, CompleteExtensionSet>; > > struct PrintToken : > super::PrintToken { > ># 23 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 23 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > > using VertexPrinter = typename CompleteExtensionSet::VertexPrinter; > > std::ostream& > print(std::ostream& o) const > { > unit<TreeVertex> v = _v; > > o << tag(v->_mode) << "â¢" << VertexPrinter::id(v); > > if (_showPosition) { > if (v->_mode == TreeVertex::Mode::clock) > o << "[" << v->_position.timespan.in << "," << v->_position.timespan.out << "]"; > else > o << "#" << v->_position.ordinal; > if (v->_tree != nullptr) > o << " ^" << v->_tree->token() << " @ " << v->_treePosition; > } > return o; > } > > PrintToken(unit<TreeVertex> v, bool showPosition = false) : > super::PrintToken(), > _v(v), > _showPosition(showPosition) > {} > > PrintToken& > showPosition() > { > _showPosition = true; > return *this; > } > > static PrintToken > token(unit<TreeVertex> v, bool showPosition = false) { return PrintToken(v, showPosition); } > > private: > unit<TreeVertex> _v; > bool _showPosition; > }; > > template<typename VertexPrinter> > struct TreePathTokenBase { > static constexpr int FacileStreamTokenTag = 0; > > using TreePathToken = TreePathTokenBase<VertexPrinter>; > using Path = std::vector<unit<TreeVertex>>; > using PathWalk = typename Path::reverse_iterator; > > > > > friend std::ostream& > operator <<(std::ostream& o, const TreePathToken& t) > { > if (t._v == nullptr) > return o; > > PathWalkPrinter p; > > unit<TreeVertex> penultimate = p.print(o, t._v, t._deltaBound, t._ceiling); > for (unit<TreeVertex> meet : t._meetLeaves) { > if (meet == penultimate->tree()) { > o << std::endl << "\t[forward from " << VertexPrinter::token(meet) << "]" << std::endl; > } else { > o << std::endl << "\tMeet from " << VertexPrinter::token(meet, true) << ":" << std::endl; > p.print(o, meet, false, 0, penultimate); > } > } > return o; > } > > TreePathTokenBase() : > TreePathTokenBase(nullptr) > {} > > TreePathTokenBase(unit<TreeVertex> v) : > _v(v), > _deltaBound(true), > _ceiling(0) > {} > > TreePathToken& > setBoundary(uint32_t ceiling) > { > _ceiling = ceiling; > _deltaBound = false; > return *this; > } > > TreePathToken& > meetFrom(unit<TreeVertex> meetFrom) > { > _meetLeaves.push_back(meetFrom); > return *this; > } > > private: > struct PathWalkPrinter { > unit<TreeVertex> > print(std::ostream& o, unit<TreeVertex> walk, bool isDeltaBound = false, uint32_t ceiling = 0, unit<TreeVertex> sibling = nullptr) > { > _path.clear(); > > unit<TreeVertex> penultimate = walk; > > while (true) { > _path.push_back(walk); > if (isDeltaBound && walk->_isOnDeltaStack) > break; > if ((sibling != nullptr) && (walk->_tree == sibling->_tree)) > break; > if (walk->_level <= ceiling) > break; > penultimate = walk; > walk = walk->_tree; > } > > if ((sibling != nullptr) && (walk->_tree == sibling->_tree)) { > o << "\tMeet at " << VertexPrinter::token(walk->_tree) << " {" << VertexPrinter::token(walk, true) << ", " > << VertexPrinter::token(sibling, true) << "}" << std::endl; > } > > for (PathWalk p = _path.rbegin(), end = _path.rend(); p != end; p++) > o << "\t" << VertexPrinter::token(*p, true) << ((*p)->_isOnDeltaStack ? " Î" : " ") << std::endl; > > return penultimate; > } > > private: > Path _path; > }; > > unit<TreeVertex> _v; > bool _deltaBound; > uint32_t _ceiling; > std::vector<unit<TreeVertex>> _meetLeaves; > }; > >public: > > struct Types { > using LinkSet = LinkSetType; > using OrdinalTree = OrdinalTreeType; > using ExtensionSet = CompleteExtensionSet; > }; > > enum class EpochFlags : uint16_t { > BitwiseEnumTag, > none = 0x0, > isRebindPoint = 0x1, > isRebindTarget = 0x2, > isForwardMutable = 0x4, > isDeltaVisited = 0x8, > isEpisodeStepActor = 0x10, > isEpisodeExclusion = 0x20, > isDeltaViewLocked = 0x40, > isClockRebuilding = 0x80, > isOnRevertFrontier = 0x100, > isDeltaCursor = 0x200, > isRevertOrphan = 0x400, > isOrdinalAtEpoch = 0x800, > isDeltaClosed = 0x1000 > }; > > > enum class Mode { > clock, > ordinal, > revert > }; > > friend std::ostream& > operator <<(std::ostream& o, Mode mode) > { > switch (mode) > { > case Mode::clock: > return o << "clock"; > case Mode::ordinal: > return o << "ordinal"; > case Mode::revert: > return o << "revert"; > } > ># 209 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 209) ># 209 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << "unreachable" << ># 209 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 209 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > } > > union Position { > WalkTimespan timespan; > ElasticOrdinal ordinal; > > Position() : > timespan{ 0, 0 } > {} > }; > > enum class Role { > precedent, > subordinate, > delta, > count = 3, > none = 3 > }; > > TreeVertexBase(Id32 id, unit<LinkSetType> links) : > TreeVertexBase(id, links, Mode::ordinal) > {} > > TreeVertexBase(Id32 id, unit<LinkSetType> links, Mode mode) : > super(id, links), > _rebindEpoch(0), > _isOnDeltaStack(false), > _epochFlags(EpochFlags::none), > _level(0), > _tree(nullptr), > _mode(mode), > _ordinalTree(nullptr), > _position(), > _roles(), > _levelAtCommit(0) > {} > > static constexpr Id32 rootId = Id32::MIN_VALUE; > > uint32_t > level() const { return _level; } > > void > setLevel(uint32_t level) { _level = level; } > > unit<TreeVertex> > tree() const { return _tree; } > > void > setTree(unit<TreeVertex> tree) { _tree = tree; } > > uint32_t > treePosition() const { return _treePosition; } > > void > setTreePosition(uint32_t treePosition) { _treePosition = treePosition; } > > Mode > mode() const { return _mode; } > > void > setMode(Mode mode) > { > if ((_mode = mode) == Mode::ordinal) > _ordinalTree = nullptr; > } > > unit<typename Types::OrdinalTree> > ordinalTree() const { return _ordinalTree; } > > void > setOrdinalTree(unit<typename Types::OrdinalTree> ordinalTree) { _ordinalTree = ordinalTree; } > > uint32_t > ordinalTreeLevel() const > { > ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ( ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > _mode == Mode::ordinal || _mode == Mode::revert ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 286) << ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠Condition [" << ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > "_mode == Mode::ordinal || _mode == Mode::revert" ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "] " << ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 286 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠" > ># 287 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << "cannot access the ordinal tree level of a " << label(_mode) << " node" << ># 287 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 287 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > > return _level - ordinalRoot()->level(); > } > > inline unit<TreeVertex> > clockProxy() { return (_mode == Mode::clock ? TreeVertex::self(this) : _ordinalTree->root()->tree()); } > > inline unit<const TreeVertex> > clockProxy() const { return (_mode == Mode::clock ? TreeVertex::self(this) : _ordinalTree->root()->tree()); } > > inline unit<TreeVertex> > clockFrontierProxy() { return (_mode == Mode::clock ? TreeVertex::self(this) : _ordinalTree->root()); } > > unit<TreeVertex> > meet(WalkPosition p) > { > unit<TreeVertex> walk = clockProxy(); > while (walk->timespan().in > p || walk->timespan().out < p) > walk = walk->tree(); > > return walk; > } > > unit<TreeVertex> > meet(unit<TreeVertex> other) > { > unit<TreeVertex> self = TreeVertex::self(this); > > while (other->level() > self->level()) > other = other->tree(); > while (self->level() > other->level()) > self = self->tree(); > while (other != self) { > self = self->tree(); > other = other->tree(); > } > > return self; > } > > bool > isSubtreeOf(unit<TreeVertex> subtreeRoot) const > { > unit<const TreeVertex> walk = TreeVertex::self(this); > while (walk->level() > subtreeRoot->level()) > walk = walk->tree(); > > return walk == subtreeRoot; > } > > bool > isPositionalSubtreeOf(unit<TreeVertex> subtreeRoot) const > { > if (Types::OrdinalTree::isOrdinalRelation(subtreeRoot, TreeVertex::self(this))) > return isSubtreeOf(subtreeRoot); > else if (subtreeRoot->_mode == Mode::clock) > return subtreeRoot->_position.timespan.contains(clockProxy()->_position.timespan); > else > return false; > } > > bool > isRevertDeltaInterior() > { > return (isFlag(EpochFlags::isOrdinalAtEpoch) && !isFlag(EpochFlags::isOnRevertFrontier) && _roles[Role::delta] > 0); > } > > inline unit<TreeVertex> > ordinalRoot() const > { > ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ( ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > _mode == Mode::ordinal || _mode == Mode::revert ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 358) << ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠Condition [" << ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > "_mode == Mode::ordinal || _mode == Mode::revert" ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "] " << ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 358 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠" > ># 359 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << "cannot access the ordinal root of a " << label(_mode) << " node" << ># 359 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 359 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > > return _ordinalTree->root(); > } > > inline bool > isOrdinalRoot() const { return (_mode == Mode::ordinal && isSelf(_ordinalTree->root())); } > > EpochType > rebindEpoch() const { return _rebindEpoch; } > > bool > isLive(EpochType epoch) const { return _rebindEpoch == epoch; } > > bool > ifAdvanceEpoch(EpochType epoch) > { > if (epoch == _rebindEpoch) > return false; > > advanceEpoch(epoch); > return true; > } > > void > advanceEpoch(EpochType epoch) > { > _rebindEpoch = epoch; > _epochFlags = EpochFlags::none; > _levelAtEpoch = _level; > > if (_mode == Mode::ordinal) { > _ordinalRebind.position = WalkTimespan{ 0, 0 }; > setFlag(EpochFlags::isOrdinalAtEpoch); > } > _roles.zero(); > > if (isOrdinalRoot()) > _ordinalTree->advanceEpoch(epoch); > } > > WalkTimespan > timespan() { return _position.timespan; } > > void > setTimeIn(WalkPosition t) { _position.timespan.in = t; } > > void > setTimeOut(WalkPosition t) { _position.timespan.out = t; } > > void > setTimespan(WalkPosition in, WalkPosition out) > { > _position.timespan.in = in; > _position.timespan.out = out; > } > > inline ElasticOrdinal > ordinal() { return _position.ordinal; } > > inline void > setOrdinal(ElasticOrdinal ordinal) { _position.ordinal = ordinal; } > > inline bool > isVisited() const { return testAll(_epochFlags, EpochFlags::isDeltaVisited); } > > inline void > setVisited( ) { _epochFlags |= EpochFlags::isDeltaVisited; } > > inline bool > isOnDeltaStack() const { return _isOnDeltaStack; } > > inline void > setOnDeltaStack(bool b = true) > { > if ((_isOnDeltaStack = b) && (_tree != nullptr)) { > _tree->requireDeltaTreeEdge(super::id(), _treePosition); > > if (_tree->_mode == Mode::clock) > _tree->setStackTreePosition(_treePosition); > } > } > > inline bool > isFlag(EpochFlags flag) const { return testAll(_epochFlags, flag); } > > inline void > setFlag(EpochFlags flag) { _epochFlags |= flag; } > > inline void > clearFlag(EpochFlags flag) { _epochFlags &= ~flag; } > > inline void > putFlag(EpochFlags flag, bool b) > { > if (b) > setEpochFlag(flag); > else > clearEpochFlag(flag); > } > > inline uint32_t > deltaPeripheryStackMeet() > { > ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ( ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > _roles[Role::delta] == 0 ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 463) << ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠Condition [" << ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > "_roles[Role::delta] == 0" ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "] " << ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠" ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 463 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > > return _deltaPeripheryStackMeet; > } > > inline void > setDeltaPeripheryStackMeet(uint32_t level) > { > ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ( ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > _roles[Role::delta] == 0 ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 471) << ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠Condition [" << ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > "_roles[Role::delta] == 0" ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "] " << ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠" ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 471 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > > _deltaPeripheryStackMeet = level; > } > > inline WalkTimespan > getOrdinalRebindPosition() { return _ordinalRebind.position; } > > inline void > setOrdinalRebindPosition(WalkPosition unique) > { > ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ( ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > _roles[Role::delta] > 0 ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 482) << ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠Condition [" << ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > "_roles[Role::delta] > 0" ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "] " << ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠" ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 482 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > > _ordinalRebind.position.in = _ordinalRebind.position.out = unique; > } > > inline RoleType > getRole(Role role) { return _roles[role]; } > > inline void > setRole(Role role, RoleType step) { _roles[role] = step; } > > inline uint32_t > stackTreePosition() > { > ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ( ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > _isOnDeltaStack ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 496) << ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠Condition [" << ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > "_isOnDeltaStack" ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "] " << ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠" ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 496 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > > return _stackTreePosition; > } > > unit<TreeVertex> > stackSubtree() { return super::links->edgeAt(_stackTreePosition)->endpoint(); } > > inline uint32_t > precedenceEvaluationIndex() const { return _precedenceEvaluation; } > > inline void > setPrecedenceEvaluationIndex(uint32_t i) { _precedenceEvaluation = i; } > > inline uint32_t > levelAtEpoch() const { return _levelAtEpoch; } > > inline uint32_t > ordinalTreeLevelAtCommit() const { return _levelAtCommit; } > > inline void > commitProfile() { _levelAtCommit = ordinalTreeLevel(); } > > void > requireDeltaTreeEdge(const Id32 id, uint32_t position) > { > if (_mode == Mode::ordinal) > super::links->out.ordinal().requireDeltaTreeEdge(id, position); > else > super::links->requireDeltaTreeEdge(id, position); > } > > inline PrintToken > token() { return PrintToken(TreeVertex::self(this)); } > > > > > inline TreePathTokenBase<PrintToken> > treePathToken(uint32_t ceiling = 0) { return treePathToken<PrintToken>(ceiling); } > > inline TreePathTokenBase<PrintToken> > treePathToken(unit<TreeVertex> subtreeRoot) { return treePathToken<PrintToken>(subtreeRoot); } > > template<typename VertexPrinter, typename TreePathToken = TreePathTokenBase<VertexPrinter>> > static inline TreePathToken > voidTreePathToken() { return TreePathToken(); } > > template<typename VertexPrinter, typename TreePathToken = TreePathTokenBase<VertexPrinter>> > inline TreePathToken > treePathToken(uint32_t ceiling = 0) > { > if (ceiling == 0) > return TreePathToken(TreeVertex::self(this)); > else > return TreePathToken(TreeVertex::self(this)).setBoundary(ceiling); > } > > template<typename VertexPrinter, typename TreePathToken = TreePathTokenBase<VertexPrinter>> > inline TreePathToken > treePathToken(unit<TreeVertex> subtreeRoot) { return TreePathToken(TreeVertex::self(this)).setBoundary(subtreeRoot->_level); } > > static inline EnumToken > tag(Mode mode) > { > switch (mode) > { > case Mode::clock: > return EnumToken("C"); > > case Mode::ordinal: > return EnumToken("O"); > > case Mode::revert: > return EnumToken("R"); > } > > ># 573 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > throw ># 573 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > FacileException ># 573 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 573) ># 573 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << "unreachable"; > } > > static inline EnumToken > label(Mode mode) > { > switch (mode) > { > case Mode::clock: > return EnumToken("clock"); > > case Mode::ordinal: > return EnumToken("ordinal"); > > case Mode::revert: > return EnumToken("revert"); > } > > ># 591 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 591) ># 591 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << "unreachable" << ># 591 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 591 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > } > > static Mode > parseMode(const std::string& s) > { > if (s == "clock") > return Mode::clock; > else if (s == "ordinal") > return Mode::ordinal; > else if (s == "revert") > return Mode::revert; > > ># 604 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 604) ># 604 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << "Cannot parse '" << s << "' as a TreeVertex::Mode" << ># 604 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 604 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > } > >private: > struct OrdinalRebind { > WalkTimespan position; > }; > > template<typename StorageClass> > struct EpisodeRoles : > EnumerationIndexArray<StorageClass, Role, static_cast<uint32_t>(Role::count)> { > }; > > bool > isSelf(unit<TreeVertex> v) const { return v.get() == this; } > > inline void > setStackTreePosition(uint32_t position) > { > ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ( ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > _mode == Mode::clock ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp", 623) << ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠Condition [" << ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > "_mode == Mode::clock" ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "] " << ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > std::endl ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > << "⢠" ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > << ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" 3 > facile::RequireException::require_sentinel ># 623 "../../subprojects/edfst/src/edfst/tree/TreeVertex.hpp" > ; > > _stackTreePosition = position; > } > > EpochType _rebindEpoch; > uint32_t _levelAtEpoch; > bool _isOnDeltaStack; > EpochFlags _epochFlags; > > union { > uint32_t _deltaPeripheryStackMeet; > OrdinalRebind _ordinalRebind; > uint32_t _stackTreePosition; > uint32_t _precedenceEvaluation; > }; > > uint32_t _level; > unit<TreeVertex> _tree; > uint32_t _treePosition; > Mode _mode; > unit<typename Types::OrdinalTree> _ordinalTree; > > Position _position; > EpisodeRoles<RoleType> _roles; > > uint32_t _levelAtCommit; >}; >} ># 8 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 1 > > > > > >namespace edfst >{ >using PathBranchLevel = uint32_t; >using PathBranchLevelSequence = std::vector<uint32_t>; > >template<typename Endpoint> >class TreeEdgeBase : > public EdgeBase<Endpoint> >{ >using super = EdgeBase<Endpoint>; > >public: > TreeEdgeBase() : > TreeEdgeBase<Endpoint>(nullptr, 0, 0) > {} > > TreeEdgeBase(unit<Endpoint> endpoint, uint32_t dualPosition) : > TreeEdgeBase<Endpoint>(endpoint, dualPosition, 0) > {} > > TreeEdgeBase(unit<Endpoint> endpoint, uint32_t dualPosition, PathBranchLevel pathBranchLevel) : > super(endpoint, dualPosition), > _pathBranchLevel(pathBranchLevel) > {} > > PathBranchLevel > pathBranchLevel() { return _pathBranchLevel; } > > void > setPathBranchLevel(PathBranchLevel level) > { > ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 3 > ( ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" > level < 0x10000 ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp", 37) << ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" > std::endl ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 3 > << "⢠Condition [" << ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" > "level < 0x10000" ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 3 > << "] " << ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" > std::endl ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 3 > << "⢠" ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" > << "Attempt to set improbable pathBranchLevel " << level << ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 3 > facile::RequireException::require_sentinel ># 37 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" > ; > > _pathBranchLevel = level; > } > > void > inferPathBranchLevel(unit<Endpoint> tail) > { > unit<Endpoint> head = super::endpoint(); > if (head->getRole(Endpoint::Role::delta) == 0) { > _pathBranchLevel = head->deltaPeripheryStackMeet(); > } else { > unit<Endpoint> walk = tail->tree(); > while (true) { > > if (!walk->isOnDeltaStack() || (walk->mode() == Endpoint::Mode::clock)) > ># 53 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 3 > throw ># 53 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" > FacileException ># 53 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp", 53) ># 53 "../../subprojects/edfst/src/edfst/tree/TreeEdge.hpp" > << "Failed to locate path branch level for cross edge " << tail->id() << " -> " << head->id(); > if (head->getOrdinalRebindPosition().in >= walk->getOrdinalRebindPosition().in) { > _pathBranchLevel = (walk->level() - walk->ordinalRoot()->level()); > return; > } > walk = walk->tree(); > } > } > } > > void > rotate() { facile::StreamLog::log(__PRETTY_FUNCTION__, 64, facile::StreamLogLevel::Status) << "Edge rotates " << super::_endpoint->id() << "<" << _pathBranchLevel << "> somewhere" << std::endl; } > >private: > PathBranchLevel _pathBranchLevel; >}; >} ># 9 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 1 > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/IndexIterator.hpp" 1 > > > > >namespace facile >{ >template<typename T> >struct VectorAccessor { > using size_type = typename std::vector<T>::size_type; > using value_type = T; > using reference = typename std::conditional<is_smart_pointer<T>::value, T, const T&>::type; > using pointer = typename std::conditional<is_smart_pointer<T>::value, T, T *>::type; > > static size_type > size(handle<const std::vector<T>> v) { return v->size(); } > > static reference > at(handle<const std::vector<T>> v, size_type i) { return v->at(i); } >}; > >template<typename Sequence, typename Accessor> >class IndexIteratorBase >{ >using IndexIterator = IndexIteratorBase<Sequence, Accessor>; >using size_type = typename Accessor::size_type; > >availability<decltype(&Accessor::size)(handle<const Sequence>), size_type> sizeAccess; >availability<decltype(&Accessor::at)(handle<const Sequence>, size_type), typename Accessor::reference> elementAccess; > >public: > typedef IndexIterator self_type; > typedef typename Accessor::value_type value_type; > typedef typename Accessor::reference reference; > typedef typename Accessor::pointer pointer; > typedef std::forward_iterator_tag iterator_category; > typedef std::make_signed<size_type> difference_type; > > IndexIteratorBase(handle<const Sequence> sequence, size_type i = 0) : > _sequence(sequence), > _i(i) > {} > > self_type > operator ++() { return _i++, *this; } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > return _i++, pre; > } > > template<typename Integer> > self_type > operator +(Integer amount) const { return IndexIterator(_sequence, _i + amount); } > > template<typename Integer> > self_type > operator +=(Integer amount) { return _i += amount, *this; } > > difference_type > operator -(const self_type& other) const { return _i - other._i; } > > template<typename Integer> > self_type > operator -(Integer amount) const { return IndexIterator(_sequence, _i - amount); } > > template<typename Integer> > self_type > operator -=(Integer amount) { return _i -= amount, *this; } > > reference > operator *() { return Accessor::at(_sequence, _i); } > > pointer > operator ->() const { return Accessor::at(_sequence, _i); } > > bool > operator ==(const self_type& other) const { return _sequence == other._sequence && _i == other._i; } > > bool > operator !=(const self_type& other) const { return _sequence != other._sequence || _i != other._i; } > > static iterable<IndexIterator> > iterate(handle<const Sequence> sequence, size_type start = 0) > { > return iterable<IndexIterator>(IndexIterator(sequence, start), IndexIterator(sequence, Accessor::size(sequence))); > } > >private: > handle<const Sequence> _sequence; > size_type _i; >}; >} ># 5 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/stitch.hpp" 1 > > > > >namespace facile >{ >template<typename Iterator, typename Subset> >class stitch >{ >public: > using self_type = stitch<Iterator, Subset>; > using value_type = typename Iterator::value_type; > using reference = typename Iterator::reference; > using pointer = typename Iterator::pointer; > using iterator_category = std::forward_iterator_tag; > > stitch(Iterator begin, Iterator end) : > _p(begin), > _end(end) > { > gather(); > } > > self_type > begin() { return *this; } > > self_type > end() { return self_type(_end, _end); } > > self_type& > operator ++() > { > _p++; > gather(); > return *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > _p++; > gather(); > return pre; > } > > reference > operator *() { return *_p; } > > pointer > operator ->() const { return _p; } > > bool > operator ==(const self_type& other) const { return _p == other._p; } > > bool > operator !=(const self_type& other) const { return _p != other._p; } > >private: > void > gather() > { > while ((_p < _end) && !Subset::include(_p)) > _p++; > } > > Iterator _p; > Iterator _end; >}; >} ># 6 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 2 > > > > ># 1 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" 1 > > > > >namespace edfst >{ >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class TreeLinkSetBase; > >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class OrdinalTreeLinkSet >{ >using EdgeType = EdgeClass<VertexType>; >using ReferenceType = ReferenceClass<VertexType>; >using TreeLinkSet = TreeLinkSetBase<EdgeClass, ReferenceClass, VertexType>; > >public: > template<typename PartitionIndex, typename LinkType, typename LinkPartitionType> > class PartitionWalk { > public: > PartitionWalk(const PartitionIndex& index, LinkPartitionType startPartition = firstPartition()) : > _i(index.start(startPartition)), > _linkScan(index.scanLinks(startPartition)), > _partition(startPartition), > _index(index) > { > if (!_linkScan.isClosed()) { > while (index.empty(_partition)) > _partition++; > } > } > > bool > isClosed() { return _linkScan.isClosed(); } > > void > advance() > { > ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" 3 > ( ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" > !_linkScan.isClosed() ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp", 39) << ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" > std::endl ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" > "!_linkScan.isClosed()" ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" 3 > << "] " << ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" > std::endl ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" 3 > << "⢠" ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" > << "Cannot advance a closed PartitionWalk" << ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 39 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkSet.hpp" > ; > > if (++_linkScan, (++_i == _index.end(_partition))) { > do { > _partition++; > } while (!_linkScan.isClosed() && _index.empty(_partition)); > } > } > > LinkType& > link() { return _linkScan.read(); } > > LinkPartitionType > partition() { return _partition; } > > private: > static LinkPartitionType > firstPartition() { return static_cast<LinkPartitionType>(0); } > > uint32_t _i; > typename PartitionIndex::LinkScan _linkScan; > LinkPartitionType _partition; > const PartitionIndex& _index; > }; > >protected: > template<typename LinkType, typename LinkPartitionType, typename IndexType> > class OrdinalLinkRotateInsertion > { > public: > OrdinalLinkRotateInsertion(IndexType& index, LinkType& emplace, bool isNewEntry) : > _index(index), > _emplace(emplace), > _isNewEntry(isNewEntry), > _newEntryPosition(0) > {} > > void > swap(LinkPartitionType partition) > { > LinkPartitionType nextPartition = partition + 1; > if (!_index.empty(nextPartition)) { > cell<LinkType> link = _index.wrapStart(nextPartition); > LinkType rotate = *link; > link.write(_emplace); > if (_isNewEntry) { > _newEntryPosition = _index.start(nextPartition); > _isNewEntry = false; > } else { > _emplace.endpoint()->links->getDual(_emplace)->setDualPosition(_index.start(nextPartition)); > } > _emplace = rotate; > } > _index.expand(partition); > } > > void > append() > { > uint32_t position = point_util::lastOfQuantity(_index.size()); > _index.set(position, _emplace); > if (_isNewEntry) > _newEntryPosition = position; > else > _emplace.endpoint()->links->getDual(_emplace)->setDualPosition(position); > } > > uint32_t > newEntryPosition() { return _newEntryPosition; } > > private: > IndexType& _index; > LinkType& _emplace; > bool _isNewEntry; > uint32_t _newEntryPosition; > }; > > template<typename LinkType, typename LinkPartitionType, typename IndexType> > class OrdinalLinkRotateRemoval > { > public: > OrdinalLinkRotateRemoval(IndexType& index, cell<LinkType> hole) : > _index(index), > _hole(hole) > {} > > void > pack(LinkPartitionType partition) > { > if (_index.empty(partition)) > return; > > cell<LinkType> sentinel = wrapEnd(partition); > if (sentinel > _hole) { > _hole.write(sentinel.read()); > _hole = sentinel; > _index.shrink(partition); > _hole->endpoint()->links->getDual(_hole)->setDualPosition(_index.indexOf(_hole)); > } > } > > private: > IndexType& _index; > cell<LinkType> _hole; > }; > > template<typename LinkType, typename PartitionIndex, typename LinkPartitionType> > struct LinkTableToken { > static constexpr int FacileStreamTokenTag = 0; > > LinkTableToken(unit<TreeLinkSet> links, PartitionIndex index, const std::string& linkTypeName, > LinkPartitionType first, LinkPartitionType last) : > _links(links), > _index(index), > _linkTypeName(linkTypeName), > _first(first), > _last(last) > {} > > std::ostream& > print(std::ostream& o) const > { > std::string comma = ""; > o << "\t" << _linkTypeName << " partitions of " << _links->_v->token() << ": { "; > for (LinkPartitionType partition : enumerable<LinkPartitionType>::walk(_first, _last)) { > > o << comma << tag(partition) << " " << _index.end(partition); > comma = ", "; > } > o << " }" << std::endl; > > PartitionWalk<PartitionIndex, LinkType, LinkPartitionType> partitionWalk(_index); > while (!partitionWalk.isClosed()) { > o << "\t\t" << tag(partitionWalk.partition()) << " " > << partitionWalk.link().endpoint()->token().showPosition() << std::endl; > partitionWalk.advance(); > } > > return o; > } > > private: > unit<TreeLinkSet> _links; > PartitionIndex _index; > const std::string _linkTypeName; > LinkPartitionType _first; > LinkPartitionType _last; > }; >}; > >template<typename LinkPartitionType, typename LinkTypeView, typename LinkType, typename IndexType> >class OrdinalLinkRotation { >public: > struct RotationTrace { > bool initialRotation; > }; > > OrdinalLinkRotation(LinkTypeView& linkView, IndexType& index) : > _linkView(linkView), > _index(index) > {} > > RotationTrace > left(cell<LinkType>& linkCell, LinkPartitionType fromPartition, LinkPartitionType toPartition) > { > RotationTrace trace = { false }; > > if (fromPartition == toPartition) > return trace; > > LinkType link = linkCell.read(); > > LinkPartitionType partitionWalk = (fromPartition - 1); > cell<LinkType> stepRight = linkCell, stepLeft = _index.wrapEnd(partitionWalk); > if (stepRight > stepLeft) { > _linkView.emplace(stepLeft, stepRight); > trace.initialRotation = true; > } > _index.expand(partitionWalk); > partitionWalk--; > > while (partitionWalk >= toPartition) { > stepRight = stepLeft; > stepLeft = _index.wrapEnd(partitionWalk); > if (stepRight > stepLeft) > _linkView.emplace(stepLeft, stepRight); > _index.expand(partitionWalk); > partitionWalk--; > } > > _linkView.emplace(link, (linkCell = stepLeft)); > return trace; > } > > RotationTrace > right(cell<LinkType> linkCell, LinkPartitionType fromPartition, LinkPartitionType toPartition) > { > RotationTrace trace = { false }; > > if (fromPartition == toPartition) > return trace; > > LinkType link = linkCell.read(); > > LinkPartitionType partitionWalk = fromPartition; > cell<LinkType> stepLeft = linkCell, stepRight = _index.wrapLast(partitionWalk); > if (stepRight > stepLeft) { > _linkView.emplace(stepRight, stepLeft); > trace.initialRotation = true; > } > > while (partitionWalk < toPartition) { > _index.shrink(partitionWalk); > partitionWalk++; > stepLeft = stepRight; > stepRight = _index.wrapLast(partitionWalk); > if (stepRight > stepLeft) > _linkView.emplace(stepRight, stepLeft); > } > > _linkView.emplace(link, stepRight); > return trace; > } > >private: > LinkTypeView& _linkView; > IndexType& _index; >}; >} ># 5 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 1 > > > > >namespace edfst >{ >template<template<typename> class LinkClass, typename LinkPartitionType, typename VertexType, unsigned int PartitionCount> >class OrdinalTreeLinkIndex >{ >using self = OrdinalTreeLinkIndex<LinkClass, LinkPartitionType, VertexType, PartitionCount>; >using LinkType = LinkClass<VertexType>; > >template<typename StorageClass> >struct OrdinalLinkPartitionIndex : > public EnumerationIndexArray<StorageClass, LinkPartitionType, PartitionCount> >{}; > >using PartitionIndex = OrdinalLinkPartitionIndex<uint32_t>; > >public: > using LinkSequence = std::vector<LinkType>; > using LinkIterable = iterable<typename LinkSequence::iterator>; > using LinkReviterable = iterable<typename LinkSequence::reverse_iterator>; > using LinkCellWalk = cellwalk<LinkType>; > using LinkScan = scan<typename LinkSequence::iterator>; > > OrdinalTreeLinkIndex() : > _sequence(nullptr) > {} > > void > inflate(handle<LinkSequence> sequence, uint32_t treeEdgeCount = 0) > { > _sequence = sequence; > _index.fill(treeEdgeCount); > } > > bool > empty() const { return _sequence->empty(); } > > bool > empty(LinkPartitionType partition) const { return start(partition) == end(partition); } > > uint32_t > size() const { return _sequence->size(); } > > uint32_t > start(LinkPartitionType partition) const { return (static_cast<uint32_t>(partition) == 0) ? 0 : _index.read(partition - 1); } > > uint32_t > reverseStart(LinkPartitionType partition) const { return _sequence->size() - _index.read(partition); } > > uint32_t > end(LinkPartitionType partition) const { return (partition == LinkPartitionType::clock) ? _sequence->size() : _index.read(partition); } > > uint32_t& > endIndex(LinkPartitionType partition) { return _index[partition]; } > > uint32_t > last(LinkPartitionType partition) const > { > ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > ( ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > size(partition) > 0 ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp", 62) << ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > std::endl ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > << "⢠Condition [" << ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > "size(partition) > 0" ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > << "] " << ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > std::endl ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > << "⢠" ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > << "Cannot identify the last link in an empty partition" << ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > facile::RequireException::require_sentinel ># 62 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > ; > > return _index.read(partition) - 1; > } > > uint32_t > reverseEnd(LinkPartitionType partition) const > { > return _sequence->size() - (static_cast<uint32_t>(partition) == 0 ? 0 : _index.read(partition - 1)); > } > > uint32_t > indexOf(cell<LinkType> link) { return link->indexIn(_sequence); } > > uint32_t > size(LinkPartitionType partition) const { return end(partition) - start(partition); } > > LinkScan > scanLinks(LinkPartitionType startPartition = static_cast<LinkPartitionType>(0), > LinkPartitionType endPartition = static_cast<LinkPartitionType>(PartitionCount)) const > { > return LinkScan(beginLinks() + start(startPartition), beginLinks() + end(endPartition)); > } > > typename LinkSequence::iterator > beginLinks() const { return _sequence->begin(); } > > typename LinkSequence::iterator > endLinks() const { return _sequence->end(); } > > void > set(uint32_t position, LinkType& link) { _sequence->at(position) = link; } > > void > setEnd(LinkPartitionType partition, uint32_t endPosition) > { > ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > ( ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > partition != LinkPartitionType::clock ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp", 98) << ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > std::endl ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > << "⢠Condition [" << ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > "partition != LinkPartitionType::clock" ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > << "] " << ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > std::endl ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > << "⢠" ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > << "Cannot set the end of the clock partition (defers to the link count)" << ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" 3 > facile::RequireException::require_sentinel ># 98 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeLinkIndex.hpp" > ; > > _index[partition] = endPosition; > } > > LinkPartitionType > identifyPartition(cell<LinkType> link) > { > return identifyLinkPartition(link.indexIn(_sequence)); > } > > LinkPartitionType > identifyLinkPartition(uint32_t edgeIndex) > { > for (LinkPartitionType p = static_cast<LinkPartitionType>(0); p < LinkPartitionType::clock; p++) { > if (edgeIndex < _index[p]) > return p; > } > > return LinkPartitionType::clock; > } > > LinkIterable > iterateLinks() > { > return LinkIterable(_sequence->begin(), _sequence->end()); > } > > LinkIterable > iterateLinks(LinkPartitionType partition) > { > return LinkIterable(_sequence->begin() + start(partition), _sequence->begin() + end(partition)); > } > > LinkReviterable > reviterateLinks(LinkPartitionType partition) > { > return LinkReviterable(_sequence->rbegin() + reverseStart(partition), _sequence->rbegin() + reverseEnd(partition)); > } > > LinkCellWalk > cellwalkLinks(LinkPartitionType partition) > { > return LinkCellWalk::make(_sequence, start(partition), end(partition)); > } > > LinkCellWalk > cellwalkLinksOverSpan(LinkPartitionType startPartition, LinkPartitionType endPartition) > { > return LinkCellWalk::make(_sequence, start(startPartition), end(endPartition)); > } > > cell<LinkType> > wrap(uint32_t position) { return cell_wrap(_sequence, position); } > > cell<LinkType> > wrapStart(LinkPartitionType partition) { return cell_wrap(_sequence, start(partition)); } > > cell<LinkType> > wrapLast(LinkPartitionType partition) { return cell_wrap(_sequence, end(partition)) - 1; } > > cell<LinkType> > wrapEnd(LinkPartitionType partition) { return cell_wrap(_sequence, end(partition)); } > > void > shrink(LinkPartitionType p, uint32_t amount = 1) { _index[p] -= amount; } > > void > expand(LinkPartitionType p, uint32_t amount = 1) { _index[p] += amount; } > > void > transferTo(self& dst) > { > _index.overwrite(dst._index); > _index.zero(); > } > >private: > handle<LinkSequence> _sequence; > PartitionIndex _index; >}; >} ># 6 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 2 > >namespace edfst >{ >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class OrdinalTreeReferenceSet : > protected OrdinalTreeLinkSet<EdgeClass, ReferenceClass, VertexType> >{ >using outer = OrdinalTreeReferenceSet<EdgeClass, ReferenceClass, VertexType>; >using super = OrdinalTreeLinkSet<EdgeClass, ReferenceClass, VertexType>; > >using EdgeType = EdgeClass<VertexType>; >using ReferenceType = ReferenceClass<VertexType>; >using TreeLinkSet = TreeLinkSetBase<EdgeClass, ReferenceClass, VertexType>; >using OrdinalTree = OrdinalTreeBase<VertexType>; > >using ReferenceSequence = std::vector<ReferenceType>; >using ReferenceIterable = iterable<typename ReferenceSequence::iterator>; >using ReferenceScan = scan<typename ReferenceSequence::iterator>; >using VertexSetReader = typename VertexSet<VertexType>::Reader; > >public: > using PartitionIndex = OrdinalTreeLinkIndex<ReferenceClass, OrdinalReferencePartition, VertexType, 3>; > using ReferencePartitionWalk = typename super::PartitionWalk<PartitionIndex, ReferenceType, OrdinalReferencePartition>; > using ReferenceToken = typename super::LinkTableToken<ReferenceType, PartitionIndex, OrdinalReferencePartition>; > > void > inflate(uint32_t treeEdgeCount = 0) { _index.inflate(_links->_in, treeEdgeCount); } > > inline PartitionIndex& > index() { return _index; } > > cell<ReferenceType> > append(ReferenceType tail, OrdinalReferencePartition rp) > { > typename super::OrdinalLinkRotateInsertion<ReferenceType, OrdinalReferencePartition, PartitionIndex> rotate(_index, tail, false); > > switch (rp) > { > case OrdinalReferencePartition::forward: > rotate.swap(OrdinalReferencePartition::forward); > [[fallthrough]]; > > case OrdinalReferencePartition::cross: > rotate.swap(OrdinalReferencePartition::cross); > [[fallthrough]]; > > case OrdinalReferencePartition::loopback: > rotate.swap(OrdinalReferencePartition::loopback); > [[fallthrough]]; > > case OrdinalReferencePartition::clock: > _links->expandIn(); > rotate.append(); > [[fallthrough]]; > > default: > ; > } > > return nullptr; > > } > > void > remove(cell<ReferenceType> reference) > { > OrdinalReferencePartition partition = identifyPartition(reference); > typename super::OrdinalLinkRotateInsertion<ReferenceType, OrdinalReferencePartition, PartitionIndex> rotate(_index, reference); > > switch (partition) > { > case OrdinalReferencePartition::forward: > rotate.pack(OrdinalReferencePartition::forward); > [[fallthrough]]; > > case OrdinalReferencePartition::cross: > rotate.pack(OrdinalReferencePartition::cross); > [[fallthrough]]; > > case OrdinalReferencePartition::loopback: > rotate.pack(OrdinalReferencePartition::loopback); > [[fallthrough]]; > > case OrdinalReferencePartition::clock: > rotate.pack(OrdinalReferencePartition::loopback); > } > > _links->shrinkIn(); > } > > template<typename Extract> > void > extract(handle<VertexSetReader> subset, handle<Extract> x) > { > __attribute__((unused)) compliance<typename IPartitionExtract<ReferenceType, OrdinalReferencePartition>::IPartitionExtractTag, Extract> check; > > OrdinalReferencePartition p = OrdinalReferencePartition::forward; > cell<ReferenceType> cursor = _links->startReferences(), keep = cursor; > cell<ReferenceType> sentinel = _links->referenceSentinel(), partition = _index.wrapEnd(p); > while (true) { > while (cursor == partition) { > if (p == OrdinalReferencePartition::clock) { > > break; > } > _index.setEnd(p, _links->referenceIndex(keep)); > x->part(p); > partition = _index.wrapEnd(++p); > } > > if (cursor >= sentinel) > break; > > if (subset->contains(cursor->endpoint())) { > x->transfer(cursor.read()); > } else { > if (cursor > keep) { > keep.write(cursor.read()); > cursor->endpoint()->links->getDual(cursor.read())->setDualPosition(_links->referenceIndex(keep)); > } > keep++; > } > cursor++; > } > _links->moveInSentinel(keep); > } > > inline void > rotateLeft(cell<ReferenceType> reference, OrdinalReferencePartition fromPartition, OrdinalReferencePartition toPartition) > { > TreeReferenceView referenceView(_links); > ReferenceRotation rotation(referenceView, _index); > > rotation.left(reference, fromPartition, toPartition); > } > > inline void > rotateRight(cell<ReferenceType> reference, OrdinalReferencePartition fromPartition, OrdinalReferencePartition toPartition) > { > TreeReferenceView referenceView(_links); > ReferenceRotation rotation(referenceView, _index); > > rotation.right(reference, fromPartition, toPartition); > } > > inline void > rotateRight(cell<ReferenceType> reference, OrdinalReferencePartition toPartition) > { > rotateRight(reference, _index.identifyPartition(reference), toPartition); > } > > void > transformClockReferences() > { > cell<ReferenceType> f = cell_wrap(_links->_in, 0); > for (cell<ReferenceType> r : _index.iterateLinks()) { > if (r->endpoint()->isOnDeltaStack() && OrdinalTree::isOrdinalRelation(_links->_v, r->endpoint())) { > if (r > f) { > ReferenceType swap = f.read(); > > _links->emplaceReference(r.read(), f); > _links->emplaceReference(swap, r); > } > f++; > } > } > > _index.endIndex(OrdinalReferencePartition::forward) > = _index.endIndex(OrdinalReferencePartition::cross) > = _index.endIndex(OrdinalReferencePartition::loopback) > = f.indexIn(_links->_in); > } > > void > deltaPreTriage() > { > deltaPreTriage(OrdinalReferencePartition::forward); > deltaPreTriage(OrdinalReferencePartition::cross); > } > > void > classifyDeltaActor(uint32_t pathBranchLowerBound) > { > unit<VertexType> v = _links->_v; > > if (v->ordinalTree()->isCrossEntry() && (_index.size(OrdinalReferencePartition::loopback) > 0)) { > cell<ReferenceType> b = _index.wrapEnd(OrdinalReferencePartition::loopback) - 1; > cell<ReferenceType> end = _index.wrapStart(OrdinalReferencePartition::loopback); > while (b >= end) { > if (b->endpoint()->mode() == VertexType::Mode::clock) > rotateRight(b, OrdinalReferencePartition::loopback, OrdinalReferencePartition::clock); > b--; > } > } > > if (_index.size(OrdinalReferencePartition::cross) > 0) { > cell<ReferenceType> x = _index.wrapEnd(OrdinalReferencePartition::cross) - 1; > cell<ReferenceType> end = _index.wrapStart(OrdinalReferencePartition::cross); > while (x >= end) { > if (!updatePathBranchLevel(v, x, pathBranchLowerBound)) { > if (x->endpoint()->mode() == VertexType::Mode::ordinal) { > x->endpoint()->links->out.ordinal().rotateRight(x->endpoint()->links->getDual(x.read()), > OrdinalEdgePartition::cross, OrdinalEdgePartition::clock); > } > rotateRight(x, OrdinalReferencePartition::cross, OrdinalReferencePartition::clock); > } > x--; > } > } > } > > void > updateOrdinalTreeRelation(OrdinalEdgePartition partition, EdgeType& e) > { > unit<VertexType> head = e.endpoint(); > uint32_t headDual = e.dualPosition(); > if (head->mode() == VertexType::Mode::ordinal) { > OrdinalReferencePartition tailCurrentPartition = head->links->in.ordinal().index().identifyLinkPartition(headDual); > OrdinalReferencePartition tailCommitPartition = OrdinalPartition::getDual(partition); > if (tailCurrentPartition < tailCommitPartition) > head->links->in.ordinal().rotateRight(head->links->referenceAt(headDual), tailCurrentPartition, tailCommitPartition); > else if (tailCurrentPartition > tailCommitPartition) > head->links->in.ordinal().rotateLeft(head->links->referenceAt(headDual), tailCurrentPartition, tailCommitPartition); > } > } > > void > requireVertexMode() > { > ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > ( ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > _links->_v->mode() == VertexType::Mode::ordinal ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp", 235) << ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > std::endl ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > << "⢠Condition [" << ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > "_links->_v->mode() == VertexType::Mode::ordinal" ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > << "] " << ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > std::endl ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > << "⢠" ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > << "Attempt to access ordinal references of " << _links->_v->token() << ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > facile::RequireException::require_sentinel ># 235 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > ; > } > > void > requirePartitionIntegrity() > { > requireVertexMode(); > > for (OrdinalReferencePartition p = OrdinalReferencePartition::cross; p < OrdinalReferencePartition::loopback; p++) { > ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > ( ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > _index.end(p) <= _index.end(p + 1) ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp", 244) << ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > std::endl ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > << "⢠Condition [" << ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > "_index.end(p) <= _index.end(p + 1)" ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > << "] " << ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > std::endl ># 244 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > << "⢠" > ># 245 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > << "Ordinal partition (" << label(p) << " = " << _index.end(p) << ") must precede partition (" > << label(p + 1) << " = " << _index.end(p + 1) << ")" << ># 246 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" 3 > facile::RequireException::require_sentinel ># 246 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeReferenceSet.hpp" > ; > } > > } > > ReferenceToken > referenceToken() > { > return ReferenceToken(_links, _index, "Reference", OrdinalReferencePartition::forward, OrdinalReferencePartition::clock); > } > >private: > class TreeReferenceView > { > public: > TreeReferenceView(unit<TreeLinkSet> links) : > _links(links) > {} > > void > emplace(cell<ReferenceType> dst, cell<ReferenceType> src) { _links->emplaceReference(dst.read(), src); } > > private: > const unit<TreeLinkSet> _links; > }; > > bool > isOrdinalDefection(unit<VertexType> tail) > { > unit<VertexType> head = _links->_v; > > if (tail->mode() == VertexType::Mode::clock) > return false; > > if (tail->ordinalTree() != head->ordinalTree()) > return true; > > bool isOrdinalTreeIntegrated = (tail->ordinalRoot()->isLive(head->rebindEpoch()) && tail->ordinalRoot()->getRole(VertexType::Role::delta) > 0); > bool isTailInDelta = (tail->isLive(head->rebindEpoch()) && tail->getRole(VertexType::Role::delta) > 0); > return (isOrdinalTreeIntegrated && tail->ordinalTree()->isCrossEntry() && !isTailInDelta); > } > > void > deltaPreTriage(OrdinalReferencePartition partition) > { > if (!_index.empty(partition)) { > cell<ReferenceType> r = _index.wrapLast(partition); > cell<ReferenceType> end = _index.wrapStart(partition); > while (true) { > bool isDefection = isOrdinalDefection(r->endpoint()); > bool isOrdinalDeparture = ((r->endpoint()->mode() == VertexType::Mode::clock) || > (r->endpoint()->ordinalRoot()->mode() == VertexType::Mode::clock)); > if ((r->endpoint() != _links->_v->tree()) && (isDefection || isOrdinalDeparture)) { > if (isDefection) { > unit<VertexType> tail = r->endpoint(); > cell<EdgeType> dual = tail->links->edgeAt(r->dualPosition()); > OrdinalEdgePartition dualPartition = tail->links->out.ordinal().index().identifyLinkPartition(r->dualPosition()); > tail->links->out.ordinal().rotateRight(dual, dualPartition, OrdinalEdgePartition::clock); > } > rotateRight(r, partition, OrdinalReferencePartition::clock); > } > if (r == end) > break; > r--; > } > } > } > > bool > updatePathBranchLevel(unit<VertexType> tail, cell<ReferenceType> x, uint32_t lowerBound) > { > unit<VertexType> head = x->endpoint(); > > if (head->mode() == VertexType::Mode::clock) > return false; > > if (OrdinalTree::isOrdinalRelation(tail, head)) { > if (!head->isLive(tail->rebindEpoch()) || (head->getRole(VertexType::Role::delta) == 0)) { > if (head->links->edgeAt(x->dualPosition())->pathBranchLevel() > lowerBound) > head->links->edgeAt(x->dualPosition())->setPathBranchLevel(lowerBound); > } > return true; > } > > return false; > } > > using ReferenceRotation = OrdinalLinkRotation<OrdinalReferencePartition, TreeReferenceView, ReferenceType, PartitionIndex>; > > const unit<TreeLinkSet> _links; > > PartitionIndex _index; >}; >} ># 11 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" 1 > > > > > >namespace edfst >{ >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class TreeLinkSetBase; > >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class ClockTreeReferenceSet >{ >using outer = ClockTreeReferenceSet<EdgeClass, ReferenceClass, VertexType>; > >public: > using EdgeType = EdgeClass<VertexType>; > using ReferenceType = ReferenceClass<VertexType>; > using TreeLinkSet = TreeLinkSetBase<EdgeClass, ReferenceClass, VertexType>; > > using ReferenceSequence = std::vector<ReferenceType>; > using VertexSetReader = typename VertexSet<VertexType>::Reader; > > struct ReferenceToken { > static constexpr int FacileStreamTokenTag = 0; > > ReferenceToken(outer& set) : > _set(set) > {} > > std::ostream& > print(std::ostream& o) const > { > for (const ReferenceType& reference : _set._links->_in) > o << "\t\t" << reference.endpoint()->token().showPosition() << std::endl; > > return o; > } > > private: > outer& _set; > }; > > ClockTreeReferenceSet(unit<TreeLinkSet> links) : > _links(links) > {} > > void > append(ReferenceType& r) > { > _links->emplaceReference(r, appendEmpty()); > } > > void > remove(cell<ReferenceType> reference) > { > cell<EdgeType> tail = _links->referenceTail(); > if (reference < tail) { > reference->write(tail.read()); > reference->endpoint()->links->getDual(reference)->setDualPosition(reference->indexIn(_links->_in)); > } > > _links->shrinkIn(); > } > > template<typename Extract> > void > extract(handle<VertexSetReader> subset, handle<Extract> x) > { > __attribute__((unused)) compliance<typename IExtract<ReferenceType>::IExtractTag, Extract> check; > > cell<ReferenceType> cursor = _links->startReferences(), keep = cursor, sentinel = _links->referenceSentinel(); > while (cursor < sentinel) { > if (subset->contains(cursor->endpoint())) { > x->transfer(cursor.read()); > } else { > if (cursor > keep) { > keep.write(cursor.read()); > cursor->endpoint()->links->getDual(cursor.read())->setDualPosition(_links->referenceIndex(keep)); > } > keep++; > } > cursor++; > } > _links->moveInSentinel(keep); > } > > cell<ReferenceType> > appendEmpty() > { > _links->_in.emplace_back(); > return cell_wrap(&_links->_in.back()); > } > > void > requireVertexMode() > { > ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" 3 > ( ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" > _links->_v->mode() == VertexType::Mode::clock ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp", 98) << ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" > std::endl ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" 3 > << "⢠Condition [" << ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" > "_links->_v->mode() == VertexType::Mode::clock" ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" 3 > << "] " << ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" > std::endl ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" 3 > << "⢠" ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" > << "Attempt to access clock references of " << _links->_v->token() << ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" 3 > facile::RequireException::require_sentinel ># 98 "../../subprojects/edfst/src/edfst/tree/ClockTreeReferenceSet.hpp" > ; > } > > ReferenceToken > referenceToken() { return ReferenceToken(*this); } > >private: > const unit<TreeLinkSet> _links; >}; >} ># 12 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 1 > > > > > > > > >namespace edfst >{ >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class OrdinalTreeEdgeSet : > protected OrdinalTreeLinkSet<EdgeClass, ReferenceClass, VertexType> >{ >using outer = OrdinalTreeEdgeSet<EdgeClass, ReferenceClass, VertexType>; >using super = OrdinalTreeLinkSet<EdgeClass, ReferenceClass, VertexType>; > >using EdgeType = EdgeClass<VertexType>; >using ReferenceType = ReferenceClass<VertexType>; >using TreeLinkSet = TreeLinkSetBase<EdgeClass, ReferenceClass, VertexType>; >using OrdinalTree = OrdinalTreeBase<VertexType>; >using SiblingWalkPosition = SiblingWalkPositionBase<VertexType>; > >using EdgeSequence = std::vector<EdgeType>; >using EdgeIterable = iterable<typename EdgeSequence::iterator>; >using EdgeReviterable = iterable<typename EdgeSequence::reverse_iterator>; >using EdgeScan = scan<typename EdgeSequence::iterator>; >using EdgeCellSequence = std::vector<cell<EdgeType>>; >using EdgeCellIterator = typename EdgeCellSequence::iterator; >using EdgeCellIterable = iterable<EdgeCellIterator>; >using EdgeCellScan = scan<EdgeCellIterator>; > >using PartitionIndex = OrdinalTreeLinkIndex<EdgeClass, OrdinalEdgePartition, VertexType, 4>; > >using EdgeToken = typename super::LinkTableToken<EdgeType, PartitionIndex, OrdinalEdgePartition>; > >public: > using EdgePartitionWalk = typename super::PartitionWalk<PartitionIndex, EdgeType, OrdinalEdgePartition>; > > > union EdgeTriage { > cell<EdgeType> e; > EdgeType clone; > > EdgeTriage(cell<EdgeType> e) : > e(e) > {} > > EdgeTriage(const EdgeTriage& src) : > clone(src.clone) > {} > > static EdgeTriage > cloneEdge(EdgeType src) > { > EdgeTriage et; > > et.clone = src; > return et; > } > > protected: > EdgeTriage() : > e(nullptr) > {} > }; > > template<typename StorageClass> > struct EdgeTriageBuffers : > EnumerationAssignmentArray<StorageClass, OrdinalEdgePartition, 5> > {}; > > using EdgeTriageBuffer = std::pair<OrdinalEdgePartition, std::vector<EdgeTriage>>; > > class EdgeTriageSet > { > public: > struct PrintToken { > static constexpr int FacileStreamTokenTag = 0; > > PrintToken(unit<EdgeTriageSet> s) : > _s(s) > {} > > std::ostream& > print(std::ostream& o) const > { > if (_s == nullptr) > return o << "\t<empty triage classification set>" << std::endl; > > o << "\tL: "; > if (_s->_walk.empty()) { > o << "<empty>" << std::endl; > } else { > o << "{"; > std::string comma = ""; > for (cell<EdgeType> looseEdge : _s->_walk) { > o << comma << looseEdge->endpoint()->token(); > comma = ", "; > } > o << "}" << std::endl; > } > > for (EdgeTriageBuffer& buffer : _s->_buffers) { > o << "\t" << tag(buffer.first) << ": "; > > if (buffer.second.empty()) { > o << "<empty>" << std::endl; > } else { > o << "{"; > std::string comma = ""; > for (EdgeTriage& e : buffer.second) { > o << comma << e.e->endpoint()->token(); > comma = ", "; > } > o << "}" << std::endl; > } > } > > return o << std::endl; > } > > private: > unit<EdgeTriageSet> _s; > }; > > void > begin(unit<TreeLinkSet> links) > { > _links = links; > > _walk.clear(); > for (EdgeTriageBuffer& buffer : _buffers) > buffer.second.clear(); > } > > inline cell<EdgeType> > triageTreeEdgeAt(uint32_t position) { return _buffers[OrdinalEdgePartition::tree].at(position).e; } > > inline uint32_t > partitionSize(OrdinalEdgePartition partition) { return _buffers[partition].size(); } > > inline void > classifyClone(OrdinalEdgePartition partition, EdgeType e) { _buffers[partition].push_back(EdgeTriage::cloneEdge(e)); } > > inline void > classify(OrdinalEdgePartition partition, cell<EdgeType> e) { _buffers[partition].push_back(e); } > > inline void > pendWalk(cell<EdgeType> e) { _walk.push_back(e); } > > inline void > setCloneDeterminantLevel(uint32_t level) { _buffers[OrdinalEdgePartition::cross].back().clone.setPathBranchLevel(level); } > > void > spongeClones() > { > for (EdgeTriageBuffer& buffer : _buffers) { > for (EdgeTriage& e : buffer.second) { > EdgeType copy = e.e.read(); > e.clone = copy; > } > } > } > > void > spongeLooseEdges(EdgeCellIterator looseEdgeCursor) > { > EdgeCellIterable spongeSubwalk(looseEdgeCursor, _walk.end()); > for (cell<EdgeType> looseEdge : spongeSubwalk) > _walkSponge.push_back(looseEdge.read()); > } > > void > commitClones(OrdinalEdgePartition startPartition) > { > cell<EdgeType> start = _links->out.ordinal()._index.wrapStart(startPartition), cursor = start; > uint32_t startOffset = start.indexIn(_links->_out); > > for (EdgeTriageBuffer& buffer : _buffers.span(startPartition, OrdinalEdgePartition::clock)) { > commitBufferClones(buffer, cursor); > if (buffer.first == OrdinalEdgePartition::clock) > break; > _links->out.ordinal()._index.setEnd(buffer.first, startOffset + (cursor - start)); > } > } > > void > sortWalk() > { > WalkConservingComparator comparator(_links); > > std::sort(_walk.begin(), _walk.end(), comparator); > } > > EdgeCellScan > scanLooseEdges() { return EdgeCellScan(_walk); } > > cell<EdgeType> > revertCommitWalk(cell<EdgeType>& revertDeltaCursor ) > { > unit<VertexType> tail = _links->_v; > > for (EdgeType& e : _walkSponge) { > unit<VertexType> head = e.endpoint(); > > _links->emplaceEdge(e, revertDeltaCursor); > > if (head->tree() == tail) { > head->ifAdvanceEpoch(tail->rebindEpoch()); > head->setFlag(VertexType::EpochFlags::isRevertOrphan); > head->setTreePosition(revertDeltaCursor.indexIn(_links->_out)); > } > ++revertDeltaCursor; > } > > return revertDeltaCursor; > } > > cell<EdgeType> > revertCommitPartition(cell<EdgeType>& revertCursor, OrdinalEdgePartition partition) > { > for (EdgeTriage& e : _buffers[partition]) { > _links->emplaceEdge(e.clone, revertCursor++); > > > > } > > return revertCursor; > } > > cell<EdgeType> > revertCommitPartitions(cell<EdgeType>& revertCursor, > OrdinalEdgePartition startPartition = OrdinalEdgePartition::tree, > OrdinalEdgePartition endPartition = OrdinalEdgePartition::clock) > { > while (startPartition <= endPartition) > revertCommitPartition(revertCursor, startPartition++); > > return revertCursor; > } > > PrintToken > token() { return PrintToken(loan_wrap(this)); } > > void > requireTreePositionIntegrity() > { > uint32_t i = 0; > > for (EdgeTriage& t : _buffers[OrdinalEdgePartition::tree]) { > unit<VertexType> subtree = t.e->endpoint(); > ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > subtree->treePosition() == i ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 254) << ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "subtree->treePosition() == i" ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 254 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" > ># 255 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << std::endl << "\tIncorrect tree position at edge " << i << " in tree edges of " << _links->_v->token() << " triage: " > << subtree->token() << " has position " << subtree->treePosition() << std::endl > << "\tTriage of " << _links->_v->token() << ": " << _links->out.ordinal().triageToken() << ># 257 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 257 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > i++; > } > } > > private: > struct WalkConservingComparator { > WalkConservingComparator(unit<TreeLinkSet> links) : > _links(links) > {} > > bool > operator ()(cell<EdgeType> first, cell<EdgeType> second) > { > unit<VertexType> v0 = _links->_v, v1 = first->endpoint(), v2 = second->endpoint(); > > if (OrdinalTree::isOrdinalRelation(v1, v2)) { > return v1->ordinal() < v2->ordinal(); > } else if (OrdinalTree::isOrdinalRelation(v0, v1)) { > return true; > } else if (OrdinalTree::isOrdinalRelation(v0, v2)) { > return false; > } > > if (v1->mode() == VertexType::Mode::clock) { > if (v2->mode() == VertexType::Mode::clock) { > if (v1->tree() == v0) { > if (v2->tree() != v0) > return true; > } else if (v2->tree() == v0) { > return false; > } > return v1->timespan().in < v2->timespan().in; > } else { > return isLess(v1, v2->ordinalTree()); > } > } else if (v2->mode() == VertexType::Mode::clock) { > return !isLess(v2, v1->ordinalTree()); > } else { > return isLess(v1->ordinalTree(), v2->ordinalTree()); > } > } > > bool > isLess(unit<VertexType> v, unit<OrdinalTree> ot) > { > unit<VertexType> v0 = _links->_v, otr = ot->root(), ota = otr->tree(); > > if (v->tree() == v0) { > if (ota == v0) > return v->treePosition() < otr->treePosition(); > else > return true; > } else if (ota == v0) { > return false; > } > > if (v == ota) > return true; > > unit<OrdinalTree> otEntry; > WalkTimespan otc, vc = v->timespan(); > > if (otr->ordinalTree() == ot) { > otc = ota->timespan(); > otEntry = ot; > } else { > otEntry = otr->ordinalTree(); > otc = otEntry->root()->tree()->timespan(); > } > > if ((otc.in < vc.in) && (otc.out > vc.out)) { > if (otEntry->root()->treePosition() > 0) { > unit<VertexType> otLeftSibling = otEntry->root()->links->findLeftClockSibling(); > if ((otLeftSibling != nullptr) && (otLeftSibling->timespan().in >= vc.in)) > return true; > } > return false; > } > > return vc.in < otc.in; > } > > bool > isLess(unit<OrdinalTree> ot1, unit<OrdinalTree> ot2) > { > unit<VertexType> ota1 = ot1->root()->tree(), ota2 = ot2->root()->tree(); > > if (ota1 == ota2) > return (ot1->root()->treePosition() < ot2->root()->treePosition()); > else > return (ota1->timespan().in < ota2->timespan().in); > } > > private: > unit<TreeLinkSet> _links; > }; > > void > commitBufferClones(EdgeTriageBuffer& buffer, cell<EdgeType>& cursor) > { > for (EdgeTriage& et : buffer.second) { > _links->emplaceEdge(et.clone, cursor++); > _links->in.ordinal().updateOrdinalTreeRelation(buffer.first, et.clone); > } > } > > unit<TreeLinkSet> _links; > > > EdgeCellSequence _walk; > EdgeSequence _walkSponge; > EdgeTriageBuffers<std::vector<EdgeTriage>> _buffers; > }; > > void > inflate(uint32_t treeEdgeCount = 0) > { > _edgeTriage = nullptr; > _index.inflate(_links->_out, treeEdgeCount); > } > > inline PartitionIndex& > index() { return _index; } > > cell<EdgeType> > triageTreeEdgeAt(uint32_t position) { return _edgeTriage->triageTreeEdgeAt(position); } > > uint32_t > edgeTriagePartitionSize(OrdinalEdgePartition partition) { return _edgeTriage->partitionSize(partition); } > > void > edgeTriageClassify(OrdinalEdgePartition partition, cell<EdgeType> e) { _edgeTriage->classify(partition, e); } > > EdgeCellScan > scanLooseEdges() { return _edgeTriage == nullptr ? EdgeCellScan() : _edgeTriage->scanLooseEdges(); } > > void > sortTreePartition() > { > if (_index.end(OrdinalEdgePartition::tree) > 0) { > std::sort(_index.beginLinks(), _index.beginLinks() + _index.end(OrdinalEdgePartition::tree), > TreeLinkSet::edgeOrdinalComparator); > > uint32_t p = 0; > for (EdgeType& t : _links->iterateTreeEdges()) { > t.endpoint()->links->getDual(t)->setDualPosition(p); > t.endpoint()->setTreePosition(p); > p++; > } > } > } > > cell<EdgeType> > append(unit<VertexType> head, OrdinalEdgePartition ep, uint32_t pathBranchLevel) > { > EdgeType edge(head, 0, pathBranchLevel); > > typename super::OrdinalLinkRotateInsertion<EdgeType, OrdinalEdgePartition, PartitionIndex> rotate(_index, edge, true); > > switch (ep) > { > case OrdinalEdgePartition::tree: > head->setTree(_links->_v); > head->setTreePosition(_index.end(OrdinalEdgePartition::tree)); > head->setLevel(_links->_v->level() + 1); > rotate.swap(OrdinalEdgePartition::tree); > [[fallthrough]]; > > case OrdinalEdgePartition::forward: > rotate.swap(OrdinalEdgePartition::forward); > [[fallthrough]]; > > case OrdinalEdgePartition::cross: > rotate.swap(OrdinalEdgePartition::cross); > [[fallthrough]]; > > case OrdinalEdgePartition::loopback: > rotate.swap(OrdinalEdgePartition::loopback); > [[fallthrough]]; > > case OrdinalEdgePartition::clock: > _links->expandOut(); > rotate.append(); > break; > } > > ReferenceType dual = ReferenceType(_links->_v, rotate.newEntryPosition()); > > if (head->mode() == VertexType::Mode::ordinal) { > OrdinalReferencePartition rp = (_links->_v->ordinalTree()->contains(head) > ? OrdinalPartition::getDual(ep) > : OrdinalReferencePartition::clock); > head->links->in.ordinal().append(dual, rp); > } else { > head->links->emplaceReference(dual, head->links->in.clock().appendEmpty()); > } > > return cell_wrap(_links->_out, rotate.newEntryPosition()); > } > > void > remove(cell<EdgeType> edge) > { > OrdinalEdgePartition partition = identifyPartition(edge); > typename super::OrdinalLinkRotateInsertion<EdgeType, OrdinalEdgePartition, PartitionIndex> rotate(_index, edge); > > switch (partition) > { > case OrdinalEdgePartition::tree: > rotate.pack(OrdinalEdgePartition::tree); > [[fallthrough]]; > > case OrdinalEdgePartition::forward: > rotate.pack(OrdinalEdgePartition::forward); > [[fallthrough]]; > > case OrdinalEdgePartition::cross: > rotate.pack(OrdinalEdgePartition::cross); > [[fallthrough]]; > > case OrdinalEdgePartition::loopback: > rotate.pack(OrdinalEdgePartition::loopback); > [[fallthrough]]; > > case OrdinalEdgePartition::clock: > rotate.pack(OrdinalEdgePartition::loopback); > } > > _links->shrinkOut(); > } > > uint32_t > treeEdgeCount() { return _index.end(OrdinalEdgePartition::tree); } > > uint32_t > freeEdgeCount() { return _links->_out.size() - _index.end(OrdinalEdgePartition::tree); } > > inline void > rotateLeft(cell<EdgeType>& edge, OrdinalEdgePartition fromPartition, OrdinalEdgePartition toPartition) > { > TreeEdgeView edgeView(_links); > EdgeRotation rotation(edgeView, _index); > > rotation.left(edge, fromPartition, toPartition); > > if ((toPartition != OrdinalEdgePartition::tree) && (_index.size(OrdinalEdgePartition::tree) > 0)) { > uint32_t lastTreeIndex = _index.last(OrdinalEdgePartition::tree); > cell<EdgeType> lastTree = _index.wrapLast(OrdinalEdgePartition::tree); > ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > (toPartition != OrdinalEdgePartition::tree) || lastTree->endpoint()->treePosition() == lastTreeIndex ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 506) << ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "(toPartition != OrdinalEdgePartition::tree) || lastTree->endpoint()->treePosition() == lastTreeIndex" ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 506 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" > ># 507 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << "Tree edge in position " << lastTreeIndex << " of " << _links->_v->token() << " has endpoint " > << lastTree->endpoint()->token() << " with [ treePosition = " << lastTree->endpoint()->treePosition() << " ]" << ># 508 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 508 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > } > } > > inline void > rotateRight(cell<EdgeType> edge, OrdinalEdgePartition fromPartition, OrdinalEdgePartition toPartition) > { > TreeEdgeView edgeView(_links); > EdgeRotation rotation(edgeView, _index); > > typename EdgeRotation::RotationTrace trace = rotation.right(edge, fromPartition, toPartition); > > if (trace.initialRotation && (fromPartition == OrdinalEdgePartition::tree)) > edge->endpoint()->setTreePosition(edge - _index.wrap(0)); > } > > void > transformClockEdges(unit<EdgeTriageSet> edgeTriage, uint32_t rebindTailLevel) > { > edgeTriage->begin(_links); > > for (EdgeType& e : _links->iterateFreeEdges()) { > if (!OrdinalTree::isOrdinalRelation(_links->_v, e.endpoint())) { > edgeTriage->classifyClone(OrdinalEdgePartition::clock, e); > } else if (e.endpoint()->isOnDeltaStack()) { > edgeTriage->classifyClone(OrdinalEdgePartition::loopback, e); > } else { > edgeTriage->classifyClone(OrdinalEdgePartition::cross, e); > if (rebindTailLevel > 0) > edgeTriage->setCloneDeterminantLevel(rebindTailLevel - _links->_v->ordinalRoot()->level()); > } > } > > edgeTriage->commitClones(OrdinalEdgePartition::forward); > } > > void > deltaPreTriage(bool isHeadAtDeltaPath, uint32_t ceiling) > { > cell<EdgeType> mark = _index.wrapStart(OrdinalEdgePartition::loopback), end = _index.wrapEnd(OrdinalEdgePartition::loopback); > > if ((_index.size(OrdinalEdgePartition::loopback) > 0) && !isHeadAtDeltaPath) { > for (cell<EdgeType> b = mark; b < end; b++) { > if (!b->endpoint()->isOnDeltaStack() && (b->endpoint()->level() > ceiling)) > deltaTriageSwap(mark, b); > } > > _index.endIndex(OrdinalEdgePartition::cross) += (mark - _index.wrapStart(OrdinalEdgePartition::loopback)); > } > } > > template<typename EventRelay> > void > deltaLeafTriage(bool isHeadAtDeltaPath, uint32_t ceiling, EventRelay& eventRelay) > { > cell<EdgeType> mark = _index.wrapStart(OrdinalEdgePartition::loopback), end = _index.wrapEnd(OrdinalEdgePartition::loopback); > > if ((_index.size(OrdinalEdgePartition::loopback) > 0) && !isHeadAtDeltaPath) { > for (cell<EdgeType> b = mark; b < end; b++) { > if (b->endpoint()->isOnDeltaStack() || (b->endpoint()->level() <= ceiling)) > eventRelay.dispatch(_links->_v, b, TreeRelation::loopback, _links->_v->ordinalTree()->edgeMode(b->endpoint())); > else > deltaTriageSwap(mark, b); > } > > _index.endIndex(OrdinalEdgePartition::cross) += (mark - _index.wrapStart(OrdinalEdgePartition::loopback)); > } > } > > template<typename EventRelay> > bool > prepareRebindEdgeTriage(unit<EdgeTriageSet> edgeTriage, bool isRootEntry, SiblingWalkPosition entryTime, EventRelay& eventRelay) > { > requirePartitionIntegrity(); > > bool isForwardMutable = (!isRootEntry && _links->_v->isFlag(VertexType::EpochFlags::isForwardMutable)); > > > if (_index.size(OrdinalEdgePartition::clock) == 0) { > if (isForwardMutable) { > if (_index.end(OrdinalEdgePartition::cross) == 0) > return false; > } else if ((_index.size(OrdinalEdgePartition::tree) == 0) && (_index.size(OrdinalEdgePartition::cross) == 0)) { > return false; > } > } > > ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > _edgeTriage == nullptr ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 595) << ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "_edgeTriage == nullptr" ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 595 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > > _edgeTriage = edgeTriage; > _edgeTriage->begin(_links); > > for (cell<EdgeType> t : _index.cellwalkLinks(OrdinalEdgePartition::tree)) > edgeTriage->pendWalk(t); > > OrdinalEdgePartition looseSpanStart = OrdinalEdgePartition::cross, looseSpanEnd = OrdinalEdgePartition::cross; > > if (isForwardMutable) { > looseSpanStart = OrdinalEdgePartition::forward; > } else { > for (cell<EdgeType> f : _index.cellwalkLinks(OrdinalEdgePartition::forward)) > edgeTriage->classify(OrdinalEdgePartition::forward, f); > } > > WalkPosition lambdaClockPosition = > (entryTime.walkPosition == 0 ? _links->_v->ordinalRoot()->clockProxy()->timespan().in : entryTime.walkPosition); > > for (cell<EdgeType> x : _index.cellwalkLinksOverSpan(looseSpanStart, looseSpanEnd)) { > bool isOrdinalRelation = OrdinalTree::isOrdinalRelation(_links->_v, x->endpoint()); > typename VertexType::Mode mode = (isOrdinalRelation ? VertexType::Mode::ordinal : VertexType::Mode::clock); > TreeRelation relation = TreeRelation::loopback; > if (x->endpoint()->isOnDeltaStack()) { > if (isOrdinalRelation) { > edgeTriage->classify(OrdinalEdgePartition::loopback, x); > } else { > edgeTriage->classify(OrdinalEdgePartition::clock, x); > } > eventRelay.dispatch(_links->_v, x, relation, mode); > } else { > bool isVisited = (_links->_v->rebindEpoch() == x->endpoint()->rebindEpoch() && x->endpoint()->isVisited()); > if ((isRootEntry && isOrdinalRelation) || isVisited) { > if (isOrdinalRelation) { > if (x->endpoint()->getRole(VertexType::Role::delta) > _links->_v->getRole(VertexType::Role::delta)) { > relation = TreeRelation::forward; > edgeTriage->classify(OrdinalEdgePartition::forward, x); > } else { > relation = TreeRelation::cross; > edgeTriage->classify(OrdinalEdgePartition::cross, x); > x->inferPathBranchLevel(_links->_v); > } > } else { > relation = identifyClockRelation(x->endpoint(), lambdaClockPosition); > edgeTriage->classify(OrdinalEdgePartition::clock, x); > } > eventRelay.dispatch(_links->_v, x, relation, mode); > } else { > edgeTriage->pendWalk(x); > } > } > } > > for (cell<EdgeType> b : _index.cellwalkLinks(OrdinalEdgePartition::loopback)) { > edgeTriage->classify(OrdinalEdgePartition::loopback, b); > eventRelay.dispatch(_links->_v, b, TreeRelation::loopback, VertexType::Mode::ordinal); > } > > if (entryTime.walkPosition > 0) { > for (cell<EdgeType> c : _index.cellwalkLinks(OrdinalEdgePartition::clock)) { > unit<VertexType> head = c->endpoint(); > if (isInLambda(entryTime, _links->_v, head, isRootEntry)) { > edgeTriage->pendWalk(c); > } else if (OrdinalTree::isOrdinalRelation(_links->_v, head)) { > if (head->isOnDeltaStack()) { > edgeTriage->classify(OrdinalEdgePartition::loopback, c); > > eventRelay.dispatch(_links->_v, c, TreeRelation::loopback, VertexType::Mode::ordinal); > } else { > edgeTriage->classify(OrdinalEdgePartition::cross, c); > c->inferPathBranchLevel(_links->_v); > > eventRelay.dispatch(_links->_v, c, TreeRelation::cross, VertexType::Mode::ordinal); > } > } else { > edgeTriage->classify(OrdinalEdgePartition::clock, c); > eventRelay.dispatch(_links->_v, c, identifyClockRelation(head, lambdaClockPosition), VertexType::Mode::clock); > } > } > } else { > for (cell<EdgeType> c : _index.cellwalkLinks(OrdinalEdgePartition::clock)) { > edgeTriage->classify(OrdinalEdgePartition::clock, c); > eventRelay.dispatch(_links->_v, c, identifyClockRelation(c->endpoint(), lambdaClockPosition), > VertexType::Mode::clock); > } > } > > edgeTriage->sortWalk(); > > > > return true; > } > > template<typename EventRelay> > void > deltaCursorTriage(cell<EdgeType> revisit, EventRelay& eventRelay) > { > unit<VertexType> tail = _links->_v; > > OrdinalEdgePartition partition = OrdinalEdgePartition::clock; > > if (OrdinalTree::isOrdinalRelation(tail, revisit->endpoint())) { > if (revisit->endpoint()->getRole(VertexType::Role::delta) > tail->getRole(VertexType::Role::delta)) { > partition = OrdinalEdgePartition::forward; > > eventRelay.dispatch(_links->_v, revisit, TreeRelation::forward, VertexType::Mode::ordinal); > } else { > partition = OrdinalEdgePartition::cross; > revisit->inferPathBranchLevel(tail); > > eventRelay.dispatch(_links->_v, revisit, TreeRelation::cross, VertexType::Mode::ordinal); > } > } else { > eventRelay.dispatch(_links->_v, revisit, TreeRelation::cross, VertexType::Mode::clock); > } > _edgeTriage->classify(partition, revisit); > } > > unit<EdgeTriageSet> > deltaCommitTriage() > { > if (_edgeTriage != nullptr) { > _edgeTriage->spongeClones(); > _edgeTriage->commitClones(OrdinalEdgePartition::tree); > } > > return releaseEdgeTriage(); > } > > unit<EdgeTriageSet> > revertCommitTriage(EdgeCellIterator looseEdgeCursor) > { > ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > _edgeTriage != nullptr ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 729) << ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "_edgeTriage != nullptr" ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << "Cannot revert at " << _links->_v->token() << " where no triage is in progress." << ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 729 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > > _edgeTriage->spongeClones(); > _edgeTriage->spongeLooseEdges(looseEdgeCursor); > > cell<EdgeType> cursor = _index.wrapStart(OrdinalEdgePartition::tree); > > _edgeTriage->revertCommitPartition(cursor, OrdinalEdgePartition::tree); > > cell<EdgeType> delta = cursor; > cell<EdgeType> visited = _edgeTriage->revertCommitWalk(cursor); > > _edgeTriage->revertCommitPartitions(cursor, OrdinalEdgePartition::forward); > > ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > cursor.indexIn(_links->_out) == _links->_out.size() ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 743) << ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "cursor.indexIn(_links->_out) == _links->_out.size()" ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 743 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" > ># 744 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << "Revert commit accounts for " << cursor.indexIn(_links->_out) << " edges but " > << _links->_v->token() << " has " << _links->_out.size() << " edges." << ># 745 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 745 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > > _links->_v->setFlag(VertexType::EpochFlags::isOnRevertFrontier); > _links->_v->setMode(VertexType::Mode::revert); > _links->out.revert().inflate(delta, visited); > > return releaseEdgeTriage(); > } > > void > classifyStepActor(unit<VertexType> episodeRoot, uint32_t rebindStep, uint32_t demotionDeterminant) > { > unit<VertexType> tail = _links->_v; > > if (tail->getRole(VertexType::Role::precedent) > 0) { > for (cell<EdgeType> x : _index.iterateLinks(OrdinalEdgePartition::cross)) { > unit<VertexType> head = x->endpoint(); > > if (head->isLive(tail->rebindEpoch())) { > uint32_t deltaPeriod = (tail == episodeRoot ? 1 : tail->getRole(VertexType::Role::precedent)); > if (head->getRole(VertexType::Role::delta) >= deltaPeriod) { > if (OrdinalTree::isOrdinalRelation(tail, head)) { > head->links->in.ordinal().rotateLeft(head->links->getDual(x.read()), > OrdinalReferencePartition::cross, OrdinalReferencePartition::forward); > rotateLeft(x, OrdinalEdgePartition::cross, OrdinalEdgePartition::forward); > } else { > head->links->in.ordinal().rotateRight(head->links->getDual(x.read()), > OrdinalReferencePartition::cross, OrdinalReferencePartition::clock); > rotateRight(x, OrdinalEdgePartition::cross, OrdinalEdgePartition::clock); > > ># 775 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 775) ># 775 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << "does this case really exist?" << ># 775 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 775 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > } > } > } > } > } else if ((_index.size(OrdinalEdgePartition::forward) > 0) && (tail->getRole(VertexType::Role::subordinate) >= rebindStep)) { > for (cell<EdgeType> f : _index.reviterateLinks(OrdinalEdgePartition::forward)) { > unit<VertexType> head = f->endpoint(); > if (!head->isLive(tail->rebindEpoch())) > continue; > > if (!OrdinalTree::isOrdinalRelation(tail, head)) { > head->links->in.ordinal().rotateRight(head->links->getDual(f.read()), > OrdinalReferencePartition::forward, OrdinalReferencePartition::clock); > rotateRight(f, OrdinalEdgePartition::forward, OrdinalEdgePartition::clock); > } else if ((head->getRole(VertexType::Role::delta) >= tail->getRole(VertexType::Role::subordinate)) && > ((tail->getRole(VertexType::Role::delta) < rebindStep) || > (head->getRole(VertexType::Role::delta) < tail->getRole(VertexType::Role::delta)))) > { > f->setPathBranchLevel(demotionDeterminant); > > if (OrdinalTree::isOrdinalRelation(tail, head)) { > head->links->in.ordinal().rotateRight(head->links->getDual(f.read()), > OrdinalReferencePartition::forward, OrdinalReferencePartition::cross); > } > rotateRight(f, OrdinalEdgePartition::forward, OrdinalEdgePartition::cross); > } > } > } > } > > void > classifyTrimmedSubordinateEdges(uint32_t rebindStep) > { > unit<VertexType> tail = _links->_v; > > if (!_index.empty(OrdinalEdgePartition::forward) && (tail->getRole(VertexType::Role::subordinate) >= rebindStep)) { > for (cell<EdgeType> f : _index.reviterateLinks(OrdinalEdgePartition::forward)) { > unit<VertexType> head = f->endpoint(); > if (!head->isLive(tail->rebindEpoch())) > continue; > > if (!OrdinalTree::isOrdinalRelation(tail, head)) { > head->links->in.ordinal().rotateRight(head->links->getDual(f.read()), > OrdinalReferencePartition::forward, OrdinalReferencePartition::clock); > rotateRight(f, OrdinalEdgePartition::forward, OrdinalEdgePartition::clock); > } > } > } > } > > void > requireVertexMode() > { > ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > _links->_v->mode() == VertexType::Mode::ordinal ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 829) << ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "_links->_v->mode() == VertexType::Mode::ordinal" ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << "Attempt to access ordinal edges of " << _links->_v->token() << ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 829 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > } > > void > requirePartitionIntegrity() > { > requireVertexMode(); > > for (OrdinalEdgePartition p = OrdinalEdgePartition::forward; p < OrdinalEdgePartition::loopback; p++) { > ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > _index.end(p) <= _index.end(p + 1) ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 838) << ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "_index.end(p) <= _index.end(p + 1)" ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 838 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" > ># 839 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << "Ordinal partition (" << label(p) << " = " << _index.end(p) > << ") must precede partition (" << label(p + 1) << " = " << _index.end(p + 1) << ")" << ># 840 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 840 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > } > > } > > void > requireTriageTreePositionIntegrity() { _edgeTriage->requireTreePositionIntegrity(); } > > void > requireDeltaTreeEdge(const Id32 id, uint32_t position) > { > if (_edgeTriage == nullptr) { > _links->requireDeltaTreeEdge(id, position); > } else { > cell<EdgeType> e = triageTreeEdgeAt(position); > ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > e != nullptr && e->endpoint()->id() == id ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 855) << ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "e != nullptr && e->endpoint()->id() == id" ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 855 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > } > } > > EdgeToken > edgeToken() > { > return EdgeToken(_links, _index, "Edge", OrdinalEdgePartition::tree, OrdinalEdgePartition::clock); > } > > typename EdgeTriageSet::PrintToken > triageToken() { return typename EdgeTriageSet::PrintToken(_edgeTriage); } > >private: > class TreeEdgeView > { > public: > TreeEdgeView(unit<TreeLinkSet> links) : > _links(links) > { } > > inline void > emplace(cell<EdgeType> src, cell<EdgeType> dst) { _links->emplaceEdge(src.read(), dst); } > > private: > const unit<TreeLinkSet> _links; > }; > > static bool > isInLambda(SiblingWalkPosition entryTime, unit<VertexType> tail, unit<VertexType> head, bool isRootEntry) > { > if (isRootEntry || !OrdinalTree::isOrdinalRelation(tail, head)) { > unit<VertexType> anchor; > if (head->mode() == VertexType::Mode::ordinal) { > unit<VertexType> root = head->ordinalRoot(); > anchor = root->tree(); > > bool isSubtreeSplice = (root->isLive(tail->rebindEpoch()) && root->isVisited() && > (!root->isOnDeltaStack() || (head->ordinalTree() != tail->ordinalTree()))); > if (isSubtreeSplice || (anchor->mode() == VertexType::Mode::ordinal)) > return true; > else if (anchor == entryTime.anchor) > return root->treePosition() >= entryTime.siblingPosition; > else if (anchor->isOnDeltaStack()) > return root->treePosition() > anchor->stackTreePosition(); > } else { > anchor = head; > } > > if (anchor->timespan().in < entryTime.walkPosition) > return false; > } > > if (head->isOnDeltaStack()) > return false; > > return !(head->isLive(tail->rebindEpoch()) && head->isVisited()); > } > > TreeRelation > identifyClockRelation(unit<VertexType> head, WalkPosition lambdaClockPosition) > { > ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ( ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > _links->_v->mode() == VertexType::Mode::ordinal ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp", 917) << ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > "_links->_v->mode() == VertexType::Mode::ordinal" ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "] " << ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > std::endl ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > << "⢠" ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > << "how can triage occur on a clock node?" << ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 917 "../../subprojects/edfst/src/edfst/tree/OrdinalTreeEdgeSet.hpp" > ; > > if (head->isOnDeltaStack()) > return TreeRelation::loopback; > > if (head->mode() == VertexType::Mode::ordinal) > return TreeRelation::cross; > > unit<VertexType> tc = _links->_v->clockProxy(); > > if (tc == head) > return TreeRelation::loopback; > > if ((head->timespan().in < lambdaClockPosition) && (head->timespan().out > lambdaClockPosition)) > return TreeRelation::loopback; > else > return TreeRelation::cross; > } > > inline void > deltaTriageSwap(cell<EdgeType>& mark, cell<EdgeType>& b) > { > if (b->endpoint()->mode() == VertexType::Mode::ordinal) { > b->endpoint()->links->in.ordinal().rotateLeft(b->endpoint()->links->referenceAt(b->dualPosition()), > OrdinalReferencePartition::loopback, OrdinalReferencePartition::cross); > } > > if (b > mark) { > EdgeType swap = mark.read(); > _links->emplaceEdge(b.read(), mark); > _links->emplaceEdge(swap, b); > } > mark++; > } > > unit<EdgeTriageSet> > releaseEdgeTriage() > { > unit<EdgeTriageSet> edgeTriage = _edgeTriage; > > _edgeTriage = nullptr; > return edgeTriage; > } > > using EdgeRotation = OrdinalLinkRotation<OrdinalEdgePartition, TreeEdgeView, EdgeType, PartitionIndex>; > > unit<TreeLinkSet> _links; > > PartitionIndex _index; > > unit<EdgeTriageSet> _edgeTriage; >}; >} ># 13 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 1 > > > > > >namespace edfst >{ >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class TreeLinkSetBase; > >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class ClockTreeEdgeSet >{ >using outer = ClockTreeEdgeSet<EdgeClass, ReferenceClass, VertexType>; > >public: > using EdgeType = EdgeClass<VertexType>; > using ReferenceType = ReferenceClass<VertexType>; > using TreeLinkSet = TreeLinkSetBase<EdgeClass, ReferenceClass, VertexType>; > > struct EdgeToken { > static constexpr int FacileStreamTokenTag = 0; > > EdgeToken(outer& set) : > _set(set) > {} > > std::ostream& > print(std::ostream& o) const > { > for (const EdgeType& edge : _set._links->iterateTreeEdges()) > o << "\t\tT " << edge.endpoint()->token().showPosition() << std::endl; > for (const EdgeType& edge : _set._links->iterateFreeEdges()) > o << "\t\tF " << edge.endpoint()->token().showPosition() << std::endl; > > return o; > } > > private: > outer& _set; > }; > > ClockTreeEdgeSet(unit<TreeLinkSet> links) : > _links(links) > { resetTreeCursor(); } > > void > inflate() { resetTreeCursor(); } > > void > resetTreeCursor() { _treeCursor = _links->_out.data(); } > > cell<EdgeType> > treeCursor() { return _treeCursor; } > > void > setTreeCursor(uint32_t position) { _treeCursor = cell_wrap(_links->_out.data(), position); } > > void > setTreeCursor(cell<EdgeType> treeCursor) { _treeCursor = treeCursor; } > > bool > isTreeEdge(cell<EdgeType> e) { return e < _treeCursor; } > > uint32_t > treeEdgeCount() { return _treeCursor.indexIn(_links->_out); } > > uint32_t > freeEdgeCount() { return _links->_out.size() - _treeCursor.indexIn(_links->_out); } > > void > activateNextEdge(bool isTreeEdge) > { > cell<EdgeType> back = appendEmpty(); > > if (isTreeEdge) { > if (back > _treeCursor) { > EdgeType swap = *_treeCursor; > _links->emplaceEdge(*back, _treeCursor); > _links->emplaceEdge(swap, back); > } > _treeCursor++; > } > } > > cell<EdgeType> > append(unit<VertexType> head, bool isTreeEdge) > { > cell<EdgeType> back = appendEmpty(); > > EdgeType rotate(head, 0); > cell<EdgeType> placement; > uint32_t toPosition; > > if (isTreeEdge) { > head->setTree(_links->_v); > head->setLevel(_links->_v->level() + 1); > head->setTreePosition(_treeCursor.indexIn(_links->_out)); > > if (_treeCursor < back) { > EdgeType swap = _treeCursor.read(); > _treeCursor.write(rotate); > rotate = swap; > } > > toPosition = _treeCursor.indexIn(_links->_out); > placement = _treeCursor++; > } else { > toPosition = point_util::lastOfQuantity(_links->_out.size()); > placement = back; > } > > if (rotate.endpoint() == head) > back.write(rotate); > else > _links->emplaceEdge(rotate, back); > > ReferenceType dual = ReferenceType(_links->_v, toPosition); > if ((head->mode() == VertexType::Mode::clock) || (head->mode() == VertexType::Mode::revert)) { > head->links->in.clock().append(dual); > } else { > head->links->in.ordinal().append(dual, OrdinalReferencePartition::clock); > } > > return placement; > } > > void > remove(cell<EdgeType> edge) > { > cell<EdgeType> hole = edge, tail = _links->edgeTail(); > if (hole < _treeCursor) { > _treeCursor--; > if (hole < _treeCursor) { > hole.write(_treeCursor.read()); > hole->endpoint()->links->getDual(hole)->setDualPosition(hole->indexIn(_links->_out)); > hole = _treeCursor; > } > } > if (hole < tail) { > hole.write(tail.read()); > hole->endpoint()->links->getDual(hole)->setDualPosition(hole->indexIn(_links->_out)); > } > > _links->shrinkOut(); > } > > void > demoteSubtree(unit<VertexType> v) > { > if (v->treePosition() < (--_treeCursor).indexIn(_links->_out)) > rotateTreeEdgeRight(v, _treeCursor); > } > > cell<EdgeType> > rotateFreeToTree(cell<EdgeType>& e) > { > if (e > _treeCursor) { > EdgeType swap = _treeCursor.read(); > _links->emplaceEdge(e.read(), _treeCursor); > _links->emplaceEdge(swap, e); > > _treeCursor->endpoint()->setTreePosition(_treeCursor.indexIn(_links->_out)); > } else { > e->endpoint()->setTreePosition(e.indexIn(_links->_out)); > } > > return ((e = _treeCursor++)); > } > > void > rotateTreeEdgeRight(unit<VertexType> v, cell<EdgeType> pivot) > { > ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > ( ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > v->tree() == _links->_v ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp", 174) << ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > std::endl ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > "v->tree() == _links->_v" ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "] " << ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > std::endl ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "⢠" ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > << ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 174 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > ; > > cell<EdgeType> pack = cell_wrap(_links->_out, v->treePosition()); > > if (pack == pivot) > return; > > EdgeType rotate = pack.read(); > while (pack < pivot) { > _links->emplaceEdge((pack + 1).read(), pack); > pack->endpoint()->setTreePosition(pack->endpoint()->treePosition() - 1); > pack++; > } > > _links->emplaceEdge(rotate, pivot); > } > > void > classifyTrimmedSubordinateReferences() > { > for (EdgeType& e : _links->iterateFreeEdges()) { > unit<VertexType> head = e.endpoint(); > if (head->mode() != VertexType::Mode::ordinal) > continue; > if (head->isLive(_links->_v->rebindEpoch()) && (head->getRole(VertexType::Role::delta) > 0)) { > cell<ReferenceType> r = head->links->getDual(e); > if (head->links->in.ordinal().index().identifyPartition(r) == OrdinalReferencePartition::forward) > head->links->in.ordinal().rotateRight(r, OrdinalReferencePartition::forward, OrdinalReferencePartition::clock); > } > } > } > > void > transferTreeCursorTo(outer& dst) > { > uint32_t treeIndex = _treeCursor.indexIn(_links->_out); > dst._treeCursor = cell_wrap(dst._links->_out, treeIndex); > _treeCursor = cell_wrap(_links->_out); > } > > void > requireVertexMode() > { > ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > ( ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > _links->_v->mode() == VertexType::Mode::clock ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp", 217) << ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > std::endl ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > "_links->_v->mode() == VertexType::Mode::clock" ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "] " << ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > std::endl ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "⢠" ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > << "Attempt to access clock edges of " << _links->_v->token() << ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 217 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > ; > } > > void > requireCursorIntegrity() > { > requireVertexMode(); > > ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > ( ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > _treeCursor.indexIn(_links->_out) <= _links->_out.size() ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp", 225) << ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > std::endl ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > "_treeCursor.indexIn(_links->_out) <= _links->_out.size()" ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "] " << ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > std::endl ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > << "⢠" ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > << ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 225 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > ; > } > > EdgeToken > edgeToken() { return EdgeToken(*this); } > >private: ># 250 "../../subprojects/edfst/src/edfst/tree/ClockTreeEdgeSet.hpp" > cell<EdgeType> > appendEmpty() > { > if (_links->_out.size() < _links->_out.capacity()) { > _links->_out.emplace_back(); > } else { > uint32_t treeIndex = _treeCursor.indexIn(_links->_out); > _links->_out.emplace_back(); > _treeCursor = cell_wrap(_links->_out, treeIndex); > } > return cell_wrap(&_links->_out.back()); > } > > const unit<TreeLinkSet> _links; > > cell<EdgeType> _treeCursor; >}; >} ># 14 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 1 > > > > > >namespace edfst >{ >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class TreeLinkSetBase; > >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class RevertTreeEdgeSet >{ >using outer = RevertTreeEdgeSet<EdgeClass, ReferenceClass, VertexType>; > >public: > using EdgeType = EdgeClass<VertexType>; > using ReferenceType = ReferenceClass<VertexType>; > using TreeLinkSet = TreeLinkSetBase<EdgeClass, ReferenceClass, VertexType>; > > using EdgeSequence = std::vector<EdgeType>; > using EdgeIterable = iterable<typename EdgeSequence::iterator>; > > struct EdgeToken { > static constexpr int FacileStreamTokenTag = 0; > > EdgeToken(outer& set) : > _set(set) > {} > > std::ostream& > print(std::ostream& o) const > { > return o << "TODO: table of revert edges" << std::endl; > } > > private: > outer& _set; > }; > > void > inflate(cell<EdgeType> visited) > { > _delta = _visited = visited; > } > > void > inflate(cell<EdgeType> delta, cell<EdgeType> visited) > { > _delta = delta; > _visited = visited; > } > > cell<EdgeType> > delta() { return _delta; } > > uint32_t > deltaEndPosition() { return _visited - _links->_out.data(); } > > void > setDeltaStartPosition(uint32_t count) { _delta = cell_wrap(_links->_out, count); } > > void > sortDelta() > { > EdgeIterable deltaWalk = EdgeIterable(_links->_out.begin(), _links->_out.begin() + _delta.indexIn(_links->_out)); > std::sort(deltaWalk.begin(), deltaWalk.end(), TreeLinkSet::edgeOrdinalComparator); > > uint32_t p = 0; > for (EdgeType& t : deltaWalk) { > t.endpoint()->links->getDual(t)->setDualPosition(p); > if (t.endpoint()->tree() == _links->_v) > t.endpoint()->setTreePosition(p); > p++; > } > } > > void > sortVisited() > { > EdgeIterable visitedWalk = EdgeIterable(_links->_out.begin(), _links->_out.begin() + _visited.indexIn(_links->_out)); > std::sort(visitedWalk.begin(), visitedWalk.end(), TreeLinkSet::edgeOrdinalComparator); > > uint32_t p = 0; > for (EdgeType& t : visitedWalk) { > t.endpoint()->links->getDual(t)->setDualPosition(p); > if (t.endpoint()->tree() == _links->_v) > t.endpoint()->setTreePosition(p); > p++; > } > } > > cell<EdgeType> > visited() { return _visited; } > > uint32_t > visitedCount() { return _visited - _links->_out.data(); } > > uint32_t > treeEdgeCount() { return _delta.indexIn(_links->_out); } > > uint32_t > freeEdgeCount() { return _links->_out.size() - _delta.indexIn(_links->_out); } > > cell<EdgeType> > wrapPartitionEnd(RevertEdgePartition partition) > { > switch (partition) > { > case RevertEdgePartition::delta: > return _delta; > > case RevertEdgePartition::visited: > return _visited; > } > > ># 117 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 3 > throw ># 117 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" > FacileException ># 117 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp", 117) ># 117 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" > << "Unreachable"; > } > > void > requireVertexMode() > { > ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 3 > ( ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" > _links->_v->mode() == VertexType::Mode::revert ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp", 123) << ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" > std::endl ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 3 > << "⢠Condition [" << ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" > "_links->_v->mode() == VertexType::Mode::revert" ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 3 > << "] " << ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" > std::endl ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 3 > << "⢠" ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" > << "Attempt to access revert edges of " << _links->_v->token() << ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" 3 > facile::RequireException::require_sentinel ># 123 "../../subprojects/edfst/src/edfst/tree/RevertTreeEdgeSet.hpp" > ; > } > > EdgeToken > edgeToken() { return EdgeToken(*this); } > >private: > const unit<TreeLinkSet> _links; > > cell<EdgeType> _delta; > cell<EdgeType> _visited; >}; >} ># 15 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 2 > >namespace edfst >{ >template<template<typename> class EdgeClass, template<typename> class ReferenceClass, typename VertexType> >class TreeLinkSetBase : > public LinkSetBase<EdgeClass, ReferenceClass, VertexType> >{ >using TreeLinkSet = TreeLinkSetBase<EdgeClass, ReferenceClass, VertexType>; >using super = LinkSetBase<EdgeClass, ReferenceClass, VertexType>; > >struct ElideRoot { > template<typename LinkIterator> > static bool > include(LinkIterator i) { return i->endpoint()->tree() != nullptr; } >}; > >struct EdgeToken { > static constexpr int FacileStreamTokenTag = 0; > > EdgeToken(TreeLinkSet& links) : > _links(links) > {} > > std::ostream& > print(std::ostream& o) const > { > if (_links._out.empty()) > return o << "\t<empty>"; > > switch (_links._v->mode()) > { > case VertexType::Mode::ordinal: > return o << _links.out.ordinal().edgeToken(); > > case VertexType::Mode::clock: > return o << _links.out.clock().edgeToken(); > > case VertexType::Mode::revert: > return o << _links.out.revert().edgeToken(); > } > > ># 56 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 56) ># 56 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "unreachable" << ># 56 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 56 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > } > > private: > TreeLinkSet& _links; >}; > >struct ReferenceToken { > static constexpr int FacileStreamTokenTag = 0; > > ReferenceToken(TreeLinkSet& links) : > _links(links) > {} > > std::ostream& > print(std::ostream& o) const > { > if (_links._in.empty()) > return o << "\t<empty>"; > > o << std::endl; > switch (_links._v->mode()) > { > case VertexType::Mode::ordinal: > case VertexType::Mode::revert: > return o << _links.in.ordinal().referenceToken(); > > case VertexType::Mode::clock: > return o << _links.in.clock().referenceToken(); > } > > ># 87 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 87) ># 87 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "unreachable" << ># 87 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 87 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > } > > private: > TreeLinkSet& _links; >}; > >public: > using EdgeType = EdgeClass<VertexType>; > using ReferenceType = ReferenceClass<VertexType>; > using OrdinalTree = OrdinalTreeBase<VertexType>; > using SiblingWalkPosition = SiblingWalkPositionBase<VertexType>; > > using OrdinalLinkSet = OrdinalTreeLinkSet<EdgeClass, ReferenceClass, VertexType>; > using ClockReferenceSet = ClockTreeReferenceSet<EdgeClass, ReferenceClass, VertexType>; > using OrdinalReferenceSet = OrdinalTreeReferenceSet<EdgeClass, ReferenceClass, VertexType>; > using ClockEdgeSet = ClockTreeEdgeSet<EdgeClass, ReferenceClass, VertexType>; > using OrdinalEdgeSet = OrdinalTreeEdgeSet<EdgeClass, ReferenceClass, VertexType>; > using RevertEdgeSet = RevertTreeEdgeSet<EdgeClass, ReferenceClass, VertexType>; > > using EdgeSequence = std::vector<EdgeType>; > using EdgeIterable = iterable<typename EdgeSequence::iterator>; > using EdgeReverseIterable = iterable<typename EdgeSequence::reverse_iterator>; > using EdgeScan = scan<typename EdgeSequence::iterator>; > using EdgeCellWalk = cellwalk<EdgeType>; > using ReferenceCellWalk = cellwalk<ReferenceType>; > using ReferenceIterable = stitch<typename std::vector<ReferenceType>::iterator, ElideRoot>; > > struct IPrecedenceProfile { > using IPrecedenceProfileTag = IPrecedenceProfile; > > struct IEvaluation { > using IEvaluationTag = IEvaluation; > > virtual ~IEvaluation() {} > > virtual ReferenceType > tail() const = 0; > > virtual uint32_t > level() const = 0; > > virtual bool > isDiscard() const = 0; > > virtual bool > isForward() const = 0; > > virtual bool > isAnchor() const = 0; > }; > > struct EvaluationAccessor { > using size_type = uint32_t; > using value_type = handle<const IEvaluation>; > using reference = value_type; > using pointer = value_type; > > static size_type > size(handle<const IPrecedenceProfile> profile) { return profile->size(); } > > static reference > at(handle<const IPrecedenceProfile> profile, size_type i) { return profile->evaluation(i); } > }; > > using EvaluationIterator = IndexIteratorBase<IPrecedenceProfile, EvaluationAccessor>; > > virtual ~IPrecedenceProfile() {} > > virtual void > prefer(ReferenceType tail) = 0; > > virtual void > prefer(ReferenceType tail, uint32_t level, bool isForward) = 0; > > virtual void > discard(ReferenceType tail, uint32_t level, bool isForward) = 0; > > virtual ReferenceType > precedent() const = 0; > > virtual void > setPrecedent(ReferenceType tail) = 0; > > virtual TreeRelation > relation() const = 0; > > virtual void > setRelation(TreeRelation relation) = 0; > > virtual void > setClockRelation(bool b = true) = 0; > > virtual uint32_t > size() const = 0; > > virtual handle<const IEvaluation> > evaluation(uint32_t) const = 0; > }; > > static struct EdgeOrdinalComparator { > bool > operator ()(const EdgeType& first, const EdgeType& second) > { > return first.endpoint()->ordinal() < second.endpoint()->ordinal(); > } > } > edgeOrdinalComparator; > > static struct CellOrdinalComparator { > bool > operator ()(cell<EdgeType> first, cell<EdgeType> second) > { > return first->endpoint()->ordinal() < second->endpoint()->ordinal(); > } > } > cellOrdinalComparator; > > TreeLinkSetBase(unit<VertexType> v) : > super(v), > in(unit<TreeLinkSet>::wrap(this)), > out(unit<TreeLinkSet>::wrap(this)) > {} > > > friend OrdinalLinkSet; > friend ClockReferenceSet; > friend OrdinalReferenceSet; > friend ClockEdgeSet; > friend OrdinalEdgeSet; > friend RevertEdgeSet; > > cell<EdgeType> > treeEdge() { return super::_v->tree()->links->edgeAt(super::_v->treePosition()); } > > uint32_t > treeEdgeCount() > { > switch (super::_v->mode()) > { > case VertexType::Mode::clock: > return out.clock().treeEdgeCount(); > > case VertexType::Mode::ordinal: > return out.ordinal().treeEdgeCount(); > > case VertexType::Mode::revert: > return out.revert().treeEdgeCount(); > } > > ># 237 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 237) ># 237 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "unreachable" << ># 237 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 237 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > } > > uint32_t > freeEdgeCount() > { > switch (super::_v->mode()) > { > case VertexType::Mode::clock: > return out.clock().freeEdgeCount(); > > case VertexType::Mode::ordinal: > return out.ordinal().freeEdgeCount(); > > case VertexType::Mode::revert: > return out.revert().freeEdgeCount(); > } > > ># 255 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 255) ># 255 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "unreachable" << ># 255 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 255 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > } > > uint32_t > indexOf(cell<EdgeType> e) { return e.indexIn(super::_out); } > > ReferenceIterable > concreteReferences() { return ReferenceIterable(super::_in.begin(), super::_in.end()); } > > EdgeIterable > iterateTreeEdges(uint32_t skipCount = 0) > { > return EdgeIterable(super::_out.begin() + skipCount, super::_out.begin() + treeEdgeCount()); > } > > EdgeIterable > iterateFreeEdges(uint32_t skipCount = 0) > { > return EdgeIterable(super::_out.begin() + treeEdgeCount() + skipCount, super::_out.end()); > } > > EdgeIterable > iterateRevertEdges(uint32_t skipCount = 0) > { > return EdgeIterable(super::_out.begin() + skipCount, super::_out.begin() + out.revert().visitedCount()); > } > > EdgeScan > scanTreeEdges(uint32_t skipCount = 0) > { > return EdgeScan(super::_out.begin() + skipCount, super::_out.begin() + treeEdgeCount()); > } > > EdgeScan > scanFreeEdges(uint32_t skipCount = 0) > { > return EdgeScan(super::_out.begin() + treeEdgeCount() + skipCount, super::_out.end()); > } > > EdgeCellWalk > cellwalkEdges(uint32_t skipCount = 0) > { > return EdgeCellWalk(super::_out, skipCount, super::_out.size()); > } > > EdgeCellWalk > cellwalkTreeEdges(uint32_t skipCount = 0) > { > return EdgeCellWalk::make(super::_out, skipCount, treeEdgeCount()); > > } > > EdgeCellWalk > cellwalkFreeEdges(uint32_t skipCount = 0) > { > return EdgeCellWalk::make(super::_out, treeEdgeCount() + skipCount, super::_out.size()); > } > > EdgeCellWalk > cellwalkSpan(uint32_t start, uint32_t end) > { > return EdgeCellWalk::make(super::_out, start, end); > } > > ReferenceCellWalk > cellwalkReferences(uint32_t skipCount = 0) > { > return ReferenceCellWalk(super::_in, skipCount, super::_in.size()); > } > > EdgeReverseIterable > iterateSiblingsLeftwards() > { > EdgeSequence& siblingSet = super::_v->tree()->links->_out; > return EdgeReverseIterable(siblingSet.rbegin() + (siblingSet.size() - super::_v->treePosition()), siblingSet.rend()); > } > > EdgeIterable > iterateSiblingsRightwards() > { > EdgeSequence& siblingSet = super::_v->tree()->links->_out; > uint32_t siblingEdgeCount = super::_v->tree()->links->treeEdgeCount(); > > > > > > return EdgeIterable(siblingSet.begin() + super::_v->treePosition() + 1, siblingSet.begin() + siblingEdgeCount); > } > > unit<VertexType> > findLeftClockSibling() > { > for (EdgeType& sibling : iterateSiblingsLeftwards()) { > if (sibling.endpoint()->mode() == VertexType::Mode::clock) > return sibling.endpoint(); > } > > return nullptr; > } > > unit<VertexType> > findLeftClockSibling(unit<VertexType> member) > { > unit<VertexType> mc = member->clockProxy(); > > ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > super::_v->isOrdinalRoot() ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 361) << ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "super::_v->isOrdinalRoot()" ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "Sibling of " << super::_v->token() << " should be determined chronologically" << ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 361 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > mc->timespan().in > super::_v->timespan().in && mc->timespan().out < super::_v->timespan().out ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 362) << ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "mc->timespan().in > super::_v->timespan().in && mc->timespan().out < super::_v->timespan().out" ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 362 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" > ># 363 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "Cannot locate a sibling subtree of " << super::_v->token() << " containing disjoint member " << member->token() << ># 363 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 363 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > > for (EdgeType& sibling : iterateSiblingsLeftwards()) { > if (sibling.endpoint()->mode() == VertexType::Mode::clock) { > if (sibling.endpoint()->timespan().out < member->timespan().in) > return nullptr; > if (sibling.endpoint()->timespan().in < member->timespan().in) > return sibling.endpoint(); > } > } > return nullptr; > } > > unit<VertexType> > findRightClockSibling() > { > for (EdgeType& sibling : iterateSiblingsRightwards()) { > if (sibling.endpoint()->mode() == VertexType::Mode::clock) > return sibling.endpoint(); > } > > return nullptr; > } > > unit<VertexType> > findRightClockSibling(unit<VertexType> member) > { > unit<VertexType> mc = member->clockProxy(); > > ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > super::_v->isOrdinalRoot() ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 392) << ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "super::_v->isOrdinalRoot()" ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "Sibling of " << super::_v->token() << " should be determined chronologically" << ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 392 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > mc->timespan().in > super::_v->tree()->timespan().in && mc->timespan().out < super::_v->tree()->timespan().out ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 393) << ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "mc->timespan().in > super::_v->tree()->timespan().in && mc->timespan().out < super::_v->tree()->timespan().out" ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 393 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" > ># 394 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "Cannot locate a sibling subtree of " << super::_v->token() << " containing disjoint member " << member->token() << ># 394 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 394 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > > for (EdgeType& sibling : iterateSiblingsRightwards()) { > if (sibling.endpoint()->mode() == VertexType::Mode::clock) { > if (sibling.endpoint()->timespan().in > member->timespan().out) > return nullptr; > if (sibling.endpoint()->timespan().out > member->timespan().out) > return sibling.endpoint(); > } > } > return nullptr; > } > > SiblingWalkPosition > findSiblingWalkPosition() > { > SiblingWalkPosition p; > > if (super::_v->mode() == VertexType::Mode::ordinal) { > unit<VertexType> root = super::_v->ordinalRoot(); > p.siblingPosition = root->treePosition(); > p.anchor = root->tree(); > p.clockSuccessor = root->links->findRightClockSibling(); > if (p.clockSuccessor == nullptr) > p.walkPosition = p.anchor->timespan().out; > else > p.walkPosition = p.clockSuccessor->timespan().in; > } else { > p.walkPosition = super::_v->timespan().out; > } > > return p; > } > > void > transformMode(typename VertexType::Mode toMode) > { > if (toMode == VertexType::Mode::clock) { > cell<EdgeType> treeCursor; > > if (super::_v->mode() == VertexType::Mode::ordinal) { > treeCursor = out.ordinal().index().wrapEnd(OrdinalEdgePartition::tree); > } else { > treeCursor = out.revert().wrapPartitionEnd(RevertEdgePartition::delta); > } > > super::_v->setMode(VertexType::Mode::clock); > out.clock().setTreeCursor(treeCursor); > > for (ReferenceType& r : concreteReferences()) { > if ((r.endpoint()->mode() == VertexType::Mode::ordinal) && (super::_v->tree() != r.endpoint())) { > OrdinalEdgePartition dualPartition = r.endpoint()->links->out.ordinal().index().identifyLinkPartition(r.dualPosition()); > if (dualPartition != OrdinalEdgePartition::clock) > r.endpoint()->links->out.ordinal().rotateRight(r.endpoint()->links->edgeAt(r.dualPosition()), dualPartition, OrdinalEdgePartition::clock); > } > } > } else if (toMode == VertexType::Mode::ordinal) { > uint32_t treeCount = out.clock().treeEdgeCount(); > > super::_v->setMode(VertexType::Mode::ordinal); > > out.ordinal().inflate(treeCount); > in.ordinal().inflate(); > } else { > ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > toMode == VertexType::Mode::revert ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 458) << ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "toMode == VertexType::Mode::revert" ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 458 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > super::_v->mode() == VertexType::Mode::ordinal ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 459) << ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "super::_v->mode() == VertexType::Mode::ordinal" ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "Cannot convert from mode clock to mode revert" << ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 459 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > > cell<EdgeType> visited = out.ordinal().index().wrapStart(OrdinalEdgePartition::forward); > super::_v->setMode(VertexType::Mode::revert); > out.revert().inflate(visited); > } > } > > void > swap(cell<EdgeType> a, cell<EdgeType> b) > { > EdgeType swap = b.read(); > super::emplaceEdge(a.read(), b); > super::emplaceEdge(swap, a); > } > > void > setPathBranchLevel(uint32_t level) > { > if (!super::_v->tree()->isOnDeltaStack()) > super::_v->tree()->links->edgeAt(super::_v->treePosition())->setPathBranchLevel(level); > > for (ReferenceType& r : in.ordinal().index().iterateLinks(OrdinalReferencePartition::cross)) { > if (OrdinalTree::isOrdinalRelation(super::_v, r.endpoint())) { > cell<EdgeType> dual = r.endpoint()->links->edgeAt(r.dualPosition()); > if (dual->pathBranchLevel() > level) > dual->setPathBranchLevel(level); > } > } > } > > void > remove(cell<EdgeType> edge) > { > switch (super::_v->mode()) > { > case VertexType::Mode::clock: > out.clock().remove(edge); > in.clock().remove(super::getDual(edge)); > break; > > case VertexType::Mode::ordinal: > out.ordinal().remove(edge); > in.ordinal().remove(super::getDual(edge)); > break; > > case VertexType::Mode::revert: > ># 506 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 506) ># 506 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "Cannot remove an edge from a vertex while it is in revert mode" << ># 506 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 506 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > } > > ># 509 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 509) ># 509 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "unreachable" << ># 509 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 509 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > } > > void > transferEdgeSetTo(unit<VertexType> dst) > { > > > > class Transformer > { > public: > Transformer(unit<VertexType> dst, uint32_t treeEdgeCount) : > _dst(dst), > _treeEdgeMeter(treeEdgeCount, 0) > {} > > void > operator ()(unit<VertexType> transfer) > { > if (_treeEdgeMeter.decrement()) > transfer->setTree(_dst); > } > > private: > unit<VertexType> _dst; > Meter<uint32_t> _treeEdgeMeter; > } > x(dst, treeEdgeCount()); > > super::transferEdgeBlockTo(dst, x); > > switch (super::_v->mode()) > { > case VertexType::Mode::clock: > out.clock().transferTreeCursorTo(dst->links->out.clock()); > break; > > case VertexType::Mode::ordinal: > out.ordinal().index().transferTo(dst->links->out.ordinal().index()); > break; > > case VertexType::Mode::revert: > ># 552 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 552) ># 552 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "NYI" << ># 552 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 552 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > } > } > > static void > proxy(unit<VertexType> proxy, ReferenceType anchor, unit<VertexType> graft, TreeRelation relation, bool isClockRelation, uint32_t clients) > { > ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > proxy->links->_in.empty() ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 559) << ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "proxy->links->_in.empty()" ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" ># 559 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "Cannot splice proxy " << proxy->token() << " having " << proxy->links->_in.size() > << " existing references" << ># 560 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 560 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > > unit<VertexType> tail = anchor.endpoint(); > cell<EdgeType> e = tail->links->getDual(anchor); > > unit<VertexType> head = e->endpoint(); > cell<ReferenceType> r = head->links->getDual(e); > if (tail->mode() == VertexType::Mode::clock) > proxy->setMode(VertexType::Mode::clock); > > uint32_t tailEdgePosition = r->dualPosition(); > r->redirect(graft); > r->setDualPosition(0); > graft->links->_out.emplace_back(e->endpoint(), e->dualPosition(), e->pathBranchLevel()); > e->redirect(proxy); > > proxy->links->resizeReferences(clients + 1); > proxy->links->_in.at(0) = ReferenceType(tail, tailEdgePosition); > e->setDualPosition(0); > proxy->setTree(tail); > > if (tail->mode() == VertexType::Mode::clock) { > if (!tail->links->out.clock().isTreeEdge(e)) > tail->links->out.clock().rotateFreeToTree(e); > } else { > OrdinalEdgePartition ep = tail->links->out.ordinal().index().identifyPartition(e); > if (ep != OrdinalEdgePartition::tree) { > tail->links->out.ordinal().rotateLeft(e, ep, OrdinalEdgePartition::tree); > OrdinalReferencePartition rp = OrdinalPartition::getDual(ep); > if (rp != OrdinalReferencePartition::forward) > proxy->links->in.ordinal().rotateLeft(proxy->links->getDual(e), rp, OrdinalReferencePartition::forward); > } > } > proxy->setTreePosition(tail->links->edgeIndex(e)); > > cell<EdgeType> splice = graft->links->edgeAt(0); > if (graft->mode() == VertexType::Mode::clock) { > if (head->tree() == graft) > graft->links->out.clock().rotateFreeToTree(splice); > } else { > if (head->mode() == VertexType::Mode::ordinal) { > if (relation == TreeRelation::tree) { > graft->links->out.ordinal().inflate(1); > } else if (!isClockRelation) { > if (relation == TreeRelation::forward) { > r = head->links->getDual(splice); > head->links->in.ordinal().rotateRight(r, OrdinalReferencePartition::forward, OrdinalReferencePartition::cross); > > splice->setPathBranchLevel(tail->ordinalTreeLevel()); > graft->links->out.ordinal().rotateLeft(splice, OrdinalEdgePartition::clock, OrdinalEdgePartition::cross); > } else { > graft->links->out.ordinal().rotateLeft(splice, OrdinalEdgePartition::clock, OrdinalEdgePartitionAdapter::from(relation)); > } > } > } > } > } > > void > requireViewIntegrity() > { > switch (super::_v->mode()) > { > case VertexType::Mode::clock: > out.clock().requireCursorIntegrity(); > in.clock().requireVertexMode(); > break; > > case VertexType::Mode::ordinal: > out.ordinal().requirePartitionIntegrity(); > in.ordinal().requirePartitionIntegrity(); > break; > > case VertexType::Mode::revert: > ># 634 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > throw ># 634 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > FacileException ># 634 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 634) ># 634 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "NYI"; > } > } > > void > requireTreePositionIntegrity() > { > if ((super::_v->mode() == VertexType::Mode::ordinal) && super::_v->isOnDeltaStack() && (super::_v->getRole(VertexType::Role::delta) > 0)) { > out.ordinal().requireTriageTreePositionIntegrity(); > } else { > uint32_t i = 0; > for (EdgeType& edge : iterateTreeEdges()) { > ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > edge.endpoint()->treePosition() == i ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 646) << ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "edge.endpoint()->treePosition() == i" ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 646 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" > ># 647 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << std::endl << "\tIncorrect tree position at edge " << i << " in tree edges of " << super::_v->token() << ": " > << edge.endpoint()->token() << " has position " << edge.endpoint()->treePosition() << std::endl > << "\tEdges of " << super::_v->token() << ": " << edgeToken() << ># 649 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 649 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > i++; > } > } > } > > void > requireDeltaTreeEdge(const Id32 id, uint32_t position) > { > ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ( ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > super::edgeAt(position)->endpoint()->id() == id && position < treeEdgeCount() ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp", 658) << ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠Condition [" << ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > "super::edgeAt(position)->endpoint()->id() == id && position < treeEdgeCount()" ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "] " << ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > std::endl ># 658 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > << "⢠" > ># 659 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > << "Tree position " << position << " of V" << id << " is not coherent with the edges of parent " > << super::_v->token() << ": found " << super::edgeAt(position)->endpoint()->token() << " in position " << position > << " of " << treeEdgeCount() << " tree edges." << ># 661 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" 3 > facile::RequireException::require_sentinel ># 661 "../../subprojects/edfst/src/edfst/tree/TreeLinkSet.hpp" > ; > } > > EdgeToken > edgeToken() { return EdgeToken(*this); } > > ReferenceToken > referenceToken() { return ReferenceToken(*this); } > > class ReferenceSet { > public: > ReferenceSet(unit<TreeLinkSet> links) : > _views(links) > {} > > ClockReferenceSet& > clock() { return _views.clock.requireVertexMode(), _views.clock; } > > OrdinalReferenceSet& > ordinal() { return _views.ordinal.requireVertexMode(), _views.ordinal; } > > private: > union Views { > Views(unit<TreeLinkSet> links) : > clock(links) > {} > > ClockReferenceSet clock; > OrdinalReferenceSet ordinal; > } > _views; > } > in; > > class EdgeSet { > public: > EdgeSet(unit<TreeLinkSet> links) : > _views(links) > {} > > ClockEdgeSet& > clock() { return _views.clock.requireVertexMode(), _views.clock; } > > OrdinalEdgeSet& > ordinal() { return _views.ordinal.requireVertexMode(), _views.ordinal; } > > RevertEdgeSet& > revert() { return _views.revert.requireVertexMode(), _views.revert; } > > private: > union Views { > Views(unit<TreeLinkSet> links) : > clock(links) > {} > > ClockEdgeSet clock; > OrdinalEdgeSet ordinal; > RevertEdgeSet revert; > } > _views; > } > out; > > class Profile > { > struct monitor_tag {}; > > public: > struct Monitor { > protected: > static monitor_tag * > tag() { return nullptr; } > }; > > Profile() : > _isTreeLeaf(false) > {} > > bool > isTreeLeaf() const { return _isTreeLeaf; } > > void > setTreeLeaf(__attribute__((unused)) monitor_tag *tag, bool b = true) { _isTreeLeaf = b; } > > private: > bool _isTreeLeaf; > } > profile; >}; >} ># 10 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/TreeReference.hpp" 1 > > > > > >namespace edfst >{ >template<typename Endpoint> >class TreeReferenceBase : > public ReferenceBase<Endpoint> >{ >using Reference = ReferenceBase<Endpoint>; > >public: > TreeReferenceBase() : > TreeReferenceBase(nullptr, 0) > {} > > TreeReferenceBase(unit<Endpoint> endpoint, uint32_t dualPosition) : > Reference(endpoint, dualPosition) > {} > > PathBranchLevel > pathBranchLevel() { return Reference::_endpoint->links->edgeAt(Reference::_dualPosition)->pathBranchLevel(); } > > void > rotate() { facile::StreamLog::log(__PRETTY_FUNCTION__, 27, facile::StreamLogLevel::Status) << "Reference rotates " << Reference::_endpoint->id() << " somewhere" << std::endl; } > >private: >}; >} ># 11 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 2 > > >using namespace edfst; > >template<typename VertexType> >struct EmptyTreePluginTest { > void > pushVertex(__attribute__((unused)) unit<VertexType> v) {} > > void > popVertex(__attribute__((unused)) unit<VertexType> v) {} > > void > scanEdge(__attribute__((unused)) unit<VertexType> tail, __attribute__((unused)) unit<VertexType> head, __attribute__((unused)) TreeRelation r) {} >}; > > ># 1 "../../subprojects/edfst/src/edfst/tree/ElasticTreeComposition.hpp" 1 > > > > > >namespace edfst >{ >template<template<typename> class ExtensionSetBase> >struct ElasticTreeComposition { > template<typename LinkSetType> > class ElasticTreeVertexBase : > public TreeVertexBase<LinkSetType, ExtensionSetBase, ElasticTreeVertexBase> { > using ExtensionSet = ExtensionSetBase<ElasticTreeVertexBase<LinkSetType>>; > using OrdinalTreeType = OrdinalTreeBase<ElasticTreeVertexBase<LinkSetType>>; > using VertexType = ElasticTreeVertexBase<LinkSetType>; > using super = TreeVertexBase<LinkSetType, ExtensionSetBase, ElasticTreeVertexBase>; > > public: > ElasticTreeVertexBase(Id32 id, unit<LinkSetType> links) : > super(id, links) > {} > > ElasticTreeVertexBase(Id32 id, unit<LinkSetType> links, typename VertexType::Mode mode) : > super(id, links, mode) > {} > > protected: > friend super; > > static unit<VertexType> > self(super *v) { return unit<VertexType>::wrap(reinterpret_cast<VertexType *>(v)); } > > static unit<const VertexType> > self(const super *v) { return unit<const VertexType>::wrap(reinterpret_cast<const VertexType *>(v)); } > }; > > class LinkSet : > public TreeLinkSetBase<TreeEdgeBase, TreeReferenceBase, ElasticTreeVertexBase<LinkSet>> > { > using VertexType = ElasticTreeVertexBase<LinkSet>; > using super = TreeLinkSetBase<TreeEdgeBase, TreeReferenceBase, VertexType>; > > public: > LinkSet(unit<VertexType> v) : > super(v) > {} > }; > > using Vertex = ElasticTreeVertexBase<LinkSet>; > using Edge = TreeEdgeBase<Vertex>; > using Reference = TreeReferenceBase<Vertex>; > using OrdinalTree = OrdinalTreeBase<Vertex>; > using SiblingWalkPosition = SiblingWalkPositionBase<Vertex>; > using EdgeStreamEndpoint = typename ExtensionSetBase<Vertex>::EdgeStreamEndpoint; > > struct IVertexGate { > virtual ~IVertexGate() {} > > virtual void > tail(EdgeStreamEndpoint) = 0; > > virtual void > tail(unit<Vertex>) = 0; > > virtual unit<Vertex> > bud(void) const = 0; > > virtual void > bud(unit<Vertex> v) = 0; > > virtual bool > isTail(unit<Vertex>) const = 0; > > virtual void > close(EdgeStreamEndpoint) = 0; > > virtual void > close(unit<Vertex>) = 0; > > virtual unit<Vertex> > head(void) const = 0; > > virtual unit<Vertex> > proxy(void) const = 0; > > virtual unit<Vertex> > graft(void) const = 0; > }; > > using ExtensionFactory = typename ExtensionSetBase<Vertex>::Factory; > using VertexFactory = VertexFactoryBase<EdgeStreamEndpoint, Vertex, ExtensionFactory>; > > using OrdinalTreeFactory = ObjectBlock<OrdinalTree>; > using EdgeTriageFactory = ObjectBlock<typename LinkSet::OrdinalEdgeSet::EdgeTriageSet>; > > struct ElementFactories { > VertexFactory vertex; > OrdinalTreeFactory ordinalTree; > EdgeTriageFactory edgeTriage; > > ElementFactories(loan<ExtensionFactory> extensionFactory) : > ElementFactories(6, extensionFactory) > {} > > ElementFactories(uint32_t initialBlockSizeExponent = 6, loan<ExtensionFactory> extensionFactory = nullptr) : > vertex(initialBlockSizeExponent, extensionFactory), > ordinalTree(initialBlockSizeExponent), > edgeTriage(initialBlockSizeExponent) > {} > }; > > struct EdgeEvent { > bool isRetrograde; > unit<Vertex> tail; > unit<Vertex> head; > unit<Vertex> root; > typename Vertex::Mode mode; > TreeRelation relation; > > EdgeEvent(unit<Vertex> tail, unit<Vertex> head) : > isRetrograde(false), > tail(tail), > head(head), > root(tail), > > mode(Vertex::Mode::clock), > relation(TreeRelation::tree) > {} > > bool > isReflexive() const { return head == tail; } > }; > > using TreeTableColumns = typename ExtensionSetBase<Vertex>::TreeTableColumns<Vertex>; >}; > >using ElasticTreeCompositionBase = ElasticTreeComposition<EmptyExtensionSet>; >} ># 29 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/ElasticTreePluginInterface.hpp" 1 > > >namespace edfst >{ >namespace plugin >{ >template<typename TreeVertex> >struct ElasticTreePluginInterface { > using TreeEdge = TreeEdgeBase<TreeVertex>; > using VertexMode = typename TreeVertex::Mode; > > virtual ~ElasticTreePluginInterface() {} > > > > > > > virtual void > elasticTreeAddEventEdge() = 0; > > virtual void > elasticTreeDeltaEdge(unit<TreeVertex> tail, cell<TreeEdge> edge, TreeRelation relation, VertexMode mode, > uint32_t crossDeterminantLowerBound = 0) = 0; > > virtual void > elasticTreeVertexCommit(unit<TreeVertex> v) = 0; > > virtual void > elasticTreeExpandVertex(unit<TreeVertex> initiator, unit<TreeVertex> origin, unit<TreeVertex> expansion) = 0; > > virtual void > elasticTreeGateVertex(unit<TreeVertex> proxy) = 0; > > virtual void > elasticTreeReposition(unit<TreeVertex> v) = 0; > > virtual void > elasticTreeBeginUpdate() = 0; > > virtual void > elasticTreeCommitRebind() = 0; > > virtual void > elasticTreeInitialize() = 0; >}; > >template<typename TreeVertex> >struct ElasticTreePluginVoid : > public ElasticTreePluginInterface<TreeVertex> { > using TreeEdge = TreeEdgeBase<TreeVertex>; > using VertexMode = typename TreeVertex::Mode; > > > > > > > void > elasticTreeAddEventEdge() {} > > void > elasticTreeDeltaEdge(__attribute__((unused)) unit<TreeVertex> tail, __attribute__((unused)) cell<TreeEdge> edge, __attribute__((unused)) TreeRelation relation, __attribute__((unused)) VertexMode mode, > __attribute__((unused)) uint32_t crossDeterminantLowerBound = 0) {} > > void > elasticTreeVertexCommit(__attribute__((unused)) unit<TreeVertex> v) {} > > void > elasticTreeExpandVertex(__attribute__((unused)) unit<TreeVertex> initiator, __attribute__((unused)) unit<TreeVertex> origin, __attribute__((unused)) unit<TreeVertex> expansion) {} > > void > elasticTreeGateVertex(__attribute__((unused)) unit<TreeVertex> proxy) {} > > void > elasticTreeReposition(__attribute__((unused)) unit<TreeVertex> v) {} > > void > elasticTreeBeginUpdate() {} > > void > elasticTreeCommitRebind() {} > > void > elasticTreeInitialize() {} >}; ># 99 "../../subprojects/edfst/src/edfst/tree/ElasticTreePluginInterface.hpp" >struct AddEventEdge { > template<typename PluginType> > void > operator ()(PluginType plugin) > { > plugin->elasticTreeAddEventEdge(); > } >}; > >struct DeltaEdge { > template<typename PluginType, typename ... EventComponents> > void > operator ()(PluginType plugin, EventComponents&& ... c) > { > plugin->elasticTreeDeltaEdge(std::forward<EventComponents>(c) ...); > } >}; > >struct VertexCommit { > template<typename PluginType, typename ... EventComponents> > void > operator ()(PluginType plugin, EventComponents&& ... c) > { > plugin->elasticTreeVertexCommit(std::forward<EventComponents>(c) ...); > } >}; > >struct ExpandVertex { > template<typename PluginType, typename ... EventComponents> > void > operator ()(PluginType plugin, EventComponents&& ... c) > { > plugin->elasticTreeExpandVertex(std::forward<EventComponents>(c) ...); > } >}; > >struct GateVertex { > template<typename PluginType, typename ... EventComponents> > void > operator ()(PluginType plugin, EventComponents&& ... c) > { > plugin->elasticTreeGateVertex(std::forward<EventComponents>(c) ...); > } >}; > >struct RepositionVertex { > template<typename PluginType, typename ... EventComponents> > void > operator ()(PluginType plugin, EventComponents&& ... c) > { > plugin->elasticTreeReposition(std::forward<EventComponents>(c) ...); > } >}; > >struct BeginUpdate { > template<typename PluginType, typename ... EventComponents> > void > operator ()(PluginType plugin, EventComponents&& ... c) > { > plugin->elasticTreeBeginUpdate(std::forward<EventComponents>(c) ...); > } >}; > >struct CommitRebind { > template<typename PluginType, typename ... EventComponents> > void > operator ()(PluginType plugin, EventComponents&& ... c) > { > plugin->elasticTreeCommitRebind(std::forward<EventComponents>(c) ...); > } >}; >} >} ># 30 "../../subprojects/edfst/src/edfst/tree/ElasticTreeFramework.hpp" 2 ># 7 "../../subprojects/edfst/test/ElasticTestMock.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 1 > > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 1 > > > > > ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 7 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 2 > > > >namespace facile >{ >template<typename Integral, typename Real = double> >struct Randomizer { > std::default_random_engine engine; > std::uniform_int_distribution<Integral> integralDistribution; > std::uniform_real_distribution<Real> realDistribution; > > Randomizer() : > Randomizer(std::chrono::system_clock::now().time_since_epoch().count()) > {} > > Randomizer(Integral seed) : > realDistribution(0.0, 1.0) > { engine.seed(seed); } > > Integral > choose(Integral min, Integral sentinel) > { > ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > ( ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > min < sentinel ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp", 29) << ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > std::endl ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > << "⢠Condition [" << ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > "min < sentinel" ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > << "] " << ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > std::endl ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > << "⢠" ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > << "Cannot choose a random value between [" << min << ", " << sentinel << ")" << ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > facile::RequireException::require_sentinel ># 29 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > ; > > Integral modulus = sentinel - min; > > if (modulus == 0) > return min; > > Integral value = integralDistribution(engine); > > return min + (value % modulus); > } > > bool > maybe(Real probability = 0.5) > { > ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > ( ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > probability >= 0.0 && probability <= 1.0 ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp", 44) << ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > std::endl ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > << "⢠Condition [" << ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > "probability >= 0.0 && probability <= 1.0" ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > << "] " << ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > std::endl ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > << "⢠" ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > << "Valid range of Maybe is { 0.0 <= probability <= 1.0 }" << ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" 3 > facile::RequireException::require_sentinel ># 44 "../../subprojects/edfst/subprojects/facile/src/math/Randomizer.hpp" > ; > > Real value = realDistribution(engine); > > return (value < probability); > } > > std::function<Integral(Integral, Integral)> > bindChooser() > { > return std::bind(&Randomizer::choose, this, > std::placeholders::_1, std::placeholders::_2); > } > > template<typename Iterator, typename IteratorType, typename ValueType> > owner<std::vector<ValueType>> > selectSubset(Iterator begin, Iterator end, Integral subsetSize, > std::function<ValueType(IteratorType)> selector = identitySelector) > { > owner<typename std::vector<ValueType>> selection = owner<std::vector<ValueType>>::make(); > > for (Iterator i = begin; i != end; ++i) > selection->push_back(selector(*i)); > Integral remaining = selection->size(); > typename std::vector<ValueType>::iterator i = selection->begin(); > for (Integral s = 0; s < subsetSize; s++, ++i, --remaining) { > typename std::vector<ValueType>::iterator j = i; > std::advance(j, choose(0, remaining)); > std::swap(*i, *j); > } > selection->resize(subsetSize); > return selection; > } > > private: > template<typename ValueType> > ValueType > identitySelector(ValueType v) > { > return v; > } >}; >} ># 6 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 2 > ># 1 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 1 > > > > > > ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" 1 > > > > > > > ># 1 "../../subprojects/edfst/3pty/networkit/src/extlibs/tlx/tlx/unused.hpp" 1 ># 14 "../../subprojects/edfst/3pty/networkit/src/extlibs/tlx/tlx/unused.hpp" >namespace tlx { > > > > >template <typename... Types> >void unused(Types&& ...) { } > >} ># 9 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" 2 > > >namespace NetworKit { >namespace GraphTools { > > > > > > > >count maxDegree(const Graph &G); > > > > > > > >count maxInDegree(const Graph &G); > > > > > > > >edgeweight maxWeightedDegree(const Graph &G); > > > > > > > >edgeweight maxWeightedInDegree(const Graph &G); > > > > > > > >node randomNode(const Graph &G); ># 61 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >std::vector<node> randomNodes(const Graph &G, count n); ># 70 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >node randomNeighbor(const Graph &G, node u); ># 84 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >std::pair<node, node> randomEdge(const Graph &G, bool uniformDistribution = false); ># 94 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >std::vector<std::pair<node, node>> randomEdges(const Graph &G, count nr); ># 106 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >template <class InputIt> >void removeEdgesFromIsolatedSet(Graph &G, InputIt first, InputIt last) { > count removedEdges = 0; > while (first != last) { > const auto u = *first++; > removedEdges += G.degree(u); > G.removePartialOutEdges(unsafe, u); > if (G.isDirected()) { > G.removePartialInEdges(unsafe, u); > } > } > > G.setEdgeCount(unsafe, G.numberOfEdges() - (G.isDirected() ? removedEdges : removedEdges / 2)); >} ># 128 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >std::pair<node, node> size(const Graph &G) noexcept; ># 137 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >double density(const Graph &G) noexcept; > > > > > > > >double volume(const Graph &G); ># 155 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >template <class InputIt> >double volume(const Graph &G, InputIt first, InputIt last) { > double outVolume = 0.0; > > > for (; first != last; ++first) > outVolume += G.weightedDegree(*first, !G.isDirected()); > > return outVolume; >} ># 174 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >template <class InputIt> >double inVolume(const Graph &G, InputIt first, InputIt last) { > double inVolume = 0.0; > > > for (; first != last; ++first) > inVolume += G.weightedDegreeIn(*first, !G.isDirected()); > > return inVolume; >} ># 192 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >Graph copyNodes(const Graph &G); ># 204 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >Graph subgraphFromNodes(const Graph &G, const std::unordered_set<node> &nodes); ># 219 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >template <class InputIt> >Graph subgraphFromNodes(const Graph &G, InputIt first, InputIt last, bool compact = false) { > count subgraphIdBound = 0; > std::unordered_map<node, node> reverseMapping; > > if (compact) { > for (InputIt it = first; it != last; ++it) { > reverseMapping[*it] = subgraphIdBound; > ++subgraphIdBound; > } > } else { > subgraphIdBound = G.upperNodeIdBound(); > } > > Graph S(subgraphIdBound, G.isWeighted(), G.isDirected()); > > if (compact) { > for (auto nodeIt : reverseMapping) { > node u = nodeIt.first; > node localU = nodeIt.second; > G.forNeighborsOf(u, [&](node v, edgeweight weight) { > if (!G.isDirected() && u > v) > return; > > auto vMapping = reverseMapping.find(v); > if (vMapping != reverseMapping.end()) > S.addEdge(localU, vMapping->second, weight); > }); > } > } else { > > for (node u = 0; u < G.upperNodeIdBound(); ++u) { > S.removeNode(u); > } > > > for (InputIt it = first; it != last; ++it) { > S.restoreNode(*it); > } > > G.forEdges([&](node u, node v, edgeweight w) { > > if (S.hasNode(u) && S.hasNode(v)) { > S.addEdge(u, v, w); > } > }); > } > > return S; >} ># 288 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >Graph subgraphAndNeighborsFromNodes(const Graph &G, const std::unordered_set<node> &nodes, > bool includeOutNeighbors = false, > bool includeInNeighbors = false); ># 299 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >Graph toUndirected(const Graph &G); ># 308 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >Graph toUnweighted(const Graph &G); ># 317 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >Graph toWeighted(const Graph &G); ># 326 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >Graph transpose(const Graph &G); > > > > > > > >void append(Graph &G, const Graph &G1); ># 343 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >void merge(Graph &G, const Graph &G1); > > > > > > > >Graph getCompactedGraph(const Graph &graph, const std::unordered_map<node, node> &nodeIdMap); > > > > > > >std::unordered_map<node, node> getContinuousNodeIds(const Graph &graph); > > > > > > >std::unordered_map<node, node> getRandomContinuousNodeIds(const Graph &graph); ># 375 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >std::vector<node> invertContinuousNodeIds(const std::unordered_map<node, node> &nodeIdMap, > const Graph &G); > > > > > > > >Graph restoreGraph(const std::vector<node> &invertedIdMap, const Graph &G); > > > > > >node augmentGraph(Graph &G); > > > > > >std::pair<Graph, node> createAugmentedGraph(const Graph &G); ># 407 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >void sortEdgesByWeight(Graph &G, bool decreasing = false); ># 419 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >std::vector<node> topologicalSort(const Graph &G); ># 436 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" >template <typename UnaryIdMapper, typename SkipEdgePredicate> >Graph getRemappedGraph(const Graph &graph, count numNodes, UnaryIdMapper &&oldIdToNew, > SkipEdgePredicate &&skipNode, bool preallocate = true) { > tlx::unused(preallocate); > > > graph.forNodes([&](node u) { ># 442 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" 3 4 > (static_cast <bool> ( ># 442 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" > skipNode(u) || oldIdToNew(u) < numNodes ># 442 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 442 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" > "skipNode(u) || oldIdToNew(u) < numNodes" ># 442 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp", 442, __extension__ __PRETTY_FUNCTION__)) ># 442 "../../subprojects/edfst/3pty/networkit/src/include/networkit/graph/GraphTools.hpp" > ; }); > > > const auto directed = graph.isDirected(); > Graph Gnew(numNodes, graph.isWeighted(), directed); > > graph.forNodes([&](const node u) { > if (skipNode(u)) > return; > > const node mapped_u = oldIdToNew(u); > graph.forNeighborsOf(u, [&](node, node v, edgeweight ew) { > if (!directed && v < u) > return; > if (skipNode(v)) > return; > > const node mapped_v = oldIdToNew(v); > Gnew.addEdge(mapped_u, mapped_v, ew); > }); > }); > > return Gnew; >} > >template <typename UnaryIdMapper> >Graph getRemappedGraph(const Graph &graph, count numNodes, UnaryIdMapper &&oldIdToNew, > bool preallocate = true) { > return getRemappedGraph( > graph, numNodes, std::forward<UnaryIdMapper>(oldIdToNew), [](node) { return false; }, > preallocate); >} > >} > >} ># 8 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiGenerator.hpp" 1 ># 11 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiGenerator.hpp" ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/StaticGraphGenerator.hpp" 1 ># 13 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/StaticGraphGenerator.hpp" >namespace NetworKit { > > > > > >class StaticGraphGenerator { > >public: > > virtual ~StaticGraphGenerator() = default; > > virtual Graph generate() = 0; >}; > >} ># 12 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiGenerator.hpp" 2 > >namespace NetworKit { > > > > > > >class ErdosRenyiGenerator final : public StaticGraphGenerator { >public: ># 44 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiGenerator.hpp" > ErdosRenyiGenerator(count nNodes, double prob, bool directed = false, bool self_loops = false); > > Graph generate() override; > >private: > node nNodes; > double prob; > bool directed; > bool self_loops; >}; > >} ># 9 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" 1 ># 14 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" ># 1 "/usr/include/c++/13/cassert" 1 3 ># 41 "/usr/include/c++/13/cassert" 3 > ># 42 "/usr/include/c++/13/cassert" 3 > > ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 > ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 45 "/usr/include/c++/13/cassert" 2 3 ># 15 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" 2 ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 16 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" 2 > > > > ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/SignalHandling.hpp" 1 > > > > > > > ># 7 "../../subprojects/edfst/3pty/networkit/src/include/networkit/auxiliary/SignalHandling.hpp" >namespace Aux { > >class SignalHandler { >public: > SignalHandler(); > > ~SignalHandler(); > > void assureRunning(); > > bool isRunning(); >}; > >namespace SignalHandling { > > > >class InterruptException : public std::exception { >public: > InterruptException() : std::exception() {} > const char *what() const noexcept override { return "Received CTRL+C/SIGINT"; } >}; > > > > > > >void init(SignalHandler *caller); > > > > > > >void reset(SignalHandler *caller); >} > >} ># 21 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" 2 > >namespace NetworKit { ># 39 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" >template <bool UseFixedPoint = true> >class ErdosRenyiEnumerator final { > > using integral_t = unsigned long long; > >public: ># 60 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" > ErdosRenyiEnumerator(node n, double prob, bool directed) > : n{n}, prob{prob}, directed{directed} { > ># 62 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" 3 4 > (static_cast <bool> ( ># 62 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" > n > 0 ># 62 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" 3 4 > ) ? void (0) : __assert_fail ( ># 62 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" > "n > 0" ># 62 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" 3 4 > , "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp", 62, __extension__ __PRETTY_FUNCTION__)) ># 62 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" > ; > } ># 83 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" > template <typename Handle> > count forEdgesParallel(Handle handle) { > std::atomic<count> numEdges{0}; > if (directed) { >#pragma omp parallel > { > const unsigned threads = omp_get_num_threads(); > const unsigned tid = omp_get_thread_num(); > > const node chunk_size = (n + threads - 1) / threads; > const node first_node = std::min<node>(n, tid * chunk_size); > const node last_node = std::min<node>(n, (tid + 1) * chunk_size); > > const auto localNumEdges = > enumerate<true>(handle, tid, prob, first_node, last_node); > numEdges.fetch_add(localNumEdges, std::memory_order_relaxed); > } > } else { >#pragma omp parallel > { > const unsigned threads = omp_get_num_threads(); > const unsigned tid = omp_get_thread_num(); > > > const node chunk_size = (n * (n - 1) / 2 + threads - 1) / threads; > > double first_node; > double last_node = 0.0; > > for (unsigned i = 0; i <= tid; i++) { > first_node = last_node; > node upper_node = std::ceil( > std::sqrt(0.25 + first_node * first_node + first_node + 2 * chunk_size)); > last_node = std::min<node>(n, upper_node); > } > > if (tid + 1 == threads) > last_node = n; > > if (first_node < last_node) { > const auto localNumEdges = > enumerate<false>(handle, tid, prob, first_node, last_node); > numEdges.fetch_add(localNumEdges, std::memory_order_relaxed); > } > } > } > > return numEdges.load(); > } > > > > > > template <typename Handle> > count forEdges(Handle handle) { > if (directed) { > return enumerate<true>(handle, 0, prob, 0, n); > } else { > return enumerate<false>(handle, 0, prob, 0, n); > } > } > > > > > count expectedNumberOfEdges() const { return prob * n * (directed ? n : (n - 1) * 0.5); } > >private: > const node n; > const double prob; > const bool directed; > > > > template <bool Directed, typename Handle> > count enumerate(Handle handle, unsigned tid, double prob, const node node_begin, > const node node_end) const { > if (prob > 0.9) { > > > > > node cur_u = node_begin; > node cur_v = 0; > count num_edges = 0; > > if (!Directed && cur_u == 0) > cur_u = 1; > > auto complement_graph = [&](unsigned tid, node u, node v) { > while (!(cur_u == u && cur_v == v)) { > callHandle(handle, tid, cur_u, cur_v); > num_edges++; > > if (++cur_v == (Directed ? n : cur_u)) { > cur_v = 0; > cur_u++; > } > } > }; > > enumerate_<Directed>(complement_graph, tid, 1.0 - prob, node_begin, node_end); > complement_graph(tid, node_end, 0); > > return num_edges; > } > > return enumerate_<Directed>(handle, tid, prob, node_begin, node_end); > } > > template <bool Directed, typename Handle> > count enumerate_(Handle handle, unsigned tid, double prob, const node node_begin, > const node node_end) const { > Aux::SignalHandler handler; > > if (prob < std::pow(n, -3.0)) { > > return 0; > } > > const double inv_log2_cp = 1.0 / std::log2(1.0 - prob); > > > auto &prng = Aux::Random::getURNG(); > auto distr = get_distribution<UseFixedPoint>(); > > count curr = node_begin; > if (!Directed && !curr) > curr = 1; > node next = -1; > > node max_skip = 0; > count numEdges = 0; > > while (curr < node_end) { > handler.assureRunning(); > > auto skip = skip_distance(distr(prng), inv_log2_cp); > next += skip; > if (skip > max_skip) > max_skip = skip; > > > > > while (next >= (Directed ? n : curr)) { > > next = next - (Directed ? n : curr); > curr++; > } > > > if (curr < node_end) { > numEdges++; > callHandle(handle, tid, curr, next); > } > } > > return numEdges; > } > > > > count skip_distance(integral_t random_prob, double inv_log2_cp) const { ># 277 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/ErdosRenyiEnumerator.hpp" > return 1 > + static_cast<count>( > std::floor((std::log2(random_prob) - 8 * sizeof(integral_t)) * inv_log2_cp)); > } > > count skip_distance(double random_prob, double inv_log2_cp) const { > return 1 + static_cast<count>(std::floor((std::log2(random_prob)) * inv_log2_cp)); > } > > > template <bool FixedPoint> > auto get_distribution() const -> > typename std::enable_if<FixedPoint, std::uniform_int_distribution<integral_t>>::type { > return std::uniform_int_distribution<integral_t>{1, std::numeric_limits<integral_t>::max()}; > } > > template <bool FixedPoint> > auto get_distribution() const -> > typename std::enable_if<!FixedPoint, std::uniform_real_distribution<double>>::type { > return std::uniform_real_distribution<double>{std::nextafter(0.0, 1.0), > std::nextafter(1.0, 0.0)}; > } > > > template <typename Handle> > auto callHandle(Handle h, unsigned tid, node u, node v) const > -> decltype(h(0u, node{0}, node{0})) { > return h(tid, u, v); > } > > template <typename Handle> > auto callHandle(Handle h, unsigned , node u, node v) const > -> decltype(h(node{0}, node{0})) { > return h(u, v); > } >}; > >using ErdosRenyiEnumeratorDefault = ErdosRenyiEnumerator<true>; > >} ># 10 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/randomization/DegreePreservingShuffle.hpp" 1 ># 11 "../../subprojects/edfst/3pty/networkit/src/include/networkit/randomization/DegreePreservingShuffle.hpp" ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/base/Algorithm.hpp" 1 > > > > > > > >namespace NetworKit { > >class Algorithm { >protected: > bool hasRun = false; > >public: > virtual ~Algorithm() = default; > > > > > > virtual void run() = 0; > > > > > > > bool hasFinished() const noexcept { return hasRun; } > > > > > void assureFinished() const { > if (!hasRun) > throw std::runtime_error("Error, run must be called first"); > } >}; > >} ># 12 "../../subprojects/edfst/3pty/networkit/src/include/networkit/randomization/DegreePreservingShuffle.hpp" 2 > > >namespace NetworKit { ># 35 "../../subprojects/edfst/3pty/networkit/src/include/networkit/randomization/DegreePreservingShuffle.hpp" >class DegreePreservingShuffle final : public Algorithm { >public: > DegreePreservingShuffle() = delete; > > > > > > > explicit DegreePreservingShuffle(const Graph &G); > > ~DegreePreservingShuffle() override; > > > > > > void run() final; > > > > > > Graph getGraph() const; > > > > > > > > const std::vector<node> &getPermutation() const noexcept { return permutation; } > > static Graph shuffleGraph(const Graph &input) { > DegreePreservingShuffle algo(input); > algo.run(); > return algo.getGraph(); > } > >private: > const Graph *G; > std::vector<node> permutation; >}; > >} ># 11 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/linkprediction/RandomLinkSampler.hpp" 1 ># 15 "../../subprojects/edfst/3pty/networkit/src/include/networkit/linkprediction/RandomLinkSampler.hpp" >namespace NetworKit { > > > > > > >namespace RandomLinkSampler { ># 32 "../../subprojects/edfst/3pty/networkit/src/include/networkit/linkprediction/RandomLinkSampler.hpp" >Graph byPercentage(const Graph &G, double percentage); ># 41 "../../subprojects/edfst/3pty/networkit/src/include/networkit/linkprediction/RandomLinkSampler.hpp" >Graph byCount(const Graph &G, count numLinks); > >} > >} ># 12 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/dynamics/GraphEventHandler.hpp" 1 ># 13 "../../subprojects/edfst/3pty/networkit/src/include/networkit/dynamics/GraphEventHandler.hpp" >namespace NetworKit { > > > > >class GraphEventHandler { > >public: > virtual ~GraphEventHandler() {} > > virtual void onNodeAddition(node u) = 0; > > virtual void onNodeRemoval(node u) = 0; > > virtual void onNodeRestoration(node u) = 0; > > virtual void onEdgeAddition(node u, node v, edgeweight w = 1.0) = 0; > > virtual void onEdgeRemoval(node u, node v, edgeweight w = 1.0) = 0; > > virtual void onWeightUpdate(node u, node v, edgeweight wOld, edgeweight wNew) = 0; > > virtual void onWeightIncrement(node u, node v, edgeweight wOld, edgeweight delta) = 0; > > virtual void onTimeStep() = 0; >}; > >} ># 13 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/dynamics/GraphEventProxy.hpp" 1 ># 14 "../../subprojects/edfst/3pty/networkit/src/include/networkit/dynamics/GraphEventProxy.hpp" >namespace NetworKit { > > > > > > > >class GraphEventProxy final { > >private: > std::vector<GraphEventHandler *> observers; > >public: > Graph *G; > > GraphEventProxy(); > > GraphEventProxy(Graph &G); > > void registerObserver(GraphEventHandler *observer); > > node addNode(); > > void removeNode(node u); > > void restoreNode(node u); > > void addEdge(node u, node v, edgeweight weight = defaultEdgeWeight); > > void removeEdge(node u, node v); > > void setWeight(node u, node v, edgeweight w); > > void incrementWeight(node u, node v, edgeweight delta); > > void timeStep(); >}; > >} ># 14 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 2 ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/DynamicBarabasiAlbertGenerator.hpp" 1 ># 11 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/DynamicBarabasiAlbertGenerator.hpp" ># 1 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/DynamicGraphSource.hpp" 1 ># 15 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/DynamicGraphSource.hpp" >namespace NetworKit { > > > > >class DynamicGraphSource { > >protected: > GraphEventProxy *Gproxy; > Graph *G; > > bool graphSet; > > bool graphInitialized; > >public: > > DynamicGraphSource(); > > > > virtual ~DynamicGraphSource() = default; > > > > > > GraphEventProxy *newGraph(); > > > > > virtual void initializeGraph() = 0; > > > > > virtual void generate() = 0; > > > > > > virtual void generateWhile(std::function<bool(void)> cont); > > > > > > virtual void generateNodes(count n); > > > > > > virtual void generateEdges(count m); > > > > > virtual void generateTimeSteps(count t); >}; > >} ># 12 "../../subprojects/edfst/3pty/networkit/src/include/networkit/generators/DynamicBarabasiAlbertGenerator.hpp" 2 > >namespace NetworKit { > > > > > >class DynamicBarabasiAlbertGenerator final : public DynamicGraphSource { > > count k; > count degSum; > >public: > DynamicBarabasiAlbertGenerator(count k = 2); > > void initializeGraph() override; > > void generate() override; >}; > >} ># 15 "../../subprojects/edfst/src/edfst/ElasticNetworKit.hpp" 2 > >using namespace facile; > >namespace edfst >{ >struct BarabasiAlbertGenerator { > uint32_t nodeCount; > uint32_t edgeCount; > > struct Builder : > public NetworKit::GraphEventHandler { > void > onNodeAddition(NetworKit::node n) override > { > facile::StreamLog::log(__PRETTY_FUNCTION__, 29, facile::StreamLogLevel::Status) << "Node added: " << n << std::endl; > } > > void > onNodeRemoval(__attribute__((unused)) NetworKit::node n) override {} > > void > onNodeRestoration(__attribute__((unused)) NetworKit::node n) override {} > > void > onEdgeAddition(NetworKit::node a, NetworKit::node b, __attribute__((unused)) NetworKit::edgeweight w = 1.0) override > { > facile::StreamLog::log(__PRETTY_FUNCTION__, 41, facile::StreamLogLevel::Status) << "Dynamic edge " << a << " -> " << b << std::endl; > } > > void > onEdgeRemoval(__attribute__((unused)) NetworKit::node a, __attribute__((unused)) NetworKit::node b, __attribute__((unused)) NetworKit::edgeweight w = 1.0) override {} > > void > onWeightUpdate(__attribute__((unused)) NetworKit::node a, __attribute__((unused)) NetworKit::node b, __attribute__((unused)) NetworKit::edgeweight wOld, __attribute__((unused)) NetworKit::edgeweight wNew) override {} > > void > onWeightIncrement(__attribute__((unused)) NetworKit::node a, __attribute__((unused)) NetworKit::node b, __attribute__((unused)) NetworKit::edgeweight wOld, __attribute__((unused)) NetworKit::edgeweight delta) override {} > > void > onTimeStep() override {} > } > builder; > > BarabasiAlbertGenerator(uint32_t nodeCount, uint32_t edgeCount) : > nodeCount(nodeCount), > edgeCount(edgeCount) > {} > > NetworKit::Graph > generate() > { > NetworKit::DynamicBarabasiAlbertGenerator source(nodeCount); > > NetworKit::Graph g; > NetworKit::GraphEventProxy proxy(g); > source.initializeGraph(); > proxy.registerObserver(&builder); > source.generateEdges(edgeCount); > return g; > } >}; >} ># 8 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 2 > ># 1 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 1 > > ># 1 "/usr/include/boost/algorithm/string/replace.hpp" 1 3 4 ># 14 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 ># 1 "/usr/include/boost/algorithm/string/config.hpp" 1 3 4 ># 15 "/usr/include/boost/algorithm/string/replace.hpp" 2 3 4 > ># 1 "/usr/include/boost/range/iterator_range_core.hpp" 1 3 4 ># 25 "/usr/include/boost/range/iterator_range_core.hpp" 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 > ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 26 "/usr/include/boost/range/iterator_range_core.hpp" 2 3 4 ># 38 "/usr/include/boost/range/iterator_range_core.hpp" 3 4 ># 1 "/usr/include/boost/range/functions.hpp" 1 3 4 ># 18 "/usr/include/boost/range/functions.hpp" 3 4 ># 1 "/usr/include/boost/range/begin.hpp" 1 3 4 ># 18 "/usr/include/boost/range/begin.hpp" 3 4 ># 1 "/usr/include/boost/range/config.hpp" 1 3 4 ># 19 "/usr/include/boost/range/begin.hpp" 2 3 4 > ># 1 "/usr/include/boost/range/iterator.hpp" 1 3 4 ># 19 "/usr/include/boost/range/iterator.hpp" 3 4 ># 1 "/usr/include/boost/range/range_fwd.hpp" 1 3 4 ># 13 "/usr/include/boost/range/range_fwd.hpp" 3 4 >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; > >} ># 20 "/usr/include/boost/range/iterator.hpp" 2 3 4 ># 1 "/usr/include/boost/range/mutable_iterator.hpp" 1 3 4 ># 21 "/usr/include/boost/range/mutable_iterator.hpp" 3 4 ># 1 "/usr/include/boost/range/detail/extract_optional_type.hpp" 1 3 4 ># 22 "/usr/include/boost/range/mutable_iterator.hpp" 2 3 4 > > > > > >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 > > >{ >}; > >} > ># 1 "/usr/include/boost/range/detail/msvc_has_iterator_workaround.hpp" 1 3 4 ># 78 "/usr/include/boost/range/mutable_iterator.hpp" 2 3 4 ># 21 "/usr/include/boost/range/iterator.hpp" 2 3 4 ># 1 "/usr/include/boost/range/const_iterator.hpp" 1 3 4 ># 27 "/usr/include/boost/range/const_iterator.hpp" 3 4 >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 > > >{ >}; > >} ># 22 "/usr/include/boost/range/iterator.hpp" 2 3 4 > > > > >namespace boost >{ ># 60 "/usr/include/boost/range/iterator.hpp" 3 4 > 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 > { > }; > > > >} ># 21 "/usr/include/boost/range/begin.hpp" 2 3 4 > > > >namespace boost >{ > > >namespace range_detail >{ > > > > > > > template< typename C > > constexpr inline typename range_iterator<C>::type > range_begin( C& c ) > { > > > > > > return c.begin(); > } > > > > > > template< typename Iterator > > constexpr inline Iterator range_begin( const std::pair<Iterator,Iterator>& p ) > { > return p.first; > } > > template< typename Iterator > > constexpr inline Iterator range_begin( std::pair<Iterator,Iterator>& p ) > { > return p.first; > } ># 71 "/usr/include/boost/range/begin.hpp" 3 4 > template< typename T, std::size_t sz > > constexpr inline const T* range_begin( const T (&a)[sz] ) noexcept > { > return a; > } > > template< typename T, std::size_t sz > > constexpr inline T* range_begin( T (&a)[sz] ) noexcept > { > return a; > } > > > >} > > > > > >namespace range_adl_barrier >{ > >template< class T > > >constexpr > >inline typename range_iterator<T>::type begin( T& r ) >{ > > using namespace range_detail; > > return range_begin( r ); >} > >template< class T > > >constexpr > >inline typename range_iterator<const T>::type begin( const T& r ) >{ > > using namespace range_detail; > > return range_begin( r ); >} > > } >} > >namespace boost >{ > namespace range_adl_barrier > { > template< class T > > inline typename range_iterator<const T>::type > const_begin( const T& r ) > { > return boost::range_adl_barrier::begin( r ); > } > } > > using namespace range_adl_barrier; >} ># 19 "/usr/include/boost/range/functions.hpp" 2 3 4 ># 1 "/usr/include/boost/range/end.hpp" 1 3 4 ># 20 "/usr/include/boost/range/end.hpp" 3 4 ># 1 "/usr/include/boost/range/detail/implementation_help.hpp" 1 3 4 ># 15 "/usr/include/boost/range/detail/implementation_help.hpp" 3 4 ># 1 "/usr/include/boost/range/detail/common.hpp" 1 3 4 ># 19 "/usr/include/boost/range/detail/common.hpp" 3 4 ># 1 "/usr/include/boost/range/detail/sfinae.hpp" 1 3 4 ># 20 "/usr/include/boost/range/detail/sfinae.hpp" 3 4 >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 {}; > > } > >} ># 20 "/usr/include/boost/range/detail/common.hpp" 2 3 4 ># 29 "/usr/include/boost/range/detail/common.hpp" 3 4 >namespace boost >{ > namespace range_detail > { ># 46 "/usr/include/boost/range/detail/common.hpp" 3 4 > 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; > }; > } >} ># 16 "/usr/include/boost/range/detail/implementation_help.hpp" 2 3 4 ># 24 "/usr/include/boost/range/detail/implementation_help.hpp" 3 4 >namespace boost >{ > namespace range_detail > { > template <typename T> > inline void boost_range_silence_warning( const T& ) { } > > > > > > inline const char* str_end( const char* s, const char* ) > { > return s + strlen( s ); > } > > > inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) > { > return s + wcslen( s ); > } ># 56 "/usr/include/boost/range/detail/implementation_help.hpp" 3 4 > template< class Char > > inline Char* str_end( Char* s ) > { > return const_cast<Char*>( str_end( s, s ) ); > } > > template< class T, std::size_t sz > > constexpr inline T* array_end( T (&boost_range_array)[sz] ) noexcept > { > return boost_range_array + sz; > } > > template< class T, std::size_t sz > > constexpr inline const T* array_end( const T (&boost_range_array)[sz] ) noexcept > { > return boost_range_array + sz; > } > > > > > > template< class Char > > inline std::size_t str_size( const Char* const& s ) > { > return str_end( s ) - s; > } > > template< class T, std::size_t sz > > inline std::size_t array_size( T (&boost_range_array)[sz] ) > { > boost_range_silence_warning( boost_range_array ); > return sz; > } > > template< class T, std::size_t sz > > inline std::size_t array_size( const T (&boost_range_array)[sz] ) > { > boost_range_silence_warning( boost_range_array ); > return sz; > } > > inline bool is_same_address(const void* l, const void* r) > { > return l == r; > } > > template<class T1, class T2> > inline bool is_same_object(const T1& l, const T2& r) > { > return range_detail::is_same_address(&l, &r); > } > > } > >} ># 21 "/usr/include/boost/range/end.hpp" 2 3 4 > > > > > >namespace boost >{ > > >namespace range_detail >{ > > > > > > template< typename C > > constexpr inline typename range_iterator<C>::type > range_end( C& c ) > { > > > > > > return c.end(); > } > > > > > > template< typename Iterator > > constexpr inline Iterator range_end( const std::pair<Iterator,Iterator>& p ) > { > return p.second; > } > > template< typename Iterator > > constexpr inline Iterator range_end( std::pair<Iterator,Iterator>& p ) > { > return p.second; > } > > > > > > template< typename T, std::size_t sz > > constexpr inline const T* range_end( const T (&a)[sz] ) noexcept > { > return range_detail::array_end<T,sz>( a ); > } > > template< typename T, std::size_t sz > > constexpr inline T* range_end( T (&a)[sz] ) noexcept > { > return range_detail::array_end<T,sz>( a ); > } > > >} > > >namespace range_adl_barrier >{ > >template< class T > > >constexpr > >inline typename range_iterator<T>::type end( T& r ) >{ > > using namespace range_detail; > > return range_end( r ); >} > >template< class T > > >constexpr > >inline typename range_iterator<const T>::type end( const T& r ) >{ > > using namespace range_detail; > > return range_end( r ); >} > > } >} > >namespace boost >{ > namespace range_adl_barrier > { > template< class T > > constexpr inline typename range_iterator<const T>::type > const_end( const T& r ) > { > return boost::range_adl_barrier::end( r ); > } > } > using namespace range_adl_barrier; >} ># 20 "/usr/include/boost/range/functions.hpp" 2 3 4 ># 1 "/usr/include/boost/range/size.hpp" 1 3 4 ># 21 "/usr/include/boost/range/size.hpp" 3 4 ># 1 "/usr/include/boost/range/size_type.hpp" 1 3 4 ># 19 "/usr/include/boost/range/size_type.hpp" 3 4 ># 1 "/usr/include/boost/range/difference_type.hpp" 1 3 4 ># 21 "/usr/include/boost/range/difference_type.hpp" 3 4 ># 1 "/usr/include/boost/range/has_range_iterator.hpp" 1 3 4 ># 23 "/usr/include/boost/range/has_range_iterator.hpp" 3 4 >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> > {}; >} ># 22 "/usr/include/boost/range/difference_type.hpp" 2 3 4 > > > >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> > { }; >} ># 20 "/usr/include/boost/range/size_type.hpp" 2 3 4 ># 1 "/usr/include/boost/range/concepts.hpp" 1 3 4 ># 19 "/usr/include/boost/range/concepts.hpp" 3 4 ># 1 "/usr/include/boost/concept_check.hpp" 1 3 4 ># 20 "/usr/include/boost/concept_check.hpp" 3 4 ># 1 "/usr/include/boost/concept/assert.hpp" 1 3 4 ># 35 "/usr/include/boost/concept/assert.hpp" 3 4 ># 1 "/usr/include/boost/concept/detail/general.hpp" 1 3 4 ># 9 "/usr/include/boost/concept/detail/general.hpp" 3 4 ># 1 "/usr/include/boost/concept/detail/backward_compatibility.hpp" 1 3 4 > > > > > > >namespace boost >{ > namespace concepts {} > > > > >} ># 10 "/usr/include/boost/concept/detail/general.hpp" 2 3 4 > > ># 1 "/usr/include/boost/concept/detail/has_constraints.hpp" 1 3 4 ># 11 "/usr/include/boost/concept/detail/has_constraints.hpp" 3 4 >namespace boost { namespace concepts { > >namespace detail >{ > > > > typedef char yes; > typedef char (&no)[2]; > > template <class Model, void (Model::*)()> > struct wrap_constraints {}; ># 31 "/usr/include/boost/concept/detail/has_constraints.hpp" 3 4 > 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; >}; > >}} ># 13 "/usr/include/boost/concept/detail/general.hpp" 2 3 4 > > > > > >namespace boost { namespace concepts { > >template <class ModelFn> >struct requirement_; > >namespace detail >{ > template <void(*)()> struct instantiate {}; >} > >template <class Model> >struct requirement >{ > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wnonnull" > > static void failed() { ((Model*)0)->~Model(); } > >#pragma GCC diagnostic pop > >}; > >struct failed {}; > >template <class Model> >struct requirement<failed ************ Model::************> >{ > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wnonnull" > > static void failed() { ((Model*)0)->~Model(); } > >#pragma GCC diagnostic pop > >}; > > > >template <class Model> >struct constraint >{ > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wnonnull" > > static void failed() { ((Model*)0)->constraints(); } > >#pragma GCC diagnostic pop > >}; > >template <class Model> >struct requirement_<void(*)(Model)> > : boost::conditional< > concepts::not_satisfied<Model>::value > , constraint<Model> > , requirement<failed ************ Model::************> > >::type >{}; ># 96 "/usr/include/boost/concept/detail/general.hpp" 3 4 >}} ># 36 "/usr/include/boost/concept/assert.hpp" 2 3 4 ># 21 "/usr/include/boost/concept_check.hpp" 2 3 4 > > ># 1 "/usr/include/boost/type_traits/conversion_traits.hpp" 1 3 4 ># 24 "/usr/include/boost/concept_check.hpp" 2 3 4 > > > > > > > ># 1 "/usr/include/boost/concept/usage.hpp" 1 3 4 ># 11 "/usr/include/boost/concept/usage.hpp" 3 4 >namespace boost { namespace concepts { > >template <class Model> >struct usage_requirements >{ > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wnonnull" > > ~usage_requirements() { ((Model*)0)->~Model(); } > >#pragma GCC diagnostic pop > >}; ># 41 "/usr/include/boost/concept/usage.hpp" 3 4 >}} ># 32 "/usr/include/boost/concept_check.hpp" 2 3 4 ># 1 "/usr/include/boost/concept/detail/concept_def.hpp" 1 3 4 > > > > > ># 1 "/usr/include/boost/preprocessor/seq/for_each_i.hpp" 1 3 4 ># 20 "/usr/include/boost/preprocessor/seq/for_each_i.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/repetition/for.hpp" 1 3 4 ># 336 "/usr/include/boost/preprocessor/repetition/for.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 ># 337 "/usr/include/boost/preprocessor/repetition/for.hpp" 2 3 4 ># 369 "/usr/include/boost/preprocessor/repetition/for.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/repetition/detail/for.hpp" 1 3 4 ># 550 "/usr/include/boost/preprocessor/repetition/detail/for.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/repetition/detail/limits/for_256.hpp" 1 3 4 ># 551 "/usr/include/boost/preprocessor/repetition/detail/for.hpp" 2 3 4 ># 370 "/usr/include/boost/preprocessor/repetition/for.hpp" 2 3 4 ># 426 "/usr/include/boost/preprocessor/repetition/for.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/repetition/limits/for_256.hpp" 1 3 4 ># 427 "/usr/include/boost/preprocessor/repetition/for.hpp" 2 3 4 ># 21 "/usr/include/boost/preprocessor/seq/for_each_i.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/seq/seq.hpp" 1 3 4 ># 16 "/usr/include/boost/preprocessor/seq/seq.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/seq/elem.hpp" 1 3 4 ># 313 "/usr/include/boost/preprocessor/seq/elem.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/seq/limits/elem_256.hpp" 1 3 4 ># 314 "/usr/include/boost/preprocessor/seq/elem.hpp" 2 3 4 ># 17 "/usr/include/boost/preprocessor/seq/seq.hpp" 2 3 4 ># 22 "/usr/include/boost/preprocessor/seq/for_each_i.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/seq/size.hpp" 1 3 4 ># 557 "/usr/include/boost/preprocessor/seq/size.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/seq/limits/size_256.hpp" 1 3 4 ># 558 "/usr/include/boost/preprocessor/seq/size.hpp" 2 3 4 ># 23 "/usr/include/boost/preprocessor/seq/for_each_i.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/seq/detail/is_empty.hpp" 1 3 4 ># 24 "/usr/include/boost/preprocessor/seq/for_each_i.hpp" 2 3 4 ># 7 "/usr/include/boost/concept/detail/concept_def.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/seq/enum.hpp" 1 3 4 ># 297 "/usr/include/boost/preprocessor/seq/enum.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/seq/limits/enum_256.hpp" 1 3 4 ># 298 "/usr/include/boost/preprocessor/seq/enum.hpp" 2 3 4 ># 8 "/usr/include/boost/concept/detail/concept_def.hpp" 2 3 4 ># 33 "/usr/include/boost/concept_check.hpp" 2 3 4 > > > > > > > >namespace boost >{ > > > > > > template <class Model> > inline void function_requires(Model* = 0) > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Model)>::failed> boost_concept_check50 __attribute__((__unused__)); > } > template <class T> inline void ignore_unused_variable_warning(T const&) {} ># 70 "/usr/include/boost/concept_check.hpp" 3 4 > 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() > { > x.error_type_must_be_an_integer_type(); > } > 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() { > x.error_type_must_be_a_signed_integer_type(); > } > 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() { > x.error_type_must_be_an_unsigned_integer_type(); > } > 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() { > TT a; > ignore_unused_variable_warning(a); > } > }; > > 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() { > > a = b; > > const_constraints(b); > } > private: > void const_constraints(const TT& x) { > > a = 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() { > TT a(b); > TT* ptr = &a; > const_constraints(a); > ignore_unused_variable_warning(ptr); > } > private: > void const_constraints(const TT& a) { > TT c(a); > const TT* ptr = &a; > ignore_unused_variable_warning(c); > ignore_unused_variable_warning(ptr); > } > 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() { > TT c(a); > > a = b; > > const_constraints(b); > ignore_unused_variable_warning(c); > } > private: > void const_constraints(const TT& x) { > TT c(x); > > a = x; > > ignore_unused_variable_warning(c); > } > 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() { > Y y = x; > ignore_unused_variable_warning(y); > } > private: > X x; > }; ># 225 "/usr/include/boost/concept_check.hpp" 3 4 > template <class TT> > void require_boolean_expr(const TT& t) { > bool x = t; > ignore_unused_variable_warning(x); > } > > 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() { > require_boolean_expr(a == b); > require_boolean_expr(a != b); > } > 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() { > require_boolean_expr(a < b); > } > 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() { > require_boolean_expr(a < b); > require_boolean_expr(a > b); > require_boolean_expr(a <= b); > require_boolean_expr(a >= b); > } > private: > TT a, b; > }; ># 283 "/usr/include/boost/concept_check.hpp" 3 4 > 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() { (void)constraints_(); } private: bool constraints_() { return a == b; } 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() { (void)constraints_(); } private: bool constraints_() { return a != b; } 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() { (void)constraints_(); } private: bool constraints_() { return a < b; } 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() { (void)constraints_(); } private: bool constraints_() { return a <= b; } 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() { (void)constraints_(); } private: bool constraints_() { return a >= b; } 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() { (void)constraints_(); } private: Ret constraints_() { return a + b; } 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_() { return a * b; } 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() { (void)constraints_(); } private: Ret constraints_() { return a / b; } 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() { (void)constraints_(); } private: Ret constraints_() { return a - b; } 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() { (void)constraints_(); } private: Ret constraints_() { return a % b; } 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() { test(is_void<Return>()); } > > private: > void test(boost::false_type) > { > > const Return& r = f(); > ignore_unused_variable_warning(r); > } > > void test(boost::true_type) > { > f(); > } > > 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() { test(is_void<Return>()); } > > private: > void test(boost::false_type) > { > f(arg); > Return r = f(arg); > ignore_unused_variable_warning(r); > } > > void test(boost::true_type) > { > f(arg); > } > > > > > > > > UnaryFunction(); > > > 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__)); ~BinaryFunction() { test(is_void<Return>()); } > private: > void test(boost::false_type) > { > (void) f(first,second); > Return r = f(first, second); > (void)r; > } > > void test(boost::true_type) > { > f(first,second); > } > > > > > > > > BinaryFunction(); > > > 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__)); ~UnaryPredicate() { > require_boolean_expr(f(arg)); > } > private: > > > > > > > UnaryPredicate(); > > > 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__)); ~BinaryPredicate() { > require_boolean_expr(f(a, b)); > } > private: > > > > > > > BinaryPredicate(); > > 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__)); ~Const_BinaryPredicate() { > const_constraints(f); > } > private: > void const_constraints(const Func& fun) { > > require_boolean_expr(fun(a, b)); > } > > > > > > > Const_BinaryPredicate(); > > > 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__)); ~AdaptableGenerator() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<result_type, Return>)>::failed> boost_concept_check450 __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; > > ~AdaptableUnaryFunction() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<result_type, Return>)>::failed> boost_concept_check462 __attribute__((__unused__)); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<Arg, argument_type>)>::failed> boost_concept_check463 __attribute__((__unused__)); > } > }; > > 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; > > ~AdaptableBinaryFunction() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<result_type, Return>)>::failed> boost_concept_check481 __attribute__((__unused__)); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<First, first_argument_type>)>::failed> boost_concept_check482 __attribute__((__unused__)); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<Second, second_argument_type>)>::failed> boost_concept_check483 __attribute__((__unused__)); > } > }; > > 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__)); ~InputIterator() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(SignedInteger<difference_type>)>::failed> boost_concept_check514 __attribute__((__unused__)); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<iterator_category, std::input_iterator_tag>)>::failed> boost_concept_check515 __attribute__((__unused__)); > > TT j(i); > (void)*i; > ++j; > i++; > } > 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__)); ~OutputIterator() { > > ++i; > i++; > *i++ = t; > } > 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__)); ~ForwardIterator() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible< typename ForwardIterator::iterator_category , std::forward_iterator_tag >)>::failed> boost_concept_check545 __attribute__((__unused__)) > > > ; > > typename InputIterator<TT>::reference r = *i; > ignore_unused_variable_warning(r); > } > > 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__)); ~Mutable_ForwardIterator() { > *i++ = *j; > } > 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__)); ~BidirectionalIterator() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible< typename BidirectionalIterator::iterator_category , std::bidirectional_iterator_tag >)>::failed> boost_concept_check573 __attribute__((__unused__)) > > > ; > > --i; > i--; > } > 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__)); ~Mutable_BidirectionalIterator() > { > *i-- = *j; > } > 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__)); ~RandomAccessIterator() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible< typename BidirectionalIterator<TT>::iterator_category , std::random_access_iterator_tag >)>::failed> boost_concept_check603 __attribute__((__unused__)) > > > ; > > i += n; > i = i + n; i = n + i; > i -= n; > i = i - n; > n = i - j; > (void)i[n]; > } > > 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__)); ~Mutable_RandomAccessIterator() > { > i[n] = *i; > } > 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__)); ~Container() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(InputIterator<const_iterator>)>::failed> boost_concept_check650 __attribute__((__unused__)); > const_constraints(c); > } > > private: > void const_constraints(const C& cc) { > i = cc.begin(); > i = cc.end(); > n = cc.size(); > n = cc.max_size(); > b = cc.empty(); > } > 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__)); ~Mutable_Container() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Assignable<typename Mutable_Container::value_type>)>::failed> boost_concept_check677 __attribute__((__unused__)) > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(InputIterator<iterator>)>::failed> boost_concept_check680 __attribute__((__unused__)); > > i = c.begin(); > i = c.end(); > c.swap(c2); > } > > 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__)); ~ForwardContainer() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( ForwardIterator< typename ForwardContainer::const_iterator >)>::failed> boost_concept_check697 __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__)); ~Mutable_ForwardContainer() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Mutable_ForwardIterator< typename Mutable_ForwardContainer::iterator >)>::failed> boost_concept_check710 __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__)); ~ReversibleContainer() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( BidirectionalIterator< typename ReversibleContainer::const_iterator>)>::failed> boost_concept_check726 __attribute__((__unused__)) > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(BidirectionalIterator<const_reverse_iterator>)>::failed> boost_concept_check730 __attribute__((__unused__)); > > const_constraints(c); > } > private: > void const_constraints(const C& cc) > { > const_reverse_iterator _i = cc.rbegin(); > _i = cc.rend(); > } > 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__)); ~Mutable_ReversibleContainer() > { > typedef typename Mutable_ForwardContainer<C>::iterator iterator; > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Mutable_BidirectionalIterator<iterator>)>::failed> boost_concept_check752 __attribute__((__unused__)); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Mutable_BidirectionalIterator<reverse_iterator>)>::failed> boost_concept_check753 __attribute__((__unused__)); > > reverse_iterator i = c.rbegin(); > i = c.rend(); > } > 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__)); ~RandomAccessContainer() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( RandomAccessIterator< typename RandomAccessContainer::const_iterator >)>::failed> boost_concept_check770 __attribute__((__unused__)) > > > ; > > const_constraints(c); > } > private: > void const_constraints(const C& cc) > { > const_reference r = cc[n]; > ignore_unused_variable_warning(r); > } > > 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__)); ~Mutable_RandomAccessContainer() > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Mutable_RandomAccessIterator<typename self::iterator>)>::failed> boost_concept_check797 __attribute__((__unused__)); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Mutable_RandomAccessIterator<typename self::reverse_iterator>)>::failed> boost_concept_check798 __attribute__((__unused__)); > > typename self::reference r = c[i]; > ignore_unused_variable_warning(r); > } > > 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__)); ~Sequence() > { > S > c(n, t), > c2(first, last); > > c.insert(p, t); > c.insert(p, n, t); > c.insert(p, first, last); > > c.erase(p); > c.erase(p, q); > > typename Sequence::reference r = c.front(); > > ignore_unused_variable_warning(c); > ignore_unused_variable_warning(c2); > ignore_unused_variable_warning(r); > const_constraints(c); > } > private: > void const_constraints(const S& c) { > typename Sequence::const_reference r = c.front(); > ignore_unused_variable_warning(r); > } > > 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__)); ~FrontInsertionSequence() > { > c.push_front(t); > c.pop_front(); > } > 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__)); ~BackInsertionSequence() > { > c.push_back(t); > c.pop_back(); > typename BackInsertionSequence::reference r = c.back(); > ignore_unused_variable_warning(r); > const_constraints(c); > } > private: > void const_constraints(const S& cc) { > typename BackInsertionSequence::const_reference > r = cc.back(); > ignore_unused_variable_warning(r); > } > 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__)); ~AssociativeContainer() > { > i = c.find(k); > r = c.equal_range(k); > c.erase(k); > c.erase(i); > c.erase(r.first, r.second); > const_constraints(c); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(BinaryPredicate<key_compare,key_type,key_type>)>::failed> boost_concept_check900 __attribute__((__unused__)); > > typedef typename AssociativeContainer::value_type value_type_; > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(BinaryPredicate<value_compare,value_type_,value_type_>)>::failed> boost_concept_check903 __attribute__((__unused__)); > } > > > typedef typename C::const_iterator const_iterator; > private: > void const_constraints(const C& cc) > { > ci = cc.find(k); > n = cc.count(k); > cr = cc.equal_range(k); > } > > 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__)); ~UniqueAssociativeContainer() > { > C c(first, last); > > pos_flag = c.insert(t); > c.insert(first, last); > > ignore_unused_variable_warning(c); > } > 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__)); ~MultipleAssociativeContainer() > { > C c(first, last); > > pos = c.insert(t); > c.insert(first, last); > > ignore_unused_variable_warning(c); > ignore_unused_variable_warning(pos); > } > 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__)); ~SimpleAssociativeContainer() > { > typedef typename C::key_type key_type; > typedef typename C::value_type value_type; > static_assert((boost::is_same<key_type,value_type>::value), "(boost::is_same<key_type,value_type>::value)"); > } > }; > > 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__)); ~PairAssociativeContainer() > { > typedef typename C::key_type key_type; > typedef typename C::value_type value_type; > typedef typename C::mapped_type mapped_type; > typedef std::pair<const key_type, mapped_type> required_value_type; > static_assert((boost::is_same<value_type,required_value_type>::value), "(boost::is_same<value_type,required_value_type>::value)"); > } > }; > > 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__)); ~SortedAssociativeContainer() > { > C > c(kc), > c2(first, last), > c3(first, last, kc); > > p = c.upper_bound(k); > p = c.lower_bound(k); > r = c.equal_range(k); > > c.insert(p, t); > > ignore_unused_variable_warning(c); > ignore_unused_variable_warning(c2); > ignore_unused_variable_warning(c3); > const_constraints(c); > } > > void const_constraints(const C& c) > { > kc = c.key_comp(); > vc = c.value_comp(); > > cp = c.upper_bound(k); > cp = c.lower_bound(k); > cr = c.equal_range(k); > } > > 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__)); ~Collection() > { > boost::function_requires<boost::InputIteratorConcept<iterator> >(); > boost::function_requires<boost::InputIteratorConcept<const_iterator> >(); > boost::function_requires<boost::CopyConstructibleConcept<value_type> >(); > const_constraints(c); > i = c.begin(); > i = c.end(); > c.swap(c); > } > > void const_constraints(const C& cc) { > ci = cc.begin(); > ci = cc.end(); > n = cc.size(); > b = cc.empty(); > } > > 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; > }; >} > > > > > ># 1 "/usr/include/boost/concept/detail/concept_undef.hpp" 1 3 4 ># 1080 "/usr/include/boost/concept_check.hpp" 2 3 4 ># 20 "/usr/include/boost/range/concepts.hpp" 2 3 4 ># 1 "/usr/include/boost/iterator/iterator_concepts.hpp" 1 3 4 ># 29 "/usr/include/boost/iterator/iterator_concepts.hpp" 3 4 ># 1 "/usr/include/boost/concept/detail/concept_def.hpp" 1 3 4 ># 30 "/usr/include/boost/iterator/iterator_concepts.hpp" 2 3 4 > >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__)); ~ReadableIterator() > { > > value_type v = *i; > boost::ignore_unused_variable_warning(v); > } > 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__)); ~WritableIterator() > { > *i = v; > } > 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__)); ~SwappableIterator() > { > std::iter_swap(i1, i2); > } > 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__)); ~LvalueIterator() > { > value_type& r = const_cast<value_type&>(*i); > boost::ignore_unused_variable_warning(r); > } > 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_check114 __attribute__((__unused__)) > > > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<IncrementableIterator>)>::failed> boost_concept_check120 __attribute__((__unused__)); ~IncrementableIterator() > { > ++i; > (void)i++; > } > 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_check134 __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; > > enum { mpl_assertion_in_line_147 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (boost::is_integral<difference_type>))0, 1 ) ) ) }; > enum { mpl_assert_rel_value148 = (std::numeric_limits<difference_type>::is_signed == true) }; enum { mpl_assertion_in_line_148 = sizeof( boost::mpl::assertion_failed<mpl_assert_rel_value148>( (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(*)( boost::Convertible< typename ForwardTraversal::traversal_category , boost::forward_traversal_tag > )>::failed> boost_concept_check150 __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_check160 __attribute__((__unused__)) > > > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BidirectionalTraversal>)>::failed> boost_concept_check166 __attribute__((__unused__)); ~BidirectionalTraversal() > { > --i; > (void)i--; > } > 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_check178 __attribute__((__unused__)) > > > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessTraversal>)>::failed> boost_concept_check184 __attribute__((__unused__)); ~RandomAccessTraversal() > { > i += n; > i = i + n; > i = n + i; > i -= n; > i = i - n; > n = i - j; > } > > private: > typename BidirectionalTraversal<Iterator>::difference_type n; > Iterator i, j; > }; > > > > > namespace detail > { > template <typename Iterator1, typename Iterator2> > void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2) > { > bool b; > b = i1 == i2; > b = i1 != i2; > > b = i2 == i1; > b = i2 != i1; > boost::ignore_unused_variable_warning(b); > } > > template <typename Iterator1, typename Iterator2> > void interop_rand_access_constraints( > Iterator1 const& i1, Iterator2 const& i2, > boost::random_access_traversal_tag, boost::random_access_traversal_tag) > { > bool b; > typename std::iterator_traits<Iterator2>::difference_type n; > b = i1 < i2; > b = i1 <= i2; > b = i1 > i2; > b = i1 >= i2; > n = i1 - i2; > > b = i2 < i1; > b = i2 <= i1; > b = i2 > i1; > b = i2 >= i1; > n = i2 - i1; > boost::ignore_unused_variable_warning(b); > boost::ignore_unused_variable_warning(n); > } > > template <typename Iterator1, typename Iterator2> > void interop_rand_access_constraints( > Iterator1 const&, Iterator2 const&, > boost::single_pass_traversal_tag, boost::single_pass_traversal_tag) > { } > > } > > 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__)); ~InteroperableIterator() > { > detail::interop_single_pass_constraints(i, ci); > detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category()); > > ci = i; > } > > private: > Iterator i; > ConstIterator ci; > }; > >} > ># 1 "/usr/include/boost/concept/detail/concept_undef.hpp" 1 3 4 ># 272 "/usr/include/boost/iterator/iterator_concepts.hpp" 2 3 4 ># 21 "/usr/include/boost/range/concepts.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/range/value_type.hpp" 1 3 4 ># 23 "/usr/include/boost/range/value_type.hpp" 3 4 >namespace boost >{ > template< class T > > struct range_value : iterator_value< typename range_iterator<T>::type > > { }; >} ># 25 "/usr/include/boost/range/concepts.hpp" 2 3 4 ># 1 "/usr/include/boost/range/detail/misc_concept.hpp" 1 3 4 ># 13 "/usr/include/boost/range/detail/misc_concept.hpp" 3 4 >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__)); ~SameTypeConcept() > { > same_type(a,b); > } > private: > template<typename T> void same_type(T,T) {} > T1 a; > T2 b; > }; > } >} ># 26 "/usr/include/boost/range/concepts.hpp" 2 3 4 ># 62 "/usr/include/boost/range/concepts.hpp" 3 4 >namespace boost { > > namespace range_detail { ># 124 "/usr/include/boost/range/concepts.hpp" 3 4 > 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_check130 __attribute__((__unused__)) > > > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<IncrementableIteratorConcept>)>::failed> boost_concept_check136 __attribute__((__unused__)); ~IncrementableIteratorConcept() > { > ++i; > (void)i++; > } > 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_check152 __attribute__((__unused__)) > > > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SinglePassIteratorConcept>)>::failed> boost_concept_check158 __attribute__((__unused__)); ~SinglePassIteratorConcept() > { > Iterator i2(++i); > boost::ignore_unused_variable_warning(i2); > > > > > > (void)(i++); > > typename std::iterator_traits<Iterator>::reference r1(*i); > boost::ignore_unused_variable_warning(r1); > > typename std::iterator_traits<Iterator>::reference r2(*(++i)); > boost::ignore_unused_variable_warning(r2); > } > 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>))0, 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_check191 __attribute__((__unused__)) > > > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ForwardIteratorConcept>)>::failed> boost_concept_check197 __attribute__((__unused__)); ~ForwardIteratorConcept() > { > > > > > Iterator i2(i++); > boost::ignore_unused_variable_warning(i2); > typename std::iterator_traits<Iterator>::reference r(*(i++)); > boost::ignore_unused_variable_warning(r); > } > 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_check218 __attribute__((__unused__)) > > > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BidirectionalIteratorConcept>)>::failed> boost_concept_check224 __attribute__((__unused__)); ~BidirectionalIteratorConcept() > { > --i; > (void)i--; > } > 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_check239 __attribute__((__unused__)) > > > > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessIteratorConcept>)>::failed> boost_concept_check245 __attribute__((__unused__)); ~RandomAccessIteratorConcept() > { > i += n; > i = i + n; > i = n + i; > i -= n; > i = i - n; > n = i - j; > } > 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_check278 __attribute__((__unused__)) > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( range_detail::SinglePassIteratorConcept<const_iterator>)>::failed> boost_concept_check281 __attribute__((__unused__)) > ; > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SinglePassRangeConcept>)>::failed> boost_concept_check284 __attribute__((__unused__)); ~SinglePassRangeConcept() > { > > > > iterator i1 = boost::begin(*m_range); > iterator i2 = boost::end(*m_range); > > boost::ignore_unused_variable_warning(i1); > boost::ignore_unused_variable_warning(i2); > > const_constraints(*m_range); > } > > private: > void const_constraints(const Rng& const_range) > { > const_iterator ci1 = boost::begin(const_range); > const_iterator ci2 = boost::end(const_range); > > boost::ignore_unused_variable_warning(ci1); > boost::ignore_unused_variable_warning(ci2); > } > > > > > > 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__)); ~WriteableRangeConcept() > { > *i = v; > } > 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> > { > }; > >} ># 21 "/usr/include/boost/range/size_type.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/type_traits/make_unsigned.hpp" 1 3 4 ># 14 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/is_signed.hpp" 1 3 4 ># 16 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 ># 1 "/usr/include/c++/13/climits" 1 3 4 ># 39 "/usr/include/c++/13/climits" 3 4 > ># 40 "/usr/include/c++/13/climits" 3 > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/limits.h" 1 3 4 ># 34 "/usr/lib/gcc/x86_64-redhat-linux/13/include/limits.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/syslimits.h" 1 3 4 > > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/limits.h" 1 3 4 ># 205 "/usr/lib/gcc/x86_64-redhat-linux/13/include/limits.h" 3 4 ># 1 "/usr/include/limits.h" 1 3 4 ># 26 "/usr/include/limits.h" 3 4 ># 1 "/usr/include/bits/libc-header-start.h" 1 3 4 ># 27 "/usr/include/limits.h" 2 3 4 ># 195 "/usr/include/limits.h" 3 4 ># 1 "/usr/include/bits/posix1_lim.h" 1 3 4 ># 27 "/usr/include/bits/posix1_lim.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 28 "/usr/include/bits/posix1_lim.h" 2 3 4 ># 161 "/usr/include/bits/posix1_lim.h" 3 4 ># 1 "/usr/include/bits/local_lim.h" 1 3 4 ># 38 "/usr/include/bits/local_lim.h" 3 4 ># 1 "/usr/include/linux/limits.h" 1 3 4 ># 39 "/usr/include/bits/local_lim.h" 2 3 4 ># 162 "/usr/include/bits/posix1_lim.h" 2 3 4 ># 196 "/usr/include/limits.h" 2 3 4 > > > ># 1 "/usr/include/bits/posix2_lim.h" 1 3 4 ># 200 "/usr/include/limits.h" 2 3 4 > > > ># 1 "/usr/include/bits/xopen_lim.h" 1 3 4 ># 64 "/usr/include/bits/xopen_lim.h" 3 4 ># 1 "/usr/include/bits/uio_lim.h" 1 3 4 ># 65 "/usr/include/bits/xopen_lim.h" 2 3 4 ># 204 "/usr/include/limits.h" 2 3 4 ># 206 "/usr/lib/gcc/x86_64-redhat-linux/13/include/limits.h" 2 3 4 ># 8 "/usr/lib/gcc/x86_64-redhat-linux/13/include/syslimits.h" 2 3 4 ># 35 "/usr/lib/gcc/x86_64-redhat-linux/13/include/limits.h" 2 3 4 ># 43 "/usr/include/c++/13/climits" 2 3 ># 17 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 > >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> {}; ># 91 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 >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{}; ># 150 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 >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{}; > > > > > > > >} ># 15 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/is_unsigned.hpp" 1 3 4 ># 17 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 ># 1 "/usr/include/c++/13/climits" 1 3 4 ># 39 "/usr/include/c++/13/climits" 3 4 > ># 40 "/usr/include/c++/13/climits" 3 > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/limits.h" 1 3 4 ># 43 "/usr/include/c++/13/climits" 2 3 ># 18 "/usr/include/boost/type_traits/is_unsigned.hpp" 2 3 4 > >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> {}; ># 91 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 >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{}; ># 142 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 >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{}; ># 155 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 >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{}; > > >} ># 16 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 > > > > > > ># 1 "/usr/include/boost/type_traits/add_volatile.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4 >namespace boost { ># 30 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4 >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; > > > >} ># 23 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 > > >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 ># 73 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 > >::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 ># 105 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 > >::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; > > > >} ># 25 "/usr/include/boost/range/size_type.hpp" 2 3 4 > > > > >namespace boost >{ > namespace detail > { > > > > > > template<typename T> > class has_size_type > { > typedef char no_type; > struct yes_type { char dummy[2]; }; > > template<typename C> > static yes_type test(typename C::size_type x); > > template<typename C> > static no_type test(...); > > 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> > { }; > >} ># 22 "/usr/include/boost/range/size.hpp" 2 3 4 ># 1 "/usr/include/boost/range/detail/has_member_size.hpp" 1 3 4 ># 18 "/usr/include/boost/range/detail/has_member_size.hpp" 3 4 ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 19 "/usr/include/boost/range/detail/has_member_size.hpp" 2 3 4 > >namespace boost >{ > namespace range_detail > { > >template<class T> >class has_member_size_impl >{ >private: > template<class U, U> > class check > { > }; > > template<class C> > static boost::uint8_t f(check<std::size_t(C::*)(void) const, &C::size>*); > > template<class C> > static boost::uint16_t f(...); > >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; >}; > > } >} ># 23 "/usr/include/boost/range/size.hpp" 2 3 4 ># 1 "/usr/include/boost/assert.hpp" 1 3 4 ># 58 "/usr/include/boost/assert.hpp" 3 4 ># 1 "/usr/include/assert.h" 1 3 4 ># 64 "/usr/include/assert.h" 3 4 >extern "C" { > > >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > noexcept (true) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > noexcept (true) __attribute__ ((__noreturn__)); > > >} ># 59 "/usr/include/boost/assert.hpp" 2 3 4 ># 24 "/usr/include/boost/range/size.hpp" 2 3 4 ># 1 "/usr/include/boost/cstdint.hpp" 1 3 4 ># 25 "/usr/include/boost/range/size.hpp" 2 3 4 ># 1 "/usr/include/boost/utility.hpp" 1 3 4 ># 16 "/usr/include/boost/utility.hpp" 3 4 ># 1 "/usr/include/boost/utility/binary.hpp" 1 3 4 ># 26 "/usr/include/boost/utility/binary.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/control/deduce_d.hpp" 1 3 4 ># 32 "/usr/include/boost/preprocessor/control/deduce_d.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 ># 33 "/usr/include/boost/preprocessor/control/deduce_d.hpp" 2 3 4 ># 27 "/usr/include/boost/utility/binary.hpp" 2 3 4 > > ># 1 "/usr/include/boost/preprocessor/seq/cat.hpp" 1 3 4 ># 18 "/usr/include/boost/preprocessor/seq/cat.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/seq/fold_left.hpp" 1 3 4 ># 21 "/usr/include/boost/preprocessor/seq/fold_left.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 ># 22 "/usr/include/boost/preprocessor/seq/fold_left.hpp" 2 3 4 ># 1110 "/usr/include/boost/preprocessor/seq/fold_left.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp" 1 3 4 ># 1111 "/usr/include/boost/preprocessor/seq/fold_left.hpp" 2 3 4 ># 19 "/usr/include/boost/preprocessor/seq/cat.hpp" 2 3 4 ># 30 "/usr/include/boost/utility/binary.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/seq/transform.hpp" 1 3 4 ># 31 "/usr/include/boost/utility/binary.hpp" 2 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/mod.hpp" 1 3 4 ># 45 "/usr/include/boost/preprocessor/arithmetic/mod.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp" 1 3 4 ># 19 "/usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp" 3 4 ># 1 "/usr/include/boost/preprocessor/comparison/less_equal.hpp" 1 3 4 ># 20 "/usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp" 2 3 4 ># 46 "/usr/include/boost/preprocessor/arithmetic/mod.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp" 1 3 4 ># 50 "/usr/include/boost/preprocessor/arithmetic/mod.hpp" 2 3 4 ># 32 "/usr/include/boost/utility/binary.hpp" 2 3 4 ># 17 "/usr/include/boost/utility.hpp" 2 3 4 ># 1 "/usr/include/boost/utility/identity_type.hpp" 1 3 4 ># 16 "/usr/include/boost/utility/identity_type.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/function_traits.hpp" 1 3 4 ># 16 "/usr/include/boost/type_traits/function_traits.hpp" 3 4 >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> >{ >}; > >} ># 17 "/usr/include/boost/utility/identity_type.hpp" 2 3 4 ># 18 "/usr/include/boost/utility.hpp" 2 3 4 > > > > ># 1 "/usr/include/boost/core/noncopyable.hpp" 1 3 4 ># 14 "/usr/include/boost/core/noncopyable.hpp" 3 4 >namespace boost { > > > > > > >namespace noncopyable_ >{ ># 34 "/usr/include/boost/core/noncopyable.hpp" 3 4 > struct base_token {}; > > > > class noncopyable: base_token > { > protected: > > constexpr noncopyable() = default; > ~noncopyable() = default; > > > > > > noncopyable( const noncopyable& ) = delete; > noncopyable& operator=( const noncopyable& ) = delete; > > > > > > }; >} > >typedef noncopyable_::noncopyable noncopyable; > >} ># 23 "/usr/include/boost/utility.hpp" 2 3 4 ># 26 "/usr/include/boost/range/size.hpp" 2 3 4 > >namespace boost >{ > namespace range_detail > { > > template<class SinglePassRange> > inline typename ::boost::enable_if< > has_member_size<SinglePassRange>, > typename range_size<const SinglePassRange>::type > >::type > range_calculate_size(const SinglePassRange& rng) > { > return rng.size(); > } > > template<class SinglePassRange> > inline typename disable_if< > has_member_size<SinglePassRange>, > typename range_size<const SinglePassRange>::type > >::type > range_calculate_size(const SinglePassRange& rng) > { > return std::distance(boost::begin(rng), boost::end(rng)); > } > } > > template<class SinglePassRange> > inline typename range_size<const SinglePassRange>::type > size(const SinglePassRange& rng) > { > > > > > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::SinglePassRangeConcept<SinglePassRange>)>::failed> boost_concept_check62 __attribute__((__unused__)); > > > > > > using namespace range_detail; > > > return range_calculate_size(rng); > } > >} ># 21 "/usr/include/boost/range/functions.hpp" 2 3 4 ># 1 "/usr/include/boost/range/distance.hpp" 1 3 4 ># 18 "/usr/include/boost/range/distance.hpp" 3 4 ># 1 "/usr/include/boost/iterator/distance.hpp" 1 3 4 ># 14 "/usr/include/boost/iterator/distance.hpp" 3 4 >namespace boost { >namespace iterators { > > namespace detail { > template <typename SinglePassIterator> > inline constexpr typename iterator_difference<SinglePassIterator>::type > distance_impl( > SinglePassIterator first > , SinglePassIterator last > , single_pass_traversal_tag > ) > { > typename iterator_difference<SinglePassIterator>::type n = 0; > while (first != last) { > ++first; > ++n; > } > return n; > } > > template <typename RandomAccessIterator> > inline constexpr typename iterator_difference<RandomAccessIterator>::type > distance_impl( > RandomAccessIterator first > , RandomAccessIterator last > , random_access_traversal_tag > ) > { > return last - first; > } > } > > namespace distance_adl_barrier { > template <typename SinglePassIterator> > inline constexpr typename iterator_difference<SinglePassIterator>::type > distance(SinglePassIterator first, SinglePassIterator last) > { > return detail::distance_impl( > first, last, typename iterator_traversal<SinglePassIterator>::type() > ); > } > } > > using namespace distance_adl_barrier; > >} > >using namespace iterators::distance_adl_barrier; > >} ># 19 "/usr/include/boost/range/distance.hpp" 2 3 4 > > > > >namespace boost >{ > > namespace range_distance_adl_barrier > { > template< class T > > inline constexpr typename range_difference<T>::type > distance( const T& r ) > { > return boost::iterators::distance( boost::begin( r ), boost::end( r ) ); > } > } > > using namespace range_distance_adl_barrier; > >} ># 22 "/usr/include/boost/range/functions.hpp" 2 3 4 ># 1 "/usr/include/boost/range/empty.hpp" 1 3 4 ># 22 "/usr/include/boost/range/empty.hpp" 3 4 >namespace boost >{ > > template< class T > > inline bool empty( const T& r ) > { > return boost::begin( r ) == boost::end( r ); > } > >} ># 23 "/usr/include/boost/range/functions.hpp" 2 3 4 ># 1 "/usr/include/boost/range/rbegin.hpp" 1 3 4 ># 19 "/usr/include/boost/range/rbegin.hpp" 3 4 ># 1 "/usr/include/boost/range/reverse_iterator.hpp" 1 3 4 ># 21 "/usr/include/boost/range/reverse_iterator.hpp" 3 4 ># 1 "/usr/include/boost/iterator/reverse_iterator.hpp" 1 3 4 ># 10 "/usr/include/boost/iterator/reverse_iterator.hpp" 3 4 ># 1 "/usr/include/boost/iterator/iterator_adaptor.hpp" 1 3 4 ># 30 "/usr/include/boost/iterator/iterator_adaptor.hpp" 3 4 ># 1 "/usr/include/boost/iterator/detail/config_def.hpp" 1 3 4 ># 31 "/usr/include/boost/iterator/iterator_adaptor.hpp" 2 3 4 > > > >namespace boost { >namespace iterators { > > > > > using boost::use_default; > >} > > > > >template<class To> >struct is_convertible<use_default,To> > : mpl::false_ {}; > >namespace iterators { > > namespace detail > { ># 63 "/usr/include/boost/iterator/iterator_adaptor.hpp" 3 4 > struct enable_type; > } ># 130 "/usr/include/boost/iterator/iterator_adaptor.hpp" 3 4 > 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 Tr1, class Tr2> > inline void iterator_adaptor_assert_traversal () > { > static_assert((is_convertible<Tr1, Tr2>::value), "(is_convertible<Tr1, Tr2>::value)"); > } > } ># 241 "/usr/include/boost/iterator/iterator_adaptor.hpp" 3 4 > 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: > iterator_adaptor() {} > > explicit iterator_adaptor(Base const &iter) > : m_iterator(iter) > { > } > > typedef Base base_type; > > Base const& base() const > { return m_iterator; } > > protected: > > typedef iterator_adaptor<Derived,Base,Value,Traversal,Reference,Difference> iterator_adaptor_; > > > > > Base const& base_reference() const > { return m_iterator; } > > Base& base_reference() > { return m_iterator; } > > private: > > > > > > > typename super_t::reference dereference() const > { return *m_iterator; } > > template < > class OtherDerived, class OtherIterator, class V, class C, class R, class D > > > bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const > { > > > > > return m_iterator == x.base(); > } > > typedef typename iterator_category_to_traversal< > typename super_t::iterator_category > >::type my_traversal; > > > > > void advance(typename super_t::difference_type n) > { > boost::iterators::detail::iterator_adaptor_assert_traversal<my_traversal, random_access_traversal_tag>(); > m_iterator += n; > } > > void increment() { ++m_iterator; } > > void decrement() > { > boost::iterators::detail::iterator_adaptor_assert_traversal<my_traversal, bidirectional_traversal_tag>(); > --m_iterator; > } > > template < > class OtherDerived, class OtherIterator, class V, class C, class R, class D > > > typename super_t::difference_type distance_to( > iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const > { > boost::iterators::detail::iterator_adaptor_assert_traversal<my_traversal, random_access_traversal_tag>(); > > > > > return y.base() - m_iterator; > } > > > > private: > Base m_iterator; > }; > >} > >using iterators::iterator_adaptor; >using iterators::enable_if_convertible; > >} > ># 1 "/usr/include/boost/iterator/detail/config_undef.hpp" 1 3 4 ># 357 "/usr/include/boost/iterator/iterator_adaptor.hpp" 2 3 4 ># 11 "/usr/include/boost/iterator/reverse_iterator.hpp" 2 3 4 > >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: > reverse_iterator() {} > > explicit reverse_iterator(Iterator x) > : super_t(x) {} > > template<class OtherIterator> > reverse_iterator( > reverse_iterator<OtherIterator> const& r > , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 > ) > : super_t(r.base()) > {} > > private: > typename super_t::reference dereference() const > { > Iterator it = this->base_reference(); > --it; > return *it; > } > > void increment() { --this->base_reference(); } > void decrement() { ++this->base_reference(); } > > void advance(typename super_t::difference_type n) > { > this->base_reference() -= n; > } > > template <class OtherIterator> > typename super_t::difference_type > distance_to(reverse_iterator<OtherIterator> const& y) const > { > return this->base_reference() - y.base(); > } > }; > > template <class BidirectionalIterator> > inline reverse_iterator<BidirectionalIterator> make_reverse_iterator(BidirectionalIterator x) > { > return reverse_iterator<BidirectionalIterator>(x); > } > >} > >using iterators::reverse_iterator; >using iterators::make_reverse_iterator; > >} ># 22 "/usr/include/boost/range/reverse_iterator.hpp" 2 3 4 > > >namespace boost >{ > > > > > template< typename T > > struct range_reverse_iterator > { > typedef reverse_iterator< > typename range_iterator< > typename remove_reference<T>::type>::type > type; > }; > > >} ># 20 "/usr/include/boost/range/rbegin.hpp" 2 3 4 > >namespace boost >{ > >template< class C > >inline typename range_reverse_iterator<C>::type >rbegin( C& c ) >{ > typedef typename range_reverse_iterator<C>::type > iter_type; > return iter_type( boost::end( c ) ); >} > >template< class C > >inline typename range_reverse_iterator<const C>::type >rbegin( const C& c ) >{ > typedef typename range_reverse_iterator<const C>::type > iter_type; > return iter_type( boost::end( c ) ); >} > >template< class T > >inline typename range_reverse_iterator<const T>::type >const_rbegin( const T& r ) >{ > return boost::rbegin( r ); >} > >} ># 24 "/usr/include/boost/range/functions.hpp" 2 3 4 ># 1 "/usr/include/boost/range/rend.hpp" 1 3 4 ># 21 "/usr/include/boost/range/rend.hpp" 3 4 >namespace boost >{ > >template< class C > >inline typename range_reverse_iterator<C>::type >rend( C& c ) >{ > typedef typename range_reverse_iterator<C>::type > iter_type; > return iter_type( boost::begin( c ) ); >} > >template< class C > >inline typename range_reverse_iterator<const C>::type >rend( const C& c ) >{ > typedef typename range_reverse_iterator<const C>::type > iter_type; > return iter_type( boost::begin( c ) ); >} > >template< class T > >inline typename range_reverse_iterator<const T>::type >const_rend( const T& r ) >{ > return boost::rend( r ); >} > >} ># 25 "/usr/include/boost/range/functions.hpp" 2 3 4 ># 39 "/usr/include/boost/range/iterator_range_core.hpp" 2 3 4 > > > ># 1 "/usr/include/boost/range/algorithm/equal.hpp" 1 3 4 ># 17 "/usr/include/boost/range/algorithm/equal.hpp" 3 4 >namespace boost >{ > namespace range_detail > { > > > template< class SinglePassTraversalReadableIterator1, > class SinglePassTraversalReadableIterator2, > class IteratorCategoryTag1, > class IteratorCategoryTag2 > > inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, > SinglePassTraversalReadableIterator1 last1, > SinglePassTraversalReadableIterator2 first2, > SinglePassTraversalReadableIterator2 last2, > IteratorCategoryTag1, > IteratorCategoryTag2 ) > { > for (;;) > { > > > > if (first1 == last1) > return first2 == last2; > > > > > if (first2 == last2) > return false; > > > if (*first1 != *first2) > break; > > ++first1; > ++first2; > } > > > > return false; > } > > template< class SinglePassTraversalReadableIterator1, > class SinglePassTraversalReadableIterator2, > class IteratorCategoryTag1, > class IteratorCategoryTag2, > class BinaryPredicate > > inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, > SinglePassTraversalReadableIterator1 last1, > SinglePassTraversalReadableIterator2 first2, > SinglePassTraversalReadableIterator2 last2, > BinaryPredicate pred, > IteratorCategoryTag1, > IteratorCategoryTag2 ) > { > for (;;) > { > > > > if (first1 == last1) > return first2 == last2; > > > > > if (first2 == last2) > return false; > > > if (!pred(*first1, *first2)) > break; > > ++first1; > ++first2; > } > > > > return false; > } > > > > template< class RandomAccessTraversalReadableIterator1, > class RandomAccessTraversalReadableIterator2 > > inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, > RandomAccessTraversalReadableIterator1 last1, > RandomAccessTraversalReadableIterator2 first2, > RandomAccessTraversalReadableIterator2 last2, > std::random_access_iterator_tag, > std::random_access_iterator_tag ) > { > return ((last1 - first1) == (last2 - first2)) > && std::equal(first1, last1, first2); > } > > template< class RandomAccessTraversalReadableIterator1, > class RandomAccessTraversalReadableIterator2, > class BinaryPredicate > > inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, > RandomAccessTraversalReadableIterator1 last1, > RandomAccessTraversalReadableIterator2 first2, > RandomAccessTraversalReadableIterator2 last2, > BinaryPredicate pred, > std::random_access_iterator_tag, > std::random_access_iterator_tag ) > { > return ((last1 - first1) == (last2 - first2)) > && std::equal(first1, last1, first2, pred); > } > > template< class SinglePassTraversalReadableIterator1, > class SinglePassTraversalReadableIterator2 > > inline bool equal( SinglePassTraversalReadableIterator1 first1, > SinglePassTraversalReadableIterator1 last1, > SinglePassTraversalReadableIterator2 first2, > SinglePassTraversalReadableIterator2 last2 ) > { > typename std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; > typename std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; > > return equal_impl(first1, last1, first2, last2, tag1, tag2); > } > > template< class SinglePassTraversalReadableIterator1, > class SinglePassTraversalReadableIterator2, > class BinaryPredicate > > inline bool equal( SinglePassTraversalReadableIterator1 first1, > SinglePassTraversalReadableIterator1 last1, > SinglePassTraversalReadableIterator2 first2, > SinglePassTraversalReadableIterator2 last2, > BinaryPredicate pred ) > { > typename std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; > typename std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; > > return equal_impl(first1, last1, first2, last2, pred, tag1, tag2); > } > > } > > namespace range > { ># 171 "/usr/include/boost/range/algorithm/equal.hpp" 3 4 > template< class SinglePassRange1, class SinglePassRange2 > > inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 ) > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( SinglePassRangeConcept<const SinglePassRange1> )>::failed> boost_concept_check174 __attribute__((__unused__)); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( SinglePassRangeConcept<const SinglePassRange2> )>::failed> boost_concept_check175 __attribute__((__unused__)); > > return ::boost::range_detail::equal( > ::boost::begin(rng1), ::boost::end(rng1), > ::boost::begin(rng2), ::boost::end(rng2) ); > } > > > template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > > inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2, > BinaryPredicate pred ) > { > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( SinglePassRangeConcept<const SinglePassRange1> )>::failed> boost_concept_check187 __attribute__((__unused__)); > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( SinglePassRangeConcept<const SinglePassRange2> )>::failed> boost_concept_check188 __attribute__((__unused__)); > > return ::boost::range_detail::equal( > ::boost::begin(rng1), ::boost::end(rng1), > ::boost::begin(rng2), ::boost::end(rng2), > pred); > } > > } > using ::boost::range::equal; >} ># 43 "/usr/include/boost/range/iterator_range_core.hpp" 2 3 4 ># 1 "/usr/include/boost/range/detail/safe_bool.hpp" 1 3 4 ># 16 "/usr/include/boost/range/detail/safe_bool.hpp" 3 4 >namespace boost >{ > namespace range_detail > { > >template<class DataMemberPtr> >class safe_bool >{ >public: > typedef safe_bool this_type; ># 56 "/usr/include/boost/range/detail/safe_bool.hpp" 3 4 > typedef DataMemberPtr unspecified_bool_type; > static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p) > { > return x ? p : 0; > } > >private: > safe_bool(); > safe_bool(const safe_bool&); > void operator=(const safe_bool&); > ~safe_bool(); >}; > > } >} ># 44 "/usr/include/boost/range/iterator_range_core.hpp" 2 3 4 > ># 1 "/usr/include/boost/next_prior.hpp" 1 3 4 ># 21 "/usr/include/boost/next_prior.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/has_plus.hpp" 1 3 4 ># 48 "/usr/include/boost/type_traits/has_plus.hpp" 3 4 ># 1 "/usr/include/boost/type_traits/detail/has_binary_operator.hpp" 1 3 4 ># 25 "/usr/include/boost/type_traits/detail/has_binary_operator.hpp" 3 4 > ># 26 "/usr/include/boost/type_traits/detail/has_binary_operator.hpp" 3 ># 37 "/usr/include/boost/type_traits/detail/has_binary_operator.hpp" 3 ># 1 "/usr/include/boost/type_traits/make_void.hpp" 1 3 4 ># 15 "/usr/include/boost/type_traits/make_void.hpp" 3 4 >namespace boost { > > >template<class...> >struct make_void { > typedef void type; >}; > > >template<class... Ts> >using void_t = typename make_void<Ts...>::type; ># 50 "/usr/include/boost/type_traits/make_void.hpp" 3 4 >} ># 38 "/usr/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 > > > > > >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> {}; > > >} ># 49 "/usr/include/boost/type_traits/has_plus.hpp" 2 3 4 ># 22 "/usr/include/boost/next_prior.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/has_plus_assign.hpp" 1 3 4 ># 28 "/usr/include/boost/type_traits/has_plus_assign.hpp" 3 4 > ># 29 "/usr/include/boost/type_traits/has_plus_assign.hpp" 3 ># 52 "/usr/include/boost/type_traits/has_plus_assign.hpp" 3 >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> {}; > >} ># 23 "/usr/include/boost/next_prior.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/has_minus.hpp" 1 3 4 ># 28 "/usr/include/boost/type_traits/has_minus.hpp" 3 4 > ># 29 "/usr/include/boost/type_traits/has_minus.hpp" 3 ># 48 "/usr/include/boost/type_traits/has_minus.hpp" 3 >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> {}; > > >} ># 24 "/usr/include/boost/next_prior.hpp" 2 3 4 ># 1 "/usr/include/boost/type_traits/has_minus_assign.hpp" 1 3 4 ># 28 "/usr/include/boost/type_traits/has_minus_assign.hpp" 3 4 > ># 29 "/usr/include/boost/type_traits/has_minus_assign.hpp" 3 ># 49 "/usr/include/boost/type_traits/has_minus_assign.hpp" 3 >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)> {}; > > >} ># 25 "/usr/include/boost/next_prior.hpp" 2 3 4 ># 1 "/usr/include/boost/iterator/advance.hpp" 1 3 4 ># 14 "/usr/include/boost/iterator/advance.hpp" 3 4 >namespace boost { >namespace iterators { > > namespace detail { > template <typename InputIterator, typename Distance> > inline constexpr void > advance_impl( > InputIterator& it > , Distance n > , incrementable_traversal_tag > ) > { > while (n > 0) { > ++it; > --n; > } > } > > > >#pragma GCC diagnostic push >#pragma GCC diagnostic ignored "-Wtype-limits" > > > template <typename BidirectionalIterator, typename Distance> > inline constexpr void > advance_impl( > BidirectionalIterator& it > , Distance n > , bidirectional_traversal_tag > ) > { > if (n >= 0) { > while (n > 0) { > ++it; > --n; > } > } > else { > while (n < 0) { > --it; > ++n; > } > } > } > > >#pragma GCC diagnostic pop > > > template <typename RandomAccessIterator, typename Distance> > inline constexpr void > advance_impl( > RandomAccessIterator& it > , Distance n > , random_access_traversal_tag > ) > { > it += n; > } > } > > namespace advance_adl_barrier { > template <typename InputIterator, typename Distance> > inline constexpr void > advance(InputIterator& it, Distance n) > { > detail::advance_impl( > it, n, typename iterator_traversal<InputIterator>::type() > ); > } > } > > using namespace advance_adl_barrier; > >} > >using namespace iterators::advance_adl_barrier; > >} ># 26 "/usr/include/boost/next_prior.hpp" 2 3 4 > > >namespace boost { ># 40 "/usr/include/boost/next_prior.hpp" 3 4 >namespace next_prior_detail { > > > > > > > >template< typename T, typename Void = void > >struct is_iterator_class >{ > static constexpr bool value = false; >}; > >template< typename T > >struct is_iterator_class< > T, > typename enable_if_has_type< > > typename std::iterator_traits< T >::iterator_category > > > > >::type >> >{ > static constexpr bool value = true; >}; > >template< typename T > >struct is_iterator : > public is_iterator_class< T > >{ >}; > >template< typename T > >struct is_iterator< T* > >{ > static constexpr bool value = true; >}; > > >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) > { > return x + 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) > { > x += n; > return x; > } >}; > >template< typename T, typename Distance, bool IsIterator = 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) > { > boost::iterators::advance(x, n); > return x; > } >}; > > >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) > { > return x - 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) > { > x -= n; > return x; > } >}; > >template< typename T, typename Distance, bool IsIterator = 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) > { > > boost::iterators::reverse_iterator< T > rx(x); > boost::iterators::advance(rx, n); > return rx.base(); > } >}; > >} > >template <class T> >inline T next(T x) { return ++x; } > >template <class T, class Distance> >inline T next(T x, Distance n) >{ > return next_prior_detail::next_advance_impl< T, Distance >::call(x, n); >} > >template <class T> >inline T prior(T x) { return --x; } > >template <class T, class Distance> >inline T prior(T x, Distance n) >{ > return next_prior_detail::prior_advance_impl< T, Distance >::call(x, n); >} > >} ># 46 "/usr/include/boost/range/iterator_range_core.hpp" 2 3 4 ># 57 "/usr/include/boost/range/iterator_range_core.hpp" 3 4 >namespace boost >{ > namespace iterator_range_detail > { > > > > > template<class IteratorT> > struct iterator_range_impl { > template< class ForwardRange > > static IteratorT adl_begin( ForwardRange& r ) > { > return IteratorT( boost::begin( r ) ); > } > > template< class ForwardRange > > static IteratorT adl_end( ForwardRange& r ) > { > return IteratorT( boost::end( r ) ); > } > }; > > template< class Left, class Right > > inline bool less_than( const Left& l, const Right& r ) > { > return std::lexicographical_compare( boost::begin(l), > boost::end(l), > boost::begin(r), > boost::end(r) ); > } > > template< class Left, class Right > > inline bool greater_than( const Left& l, const Right& r ) > { > return iterator_range_detail::less_than(r,l); > } > > template< class Left, class Right > > inline bool less_or_equal_than( const Left& l, const Right& r ) > { > return !iterator_range_detail::less_than(r,l); > } > > template< class Left, class Right > > inline bool greater_or_equal_than( const Left& l, const Right& r ) > { > return !iterator_range_detail::less_than(l,r); > } > > > > template< class Left, class Right > > inline bool equal(const Left& l, const Right& r) > { > return boost::equal(l, 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() > : m_Begin() > , m_End() > { > } > > template<class Iterator> > iterator_range_base(Iterator Begin, Iterator End) > : m_Begin(Begin) > , m_End(End) > { > } > >public: > IteratorT begin() const > { > return m_Begin; > } > > IteratorT end() const > { > return m_End; > } > > bool empty() const > { > return m_Begin == m_End; > } > > operator unspecified_bool_type() const > { > return safe_bool_t::to_unspecified_bool( > m_Begin != m_End, &iterator_range_base::m_Begin); > } > > bool operator!() const > { > return empty(); > } > > bool equal(const iterator_range_base& r) const > { > return m_Begin == r.m_Begin && m_End == r.m_End; > } > > reference front() const > { > (static_cast <bool> (!empty()) ? void (0) : __assert_fail ("!empty()", "/usr/include/boost/range/iterator_range_core.hpp", 255, __extension__ __PRETTY_FUNCTION__)); > return *m_Begin; > } > > void drop_front() > { > (static_cast <bool> (!empty()) ? void (0) : __assert_fail ("!empty()", "/usr/include/boost/range/iterator_range_core.hpp", 261, __extension__ __PRETTY_FUNCTION__)); > ++m_Begin; > } > > void drop_front(difference_type n) > { > (static_cast <bool> (n >= difference_type()) ? void (0) : __assert_fail ("n >= difference_type()", "/usr/include/boost/range/iterator_range_core.hpp", 267, __extension__ __PRETTY_FUNCTION__)); > std::advance(this->m_Begin, n); > } > > > void pop_front() { drop_front(); } > >protected: > template<class Iterator> > void assign(Iterator first, Iterator last) > { > m_Begin = first; > m_End = last; > } > > template<class SinglePassRange> > void assign(const SinglePassRange& r) > { > m_Begin = impl::adl_begin(r); > m_End = impl::adl_end(r); > } > > template<class SinglePassRange> > void assign(SinglePassRange& r) > { > m_Begin = impl::adl_begin(r); > m_End = impl::adl_end(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) > : base_type(first, last) > { > } > >public: > typedef typename base_type::difference_type difference_type; > typedef typename base_type::reference reference; > > reference back() const > { > (static_cast <bool> (!this->empty()) ? void (0) : __assert_fail ("!this->empty()", "/usr/include/boost/range/iterator_range_core.hpp", 323, __extension__ __PRETTY_FUNCTION__)); > return *boost::prior(this->m_End); > } > > void drop_back() > { > (static_cast <bool> (!this->empty()) ? void (0) : __assert_fail ("!this->empty()", "/usr/include/boost/range/iterator_range_core.hpp", 329, __extension__ __PRETTY_FUNCTION__)); > --this->m_End; > } > > void drop_back(difference_type n) > { > (static_cast <bool> (n >= difference_type()) ? void (0) : __assert_fail ("n >= difference_type()", "/usr/include/boost/range/iterator_range_core.hpp", 335, __extension__ __PRETTY_FUNCTION__)); > std::advance(this->m_End, -n); > } > > > void pop_back() { drop_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) > : base_type(first, last) > { > } > >public: > reference operator[](difference_type at) const > { > (static_cast <bool> (at >= 0) ? void (0) : __assert_fail ("at >= 0", "/usr/include/boost/range/iterator_range_core.hpp", 389, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (static_cast<typename base_type::size_type>(at) < size()) ? void (0) : __assert_fail ("static_cast<typename base_type::size_type>(at) < size()", "/usr/include/boost/range/iterator_range_core.hpp", 390, __extension__ __PRETTY_FUNCTION__)); > return this->m_Begin[at]; > } > > > > > > > abstract_value_type operator()(difference_type at) const > { > (static_cast <bool> (at >= 0) ? void (0) : __assert_fail ("at >= 0", "/usr/include/boost/range/iterator_range_core.hpp", 401, __extension__ __PRETTY_FUNCTION__)); > (static_cast <bool> (static_cast<typename base_type::size_type>(at) < size()) ? void (0) : __assert_fail ("static_cast<typename base_type::size_type>(at) < size()", "/usr/include/boost/range/iterator_range_core.hpp", 402, __extension__ __PRETTY_FUNCTION__)); > return this->m_Begin[at]; > } > > typename base_type::size_type size() const > { > return this->m_End - this->m_Begin; > } >}; > > } ># 433 "/usr/include/boost/range/iterator_range_core.hpp" 3 4 > 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) > : base_type(first, last) > { > } > > template<class SinglePassRange> > iterator_range( > const SinglePassRange& r, > typename ::boost::enable_if< > is_compatible_range<const SinglePassRange> > >::type* = 0 > ) > : base_type(impl::adl_begin(r), impl::adl_end(r)) > { > } > > template<class SinglePassRange> > iterator_range( > SinglePassRange& r, > typename ::boost::enable_if< > is_compatible_range<SinglePassRange> > >::type* = 0 > ) > : base_type(impl::adl_begin(r), impl::adl_end(r)) > { > } > > template<class SinglePassRange> > iterator_range(const SinglePassRange& r, > iterator_range_detail::const_range_tag) > : base_type(impl::adl_begin(r), impl::adl_end(r)) > { > } > > template<class SinglePassRange> > iterator_range(SinglePassRange& r, > iterator_range_detail::range_tag) > : base_type(impl::adl_begin(r), impl::adl_end(r)) > { > } > > template<class Iterator> > iterator_range& operator=(const iterator_range<Iterator>& other) > { > this->assign(other.begin(), other.end()); > return *this; > } > > template<class Iterator> > iterator_range& operator=(iterator_range<Iterator>& other) > { > this->assign(other.begin(), other.end()); > return *this; > } > > template<class SinglePassRange> > iterator_range& operator=(SinglePassRange& r) > { > this->assign(r); > return *this; > } > > template<class SinglePassRange> > iterator_range& operator=(const SinglePassRange& r) > { > this->assign(r); > return *this; > } > > iterator_range& advance_begin( > typename base_type::difference_type n) > { > std::advance(this->m_Begin, n); > return *this; > } > > iterator_range& advance_end( > typename base_type::difference_type n) > { > std::advance(this->m_End, n); > return *this; > } > > protected: > > > > > typedef iterator_range iterator_range_; > }; > > > > > > > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return boost::equal( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return !boost::equal( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return iterator_range_detail::less_than( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return iterator_range_detail::less_or_equal_than( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return iterator_range_detail::greater_than( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return iterator_range_detail::greater_or_equal_than( l, r ); > } > > template< class Iterator1T, class Iterator2T > > inline bool > operator==( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) > { > return boost::equal( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return boost::equal( l, r ); > } > > > template< class Iterator1T, class Iterator2T > > inline bool > operator!=( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) > { > return !boost::equal( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return !boost::equal( l, r ); > } > > > template< class Iterator1T, class Iterator2T > > inline bool > operator<( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) > { > return iterator_range_detail::less_than( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return iterator_range_detail::less_than( l, r ); > } > > template< class Iterator1T, class Iterator2T > > inline bool > operator<=( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) > { > return iterator_range_detail::less_or_equal_than( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return iterator_range_detail::less_or_equal_than( l, r ); > } > > template< class Iterator1T, class Iterator2T > > inline bool > operator>( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) > { > return iterator_range_detail::greater_than( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return iterator_range_detail::greater_than( l, r ); > } > > template< class Iterator1T, class Iterator2T > > inline bool > operator>=( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) > { > return iterator_range_detail::greater_or_equal_than( l, r ); > } > > template< class IteratorT, class ForwardRange > > inline 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 ) > { > return iterator_range_detail::greater_or_equal_than( l, r ); > } ># 754 "/usr/include/boost/range/iterator_range_core.hpp" 3 4 > template< typename IteratorT > > inline iterator_range< IteratorT > > make_iterator_range( IteratorT Begin, IteratorT End ) > { > return iterator_range<IteratorT>( Begin, End ); > } > > template<typename IteratorT, typename IntegerT> > inline iterator_range<IteratorT> > make_iterator_range_n(IteratorT first, IntegerT n) > { > return iterator_range<IteratorT>(first, boost::next(first, n)); > } > > > > > > > template< class ForwardRange > > inline iterator_range< typename range_iterator<ForwardRange>::type > > make_iterator_range( ForwardRange& r ) > { > return iterator_range< typename range_iterator<ForwardRange>::type > > ( r, iterator_range_detail::range_tag() ); > } > > template< class ForwardRange > > inline iterator_range< typename range_iterator<const ForwardRange>::type > > make_iterator_range( const ForwardRange& r ) > { > return iterator_range< typename range_iterator<const ForwardRange>::type > > ( r, iterator_range_detail::const_range_tag() ); > } > > namespace iterator_range_detail > { > template< class Range > > inline 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 ) > { > > > > > > > > typename range_iterator<Range>::type > new_begin = boost::begin( r ), > new_end = boost::end( r ); > std::advance( new_begin, advance_begin ); > std::advance( new_end, advance_end ); > return make_iterator_range( new_begin, new_end ); > } > } > > template< class Range > > inline 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 ) > { > return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); > } > > template< class Range > > inline 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 ) > { > return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); > } ># 839 "/usr/include/boost/range/iterator_range_core.hpp" 3 4 > template< typename SeqT, typename Range > > inline SeqT copy_range( const Range& r ) > { > return SeqT( boost::begin( r ), boost::end( r ) ); > } > >} ># 17 "/usr/include/boost/algorithm/string/replace.hpp" 2 3 4 > > > > > ># 1 "/usr/include/boost/algorithm/string/find_format.hpp" 1 3 4 ># 19 "/usr/include/boost/algorithm/string/find_format.hpp" 3 4 ># 1 "/usr/include/boost/range/as_literal.hpp" 1 3 4 ># 18 "/usr/include/boost/range/as_literal.hpp" 3 4 ># 1 "/usr/include/boost/range/iterator_range.hpp" 1 3 4 ># 14 "/usr/include/boost/range/iterator_range.hpp" 3 4 ># 1 "/usr/include/boost/range/iterator_range_io.hpp" 1 3 4 ># 43 "/usr/include/boost/range/iterator_range_io.hpp" 3 4 >namespace boost >{ ># 54 "/usr/include/boost/range/iterator_range_io.hpp" 3 4 > template< typename IteratorT, typename Elem, typename Traits > > inline std::basic_ostream<Elem,Traits>& operator<<( > std::basic_ostream<Elem, Traits>& Os, > const iterator_range<IteratorT>& r ) > { > std::copy( r.begin(), r.end(), > std::ostream_iterator< typename > iterator_value<IteratorT>::type, > Elem, Traits>(Os) ); > return Os; > } ># 85 "/usr/include/boost/range/iterator_range_io.hpp" 3 4 >} ># 15 "/usr/include/boost/range/iterator_range.hpp" 2 3 4 ># 19 "/usr/include/boost/range/as_literal.hpp" 2 3 4 ># 1 "/usr/include/boost/range/detail/str_types.hpp" 1 3 4 ># 17 "/usr/include/boost/range/detail/str_types.hpp" 3 4 >namespace boost >{ > template< class T > > struct range_mutable_iterator<T*> > { > typedef T* type; > }; > > template< class T > > struct range_const_iterator<T*> > { > typedef const T* type; > }; > > template< class T > > struct range_size<T*> > { > typedef std::size_t type; > }; >} ># 20 "/usr/include/boost/range/as_literal.hpp" 2 3 4 > > > ># 1 "/usr/include/c++/13/cstring" 1 3 4 ># 39 "/usr/include/c++/13/cstring" 3 4 > ># 40 "/usr/include/c++/13/cstring" 3 ># 24 "/usr/include/boost/range/as_literal.hpp" 2 3 4 > > > > > > ># 1 "/usr/include/c++/13/cwchar" 1 3 4 ># 39 "/usr/include/c++/13/cwchar" 3 4 > ># 40 "/usr/include/c++/13/cwchar" 3 ># 31 "/usr/include/boost/range/as_literal.hpp" 2 3 4 > > >namespace boost >{ > namespace range_detail > { > inline std::size_t length( const char* s ) > { > return strlen( s ); > } > > > inline std::size_t length( const char16_t* s ) > { > return std::char_traits<char16_t>::length( s ); > } > > > > inline std::size_t length( const char32_t* s ) > { > return std::char_traits<char32_t>::length( s ); > } > > > > inline std::size_t length( const wchar_t* s ) > { > return wcslen( s ); > } ># 69 "/usr/include/boost/range/as_literal.hpp" 3 4 > inline bool is_char_ptr( char* ) > { > return true; > } > > inline bool is_char_ptr( const char* ) > { > return true; > } > > > inline bool is_char_ptr( char16_t* ) > { > return true; > } > > inline bool is_char_ptr( const char16_t* ) > { > return true; > } > > > > inline bool is_char_ptr( char32_t* ) > { > return true; > } > > inline bool is_char_ptr( const char32_t* ) > { > return true; > } > > > > inline bool is_char_ptr( wchar_t* ) > { > return true; > } > > inline bool is_char_ptr( const wchar_t* ) > { > return true; > } > > > template< class T > > inline long is_char_ptr( const T& ) > { > return 0L; > } > > template< class T > > inline iterator_range<T*> > make_range( T* const r, bool ) > { > return iterator_range<T*>( r, r + length(r) ); > } > > template< class T > > inline iterator_range<typename range_iterator<T>::type> > make_range( T& r, long ) > { > return boost::make_iterator_range( r ); > } > > } > > template< class Range > > inline iterator_range<typename range_iterator<Range>::type> > as_literal( Range& r ) > { > return range_detail::make_range( r, range_detail::is_char_ptr(r) ); > } > > template< class Range > > inline iterator_range<typename range_iterator<const Range>::type> > as_literal( const Range& r ) > { > return range_detail::make_range( r, range_detail::is_char_ptr(r) ); > } > > template< class Char, std::size_t sz > > inline iterator_range<Char*> as_literal( Char (&arr)[sz] ) > { > return range_detail::make_range( arr, range_detail::is_char_ptr(arr) ); > } > > template< class Char, std::size_t sz > > inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] ) > { > return range_detail::make_range( arr, range_detail::is_char_ptr(arr) ); > } >} ># 20 "/usr/include/boost/algorithm/string/find_format.hpp" 2 3 4 > ># 1 "/usr/include/boost/algorithm/string/concept.hpp" 1 3 4 ># 23 "/usr/include/boost/algorithm/string/concept.hpp" 3 4 >namespace boost { > namespace algorithm { ># 34 "/usr/include/boost/algorithm/string/concept.hpp" 3 4 > template<typename FinderT, typename IteratorT> > struct FinderConcept > { > private: > typedef iterator_range<IteratorT> range; > public: > void constraints() > { > > r=(*pF)(i,i); > } > private: > range r; > IteratorT i; > FinderT* pF; > }; ># 61 "/usr/include/boost/algorithm/string/concept.hpp" 3 4 > template<typename FormatterT, typename FinderT, typename IteratorT> > struct FormatterConcept > { > public: > void constraints() > { > > ::boost::begin((*pFo)( (*pF)(i,i) )); > ::boost::end((*pFo)( (*pF)(i,i) )); > } > private: > IteratorT i; > FinderT* pF; > FormatterT *pFo; > }; > > } >} ># 22 "/usr/include/boost/algorithm/string/find_format.hpp" 2 3 4 ># 1 "/usr/include/boost/algorithm/string/detail/find_format.hpp" 1 3 4 ># 18 "/usr/include/boost/algorithm/string/detail/find_format.hpp" 3 4 ># 1 "/usr/include/boost/algorithm/string/detail/find_format_store.hpp" 1 3 4 ># 17 "/usr/include/boost/algorithm/string/detail/find_format_store.hpp" 3 4 >namespace boost { > namespace algorithm { > namespace detail { > > > > > > > > template< > typename ForwardIteratorT, > typename FormatterT, > typename FormatResultT > > class find_format_store : > public iterator_range<ForwardIteratorT> > { > public: > > typedef iterator_range<ForwardIteratorT> base_type; > typedef FormatterT formatter_type; > typedef FormatResultT format_result_type; > > public: > > find_format_store( > const base_type& FindResult, > const format_result_type& FormatResult, > const formatter_type& Formatter ) : > base_type(FindResult), > m_FormatResult(FormatResult), > m_Formatter(Formatter) {} > > > template< typename FindResultT > > find_format_store& operator=( FindResultT FindResult ) > { > iterator_range<ForwardIteratorT>::operator=(FindResult); > if( !this->empty() ) { > m_FormatResult=m_Formatter(FindResult); > } > > return *this; > } > > > const format_result_type& format_result() > { > return m_FormatResult; > } > > private: > format_result_type m_FormatResult; > const formatter_type& m_Formatter; > }; > > template<typename InputT, typename FindResultT> > bool check_find_result(InputT&, FindResultT& FindResult) > { > typedef typename > range_const_iterator<InputT>::type input_iterator_type; > iterator_range<input_iterator_type> ResultRange(FindResult); > return !ResultRange.empty(); > } > > > > > } > } >} ># 19 "/usr/include/boost/algorithm/string/detail/find_format.hpp" 2 3 4 ># 1 "/usr/include/boost/algorithm/string/detail/replace_storage.hpp" 1 3 4 ># 17 "/usr/include/boost/algorithm/string/detail/replace_storage.hpp" 3 4 ># 1 "/usr/include/boost/algorithm/string/sequence_traits.hpp" 1 3 4 ># 16 "/usr/include/boost/algorithm/string/sequence_traits.hpp" 3 4 ># 1 "/usr/include/boost/algorithm/string/yes_no_type.hpp" 1 3 4 ># 14 "/usr/include/boost/algorithm/string/yes_no_type.hpp" 3 4 >namespace boost { > namespace algorithm { > > > > > > template<int I> struct size_descriptor > { > typedef char (& type)[I]; > }; > > typedef size_descriptor<1>::type yes_type; > typedef size_descriptor<2>::type no_type; > > } >} ># 17 "/usr/include/boost/algorithm/string/sequence_traits.hpp" 2 3 4 ># 34 "/usr/include/boost/algorithm/string/sequence_traits.hpp" 3 4 >namespace boost { > namespace algorithm { ># 44 "/usr/include/boost/algorithm/string/sequence_traits.hpp" 3 4 > template< typename T > > class has_native_replace > { > > public: > > > > static const bool value=false; > > > > typedef mpl::bool_<has_native_replace<T>::value> type; > }; > > > > > > > > template< typename T > > class has_stable_iterators > { > public: > > > > static const bool value=false; > > > typedef mpl::bool_<has_stable_iterators<T>::value> type; > }; > > > > > > > > template< typename T > > class has_const_time_insert > { > public: > > > > static const bool value=false; > > > typedef mpl::bool_<has_const_time_insert<T>::value> type; > }; > > > > > > > > template< typename T > > class has_const_time_erase > { > public: > > > > static const bool value=false; > > > typedef mpl::bool_<has_const_time_erase<T>::value> type; > }; > > } >} ># 18 "/usr/include/boost/algorithm/string/detail/replace_storage.hpp" 2 3 4 ># 1 "/usr/include/boost/algorithm/string/detail/sequence.hpp" 1 3 4 ># 16 "/usr/include/boost/algorithm/string/detail/sequence.hpp" 3 4 ># 1 "/usr/include/boost/mpl/logical.hpp" 1 3 4 ># 17 "/usr/include/boost/algorithm/string/detail/sequence.hpp" 2 3 4 > > > > > >namespace boost { > namespace algorithm { > namespace detail { > > > > template< typename InputT, typename ForwardIteratorT > > inline void insert( > InputT& Input, > typename InputT::iterator At, > ForwardIteratorT Begin, > ForwardIteratorT End ) > { > Input.insert( At, Begin, End ); > } > > template< typename InputT, typename InsertT > > inline void insert( > InputT& Input, > typename InputT::iterator At, > const InsertT& Insert ) > { > ::boost::algorithm::detail::insert( Input, At, ::boost::begin(Insert), ::boost::end(Insert) ); > } > > > > > > > > template< typename InputT > > inline typename InputT::iterator erase( > InputT& Input, > typename InputT::iterator From, > typename InputT::iterator To ) > { > return Input.erase( From, To ); > } > > > > > > template< bool HasConstTimeOperations > > struct replace_const_time_helper > { > template< typename InputT, typename ForwardIteratorT > > void operator()( > InputT& Input, > typename InputT::iterator From, > typename InputT::iterator To, > ForwardIteratorT Begin, > ForwardIteratorT End ) > { > > ForwardIteratorT InsertIt=Begin; > typename InputT::iterator InputIt=From; > for(; InsertIt!=End && InputIt!=To; InsertIt++, InputIt++ ) > { > *InputIt=*InsertIt; > } > > if ( InsertIt!=End ) > { > > Input.insert( InputIt, InsertIt, End ); > } > else > { > if ( InputIt!=To ) > { > > Input.erase( InputIt, To ); > } > } > } > }; > > template<> > struct replace_const_time_helper< true > > { > > template< typename InputT, typename ForwardIteratorT > > void operator()( > InputT& Input, > typename InputT::iterator From, > typename InputT::iterator To, > ForwardIteratorT Begin, > ForwardIteratorT End ) > { > typename InputT::iterator At=Input.erase( From, To ); > if ( Begin!=End ) > { > if(!Input.empty()) > { > Input.insert( At, Begin, End ); > } > else > { > Input.insert( Input.begin(), Begin, End ); > } > } > } > }; > > > template< bool HasNative > > struct replace_native_helper > { > template< typename InputT, typename ForwardIteratorT > > void operator()( > InputT& Input, > typename InputT::iterator From, > typename InputT::iterator To, > ForwardIteratorT Begin, > ForwardIteratorT End ) > { > replace_const_time_helper< > boost::mpl::and_< > has_const_time_insert<InputT>, > has_const_time_erase<InputT> >::value >()( > Input, From, To, Begin, End ); > } > }; > > > template<> > struct replace_native_helper< true > > { > template< typename InputT, typename ForwardIteratorT > > void operator()( > InputT& Input, > typename InputT::iterator From, > typename InputT::iterator To, > ForwardIteratorT Begin, > ForwardIteratorT End ) > { > Input.replace( From, To, Begin, End ); > } > }; > > > > template< typename InputT, typename ForwardIteratorT > > inline void replace( > InputT& Input, > typename InputT::iterator From, > typename InputT::iterator To, > ForwardIteratorT Begin, > ForwardIteratorT End ) > { > replace_native_helper< has_native_replace<InputT>::value >()( > Input, From, To, Begin, End ); > } > > template< typename InputT, typename InsertT > > inline void replace( > InputT& Input, > typename InputT::iterator From, > typename InputT::iterator To, > const InsertT& Insert ) > { > if(From!=To) > { > ::boost::algorithm::detail::replace( Input, From, To, ::boost::begin(Insert), ::boost::end(Insert) ); > } > else > { > ::boost::algorithm::detail::insert( Input, From, ::boost::begin(Insert), ::boost::end(Insert) ); > } > } > > } > } >} ># 19 "/usr/include/boost/algorithm/string/detail/replace_storage.hpp" 2 3 4 > >namespace boost { > namespace algorithm { > namespace detail { > > > > template< typename StorageT, typename OutputIteratorT > > inline OutputIteratorT move_from_storage( > StorageT& Storage, > OutputIteratorT DestBegin, > OutputIteratorT DestEnd ) > { > OutputIteratorT OutputIt=DestBegin; > > while( !Storage.empty() && OutputIt!=DestEnd ) > { > *OutputIt=Storage.front(); > Storage.pop_front(); > ++OutputIt; > } > > return OutputIt; > } > > template< typename StorageT, typename WhatT > > inline void copy_to_storage( > StorageT& Storage, > const WhatT& What ) > { > Storage.insert( Storage.end(), ::boost::begin(What), ::boost::end(What) ); > } > > > > > template< bool HasStableIterators > > struct process_segment_helper > { > > template< > typename StorageT, > typename InputT, > typename ForwardIteratorT > > ForwardIteratorT operator()( > StorageT& Storage, > InputT& , > ForwardIteratorT InsertIt, > ForwardIteratorT SegmentBegin, > ForwardIteratorT SegmentEnd ) > { > > ForwardIteratorT It=::boost::algorithm::detail::move_from_storage( Storage, InsertIt, SegmentBegin ); > > > > > > > if( Storage.empty() ) > { > if( It==SegmentBegin ) > { > > return SegmentEnd; > } > else > { > > return std::copy( SegmentBegin, SegmentEnd, It ); > } > } > else > { > > while( It!=SegmentEnd ) > { > > Storage.push_back( *It ); > > *It=Storage.front(); > Storage.pop_front(); > > > ++It; > } > > return It; > } > } > }; > > template<> > struct process_segment_helper< true > > { > > template< > typename StorageT, > typename InputT, > typename ForwardIteratorT > > ForwardIteratorT operator()( > StorageT& Storage, > InputT& Input, > ForwardIteratorT InsertIt, > ForwardIteratorT SegmentBegin, > ForwardIteratorT SegmentEnd ) > > { > > ::boost::algorithm::detail::replace( Input, InsertIt, SegmentBegin, Storage ); > > Storage.clear(); > > return SegmentEnd; > } > }; > > > template< > typename StorageT, > typename InputT, > typename ForwardIteratorT > > inline ForwardIteratorT process_segment( > StorageT& Storage, > InputT& Input, > ForwardIteratorT InsertIt, > ForwardIteratorT SegmentBegin, > ForwardIteratorT SegmentEnd ) > { > return > process_segment_helper< > has_stable_iterators<InputT>::value>()( > Storage, Input, InsertIt, SegmentBegin, SegmentEnd ); > } > > > } > } >} ># 20 "/usr/include/boost/algorithm/string/detail/find_format.hpp" 2 3 4 > >namespace boost { > namespace algorithm { > namespace detail { > > > > template< > typename OutputIteratorT, > typename InputT, > typename FormatterT, > typename FindResultT, > typename FormatResultT > > inline OutputIteratorT find_format_copy_impl2( > OutputIteratorT Output, > const InputT& Input, > FormatterT Formatter, > const FindResultT& FindResult, > const FormatResultT& FormatResult ) > { > typedef find_format_store< > typename > range_const_iterator<InputT>::type, > FormatterT, > FormatResultT > store_type; > > > store_type M( FindResult, FormatResult, Formatter ); > > if ( !M ) > { > > Output = std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); > return Output; > } > > > Output = std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); > > > Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); > > Output = std::copy( M.end(), ::boost::end(Input), Output ); > > return Output; > } > > template< > typename OutputIteratorT, > typename InputT, > typename FormatterT, > typename FindResultT > > inline OutputIteratorT find_format_copy_impl( > OutputIteratorT Output, > const InputT& Input, > FormatterT Formatter, > const FindResultT& FindResult ) > { > if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { > return ::boost::algorithm::detail::find_format_copy_impl2( > Output, > Input, > Formatter, > FindResult, > Formatter(FindResult) ); > } else { > return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); > } > } > > > > > template< > typename InputT, > typename FormatterT, > typename FindResultT, > typename FormatResultT > > inline InputT find_format_copy_impl2( > const InputT& Input, > FormatterT Formatter, > const FindResultT& FindResult, > const FormatResultT& FormatResult) > { > typedef find_format_store< > typename > range_const_iterator<InputT>::type, > FormatterT, > FormatResultT > store_type; > > > store_type M( FindResult, FormatResult, Formatter ); > > if ( !M ) > { > > return InputT( Input ); > } > > InputT Output; > > boost::algorithm::detail::insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() ); > > boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); > > boost::algorithm::detail::insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) ); > > return Output; > } > > template< > typename InputT, > typename FormatterT, > typename FindResultT > > inline InputT find_format_copy_impl( > const InputT& Input, > FormatterT Formatter, > const FindResultT& FindResult) > { > if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { > return ::boost::algorithm::detail::find_format_copy_impl2( > Input, > Formatter, > FindResult, > Formatter(FindResult) ); > } else { > return Input; > } > } > > > > template< > typename InputT, > typename FormatterT, > typename FindResultT, > typename FormatResultT > > inline void find_format_impl2( > InputT& Input, > FormatterT Formatter, > const FindResultT& FindResult, > const FormatResultT& FormatResult) > { > typedef find_format_store< > typename > range_iterator<InputT>::type, > FormatterT, > FormatResultT > store_type; > > > store_type M( FindResult, FormatResult, Formatter ); > > if ( !M ) > { > > return; > } > > > ::boost::algorithm::detail::replace( Input, M.begin(), M.end(), M.format_result() ); > } > > template< > typename InputT, > typename FormatterT, > typename FindResultT > > inline void find_format_impl( > InputT& Input, > FormatterT Formatter, > const FindResultT& FindResult) > { > if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { > ::boost::algorithm::detail::find_format_impl2( > Input, > Formatter, > FindResult, > Formatter(FindResult) ); > } > } > > } > } >} ># 23 "/usr/include/boost/algorithm/string/find_format.hpp" 2 3 4 ># 1 "/usr/include/boost/algorithm/string/detail/find_format_all.hpp" 1 3 4 ># 23 "/usr/include/boost/algorithm/string/detail/find_format_all.hpp" 3 4 >namespace boost { > namespace algorithm { > namespace detail { > > > > template< > typename OutputIteratorT, > typename InputT, > typename FinderT, > typename FormatterT, > typename FindResultT, > typename FormatResultT > > inline OutputIteratorT find_format_all_copy_impl2( > OutputIteratorT Output, > const InputT& Input, > FinderT Finder, > FormatterT Formatter, > const FindResultT& FindResult, > const FormatResultT& FormatResult ) > { > typedef typename > range_const_iterator<InputT>::type input_iterator_type; > > typedef find_format_store< > input_iterator_type, > FormatterT, > FormatResultT > store_type; > > > store_type M( FindResult, FormatResult, Formatter ); > > > input_iterator_type LastMatch=::boost::begin(Input); > > > while( M ) > { > > Output = std::copy( LastMatch, M.begin(), Output ); > > Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); > > > LastMatch=M.end(); > M=Finder( LastMatch, ::boost::end(Input) ); > } > > > Output = std::copy( LastMatch, ::boost::end(Input), Output ); > > return Output; > } > > template< > typename OutputIteratorT, > typename InputT, > typename FinderT, > typename FormatterT, > typename FindResultT > > inline OutputIteratorT find_format_all_copy_impl( > OutputIteratorT Output, > const InputT& Input, > FinderT Finder, > FormatterT Formatter, > const FindResultT& FindResult ) > { > if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { > return ::boost::algorithm::detail::find_format_all_copy_impl2( > Output, > Input, > Finder, > Formatter, > FindResult, > Formatter(FindResult) ); > } else { > return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); > } > } > > > > template< > typename InputT, > typename FinderT, > typename FormatterT, > typename FindResultT, > typename FormatResultT > > inline InputT find_format_all_copy_impl2( > const InputT& Input, > FinderT Finder, > FormatterT Formatter, > const FindResultT& FindResult, > const FormatResultT& FormatResult) > { > typedef typename > range_const_iterator<InputT>::type input_iterator_type; > > typedef find_format_store< > input_iterator_type, > FormatterT, > FormatResultT > store_type; > > > store_type M( FindResult, FormatResult, Formatter ); > > > input_iterator_type LastMatch=::boost::begin(Input); > > > InputT Output; > > > while( M ) > { > > boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, M.begin() ); > > boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); > > > LastMatch=M.end(); > M=Finder( LastMatch, ::boost::end(Input) ); > } > > > ::boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, ::boost::end(Input) ); > > return Output; > } > > template< > typename InputT, > typename FinderT, > typename FormatterT, > typename FindResultT > > inline InputT find_format_all_copy_impl( > const InputT& Input, > FinderT Finder, > FormatterT Formatter, > const FindResultT& FindResult) > { > if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { > return ::boost::algorithm::detail::find_format_all_copy_impl2( > Input, > Finder, > Formatter, > FindResult, > Formatter(FindResult) ); > } else { > return Input; > } > } > > > > template< > typename InputT, > typename FinderT, > typename FormatterT, > typename FindResultT, > typename FormatResultT > > inline void find_format_all_impl2( > InputT& Input, > FinderT Finder, > FormatterT Formatter, > FindResultT FindResult, > FormatResultT FormatResult) > { > typedef typename > range_iterator<InputT>::type input_iterator_type; > typedef find_format_store< > input_iterator_type, > FormatterT, > FormatResultT > store_type; > > > store_type M( FindResult, FormatResult, Formatter ); > > > std::deque< > typename range_value<InputT>::type> Storage; > > > input_iterator_type InsertIt=::boost::begin(Input); > input_iterator_type SearchIt=::boost::begin(Input); > > while( M ) > { > > InsertIt=process_segment( > Storage, > Input, > InsertIt, > SearchIt, > M.begin() ); > > > SearchIt=M.end(); > > > ::boost::algorithm::detail::copy_to_storage( Storage, M.format_result() ); > > > M=Finder( SearchIt, ::boost::end(Input) ); > } > > > InsertIt=::boost::algorithm::detail::process_segment( > Storage, > Input, > InsertIt, > SearchIt, > ::boost::end(Input) ); > > if ( Storage.empty() ) > { > > ::boost::algorithm::detail::erase( Input, InsertIt, ::boost::end(Input) ); > } > else > { > > ::boost::algorithm::detail::insert( Input, ::boost::end(Input), Storage.begin(), Storage.end() ); > } > } > > template< > typename InputT, > typename FinderT, > typename FormatterT, > typename FindResultT > > inline void find_format_all_impl( > InputT& Input, > FinderT Finder, > FormatterT Formatter, > FindResultT FindResult) > { > if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { > ::boost::algorithm::detail::find_format_all_impl2( > Input, > Finder, > Formatter, > FindResult, > Formatter(FindResult) ); > } > } > > } > } >} ># 24 "/usr/include/boost/algorithm/string/find_format.hpp" 2 3 4 > > > > > > > >namespace boost { > namespace algorithm { ># 52 "/usr/include/boost/algorithm/string/find_format.hpp" 3 4 > template< > typename OutputIteratorT, > typename RangeT, > typename FinderT, > typename FormatterT> > inline OutputIteratorT find_format_copy( > OutputIteratorT Output, > const RangeT& Input, > FinderT Finder, > FormatterT Formatter ) > { > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FinderConcept< FinderT, typename range_const_iterator<RangeT>::type> )>::failed> boost_concept_check64 __attribute__((__unused__)) > > > > ; > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FormatterConcept< FormatterT, FinderT,typename range_const_iterator<RangeT>::type> )>::failed> boost_concept_check69 __attribute__((__unused__)) > > > > ; > > iterator_range<typename range_const_iterator<RangeT>::type> lit_input(::boost::as_literal(Input)); > > return detail::find_format_copy_impl( > Output, > lit_input, > Formatter, > Finder( ::boost::begin(lit_input), ::boost::end(lit_input) ) ); > } > > > > > > template< > typename SequenceT, > typename FinderT, > typename FormatterT> > inline SequenceT find_format_copy( > const SequenceT& Input, > FinderT Finder, > FormatterT Formatter ) > { > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FinderConcept< FinderT, typename range_const_iterator<SequenceT>::type> )>::failed> boost_concept_check98 __attribute__((__unused__)) > > > > ; > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FormatterConcept< FormatterT, FinderT,typename range_const_iterator<SequenceT>::type> )>::failed> boost_concept_check103 __attribute__((__unused__)) > > > > ; > > return detail::find_format_copy_impl( > Input, > Formatter, > Finder(::boost::begin(Input), ::boost::end(Input))); > } ># 124 "/usr/include/boost/algorithm/string/find_format.hpp" 3 4 > template< > typename SequenceT, > typename FinderT, > typename FormatterT> > inline void find_format( > SequenceT& Input, > FinderT Finder, > FormatterT Formatter) > { > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FinderConcept< FinderT, typename range_const_iterator<SequenceT>::type> )>::failed> boost_concept_check134 __attribute__((__unused__)) > > > > ; > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FormatterConcept< FormatterT, FinderT,typename range_const_iterator<SequenceT>::type> )>::failed> boost_concept_check139 __attribute__((__unused__)) > > > > ; > > detail::find_format_impl( > Input, > Formatter, > Finder(::boost::begin(Input), ::boost::end(Input))); > } ># 171 "/usr/include/boost/algorithm/string/find_format.hpp" 3 4 > template< > typename OutputIteratorT, > typename RangeT, > typename FinderT, > typename FormatterT> > inline OutputIteratorT find_format_all_copy( > OutputIteratorT Output, > const RangeT& Input, > FinderT Finder, > FormatterT Formatter) > { > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FinderConcept< FinderT, typename range_const_iterator<RangeT>::type> )>::failed> boost_concept_check183 __attribute__((__unused__)) > > > > ; > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FormatterConcept< FormatterT, FinderT,typename range_const_iterator<RangeT>::type> )>::failed> boost_concept_check188 __attribute__((__unused__)) > > > > ; > > iterator_range<typename range_const_iterator<RangeT>::type> lit_input(::boost::as_literal(Input)); > > return detail::find_format_all_copy_impl( > Output, > lit_input, > Finder, > Formatter, > Finder(::boost::begin(lit_input), ::boost::end(lit_input))); > } > > > > > > template< > typename SequenceT, > typename FinderT, > typename FormatterT > > inline SequenceT find_format_all_copy( > const SequenceT& Input, > FinderT Finder, > FormatterT Formatter ) > { > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FinderConcept< FinderT, typename range_const_iterator<SequenceT>::type> )>::failed> boost_concept_check218 __attribute__((__unused__)) > > > > ; > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FormatterConcept< FormatterT, FinderT,typename range_const_iterator<SequenceT>::type> )>::failed> boost_concept_check223 __attribute__((__unused__)) > > > > ; > > return detail::find_format_all_copy_impl( > Input, > Finder, > Formatter, > Finder( ::boost::begin(Input), ::boost::end(Input) ) ); > } ># 246 "/usr/include/boost/algorithm/string/find_format.hpp" 3 4 > template< > typename SequenceT, > typename FinderT, > typename FormatterT > > inline void find_format_all( > SequenceT& Input, > FinderT Finder, > FormatterT Formatter ) > { > > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FinderConcept< FinderT, typename range_const_iterator<SequenceT>::type> )>::failed> boost_concept_check256 __attribute__((__unused__)) > > > > ; > typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( FormatterConcept< FormatterT, FinderT,typename range_const_iterator<SequenceT>::type> )>::failed> boost_concept_check261 __attribute__((__unused__)) > > > > ; > > detail::find_format_all_impl( > Input, > Finder, > Formatter, > Finder(::boost::begin(Input), ::boost::end(Input))); > > } > > } > > > using algorithm::find_format_copy; > using algorithm::find_format; > using algorithm::find_format_all_copy; > using algorithm::find_format_all; > >} ># 23 "/usr/include/boost/algorithm/string/replace.hpp" 2 3 4 ># 1 "/usr/include/boost/algorithm/string/finder.hpp" 1 3 4 ># 22 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 ># 1 "/usr/include/boost/algorithm/string/constants.hpp" 1 3 4 ># 14 "/usr/include/boost/algorithm/string/constants.hpp" 3 4 >namespace boost { > namespace algorithm { > > > > > > enum token_compress_mode_type > { > token_compress_on, > token_compress_off > }; > > } > > > using algorithm::token_compress_on; > using algorithm::token_compress_off; > >} ># 23 "/usr/include/boost/algorithm/string/finder.hpp" 2 3 4 ># 1 "/usr/include/boost/algorithm/string/detail/finder.hpp" 1 3 4 ># 24 "/usr/include/boost/algorithm/string/detail/finder.hpp" 3 4 >namespace boost { > namespace algorithm { > namespace detail { ># 36 "/usr/include/boost/algorithm/string/detail/finder.hpp" 3 4 > template<typename SearchIteratorT,typename PredicateT> > struct first_finderF > { > typedef SearchIteratorT search_iterator_type; > > > template< typename SearchT > > first_finderF( const SearchT& Search, PredicateT Comp ) : > m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} > first_finderF( > search_iterator_type SearchBegin, > search_iterator_type SearchEnd, > PredicateT Comp ) : > m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} > > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > operator()( > ForwardIteratorT Begin, > ForwardIteratorT End ) const > { > typedef iterator_range<ForwardIteratorT> result_type; > typedef ForwardIteratorT input_iterator_type; > > > for(input_iterator_type OuterIt=Begin; > OuterIt!=End; > ++OuterIt) > { > > if( boost::empty(m_Search) ) > return result_type( End, End ); > > input_iterator_type InnerIt=OuterIt; > search_iterator_type SubstrIt=m_Search.begin(); > for(; > InnerIt!=End && SubstrIt!=m_Search.end(); > ++InnerIt,++SubstrIt) > { > if( !( m_Comp(*InnerIt,*SubstrIt) ) ) > break; > } > > > if ( SubstrIt==m_Search.end() ) > return result_type( OuterIt, InnerIt ); > } > > return result_type( End, End ); > } > > private: > iterator_range<search_iterator_type> m_Search; > PredicateT m_Comp; > }; ># 100 "/usr/include/boost/algorithm/string/detail/finder.hpp" 3 4 > template<typename SearchIteratorT, typename PredicateT> > struct last_finderF > { > typedef SearchIteratorT search_iterator_type; > typedef first_finderF< > search_iterator_type, > PredicateT> first_finder_type; > > > template< typename SearchT > > last_finderF( const SearchT& Search, PredicateT Comp ) : > m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} > last_finderF( > search_iterator_type SearchBegin, > search_iterator_type SearchEnd, > PredicateT Comp ) : > m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} > > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > operator()( > ForwardIteratorT Begin, > ForwardIteratorT End ) const > { > typedef iterator_range<ForwardIteratorT> result_type; > > if( boost::empty(m_Search) ) > return result_type( End, End ); > > typedef typename > std::iterator_traits<ForwardIteratorT>::iterator_category category; > > return findit( Begin, End, category() ); > } > > private: > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > findit( > ForwardIteratorT Begin, > ForwardIteratorT End, > std::forward_iterator_tag ) const > { > typedef iterator_range<ForwardIteratorT> result_type; > > first_finder_type first_finder( > m_Search.begin(), m_Search.end(), m_Comp ); > > result_type M=first_finder( Begin, End ); > result_type Last=M; > > while( M ) > { > Last=M; > M=first_finder( ::boost::end(M), End ); > } > > return Last; > } > > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > findit( > ForwardIteratorT Begin, > ForwardIteratorT End, > std::bidirectional_iterator_tag ) const > { > typedef iterator_range<ForwardIteratorT> result_type; > typedef ForwardIteratorT input_iterator_type; > > > for(input_iterator_type OuterIt=End; > OuterIt!=Begin; ) > { > input_iterator_type OuterIt2=--OuterIt; > > input_iterator_type InnerIt=OuterIt2; > search_iterator_type SubstrIt=m_Search.begin(); > for(; > InnerIt!=End && SubstrIt!=m_Search.end(); > ++InnerIt,++SubstrIt) > { > if( !( m_Comp(*InnerIt,*SubstrIt) ) ) > break; > } > > > if( SubstrIt==m_Search.end() ) > return result_type( OuterIt2, InnerIt ); > } > > return result_type( End, End ); > } > > private: > iterator_range<search_iterator_type> m_Search; > PredicateT m_Comp; > }; ># 209 "/usr/include/boost/algorithm/string/detail/finder.hpp" 3 4 > template<typename SearchIteratorT, typename PredicateT> > struct nth_finderF > { > typedef SearchIteratorT search_iterator_type; > typedef first_finderF< > search_iterator_type, > PredicateT> first_finder_type; > typedef last_finderF< > search_iterator_type, > PredicateT> last_finder_type; > > > template< typename SearchT > > nth_finderF( > const SearchT& Search, > int Nth, > PredicateT Comp) : > m_Search(::boost::begin(Search), ::boost::end(Search)), > m_Nth(Nth), > m_Comp(Comp) {} > nth_finderF( > search_iterator_type SearchBegin, > search_iterator_type SearchEnd, > int Nth, > PredicateT Comp) : > m_Search(SearchBegin, SearchEnd), > m_Nth(Nth), > m_Comp(Comp) {} > > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > operator()( > ForwardIteratorT Begin, > ForwardIteratorT End ) const > { > if(m_Nth>=0) > { > return find_forward(Begin, End, m_Nth); > } > else > { > return find_backward(Begin, End, -m_Nth); > } > > } > > private: > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > find_forward( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N) const > { > typedef iterator_range<ForwardIteratorT> result_type; > > > if( boost::empty(m_Search) ) > return result_type( End, End ); > > > first_finder_type first_finder( > m_Search.begin(), m_Search.end(), m_Comp ); > > result_type M( Begin, Begin ); > > for( unsigned int n=0; n<=N; ++n ) > { > > M=first_finder( ::boost::end(M), End ); > > if ( !M ) > { > > return M; > } > } > > return M; > } > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > find_backward( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N) const > { > typedef iterator_range<ForwardIteratorT> result_type; > > > if( boost::empty(m_Search) ) > return result_type( End, End ); > > > last_finder_type last_finder( > m_Search.begin(), m_Search.end(), m_Comp ); > > result_type M( End, End ); > > for( unsigned int n=1; n<=N; ++n ) > { > > M=last_finder( Begin, ::boost::begin(M) ); > > if ( !M ) > { > > return M; > } > } > > return M; > } > > > private: > iterator_range<search_iterator_type> m_Search; > int m_Nth; > PredicateT m_Comp; > }; > > > > template<typename ForwardIteratorT> > iterator_range<ForwardIteratorT> > find_head_impl( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N, > std::forward_iterator_tag ) > { > typedef ForwardIteratorT input_iterator_type; > typedef iterator_range<ForwardIteratorT> result_type; > > input_iterator_type It=Begin; > for( unsigned int Index=0; Index<N && It!=End; ++Index,++It ) > ; > > return result_type( Begin, It ); > } > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > find_head_impl( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N, > std::random_access_iterator_tag ) > { > typedef iterator_range<ForwardIteratorT> result_type; > > if ( (End<=Begin) || ( static_cast<unsigned int>(End-Begin) < N ) ) > return result_type( Begin, End ); > > return result_type(Begin,Begin+N); > } > > > template<typename ForwardIteratorT> > iterator_range<ForwardIteratorT> > find_head_impl( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N ) > { > typedef typename > std::iterator_traits<ForwardIteratorT>::iterator_category category; > > return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() ); > } > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > find_tail_impl( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N, > std::forward_iterator_tag ) > { > typedef ForwardIteratorT input_iterator_type; > typedef iterator_range<ForwardIteratorT> result_type; > > unsigned int Index=0; > input_iterator_type It=Begin; > input_iterator_type It2=Begin; > > > for( Index=0; Index<N && It2!=End; ++Index,++It2 ) > ; > > > for(; It2!=End; ++It,++It2 ) > ; > > return result_type( It, It2 ); > } > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > find_tail_impl( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N, > std::bidirectional_iterator_tag ) > { > typedef ForwardIteratorT input_iterator_type; > typedef iterator_range<ForwardIteratorT> result_type; > > input_iterator_type It=End; > for( unsigned int Index=0; Index<N && It!=Begin; ++Index,--It ) > ; > > return result_type( It, End ); > } > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > find_tail_impl( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N, > std::random_access_iterator_tag ) > { > typedef iterator_range<ForwardIteratorT> result_type; > > if ( (End<=Begin) || ( static_cast<unsigned int>(End-Begin) < N ) ) > return result_type( Begin, End ); > > return result_type( End-N, End ); > } > > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > find_tail_impl( > ForwardIteratorT Begin, > ForwardIteratorT End, > unsigned int N ) > { > typedef typename > std::iterator_traits<ForwardIteratorT>::iterator_category category; > > return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() ); > } ># 468 "/usr/include/boost/algorithm/string/detail/finder.hpp" 3 4 > struct head_finderF > { > > head_finderF( int N ) : m_N(N) {} > > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > operator()( > ForwardIteratorT Begin, > ForwardIteratorT End ) const > { > if(m_N>=0) > { > return ::boost::algorithm::detail::find_head_impl( Begin, End, m_N ); > } > else > { > iterator_range<ForwardIteratorT> Res= > ::boost::algorithm::detail::find_tail_impl( Begin, End, -m_N ); > > return ::boost::make_iterator_range(Begin, Res.begin()); > } > } > > private: > int m_N; > }; ># 506 "/usr/include/boost/algorithm/string/detail/finder.hpp" 3 4 > struct tail_finderF > { > > tail_finderF( int N ) : m_N(N) {} > > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > operator()( > ForwardIteratorT Begin, > ForwardIteratorT End ) const > { > if(m_N>=0) > { > return ::boost::algorithm::detail::find_tail_impl( Begin, End, m_N ); > } > else > { > iterator_range<ForwardIteratorT> Res= > ::boost::algorithm::detail::find_head_impl( Begin, End, -m_N ); > > return ::boost::make_iterator_range(Res.end(), End); > } > } > > private: > int m_N; > }; ># 547 "/usr/include/boost/algorithm/string/detail/finder.hpp" 3 4 > template< typename PredicateT > > struct token_finderF > { > > token_finderF( > PredicateT Pred, > token_compress_mode_type eCompress=token_compress_off ) : > m_Pred(Pred), m_eCompress(eCompress) {} > > > template< typename ForwardIteratorT > > iterator_range<ForwardIteratorT> > operator()( > ForwardIteratorT Begin, > ForwardIteratorT End ) const > { > typedef iterator_range<ForwardIteratorT> result_type; > > ForwardIteratorT It=std::find_if( Begin, End, m_Pred ); > > if( It==End ) > { > return result_type( End, End ); > } > else > { > ForwardIteratorT It2=It; > > if( m_eCompress==token_compress_on ) > { > > while( It2!=End && m_Pred(*It2) ) ++It2; > } > else > { > > ++It2; > } > > return result_type( It, It2 ); > } > } > > private: > PredicateT m_Pred; > token_compress_mode_type m_eCompress; > }; ># 602 "/usr/include/boost/algorithm/string/detail/finder.hpp" 3 4 > template<typename ForwardIterator1T> > struct range_finderF > { > typedef ForwardIterator1T input_iterator_type; > typedef iterator_range<input_iterator_type> result_type; > > > range_finderF( > input_iterator_type Begin, > input_iterator_type End ) : m_Range(Begin, End) {} > > range_finderF(const iterator_range<input_iterator_type>& Range) : > m_Range(Range) {} > > > template< typename ForwardIterator2T > > iterator_range<ForwardIterator2T> > operator()( > ForwardIterator2T, > ForwardIterator2T ) const > { > > > > return m_Range; > > } > > private: > iterator_range<input_iterator_type> m_Range; > }; > > > } > } >} ># 24 "/usr/include/boost/algorithm/string/finder.hpp" 2 3 4 ># 1 "/usr/include/boost/algorithm/string/compare.hpp" 1 3 4 ># 24 "/usr/include/boost/algorithm/string/compare.hpp" 3 4 >namespace boost { > namespace algorithm { ># 34 "/usr/include/boost/algorithm/string/compare.hpp" 3 4 > struct is_equal > { > > > > > template< typename T1, typename T2 > > bool operator()( const T1& Arg1, const T2& Arg2 ) const > { > return Arg1==Arg2; > } > }; > > > > > > > struct is_iequal > { > > > > > is_iequal( const std::locale& Loc=std::locale() ) : > m_Loc( Loc ) {} > > > > > > template< typename T1, typename T2 > > bool operator()( const T1& Arg1, const T2& Arg2 ) const > { > > > > return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc); > > } > > private: > std::locale m_Loc; > }; ># 86 "/usr/include/boost/algorithm/string/compare.hpp" 3 4 > struct is_less > { > > > > > template< typename T1, typename T2 > > bool operator()( const T1& Arg1, const T2& Arg2 ) const > { > return Arg1<Arg2; > } > }; > > > > > > > > struct is_iless > { > > > > > is_iless( const std::locale& Loc=std::locale() ) : > m_Loc( Loc ) {} > > > > > > template< typename T1, typename T2 > > bool operator()( const T1& Arg1, const T2& Arg2 ) const > { > > > > return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc); > > } > > private: > std::locale m_Loc; > }; ># 139 "/usr/include/boost/algorithm/string/compare.hpp" 3 4 > struct is_not_greater > { > > > > > template< typename T1, typename T2 > > bool operator()( const T1& Arg1, const T2& Arg2 ) const > { > return Arg1<=Arg2; > } > }; > > > > > > > > struct is_not_igreater > { > > > > > is_not_igreater( const std::locale& Loc=std::locale() ) : > m_Loc( Loc ) {} > > > > > > template< typename T1, typename T2 > > bool operator()( const T1& Arg1, const T2& Arg2 ) const > { > > > > return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc); > > } > > private: > std::locale m_Loc; > }; > > > } > > > using algorithm::is_equal; > using algorithm::is_iequal; > using algorithm::is_less; > using algorithm::is_iless; > using algorithm::is_not_greater; > using algorithm::is_not_igreater; > >} ># 25 "/usr/include/boost/algorithm/string/finder.hpp" 2 3 4 ># 34 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 >namespace boost { > namespace algorithm { ># 48 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 > template<typename RangeT> > inline detail::first_finderF< > typename range_const_iterator<RangeT>::type, > is_equal> > first_finder( const RangeT& Search ) > { > return > detail::first_finderF< > typename > range_const_iterator<RangeT>::type, > is_equal>( ::boost::as_literal(Search), is_equal() ) ; > } > > > > > > template<typename RangeT,typename PredicateT> > inline detail::first_finderF< > typename range_const_iterator<RangeT>::type, > PredicateT> > first_finder( > const RangeT& Search, PredicateT Comp ) > { > return > detail::first_finderF< > typename > range_const_iterator<RangeT>::type, > PredicateT>( ::boost::as_literal(Search), Comp ); > } ># 88 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 > template<typename RangeT> > inline detail::last_finderF< > typename range_const_iterator<RangeT>::type, > is_equal> > last_finder( const RangeT& Search ) > { > return > detail::last_finderF< > typename > range_const_iterator<RangeT>::type, > is_equal>( ::boost::as_literal(Search), is_equal() ); > } > > > > > template<typename RangeT, typename PredicateT> > inline detail::last_finderF< > typename range_const_iterator<RangeT>::type, > PredicateT> > last_finder( const RangeT& Search, PredicateT Comp ) > { > return > detail::last_finderF< > typename > range_const_iterator<RangeT>::type, > PredicateT>( ::boost::as_literal(Search), Comp ) ; > } ># 127 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 > template<typename RangeT> > inline detail::nth_finderF< > typename range_const_iterator<RangeT>::type, > is_equal> > nth_finder( > const RangeT& Search, > int Nth) > { > return > detail::nth_finderF< > typename > range_const_iterator<RangeT>::type, > is_equal>( ::boost::as_literal(Search), Nth, is_equal() ) ; > } > > > > > template<typename RangeT, typename PredicateT> > inline detail::nth_finderF< > typename range_const_iterator<RangeT>::type, > PredicateT> > nth_finder( > const RangeT& Search, > int Nth, > PredicateT Comp ) > { > return > detail::nth_finderF< > typename > range_const_iterator<RangeT>::type, > PredicateT>( ::boost::as_literal(Search), Nth, Comp ); > } ># 172 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 > inline detail::head_finderF > head_finder( int N ) > { > return detail::head_finderF(N); > } ># 189 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 > inline detail::tail_finderF > tail_finder( int N ) > { > return detail::tail_finderF(N); > } ># 213 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 > template< typename PredicateT > > inline detail::token_finderF<PredicateT> > token_finder( > PredicateT Pred, > token_compress_mode_type eCompress=token_compress_off ) > { > return detail::token_finderF<PredicateT>( Pred, eCompress ); > } ># 232 "/usr/include/boost/algorithm/string/finder.hpp" 3 4 > template< typename ForwardIteratorT > > inline detail::range_finderF<ForwardIteratorT> > range_finder( > ForwardIteratorT Begin, > ForwardIteratorT End ) > { > return detail::range_finderF<ForwardIteratorT>( Begin, End ); > } > > > > > > template< typename ForwardIteratorT > > inline detail::range_finderF<ForwardIteratorT> > range_finder( iterator_range<ForwardIteratorT> Range ) > { > return detail::range_finderF<ForwardIteratorT>( Range ); > } > > } > > > using algorithm::first_finder; > using algorithm::last_finder; > using algorithm::nth_finder; > using algorithm::head_finder; > using algorithm::tail_finder; > using algorithm::token_finder; > using algorithm::range_finder; > >} ># 24 "/usr/include/boost/algorithm/string/replace.hpp" 2 3 4 ># 1 "/usr/include/boost/algorithm/string/formatter.hpp" 1 3 4 ># 18 "/usr/include/boost/algorithm/string/formatter.hpp" 3 4 ># 1 "/usr/include/boost/algorithm/string/detail/formatter.hpp" 1 3 4 ># 20 "/usr/include/boost/algorithm/string/detail/formatter.hpp" 3 4 ># 1 "/usr/include/boost/algorithm/string/detail/util.hpp" 1 3 4 ># 18 "/usr/include/boost/algorithm/string/detail/util.hpp" 3 4 >namespace boost { > namespace algorithm { > namespace detail { ># 31 "/usr/include/boost/algorithm/string/detail/util.hpp" 3 4 > template< typename CharT > > struct empty_container > { > typedef empty_container<CharT> type; > typedef CharT value_type; > typedef std::size_t size_type; > typedef std::ptrdiff_t difference_type; > typedef const value_type& reference; > typedef const value_type& const_reference; > typedef const value_type* iterator; > typedef const value_type* const_iterator; > > > > const_iterator begin() const > { > return reinterpret_cast<const_iterator>(0); > } > > const_iterator end() const > { > return reinterpret_cast<const_iterator>(0); > } > > bool empty() const > { > return false; > } > > size_type size() const > { > return 0; > } > }; > > > > > template<typename InputIteratorT, typename OutputIteratorT> > inline OutputIteratorT bounded_copy( > InputIteratorT First, > InputIteratorT Last, > OutputIteratorT DestFirst, > OutputIteratorT DestLast ) > { > InputIteratorT InputIt=First; > OutputIteratorT OutputIt=DestFirst; > for(; InputIt!=Last && OutputIt!=DestLast; InputIt++, OutputIt++ ) > { > *OutputIt=*InputIt; > } > > return OutputIt; > } > > > > > template< > typename SeqT, > typename IteratorT=typename SeqT::const_iterator > > struct copy_iterator_rangeF > { > typedef iterator_range<IteratorT> argument_type; > typedef SeqT result_type; > SeqT operator()( const iterator_range<IteratorT>& Range ) const > { > return copy_range<SeqT>(Range); > } > }; > > } > } >} ># 21 "/usr/include/boost/algorithm/string/detail/formatter.hpp" 2 3 4 > > > >namespace boost { > namespace algorithm { > namespace detail { > > > > > template<typename RangeT> > struct const_formatF > { > private: > typedef typename > range_const_iterator<RangeT>::type format_iterator; > typedef iterator_range<format_iterator> result_type; > > public: > > const_formatF(const RangeT& Format) : > m_Format(::boost::begin(Format), ::boost::end(Format)) {} ># 53 "/usr/include/boost/algorithm/string/detail/formatter.hpp" 3 4 > template<typename Range2T> > const result_type& operator()(const Range2T&) const > { > return m_Format; > } > > private: > result_type m_Format; > }; > > > > > template<typename RangeT> > struct identity_formatF > { > > template< typename Range2T > > const RangeT& operator()(const Range2T& Replace) const > { > return RangeT(::boost::begin(Replace), ::boost::end(Replace)); > } > }; > > > > > template< typename CharT > > struct empty_formatF > { > template< typename ReplaceT > > empty_container<CharT> operator()(const ReplaceT&) const > { > return empty_container<CharT>(); > } > }; > > > > > template<typename FinderT> > struct dissect_formatF > { > public: > > dissect_formatF(FinderT Finder) : > m_Finder(Finder) {} > > > template<typename RangeT> > inline iterator_range< > typename range_const_iterator<RangeT>::type> > operator()(const RangeT& Replace) const > { > return m_Finder(::boost::begin(Replace), ::boost::end(Replace)); > } > > private: > FinderT m_Finder; > }; > > > } > } >} ># 19 "/usr/include/boost/algorithm/string/formatter.hpp" 2 3 4 ># 31 "/usr/include/boost/algorithm/string/formatter.hpp" 3 4 >namespace boost { > namespace algorithm { ># 44 "/usr/include/boost/algorithm/string/formatter.hpp" 3 4 > template<typename RangeT> > inline detail::const_formatF< > iterator_range< > typename range_const_iterator<RangeT>::type> > > const_formatter(const RangeT& Format) > { > return detail::const_formatF< > iterator_range< > typename range_const_iterator<RangeT>::type> >(::boost::as_literal(Format)); > } ># 62 "/usr/include/boost/algorithm/string/formatter.hpp" 3 4 > template<typename RangeT> > inline detail::identity_formatF< > iterator_range< > typename range_const_iterator<RangeT>::type> > > identity_formatter() > { > return detail::identity_formatF< > iterator_range< > typename range_const_iterator<RangeT>::type> >(); > } ># 82 "/usr/include/boost/algorithm/string/formatter.hpp" 3 4 > template<typename RangeT> > inline detail::empty_formatF< > typename range_value<RangeT>::type> > empty_formatter(const RangeT&) > { > return detail::empty_formatF< > typename range_value<RangeT>::type>(); > } ># 100 "/usr/include/boost/algorithm/string/formatter.hpp" 3 4 > template<typename FinderT> > inline detail::dissect_formatF< FinderT > > dissect_formatter(const FinderT& Finder) > { > return detail::dissect_formatF<FinderT>(Finder); > } > > > } > > > using algorithm::const_formatter; > using algorithm::identity_formatter; > using algorithm::empty_formatter; > using algorithm::dissect_formatter; > >} ># 25 "/usr/include/boost/algorithm/string/replace.hpp" 2 3 4 > > > > > > > >namespace boost { > namespace algorithm { ># 52 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T> > inline OutputIteratorT replace_range_copy( > OutputIteratorT Output, > const Range1T& Input, > const iterator_range< > typename > range_const_iterator<Range1T>::type>& SearchRange, > const Range2T& Format) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::range_finder(SearchRange), > ::boost::algorithm::const_formatter(Format)); > } > > > > > > template<typename SequenceT, typename RangeT> > inline SequenceT replace_range_copy( > const SequenceT& Input, > const iterator_range< > typename > range_const_iterator<SequenceT>::type>& SearchRange, > const RangeT& Format) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::range_finder(SearchRange), > ::boost::algorithm::const_formatter(Format)); > } ># 98 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename RangeT> > inline void replace_range( > SequenceT& Input, > const iterator_range< > typename > range_iterator<SequenceT>::type>& SearchRange, > const RangeT& Format) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::range_finder(SearchRange), > ::boost::algorithm::const_formatter(Format)); > } ># 130 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T, > typename Range3T> > inline OutputIteratorT replace_first_copy( > OutputIteratorT Output, > const Range1T& Input, > const Range2T& Search, > const Range3T& Format) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::first_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename Range1T, typename Range2T> > inline SequenceT replace_first_copy( > const SequenceT& Input, > const Range1T& Search, > const Range2T& Format ) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::first_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } ># 173 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename Range1T, typename Range2T> > inline void replace_first( > SequenceT& Input, > const Range1T& Search, > const Range2T& Format ) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::first_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } ># 205 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T, > typename Range3T> > inline OutputIteratorT ireplace_first_copy( > OutputIteratorT Output, > const Range1T& Input, > const Range2T& Search, > const Range3T& Format, > const std::locale& Loc=std::locale() ) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::first_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename Range2T, typename Range1T> > inline SequenceT ireplace_first_copy( > const SequenceT& Input, > const Range2T& Search, > const Range1T& Format, > const std::locale& Loc=std::locale() ) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::first_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } ># 252 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename Range1T, typename Range2T> > inline void ireplace_first( > SequenceT& Input, > const Range1T& Search, > const Range2T& Format, > const std::locale& Loc=std::locale() ) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::first_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } ># 283 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T, > typename Range3T> > inline OutputIteratorT replace_last_copy( > OutputIteratorT Output, > const Range1T& Input, > const Range2T& Search, > const Range3T& Format ) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::last_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename Range1T, typename Range2T> > inline SequenceT replace_last_copy( > const SequenceT& Input, > const Range1T& Search, > const Range2T& Format ) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::last_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } ># 326 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename Range1T, typename Range2T> > inline void replace_last( > SequenceT& Input, > const Range1T& Search, > const Range2T& Format ) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::last_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } ># 358 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T, > typename Range3T> > inline OutputIteratorT ireplace_last_copy( > OutputIteratorT Output, > const Range1T& Input, > const Range2T& Search, > const Range3T& Format, > const std::locale& Loc=std::locale() ) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::last_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename Range1T, typename Range2T> > inline SequenceT ireplace_last_copy( > const SequenceT& Input, > const Range1T& Search, > const Range2T& Format, > const std::locale& Loc=std::locale() ) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::last_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } ># 405 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename Range1T, typename Range2T> > inline void ireplace_last( > SequenceT& Input, > const Range1T& Search, > const Range2T& Format, > const std::locale& Loc=std::locale() ) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::last_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } ># 438 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T, > typename Range3T> > inline OutputIteratorT replace_nth_copy( > OutputIteratorT Output, > const Range1T& Input, > const Range2T& Search, > int Nth, > const Range3T& Format ) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::nth_finder(Search, Nth), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename Range1T, typename Range2T> > inline SequenceT replace_nth_copy( > const SequenceT& Input, > const Range1T& Search, > int Nth, > const Range2T& Format ) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::nth_finder(Search, Nth), > ::boost::algorithm::const_formatter(Format) ); > } ># 485 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename Range1T, typename Range2T> > inline void replace_nth( > SequenceT& Input, > const Range1T& Search, > int Nth, > const Range2T& Format ) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::nth_finder(Search, Nth), > ::boost::algorithm::const_formatter(Format) ); > } ># 520 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T, > typename Range3T> > inline OutputIteratorT ireplace_nth_copy( > OutputIteratorT Output, > const Range1T& Input, > const Range2T& Search, > int Nth, > const Range3T& Format, > const std::locale& Loc=std::locale() ) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc) ), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename Range1T, typename Range2T> > inline SequenceT ireplace_nth_copy( > const SequenceT& Input, > const Range1T& Search, > int Nth, > const Range2T& Format, > const std::locale& Loc=std::locale() ) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } ># 571 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename Range1T, typename Range2T> > inline void ireplace_nth( > SequenceT& Input, > const Range1T& Search, > int Nth, > const Range2T& Format, > const std::locale& Loc=std::locale() ) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } ># 603 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T, > typename Range3T> > inline OutputIteratorT replace_all_copy( > OutputIteratorT Output, > const Range1T& Input, > const Range2T& Search, > const Range3T& Format ) > { > return ::boost::algorithm::find_format_all_copy( > Output, > Input, > ::boost::algorithm::first_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename Range1T, typename Range2T> > inline SequenceT replace_all_copy( > const SequenceT& Input, > const Range1T& Search, > const Range2T& Format ) > { > return ::boost::algorithm::find_format_all_copy( > Input, > ::boost::algorithm::first_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } ># 646 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename Range1T, typename Range2T> > inline void replace_all( > SequenceT& Input, > const Range1T& Search, > const Range2T& Format ) > { > ::boost::algorithm::find_format_all( > Input, > ::boost::algorithm::first_finder(Search), > ::boost::algorithm::const_formatter(Format) ); > } ># 678 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T, > typename Range3T> > inline OutputIteratorT ireplace_all_copy( > OutputIteratorT Output, > const Range1T& Input, > const Range2T& Search, > const Range3T& Format, > const std::locale& Loc=std::locale() ) > { > return ::boost::algorithm::find_format_all_copy( > Output, > Input, > ::boost::algorithm::first_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename Range1T, typename Range2T> > inline SequenceT ireplace_all_copy( > const SequenceT& Input, > const Range1T& Search, > const Range2T& Format, > const std::locale& Loc=std::locale() ) > { > return ::boost::algorithm::find_format_all_copy( > Input, > ::boost::algorithm::first_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } ># 725 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename Range1T, typename Range2T> > inline void ireplace_all( > SequenceT& Input, > const Range1T& Search, > const Range2T& Format, > const std::locale& Loc=std::locale() ) > { > ::boost::algorithm::find_format_all( > Input, > ::boost::algorithm::first_finder(Search, is_iequal(Loc)), > ::boost::algorithm::const_formatter(Format) ); > } ># 760 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T> > inline OutputIteratorT replace_head_copy( > OutputIteratorT Output, > const Range1T& Input, > int N, > const Range2T& Format ) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::head_finder(N), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename RangeT> > inline SequenceT replace_head_copy( > const SequenceT& Input, > int N, > const RangeT& Format ) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::head_finder(N), > ::boost::algorithm::const_formatter(Format) ); > } ># 806 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename RangeT> > inline void replace_head( > SequenceT& Input, > int N, > const RangeT& Format ) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::head_finder(N), > ::boost::algorithm::const_formatter(Format) ); > } ># 840 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template< > typename OutputIteratorT, > typename Range1T, > typename Range2T> > inline OutputIteratorT replace_tail_copy( > OutputIteratorT Output, > const Range1T& Input, > int N, > const Range2T& Format ) > { > return ::boost::algorithm::find_format_copy( > Output, > Input, > ::boost::algorithm::tail_finder(N), > ::boost::algorithm::const_formatter(Format) ); > } > > > > > > template<typename SequenceT, typename RangeT> > inline SequenceT replace_tail_copy( > const SequenceT& Input, > int N, > const RangeT& Format ) > { > return ::boost::algorithm::find_format_copy( > Input, > ::boost::algorithm::tail_finder(N), > ::boost::algorithm::const_formatter(Format) ); > } ># 886 "/usr/include/boost/algorithm/string/replace.hpp" 3 4 > template<typename SequenceT, typename RangeT> > inline void replace_tail( > SequenceT& Input, > int N, > const RangeT& Format ) > { > ::boost::algorithm::find_format( > Input, > ::boost::algorithm::tail_finder(N), > ::boost::algorithm::const_formatter(Format) ); > } > > } > > > using algorithm::replace_range_copy; > using algorithm::replace_range; > using algorithm::replace_first_copy; > using algorithm::replace_first; > using algorithm::ireplace_first_copy; > using algorithm::ireplace_first; > using algorithm::replace_last_copy; > using algorithm::replace_last; > using algorithm::ireplace_last_copy; > using algorithm::ireplace_last; > using algorithm::replace_nth_copy; > using algorithm::replace_nth; > using algorithm::ireplace_nth_copy; > using algorithm::ireplace_nth; > using algorithm::replace_all_copy; > using algorithm::replace_all; > using algorithm::ireplace_all_copy; > using algorithm::ireplace_all; > using algorithm::replace_head_copy; > using algorithm::replace_head; > using algorithm::replace_tail_copy; > using algorithm::replace_tail; > >} ># 4 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 2 > > > > > > ># 9 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" >namespace dual_graph >{ >using ConfigurationSchema::DefineFieldSet; >using ConfigurationSchema::TupleJunction; >using ConfigurationSchema::PropertyTree; > >struct StreamComposition { > virtual ~StreamComposition() {} > > virtual void > generateDefaultRunIdToken(std::ostream& o) = 0; >}; > >struct GraphStreamComposition : > StreamComposition { > struct Configurable { > using Fields = decltype(DefineFieldSet())::Type; > Fields fields; > > Configurable() : > fields(TupleJunction::unreachable) > {} > }; > > void > generateDefaultRunIdToken(std::ostream& o) override { o << "graph"; } >}; > >struct PathStreamComposition : > public StreamComposition { > struct Configurable { > struct Paths { > uint32_t count; > uint32_t maxLength; > > using Fields = decltype(DefineFieldSet(count, maxLength))::Type; > Fields fields; > > Paths() : > fields( ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "count" ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > count ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "maxLength" ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > maxLength ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 48 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > ) > {} > } > paths; > > struct Iterations { > uint32_t max; > > using Fields = decltype(DefineFieldSet(max))::Type; > Fields fields; > > Iterations() : > fields( ># 60 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 60 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "max" ># 60 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 60 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > max ># 60 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 60 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > ) > {} > } > iterations; > > using Fields = decltype(DefineFieldSet(paths, iterations))::Type; > Fields fields; > > Configurable() : > fields( ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "paths" ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > paths ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "iterations" ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > iterations ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 69 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > ) > {} > }; > > PathStreamComposition(handle<Configurable> configurable) : > _configurable(configurable) > {} > > void > generateDefaultRunIdToken(std::ostream& o) override { o << _configurable->paths.count << "-paths"; } > > handle<Configurable> > configurable() { return _configurable; } > > private: > handle<Configurable> _configurable; >}; > >struct StreamCompositionFactory { > struct Configurable { > GraphStreamComposition::Configurable graph; > PathStreamComposition::Configurable path; > > using Fields = decltype(DefineFieldSet(graph, path))::Type; > Fields fields; > > Configurable() : > fields( ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "graph" ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > graph ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "path" ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > path ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 96 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , TupleJunction::one) > {} > }; > > static owner<StreamComposition> > make(handle<Configurable> configurable) > { > struct { > owner<StreamComposition> c; > > void > operator ()(PropertyTree<GraphStreamComposition::Configurable> g) > { > if (g.isSpecified()) > c = owner<GraphStreamComposition>::make(); > } > > void > operator ()(PropertyTree<PathStreamComposition::Configurable> p) > { > if (p.isSpecified()) > c = owner<PathStreamComposition>::make(p.value()); > } > } > factory; > > configurable->fields.constDispatch(factory); > return std::move(factory.c); > } >}; > >class GraphComposition { >public: > struct Configurable { > GraphSpecification::GeneratorFactory::Configurable graph; > GraphSpecification::GeneratorFactory::Configurable edgeExpansion; > > using Fields = decltype(DefineFieldSet(graph, edgeExpansion))::Type; > Fields fields; > > Configurable() : > fields( ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "graph" ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > graph ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "edgeExpansion" ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > edgeExpansion ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 137 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > ) > {} > }; > > GraphComposition(handle<Configurable> configurable) : > _configurable(configurable) > { > _graph = GraphSpecification::GeneratorFactory::make(_configurable->graph); > if (_configurable->fields.isSpecified(_configurable->edgeExpansion)) > _edgeExpansion = GraphSpecification::GeneratorFactory::make(_configurable->edgeExpansion); > } > > loan<const GraphSpecification::Generator> > graph() { return _graph; } > > loan<GraphSpecification::Generator> > edgeExpansion() { return _edgeExpansion; } > > void > generateDefaultRunIdToken(std::ostream& o) { o << spellSyntheticSourceId(); } > > std::string > spellSyntheticSourceId() > { > std::stringstream ss; > ss << spellId(_graph->id); > if (_edgeExpansion != nullptr) > ss << "x" << spellId(_edgeExpansion->id); > return ss.str(); > } > >private: > GraphSpecification::Arity > parseArity(char c) > { > switch (c) > { > case 'u': > return GraphSpecification::Arity::unary; > > case 'b': > return GraphSpecification::Arity::binary; > > case 'n': > return GraphSpecification::Arity::nary; > > default: > ; > } > > ># 187 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp", 187) ># 187 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > << "unreachable" << ># 187 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::RequireException::require_sentinel ># 187 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > ; > } > > handle<Configurable> _configurable; > > owner<GraphSpecification::Generator> _graph; > owner<GraphSpecification::Generator> _edgeExpansion; >}; > >struct GraphPersistence { > struct Configurable { > bool graph; > bool paths; > bool overwrite; > std::string location; > std::string filename; > > using Fields = decltype(DefineFieldSet(graph, paths, overwrite, location, filename))::Type; > Fields fields; > > Configurable() : > graph(false), > paths(false), > fields( ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "graph" ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > graph ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "paths" ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > paths ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "overwrite" ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > overwrite ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "location" ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > location ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "filename" ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > filename ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 210 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > ) > {} > }; > > struct InvocationIdentifiers { > const std::string& testName; > const std::string& passName; > const std::string& runId; > const std::string& tag; > }; > > GraphPersistence(handle<Configurable> configurable) : > _configurable(configurable) > {} > > bool > graph() { return _configurable->graph; } > > bool > paths() { return _configurable->paths; } > > std::string > inflateLocation(const InvocationIdentifiers& id) > { > std::string inflated = boost::replace_all_copy(_configurable->location, "<test>", id.testName); > boost::replace_all(inflated, "<pass>", id.passName); > boost::replace_all(inflated, "<run>", id.runId); > return inflated; > } > > std::string > inflateFilename(const InvocationIdentifiers& id) > { > std::string inflated = boost::replace_all_copy(_configurable->filename, "<test>", id.testName); > boost::replace_all(inflated, "<pass>", id.passName); > boost::replace_all(inflated, "<run>", id.runId); > boost::replace_all(inflated, "<tag>", id.tag); > return inflated; > } > > private: > handle<Configurable> _configurable; >}; > >class GeneratorSpecification >{ >public: > struct Configurable { > StreamCompositionFactory::Configurable stream; > Randomization::DistributionConfigurable distribution; > GraphPersistence::Configurable persistence; > GraphComposition::Configurable composition; > > using Fields = decltype(DefineFieldSet(stream, distribution, persistence, composition))::Type; > Fields fields; > > Configurable() : > fields( ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "stream" ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > stream ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "distribution" ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > distribution ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "persistence" ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > persistence ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > facile::NamedVariable( ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > "composition" ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > , ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > composition ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" 3 > ) ># 267 "../../subprojects/edfst/src/edfst/sim/GeneratorSpecification.hpp" > , TupleJunction::all) > {} > }; > > GeneratorSpecification(owner<json> properties) : > _properties(std::move(properties)), > _s(nullptr), > _c(nullptr) > {} > > loan<StreamComposition> > getStreamComposition() const { return _s; } > > loan<GraphComposition> > getGraphComposition() const { return _c; } > > std::string > spellSyntheticSourceId() { return _c->spellSyntheticSourceId(); } > > handle<const Randomization::DistributionConfigurable> > getDistribution() const { return handle(_configurable.distribution); } > > loan<GraphPersistence> > getPersistence() const { return _p; } > > void > parse() > { > > using namespace Randomization; > > ConfigurationSchema::Parser parser; > parser.parse(_configurable, _properties.reference()); > > _s = StreamCompositionFactory::make(handle(_configurable.stream)); > _c = owner<GraphComposition>::make(handle(_configurable.composition)); > _p = owner<GraphPersistence>::make(handle(_configurable.persistence)); > } > > std::string > generateDefaultRunId() > { > std::stringstream ss; > > _s->generateDefaultRunIdToken(ss); > ss << "."; > _c->generateDefaultRunIdToken(ss); > return ss.str(); > } > >private: > owner<json> _properties; > > owner<StreamComposition> _s; > owner<GraphComposition> _c; > Configurable _configurable; > owner<GraphPersistence> _p; >}; >} ># 5 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 1 > > > > > > >namespace dual_graph >{ >template<typename tNode, typename tId = uint32_t> >class ArityNodeBase : > public EdgeStream::IEdgeStreamPoint >{ >protected: > using Node = ArityNodeBase<tNode>; > using Arity = GraphSpecification::Arity; > >public: > using Id = tId; > > enum class BinarySuccessor { > left, > right > }; > > struct PrintTag { > ># 26 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 26 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > > std::ostream& > print(std::ostream& o) const { return o << tagArity(_node._arity) << _node._id; } > > PrintTag(const Node& node) : > _node(node) > {} > > protected: > const Node& _node; > }; > > struct PrintToken { > ># 40 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 40 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > > std::ostream& > print(std::ostream& o) const > { > o << _node.tag() << ": "; > > if (_node._arity == Arity::unary) { > if (_node._successors.unary.unique == nullptr) > o << "-"; > else > o << _node._successors.unary.unique->_id; > } else if (_node._arity == Arity::binary) { > o << "["; > if (_node._successors.binary.left == nullptr) > o << "-"; > else > o << _node._successors.binary.left->_id; > o << ", "; > if (_node._successors.binary.right == nullptr) > o << "-"; > else > o << _node._successors.binary.right->_id; > o << "]"; > } else { > o << "{"; > Comma comma; > if (_node._successors.binary.left == nullptr) > o << comma << "-"; > else > o << comma << _node._successors.multiple.continuation->_id; > for (unit<tNode> successor : _node._successors.multiple.successors) > o << comma << successor->_id; > o << "}"; > } > > return o; > } > > PrintToken(const Node& node) : > _node(node) > {} > > protected: > const Node& _node; > }; > > ArityNodeBase(tId id, Arity arity) : > _id(id), > _arity(arity) > { > ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > _arity != Arity::none ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 91) << ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "_arity != Arity::none" ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot create a node with an unspecified arity" << ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 91 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > > if (_arity == Arity::nary) { > typename Multiple::Tag tag; > new (&_successors) Successors(tag); > } > } > > ~ArityNodeBase() > { > if (_arity == Arity::nary) > _successors.multiple.~Multiple(); > } > > uint32_t > id() const override { return _id; } > > tId > instanceId() const { return _id; } > > Arity > arity() const { return _arity; } > > bool > isLeaf() const { return edgeCount() == 0; } > > uint32_t > edgeCount() const > { > switch (_arity) > { > case Arity::nullary: > return 0; > > case Arity::unary: > return _successors.unary.edgeCount(); > > case Arity::binary: > return _successors.binary.edgeCount(); > > case Arity::nary: > return _successors.multiple.edgeCount(); > > default: > ; > } > > ># 138 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 138) ># 138 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "unreachable" << ># 138 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 138 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > } > > bool > isSuccessorComplete() const > { > switch (_arity) > { > case Arity::unary: > return _successors.unary.isSuccessorComplete(); > > case Arity::binary: > return _successors.binary.isSuccessorComplete(); > > case Arity::nary: > return _successors.multiple.isSuccessorComplete(); > > default: > ; > } > > ># 159 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 159) ># 159 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "unreachable" << ># 159 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 159 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > } > > unit<tNode> > successor() const { return _successors.unary.unique; } > > unit<tNode> > successorAt(BinarySuccessor position) const > { > if (position == BinarySuccessor::left) > return _successors.binary.left; > else > return _successors.binary.right; > } > > unit<tNode> > left() const > { > ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > _arity == Arity::binary ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 177) << ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "_arity == Arity::binary" ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot get the left successor of a non-binary node" << ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 177 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > > return _successors.binary.left; > } > > unit<tNode> > right() const > { > ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > _arity == Arity::binary ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 185) << ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "_arity == Arity::binary" ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot get the right successor of a non-binary node" << ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 185 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > > return _successors.binary.right; > } > > unit<tNode> > continuation() const { return _successors.multiple.continuation; } > > unit<tNode> > leap() const > { > switch (_arity) > { > case Arity::unary: > return _successors.unary.unique; > case Arity::binary: > return _successors.binary.right; > default:; > } > ># 204 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 204) ># 204 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot identify the leap from a " << _arity << " node" << ># 204 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 204 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > } > > unit<tNode> > successorAt(uint32_t position) const { return _successors.multiple.successors->at(position); } > > void > setContinuation(unit<tNode> successor) > { > ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > successor != nullptr ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 213) << ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "successor != nullptr" ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot nullify a successor" << ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 213 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > findSuccessor(successor->_id) == nullptr ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 214) << ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "findSuccessor(successor->_id) == nullptr" ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot add a duplicate edge (" << _id << " -> " << successor->_id << ")" << ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 214 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > logSuccessor(_successors.unary.unique, successor); > > if (_arity == Arity::unary) > _successors.unary.unique = successor; > else if (_arity == Arity::nary) > _successors.multiple.continuation = successor; > else > ># 222 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 222) ># 222 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot set a unique successor on a " << _arity << " node" << ># 222 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 222 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > } > > void > setSuccessorAt(unit<tNode> successor, BinarySuccessor position) > { > ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > successor != nullptr ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 228) << ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "successor != nullptr" ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot nullify a successor" << ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 228 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > _arity == Arity::binary ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 229) << ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "_arity == Arity::binary" ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot set a binary successor on a " << _arity << " node" << ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 229 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > findSuccessor(successor->_id) == nullptr ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 230) << ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "findSuccessor(successor->_id) == nullptr" ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot add a duplicate edge (" << _id << " -> " << successor->_id << ")" << ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 230 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > logSuccessor(successorAt(position), successor); > > if (position == BinarySuccessor::left) > _successors.binary.left = successor; > else > _successors.binary.right = successor; > } > > void > addSuccessor(unit<tNode> successor) > { > ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > successor != nullptr ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 242) << ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "successor != nullptr" ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot nullify a successor" << ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 242 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > _arity == Arity::nary ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 243) << ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "_arity == Arity::nary" ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot add a successor to a " << _arity << " node" << ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 243 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > findSuccessor(successor->_id) == nullptr ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 244) << ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "findSuccessor(successor->_id) == nullptr" ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot add a duplicate edge (" << _id << " -> " << successor->_id << ")" << ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 244 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > logSuccessor(successor); > > _successors.multiple.successors->push_back(successor); > } > > void > setSuccessorAt(unit<tNode> successor, uint32_t position) > { > ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > successor != nullptr ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 253) << ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "successor != nullptr" ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot nullify a successor" << ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 253 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ( ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > _arity == Arity::nary ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 254) << ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠Condition [" << ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > "_arity == Arity::nary" ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "] " << ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > std::endl ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > << "⢠" ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Cannot set a positional successor on a " << _arity << " node" << ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 254 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > logSuccessor(_successors.multiple.successors->at(position), successor); > > _successors.multiple.successors->at(position) = successor; > } > > template<typename Sink> > void > streamSuccessors(Sink& sink) > { > switch (_arity) > { > case Arity::nullary: > break; > > case Arity::unary: > if (_successors.unary.unique != nullptr) > sink(_successors.unary.unique); > break; > > case Arity::binary: > if (_successors.binary.left != nullptr) > sink(_successors.binary.left); > if (_successors.binary.right != nullptr) > sink(_successors.binary.right); > break; > > case Arity::nary: > if (_successors.multiple.continuation != nullptr) > sink(_successors.multiple.continuation); > for (unit<tNode> successor : _successors.multiple.successors) > sink(successor); > break; > > default: > ># 289 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 289) ># 289 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "unreachable" << ># 289 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 289 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > } > } > > template<typename Sink> > void > streamSuccessors(const Sink& sink) > { > switch (_arity) > { > case Arity::nullary: > break; > > case Arity::unary: > if (_successors.unary.unique != nullptr) > sink(_successors.unary.unique); > break; > > case Arity::binary: > if (_successors.binary.left != nullptr) > sink(_successors.binary.left); > if (_successors.binary.right != nullptr) > sink(_successors.binary.right); > break; > > case Arity::nary: > if (_successors.multiple.continuation != nullptr) > sink(_successors.multiple.continuation); > for (unit<tNode> successor : _successors.multiple.successors) > sink(successor); > break; > > default: > ># 322 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 322) ># 322 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "unreachable" << ># 322 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 322 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > } > } > > void > stealSuccessors(unit<tNode> victim) > { > switch (_arity) > { > case Arity::nullary: > break; > > case Arity::unary: > _successors.unary.unique = victim->_successors.unary.unique; > break; > > case Arity::binary: > _successors.binary.left = victim->_successors.binary.left; > _successors.binary.right = victim->_successors.binary.right; > break; > > case Arity::nary: > _successors.multiple.continuation = victim->_successors.multiple.continuation; > _successors.multiple.successors = std::move(victim->_successors.multiple.successors); > break; > > default: > ># 349 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 349) ># 349 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "unreachable" << ># 349 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 349 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > } > } > > inline PrintTag > arityTag() const { return PrintTag(*this); } > > inline PrintToken > arityToken() const { return PrintToken(*this); } > > friend std::ostream& > operator <<(std::ostream& o, const Node& node) { return o << node.arityToken(); } > >protected: > unit<tNode> > findSuccessor(tId id) > { > switch (_arity) > { > default: > ># 369 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/ArityNode.hpp", 369) ># 369 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > << "Node of arity " << _arity << " has no successors" << ># 369 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" 3 > facile::RequireException::require_sentinel ># 369 "../../subprojects/edfst/src/edfst/sim/ArityNode.hpp" > ; > > case Arity::unary: > return (_successors.unary.unique != nullptr && _successors.unary.unique->_id == id) ? _successors.unary.unique : nullptr; > > case Arity::binary: > if ((_successors.binary.left != nullptr) && (_successors.binary.left->_id == id)) > return _successors.binary.left; > else if ((_successors.binary.right != nullptr) && (_successors.binary.right->_id == id)) > return _successors.binary.right; > else > break; > > case Arity::nary: > if ((_successors.multiple.continuation != nullptr) && (_successors.multiple.continuation->_id == id)) > return _successors.multiple.continuation; > > for (unit<tNode> successor : _successors.multiple.successors) { > if (successor->_id == id) > return successor; > } > } > > return nullptr; > } > > inline void > logSuccessor(unit<tNode> designated) { logSuccessor(nullptr, designated); } > > inline void > logSuccessor(unit<tNode> former, unit<tNode> designated) > { > if (former == nullptr) > 0 && GeneratorLog::log()->prefix() << "+E (" << id() << " -> " << designated->id() << ")" << std::endl; > else > 0 && GeneratorLog::log()->prefix() << "xE (" << id() << " -> " << former->id() << ") => (" << id() << " -> " << designated->id() << ")" << std::endl; > } > > const tId _id; > const Arity _arity; > > struct Unary { > unit<tNode> unique; > > bool > isSuccessorComplete() const { return unique != nullptr; } > > uint32_t > edgeCount() const { return (unique == nullptr ? 0 : 1); } > }; > struct Binary { > unit<tNode> left; > unit<tNode> right; > > bool > isSuccessorComplete() const { return (left != nullptr && right != nullptr); } > > uint32_t > edgeCount() const { return ((left == nullptr) ? 0 : 1) + ((right == nullptr) ? 0 : 1); } > }; > struct Multiple { > struct Tag {}; > > using SuccessorList = std::vector<unit<tNode>>; > > unit<tNode> continuation; > owner<SuccessorList> successors; > > Multiple() : > successors(owner<SuccessorList>::make(0)) > {} > > ~Multiple() > { > if (successors != nullptr) > successors.reset(); > } > > bool > isSuccessorComplete() const { return false; } > > uint32_t > edgeCount() const { return successors->size() + (continuation == nullptr ? 0 : 1); } > }; > > union Successors { > Unary unary; > Binary binary; > Multiple multiple; > > Successors() : > binary() > {} > > Successors(__attribute__((unused)) typename Multiple::Tag tag) : > multiple() > {} > > ~Successors() {} > } > _successors; >}; >} ># 6 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" 2 > >namespace dual_graph >{ >namespace BlockGraph >{ >struct SubblockMetrics { > uint32_t nodeCount; > uint32_t subblockCount; >}; > >enum class BinarySuccessorCondition { > any, > empty, > occupied >}; > >template<typename tNode> >class NodeBase : > public ArityNodeBase<tNode> >{ >using super = ArityNodeBase<tNode>; > >protected: > using Node = NodeBase<tNode>; > using Arity = GraphSpecification::Arity; > >public: > struct PrintTag { > ># 34 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 34 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" > ; > > std::ostream& > print(std::ostream& o) const { return o << (_node._isSubblockHead ? "B" : "V") << _node._id; } > > PrintTag(const Node& node) : > _node(node) > {} > > protected: > const Node& _node; > }; > > struct PrintToken { > ># 48 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 48 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" > ; > > std::ostream& > print(std::ostream& o) const > { > o << _node.tag(); > if (_node._subblockHead != nullptr) > o << " (" << _node._subblockHead->tag() << ")"; > o << ": "; > > if (_node._arity == Arity::unary) { > if (_node._successors.unary.unique == nullptr) > o << "-"; > else > o << _node._successors.unary.unique->_id; > } else if (_node._arity == Arity::binary) { > o << "["; > if (_node._successors.binary.left == nullptr) > o << "-"; > else > o << _node._successors.binary.left->_id; > o << ", "; > if (_node._successors.binary.right == nullptr) > o << "-"; > else > o << _node._successors.binary.right->_id; > o << "]"; > } else { > o << "{"; > Comma comma; > for (unit<tNode> successor : fermata(_node._successors.multiple.successors)) > o << comma << successor->_id; > o << "}"; > } > > return o; > } > > PrintToken(const Node& node) : > _node(node) > {} > > protected: > const Node& _node; > }; > > NodeBase(typename super::Id id, Arity arity, unit<tNode> treeParent = nullptr) : > ArityNodeBase<tNode>(id, arity), > _isSubblockHead(false), > _subblockDepth(determineSubblockDepth(treeParent)), > _subblockHead(determineSubblockHead(treeParent)) > {} > > bool > isSubblockHead() const { return _isSubblockHead; } > > void > setSubblockHead(bool b = true) > { > 0 && GeneratorLog::log()->prefix() << " H " << super::id() << std::endl; > > _isSubblockHead = b; > } > > uint32_t > subblockDepth() const { return _subblockDepth; } > > void > incrementSubblockDepth() { _subblockDepth++; } > > unit<tNode> > subblockHead() const { return _subblockHead; } > > inline PrintTag > tag() const { return PrintTag(*this); } > > inline PrintToken > token() const { return PrintToken(*this); } > > friend std::ostream& > operator <<(std::ostream& o, const Node& node) { return o << node.token(); } > >private: > static uint32_t > determineSubblockDepth(unit<tNode> treeParent) > { > if (treeParent == nullptr) > return 0; > > if (treeParent->_isSubblockHead) > return treeParent->_subblockDepth + 1; > else > return treeParent->_subblockDepth; > } > > static unit<tNode> > determineSubblockHead(unit<tNode> treeParent) > { > if (treeParent == nullptr) > return nullptr; > > if (treeParent->_isSubblockHead) > return treeParent; > else > return treeParent->_subblockHead; > } > > bool _isSubblockHead; > uint32_t _subblockDepth; > const unit<tNode> _subblockHead; >}; > >struct Node : > public NodeBase<Node> { > using Id = NodeBase<Node>::Id; > using Arity = GraphSpecification::Arity; > > Node(Id id, Arity arity, unit<Node> treeParent = nullptr) : > NodeBase<Node>(id, arity, treeParent) > {} >}; > >template<typename tNode, typename tId = uint32_t> >class BlockGraphBase >{ >using BlockGraph = BlockGraphBase<tNode, tId>; > >public: > using NodeType = tNode; > > struct PrintToken { > ># 179 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 179 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" > ; > > std::ostream& > print(std::ostream& o) const > { > if (_appendBlockTree) { > PrintWithBlockTree fullPrinter(_g); > return fullPrinter.print(o); > } > > for (unit<tNode> n : _g._nodes.iterate()) > o << n->token() << std::endl; > > return o << std::endl; > } > > PrintToken(const BlockGraph& g, bool appendBlockTree) : > _g(g), > _appendBlockTree(appendBlockTree) > {} > > private: > struct PrintWithBlockTree { > using SubblockSet = std::vector<unit<tNode>>; > using BlockTree = std::unordered_map<tId, owner<SubblockSet>>; > > PrintWithBlockTree(const BlockGraph& g) : > _g(g), > _rootSubblocks(owner<SubblockSet>::make()) > {} > > std::ostream& > print(std::ostream& o) > { > for (unit<tNode> n : _g._nodes.iterate()) { > o << n->token() << std::endl; > > if (n->isSubblockHead()) { > if (n->subblockHead() == nullptr) > _rootSubblocks->push_back(n); > else > addSubblockEdge(n); > } > } > > printBlockTree(o); > return o << std::endl; > } > > private: > class Frame { > using Cursor = typename SubblockSet::iterator; > > public: > Frame(loan<SubblockSet> s) : > _s(s), > _cursor(_s->begin()) > {} > > unit<tNode> > cursor() { return *_cursor; } > > void > advance() { _cursor++; } > > bool > isClosed() { return _cursor == _s->end(); } > > private: > loan<SubblockSet> _s; > Cursor _cursor; > }; > > void > printBlockTree(std::ostream& o) > { > o << _g.root()->id() << std::endl; > > uint32_t indent = 2; > std::deque<Frame> stack; > stack.push_back(Frame(_rootSubblocks)); > while (!stack.empty()) { > Frame& top = stack.back(); > if (top.isClosed()) { > indent -= 2; > stack.pop_back(); > continue; > } > > unit<tNode> cursor = top.cursor(); > o << std::string(indent, ' ') << cursor->id() << std::endl; > top.advance(); > > typename BlockTree::iterator i = _tree.find(cursor->id()); > if (i != _tree.end()) { > indent += 2; > stack.push_back(Frame(i->second)); > } > } > } > > void > addSubblockEdge(unit<tNode> n) > { > unit<tNode> head = n->subblockHead(); > typename BlockTree::iterator i = _tree.find(head->id()); > loan<SubblockSet> headSubblocks; > if (i == _tree.end()) > headSubblocks = _tree.emplace(head->id(), owner<SubblockSet>::make()).first->second; > else > headSubblocks = i->second; > > headSubblocks->push_back(n); > } > > const BlockGraph& _g; > BlockTree _tree; > owner<SubblockSet> _rootSubblocks; > }; > > const BlockGraph& _g; > bool _appendBlockTree; > }; > > BlockGraphBase() : > _nexttId(1) , > _nodes(6) > {} > > ~BlockGraphBase() { _nodes.releaseAll(); } > > unit<tNode> > root() const { return _root; } > > template<typename ... ConstructorArgs> > unit<tNode> > createRoot(ConstructorArgs&& ... args) > { > _root = _nodes.emplace(_nexttId++, std::forward<ConstructorArgs>(args) ...); > > return _root; > } > > template<typename ... ConstructorArgs> > unit<tNode> > createNode(ConstructorArgs&& ... args) > { > 0 && GeneratorLog::log()->prefix() << "~N " << _nexttId << std::endl; > > return _nodes.emplace(_nexttId++, std::forward<ConstructorArgs>(args) ...); > } > > iterable<typename FactoryMap::Vector<tNode, tId>::iterator> > iterateNodes() { return _nodes.iterate(); } > > inline PrintToken > token(bool appendBlockTree = false) { return PrintToken(*this, appendBlockTree); } > >private: > tId _nexttId; > > unit<tNode> _root; > > FactoryMap::Vector<tNode, tId> _nodes; >}; > >template<typename BlockGraphType> >class PersistenceBase >{ >using Persistence = PersistenceBase<BlockGraphType>; >using iNode = typename BlockGraphType::NodeType; >using Arity = GraphSpecification::Arity; > >public: > enum EntryTag : uint8_t { > node = 'N', > edge = 'E' > }; > > enum ArityTag : uint8_t { > unary = 'U', > binary = 'B', > nary = 'N' > }; > > PersistenceBase(loan<BlockGraphType> g) : > _g(g) > {} > > template<typename oSink> > void > operator ()(oSink& sink) > { > for (unit<iNode> n : _g->iterateNodes()) > printNode(sink, n); > } > >private: > struct SubblockHead { > unit<iNode> head; > > friend std::ostream& > operator <<(std::ostream& o, SubblockHead self) > { > if (self.head == nullptr) > return o << "-"; > else > return o << self.head->id(); > } > }; > > struct EdgeSet { > std::ostream& o; > unit<iNode> self; > > void > operator ()(unit<iNode> edgeHead) const > { > o << EntryTag::edge << " " << self->id() << " " << edgeHead->id() << std::endl; > } > }; > > inline ArityTag > tag(unit<iNode> n) > { > switch (n->arity()) > { > case Arity::unary: > return ArityTag::unary; > > case Arity::binary: > return ArityTag::binary; > > case Arity::nary: > return ArityTag::nary; > > default: > ; > } > > ># 419 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp", 419) ># 419 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" > << "unreachable" << ># 419 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" 3 > facile::RequireException::require_sentinel ># 419 "../../subprojects/edfst/src/edfst/sim/BlockGraph.hpp" > ; > } > > template<typename oSink> > void > printNode(oSink& sink, unit<iNode> n) > { > sink.nodeStream() << EntryTag::node << " " << n->id() << " " << tag(n) << std::endl; > > n->streamSuccessors(EdgeSet{ sink.edgeStream(), n }); > } > > loan<BlockGraphType> _g; >}; > >template<typename BlockGraphType> >using Persistence = PersistenceBase<BlockGraphType>; > >template<typename BlockGraphType> >class PrinterBase >{ >using Printer = PrinterBase<BlockGraphType>; >using Arity = GraphSpecification::Arity; > >public: > PrinterBase(loan<BlockGraphType> g) : > _g(g) > {} > > friend std::ostream& > operator <<(std::ostream& o, const Printer& p) > { > return o << p._g->token(true) << std::endl; > } > >private: > loan<BlockGraphType> _g; >}; > >template<typename BlockGraphType> >using Printer = PrinterBase<BlockGraphType>; > >template<typename BlockGraph, typename CycleGraph> >struct BlockGraphSetBase { > owner<BlockGraph> b; > owner<CycleGraph> c; >}; >} >} ># 10 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 2 > >namespace dual_graph >{ >namespace BlockGraph >{ >template<typename iNode> >struct VoidObserver { > void > edge(__attribute__((unused)) unit<iNode> tail, __attribute__((unused)) unit<iNode> head) {} > > void > node() {} >}; > >template<typename oNode, typename Composition, typename Chooser, typename Observer = VoidObserver<oNode>> >class BlockGraphGeneratorBase >{ >using BlockGraphGenerator = BlockGraphGeneratorBase<oNode, Composition, Chooser, Observer>; >using BlockGraph = BlockGraphBase<oNode>; > >using Id = typename oNode::Id; >using Arity = GraphSpecification::Arity; > >public: > BlockGraphGeneratorBase(owner<Composition> composition, loan<Chooser> chooser, loan<Observer> observer) : > _blockGenerator(*this), > _expansionStack(*this), > _composition(std::move(composition)), > _observer(observer), > _chooser(chooser), > _g(owner<BlockGraph>::make()) > {} > > static owner<BlockGraphGenerator> > make(owner<Composition> composition, loan<Chooser> chooser, loan<Observer> observer = nullptr) > { > return owner<BlockGraphGenerator>::make(std::move(composition), chooser, observer); > } > > owner<BlockGraph> > generate() > { > unit<oNode> root = _g->createRoot(_composition->chooseArity(_chooser)); > _expansionStack.push()->append(root); > _expansionStack.walk(); > > return std::move(_g); > } > >private: > template<typename BlockGenerator> > class ExpansionStackBase > { > using ExpansionStack = ExpansionStackBase<BlockGenerator>; > > public: > class Frame { > using PendingSubblocks = std::vector<unit<oNode>>; > using Cursor = typename PendingSubblocks::iterator; > > public: > Frame() : > _isOpen(false) > {} > > bool > isOpen() { return _isOpen; } > > bool > isClosed() { return _cursor == _pendingSubblocks.end(); } > > void > begin() > { > _isOpen = true; > _cursor = _pendingSubblocks.begin(); > } > > unit<oNode> > peek() { return *(_cursor - 1); } > > unit<oNode> > step() { return *(_cursor++); } > > void > append(unit<oNode> pendingSubblock) { _pendingSubblocks.push_back(pendingSubblock); } > > private: > bool _isOpen; > PendingSubblocks _pendingSubblocks; > Cursor _cursor; > }; > > class View > { > using Mask = std::unordered_set<uint32_t>; > using MaskPosition = typename Mask::iterator; > > public: > View(ExpansionStack& stack) : > _stack(stack) > {} > > bool > start() > { > if (size() == 0) > return false; > > _mask.clear(); > return true; > } > > bool > isClosed() { return _mask.size() >= size(); } > > uint32_t > size() { return _stack._stack.size() - 1 ; } > > unit<oNode> > at(uint32_t depth) > { > MaskPosition p = _mask.find(depth); > if (p == _mask.end()) > return _stack._stack.at(depth)->peek(); > else > return nullptr; > } > > unit<oNode> > inner() { return at(point_util::lastOfQuantity(size())); } > > unit<oNode> > nextAt(uint32_t depth) > { > ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ( ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > !isClosed() ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp", 145) << ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠Condition [" << ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > "!isClosed()" ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "] " << ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠" ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > << "Cannot choose the next block head in a closed stack view" << ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 145 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > ; > > for (uint32_t i = 0; i < size(); i++, depth--) { > MaskPosition p = _mask.find(depth); > if (p == _mask.end()) > return _stack._stack.at(depth + 1)->peek(); > > if (depth == 0) > depth = size(); > } > > ># 156 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp", 156) ># 156 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > << "unreachable" << ># 156 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 156 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > ; > } > > unit<oNode> > innermost() { return nextAt(point_util::lastOfQuantity(size())); } > > void > mask(uint32_t depth) > { > ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ( ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > _mask.find(depth) == _mask.end() ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp", 165) << ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠Condition [" << ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > "_mask.find(depth) == _mask.end()" ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "] " << ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠" ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > << "Block head at depth " << depth << " is already masked" << ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 165 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > ; > ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ( ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > depth < point_util::lastOfQuantity(_stack._stack.size()) ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp", 166) << ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠Condition [" << ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > "depth < L(_stack._stack.size())" ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "] " << ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 166 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠" > ># 167 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > << "Cannot mask block head with depth " << depth << " on a stack of size " << _stack._stack.size() << ># 167 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 167 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > ; > > _mask.emplace(depth); > } > > private: > ExpansionStack& _stack; > > Mask _mask; > } > view; > > ExpansionStackBase(BlockGraphGenerator& generator) : > view(*this), > _generator(generator), > _framePool(4) > {} > > bool > empty() { return _stack.empty(); } > > unit<Frame> > push() > { > unit<Frame> push = _framePool.makeUnit(); > _stack.push_back(push); > return push; > } > > void > walk() > { > while (true) { > unit<Frame> top = _stack.back(); > if (!top->isOpen()) { > top->begin(); > } > if (top->isClosed()) { > _stack.pop_back(); > if (_stack.empty()) > break; > > if (_generator._observer != nullptr) { > unit<oNode> node = _stack.back()->peek(); > node->streamSuccessors([&](unit<oNode> successor) { _generator._observer->edge(node, successor); }); > } > continue; > } > > unit<oNode> subblock = top->step(); > _generator._blockGenerator.begin(subblock); > _generator._blockGenerator.expand(); > > if (top == _stack.back()) > subblock->streamSuccessors([&](unit<oNode> successor) { _generator._observer->edge(subblock, successor); }); > } > } > > private: > BlockGraphGenerator& _generator; > > std::vector<unit<Frame>> _stack; > ObjectBlock<Frame> _framePool; > }; > > class BlockGenerator > { > using ExpansionStack = ExpansionStackBase<BlockGenerator>; > > public: > BlockGenerator(BlockGraphGenerator& generator) : > _generator(generator) > {} > > void > begin(unit<oNode> head) > { > _m = _generator._composition->composeSubblock(head, _generator._chooser); > > ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ( ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > _m.subblockCount <= _m.nodeCount ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp", 246) << ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠Condition [" << ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > "_m.subblockCount <= _m.nodeCount" ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "] " << ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠" ># 246 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > << "Cannot generate " << _m.subblockCount > << " subblocks on only " << _m.nodeCount << " nodes" << ># 247 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 247 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > ; > > _head = head; > > _members.clear(); > _members.push_back(head); > } > > void > expand() > { > 0 && GeneratorLog::log()->prefix() << "## expand block " << _head->id() << std::endl; > > > for (uint32_t i = 0; i < _m.nodeCount; i++) { > unit<oNode> expansionPoint = choose(); > > 0 && GeneratorLog::log()->prefix() << "# expand " << expansionPoint->id() << std::endl; > > bool expandEdge; > if (expansionPoint->isSuccessorComplete()) { > expandEdge = true; > } else if (expansionPoint->isLeaf()) { > expandEdge = false; > } else { > expandEdge = _generator._chooser->maybe(0.4); > } > > if (expandEdge) > expandAnyEdge(expansionPoint); > else > forkDetour(expansionPoint); > } > > if (_m.subblockCount > 0) { > unit<typename ExpansionStack::Frame> f = _generator._expansionStack.push(); > > for (uint32_t i = 1; i <= _m.subblockCount; i++) { > uint32_t subblockIndex = chooseIndex(i); > swap(i, subblockIndex); > > _members.at(i)->setSubblockHead(); > f->append(_members.at(i)); > } > } > for (uint32_t i = (_m.subblockCount + 1); i < _members.size(); i++) { > unit<oNode> member = _members.at(i); > > ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ( ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > !member->isSubblockHead() ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp", 295) << ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠Condition [" << ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > "!member->isSubblockHead()" ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "] " << ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > std::endl ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > << "⢠" ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > << "Cannot stream successors of a pending subblock head" << ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" 3 > facile::RequireException::require_sentinel ># 295 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > ; > > if (_generator._observer != nullptr) > member->streamSuccessors([&](unit<oNode> successor) { _generator._observer->edge(member, successor); }); > } > } > > private: > void > expandAnyEdge(unit<oNode> expansionPoint) > { > 0 && GeneratorLog::log()->prefix() << "Expand any edge of " << expansionPoint->id() << std::endl; > > unit<oNode> expansion = _generator._g->createNode(_generator._composition->chooseArity(_generator._chooser), expansionPoint); > _members.push_back(expansion); > > unit<oNode> expansionPointSuccessor; > > if (expansionPoint->arity() == Arity::unary) { > expansionPointSuccessor = expansionPoint->successor(); > expansionPoint->setContinuation(expansion); > } else if (expansionPoint->arity() == Arity::binary) { > typename oNode::BinarySuccessor side = _generator._composition->chooseSide(expansionPoint, _generator._chooser, BinarySuccessorCondition::occupied); > expansionPointSuccessor = expansionPoint->successorAt(side); > expansionPoint->setSuccessorAt(expansion, side); > } else { > uint32_t i = _generator._chooser->choose(0, point_util::lastOfQuantity(expansionPoint->edgeCount())); > expansionPointSuccessor = expansionPoint->successorAt(i); > expansionPoint->setSuccessorAt(expansion, i); > } > > > > > appendSuccessor(expansion, expansionPointSuccessor); > if (_generator._expansionStack.view.start()) { > if (expansionPointSuccessor->isSubblockHead() && (expansionPointSuccessor->subblockDepth() <= expansion->subblockDepth())) > _generator._expansionStack.view.mask(expansionPointSuccessor->subblockDepth()); > > appendLoops(expansion); > } > } > > void > expandNode(__attribute__((unused)) unit<oNode> expansionPoint) > { ># 359 "../../subprojects/edfst/src/edfst/sim/BlockGraphGenerator.hpp" > } > > void > forkDetour(unit<oNode> expansionPoint) > { > 0 && GeneratorLog::log()->prefix() << "Fork a detour from " << expansionPoint->id() << std::endl; > > unit<oNode> expansion = _generator._g->createNode(_generator._composition->chooseArity(_generator._chooser), expansionPoint); > _members.push_back(expansion); > > unit<oNode> detourDestination = nullptr; > if (_generator._expansionStack.view.start()) > detourDestination = _generator._composition->chooseLoopHead(_generator._expansionStack.view, expansion, _generator._chooser, true ); > if (detourDestination == nullptr) { > if (!expansionPoint->isLeaf()) { > if (expansionPoint->arity() == Arity::binary) { > typename oNode::BinarySuccessor side = _generator._composition->chooseSide(expansionPoint, _generator._chooser, BinarySuccessorCondition::occupied); > detourDestination = expansionPoint->successorAt(side); > } else { > uint32_t i = _generator._chooser->choose(0, point_util::lastOfQuantity(expansionPoint->edgeCount())); > detourDestination = expansionPoint->successorAt(i); > } > } > } > if (detourDestination != nullptr) { > appendSuccessor(expansion, detourDestination); > if (detourDestination->isSubblockHead() && (detourDestination->subblockDepth() <= expansion->subblockDepth())) > _generator._expansionStack.view.mask(detourDestination->subblockDepth()); > } > > appendSuccessor(expansionPoint, expansion); > appendLoops(expansion); > } > > void > appendLoops(unit<oNode> node) > { > 0 && GeneratorLog::log()->prefix() << "Append loops to " << node->id() << std::endl; > > while (!node->isSuccessorComplete() && !_generator._expansionStack.view.isClosed()) { > unit<oNode> loopHead = _generator._composition->chooseLoopHead(_generator._expansionStack.view, node, _generator._chooser, false ); > if (loopHead == nullptr) > break; > > appendSuccessor(node, loopHead); > _generator._expansionStack.view.mask(loopHead->subblockDepth()); > } > } > > void > appendSuccessor(unit<oNode> expansion, unit<oNode> successor) > { > if (expansion->arity() == Arity::unary) { > expansion->setContinuation(successor); > } else if (expansion->arity() == Arity::binary) { > typename oNode::BinarySuccessor side = _generator._composition->chooseSide(expansion, _generator._chooser, BinarySuccessorCondition::empty); > expansion->setSuccessorAt(successor, side); > } else { > expansion->addSuccessor(successor); > } > } > > void > swap(uint32_t a, uint32_t b) > { > if (a == b) > return; > > unit<oNode> swap = _members.at(a); > _members.at(a) = _members.at(b); > _members.at(b) = swap; > } > > uint32_t > chooseIndex(uint32_t first = 0) { return _generator._chooser->choose(first, point_util::lastOfQuantity(_members.size())); } > > unit<oNode> > choose() { return _members.at(chooseIndex()); } > > BlockGraphGenerator& _generator; > > unit<oNode> _head; > SubblockMetrics _m; > > std::deque<unit<oNode>> _members; > } > _blockGenerator; > > ExpansionStackBase<BlockGenerator> _expansionStack; > > owner<Composition> _composition; > loan<Observer> _observer; > loan<Chooser> _chooser; > > owner<BlockGraph> _g; >}; >} >} ># 8 "../../subprojects/edfst/test/ElasticTestMock.hpp" 2 > > >namespace elastic_test >{ >template<typename VertexType, unsigned int StartId> >struct CounterExtension { > using Extension = CounterExtension<VertexType, StartId>; > > struct PrintToken { > ># 17 "../../subprojects/edfst/test/ElasticTestMock.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 17 "../../subprojects/edfst/test/ElasticTestMock.hpp" > ; > > std::ostream& > print(std::ostream& o) const > { > o << "V" << _e->_v->id() << "[E "; > > Comma comma; > unit<Extension> e = _e; > while (e != nullptr) { > o << comma << e->_extensionId << "(" << e->_v->id() << ")"; > e = e->_previous; > } > > return o << "]"; > } > > PrintToken(unit<Extension> e) : > _e(e) > {} > > protected: > unit<Extension> _e; > }; > > > CounterExtension() : > _v(nullptr), > _extensionId(0), > _previous(nullptr) > {} > > CounterExtension(unit<VertexType> v) : > _v(v), > _extensionId(nextId()), > _previous(chain(unit<Extension>::wrap(this))) > {} > > uint32_t > extensionId() { return _extensionId; } > > inline PrintToken > token() { return PrintToken(unit<Extension>::wrap(this)); } > > static uint32_t > nextId() > { > static uint32_t idCounter = StartId; > > return idCounter++; > } > > static unit<Extension> > chain(unit<Extension> next) > { > static unit<Extension> chain = nullptr; > > unit<Extension> link = chain; > chain = next; > return link; > } > > private: > unit<VertexType> _v; > uint32_t _extensionId; > unit<Extension> _previous; >}; > >struct ExtensionFunctor { > template<typename ExtensionType> > void > operator ()(ExtensionType extension, const std::string& context = "base", uint32_t magnitude = 0) > { > facile::StreamLog::log(__PRETTY_FUNCTION__, 90, facile::StreamLogLevel::Status) << "\tFunctor " << _id << " in context " << context << " with magnitude " << magnitude > << ": Extension " << typeid(ExtensionType).hash_code() << ": " << extension->token() << std::endl; > } > > ExtensionFunctor() : > _id("generic") > {} > > ExtensionFunctor(const std::string& id) : > _id(id) > {} > > private: > std::string _id; >}; > >struct MockTreePlugins { > template<typename TreeIntegrationType, unsigned int Magnitude> > struct FooPlugin : > public plugin::ElasticTreePluginInterface<typename TreeIntegrationType::Types::TreeVertex> { > using Plugin = FooPlugin<TreeIntegrationType, Magnitude>; > using TreeVertex = typename TreeIntegrationType::Types::TreeVertex; > using VertexMode = typename TreeVertex::Mode; > > struct PrintToken { > ># 115 "../../subprojects/edfst/test/ElasticTestMock.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 115 "../../subprojects/edfst/test/ElasticTestMock.hpp" > ; > > std::ostream& > print(std::ostream& o) const > { > Comma comma; > > o << "["; > for (uint32_t i = 0; i < Magnitude; i++) > o << comma << "foo"; > return o << "]"; > } > > PrintToken(loan<Plugin> plugin) : > _plugin(plugin) > {} > > protected: > loan<Plugin> _plugin; > }; > > FooPlugin() : > _x(nullptr) > {} > > FooPlugin(loan<TreeIntegrationType> x) : > _x(x) > {} > > void > happen(std::ostream& o) { o << "Nothing happened" << std::endl; } > > void > happen(std::ostream& o, uint32_t a) > { > if ((a * Magnitude) == 12) > o << "Something happened at " << a << std::endl; > else > o << "Nothing happened " << a << " times!" << std::endl; > } ># 167 "../../subprojects/edfst/test/ElasticTestMock.hpp" > void > elasticTreeAddEventEdge() > { > facile::StreamLog::log(__PRETTY_FUNCTION__, 170, facile::StreamLogLevel::Status) << "### New edge " << _x->episode.update.event->tail->id() << " -> " << _x->episode.update.event->head->id() > << ", a " << label(_x->episode.update.event->relation) > << " edge in " << TreeVertex::label(_x->episode.update.event->mode) << " mode" << std::endl; > } > > void > elasticTreeDeltaEdge(__attribute__((unused)) unit<TreeVertex> tail, __attribute__((unused)) unit<TreeVertex> head, __attribute__((unused)) TreeRelation relation, > __attribute__((unused)) VertexMode mode, __attribute__((unused)) uint32_t crossDeterminantLowerBound) > {} > > void > elasticTreeVertexCommit(__attribute__((unused)) unit<TreeVertex> v) {} > > void > elasticTreeExpandVertex(__attribute__((unused)) unit<TreeVertex> initiator, __attribute__((unused)) unit<TreeVertex> origin, __attribute__((unused)) unit<TreeVertex> expansion) {} > > void > elasticTreeGateVertex(__attribute__((unused)) unit<TreeVertex> proxy) {} > > void > elasticTreeReposition(__attribute__((unused)) unit<TreeVertex> v) {} > > void > elasticTreeBeginUpdate() {} > > void > elasticTreeCommitRebind() {} > > void > elasticTreeInitialize() {} > > inline PrintToken > token() { return PrintToken(loan_wrap(this)); } > > private: > const loan<TreeIntegrationType> _x; > }; >}; >} ># 7 "../../subprojects/edfst/test/ElasticTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" 1 > > > > >namespace elastic_test >{ >template<typename TreeIntegrationType, typename TreeEvaluationType> >struct TreePluginEvaluationBase { > using Plugin = TreePluginEvaluationBase<TreeIntegrationType, TreeEvaluationType>; > using GraphType = typename TreeEvaluationType::Types::Graph; > using TreeVertex = typename TreeIntegrationType::Types::TreeVertex; > using TreeEdge = typename TreeIntegrationType::Types::TreeEdge; > using TreeReference = typename TreeIntegrationType::Types::TreeReference; > using OrdinalTree = typename TreeIntegrationType::Types::OrdinalTree; > using VertexMode = typename TreeVertex::Mode; > using EdgeEvent = typename TreeIntegrationType::EdgeEvent; > using IdType = typename TreeVertex::IdType; > > struct PrintToken { > ># 20 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 20 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > ; > > std::ostream& > print(std::ostream& o) const { return o << "[plugin event edge evaluator]"; } > }; > > TreePluginEvaluationBase() : > _x(nullptr) > {} > > TreePluginEvaluationBase(loan<TreeIntegrationType> x) : > _x(x) > {} ># 55 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > bool > isSubtreeMember(unit<TreeVertex> subtree, unit<TreeVertex> member) > { > (member->level() > subtree->level()) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 58 ># 58 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , member->level() > subtree->level(), "member->level() > subtree->level()") > << member->token() << " at level " << member->level() << " cannot be a member of subtree " > << subtree->token() << " at level " << subtree->level() << FacileTestInvariant::verify_sentinel; > > unit<TreeVertex> walk = member->tree(); > while (walk->level() > subtree->level()) > walk = walk->tree(); > > return (walk == subtree); > } > > bool > isSubtreeDisjoint(unit<TreeVertex> a, unit<TreeVertex> b) > { > if (a->level() == b->level()) > return (a != b); > > if (a->level() > b->level()) > return !isSubtreeMember(b, a); > else > return !isSubtreeMember(a, b); > } > > void > relationInvariant(unit<TreeVertex> tail, unit<TreeVertex> head, TreeRelation relation) > { > switch (relation) > { > case TreeRelation::tree: > (head->tree() == tail) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 87 ># 87 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , head->tree() == tail, "head->tree() == tail") << "Incorrect depth-first relation " << label(relation) << " on a plugin edge event " > << "(" << tail->token() << " -> " << head->token() << ")" << FacileTestInvariant::verify_sentinel; > break; > > case TreeRelation::forward: > (isSubtreeMember(tail, head)) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 92 ># 92 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , isSubtreeMember(tail, head), "isSubtreeMember(tail, head)") << "Incorrect depth-first relation " << label(relation) << " on a plugin edge event (" > << tail->token() << " -> " << head->token() << ")" << FacileTestInvariant::verify_sentinel; > break; > > case TreeRelation::cross: > (isSubtreeDisjoint(tail, head)) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 97 ># 97 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , isSubtreeDisjoint(tail, head), "isSubtreeDisjoint(tail, head)") << "Incorrect depth-first relation " << label(relation) << " on a plugin edge event (" > << tail->token() << " -> " << head->token() << ")" << FacileTestInvariant::verify_sentinel; > break; > > case TreeRelation::loopback: > (isSubtreeMember(head, tail)) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 102 ># 102 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , isSubtreeMember(head, tail), "isSubtreeMember(head, tail)") << "Incorrect depth-first relation " << label(relation) << " on a plugin edge event (" > << tail->token() << " -> " << head->token() << ")" << FacileTestInvariant::verify_sentinel; > break; > > default: > ># 107 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 107) ># 107 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > << "unreachable" << ># 107 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" 3 > facile::RequireException::require_sentinel ># 107 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > ; > } > } > > void > modeInvariant(unit<TreeVertex> tail, unit<TreeVertex> head, VertexMode mode) > { > (OrdinalTree::isOrdinalRelation(tail, head) == (mode == VertexMode::ordinal)) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 114 ># 114 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , OrdinalTree::isOrdinalRelation(tail, head) == (mode == VertexMode::ordinal), "OrdinalTree::isOrdinalRelation(tail, head) == (mode == VertexMode::ordinal)") > << "Incorrect mode " << TreeVertex::label(mode) << " on an edge event (" << tail->token() << " -> " << head->token() << ")" > << FacileTestInvariant::verify_sentinel; > } > > void > successorInvariant(unit<TreeVertex> tail, unit<TreeVertex> head) > { > const bool found = false; > for (const TreeEdge& e : tail->links->iterateEdges()) { > if (e.endpoint() == head) > return; > } > (found) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 127 ># 127 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , found, "found") << "Failed to find edge head " << head->token() << " among edges of tail " << tail->token() << FacileTestInvariant::verify_sentinel; > } > > void > elasticTreeAddEventEdge() > { > loan<EdgeEvent> event = _x->episode.update.event; > if (event->isReflexive()) > return; > > relationInvariant(event->tail, event->head, _x->episode.update.integration.relation); > modeInvariant(event->tail, event->head, _x->episode.update.integration.mode); > successorInvariant(event->tail, event->head); > > > > } > > void > elasticTreeDeltaEdge(unit<TreeVertex> tail, cell<TreeEdge> edge, TreeRelation relation, > VertexMode mode, __attribute__((unused)) uint32_t crossDeterminantLowerBound = 0) > { > unit<TreeVertex> head = edge->endpoint(); > > relationInvariant(tail, head, relation); > modeInvariant(tail, head, mode); > successorInvariant(tail, edge->endpoint()); > > > > } > > void > elasticTreeVertexCommit(__attribute__((unused)) unit<TreeVertex> v) > { > > > > > > } > > void > elasticTreeExpandVertex(unit<TreeVertex> initiator, unit<TreeVertex> origin, unit<TreeVertex> expansion) > { > (_x->episode.expansion.isInProgress && !_x->episode.expansion.isGate) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 172 ># 172 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , _x->episode.expansion.isInProgress && !_x->episode.expansion.isGate, "_x->episode.expansion.isInProgress && !_x->episode.expansion.isGate") > << "Cannot expand a vertex without an episode expansion in progress" << FacileTestInvariant::verify_sentinel; > (origin->links->treeEdgeCount() == 1 && origin->links->freeEdgeCount() == 0) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 174 ># 174 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , origin->links->treeEdgeCount() == 1 && origin->links->freeEdgeCount() == 0, "origin->links->treeEdgeCount() == 1 && origin->links->freeEdgeCount() == 0") > << "Expansion origin " << origin->token() << " must have only one tree edge to expansion " << expansion->token() << FacileTestInvariant::verify_sentinel; > (initiator != expansion && origin != expansion) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 176 ># 176 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , initiator != expansion && origin != expansion, "initiator != expansion && origin != expansion") > << "Expansion " << expansion->token() << " must be a unique new vertex" << FacileTestInvariant::verify_sentinel; > (!origin->links->isReflexive()) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 178 ># 178 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , !origin->links->isReflexive(), "!origin->links->isReflexive()") > << "Reflexive origin " << origin->token() << " must have its reflexive edge expanded through " << expansion->token() << FacileTestInvariant::verify_sentinel; > } > > void > incomingMutualExclusionInvariant(unit<TreeVertex> proxy, unit<TreeVertex> gated) > { > static std::set<IdType> tails; > > tails.clear(); > for (const TreeReference& r : proxy->links->concreteReferences()) > tails.emplace(r.endpoint()->id()); > for (const TreeReference& r : gated->links->concreteReferences()) { > (tails.count(r.endpoint()->id()) == 0) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 191 ># 191 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , tails.count(r.endpoint()->id()) == 0, "tails.count(r.endpoint()->id()) == 0") > << "References to gate proxy " << proxy->token() << " and gated head " << gated->token() > << " must be mutually exclusive, but tail " << r.endpoint()->token() << " occurs in both" << FacileTestInvariant::verify_sentinel; > } > } > > void > elasticTreeGateVertex(unit<TreeVertex> proxy) > { > (_x->episode.expansion.isInProgress && _x->episode.expansion.isGate) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 200 ># 200 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , _x->episode.expansion.isInProgress && _x->episode.expansion.isGate, "_x->episode.expansion.isInProgress && _x->episode.expansion.isGate") > << "Cannot gate a vertex without an episode gate in progress" << FacileTestInvariant::verify_sentinel; > (proxy->links->edgeCount() == 1) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 202 ># 202 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , proxy->links->edgeCount() == 1, "proxy->links->edgeCount() == 1") << "Gate proxy must have exactly one edge to the gated head" << FacileTestInvariant::verify_sentinel; > incomingMutualExclusionInvariant(proxy, proxy->links->edgeAt(0)->endpoint()); > } > > void > elasticTreeReposition(__attribute__((unused)) unit<TreeVertex> v) > { > (_x->episode.expansion.isInProgress) || FacileTestInvariant("../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp", 209 ># 209 "../../subprojects/edfst/test/tree/TreePluginEvaluation.hpp" > , _x->episode.expansion.isInProgress, "_x->episode.expansion.isInProgress") << "Cannot reposition vertices without an expansion in progress" << FacileTestInvariant::verify_sentinel; > } > > void > elasticTreeBeginUpdate() > { > > } > > void > elasticTreeCommitRebind() > { > > } > > template<typename EvaluationContext> > void > evaluateUpdateClose(loan<EvaluationContext> context) > { > } > > void > setTreeEvaluation(loan<TreeEvaluationType> e) > { > _e = e; > _g = _e->getGraph(); > } > > inline PrintToken > token() { return PrintToken(); } > > inline loan<typename TreeEvaluationType::Types::EmptyTest> > test() { return nullptr; } > > private: > const loan<TreeIntegrationType> _x; > loan<TreeEvaluationType> _e; > loan<GraphType> _g; >}; >} ># 8 "../../subprojects/edfst/test/ElasticTestFramework.hpp" 2 > >using namespace point_util; >using namespace facile; >using namespace facile_test; >using namespace elastic_test; ># 4 "../../test/PiiTestFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/LiveImage.hpp" 1 > > > ># 1 "/usr/include/c++/13/stdlib.h" 1 3 ># 36 "/usr/include/c++/13/stdlib.h" 3 ># 1 "/usr/include/c++/13/cstdlib" 1 3 ># 39 "/usr/include/c++/13/cstdlib" 3 > ># 40 "/usr/include/c++/13/cstdlib" 3 ># 37 "/usr/include/c++/13/stdlib.h" 2 3 > > ># 38 "/usr/include/c++/13/stdlib.h" 3 >using std::abort; >using std::atexit; >using std::exit; > > > using std::at_quick_exit; > > > using std::quick_exit; > > > using std::_Exit; > > > > >using std::div_t; >using std::ldiv_t; > >using std::abs; >using std::atof; >using std::atoi; >using std::atol; >using std::bsearch; >using std::calloc; >using std::div; >using std::free; >using std::getenv; >using std::labs; >using std::ldiv; >using std::malloc; > >using std::mblen; >using std::mbstowcs; >using std::mbtowc; > >using std::qsort; >using std::rand; >using std::realloc; >using std::srand; >using std::strtod; >using std::strtol; >using std::strtoul; >using std::system; > >using std::wcstombs; >using std::wctomb; ># 5 "../../subprojects/edfst/subprojects/facile/src/io/LiveImage.hpp" 2 ># 1 "/usr/include/fcntl.h" 1 3 4 ># 28 "/usr/include/fcntl.h" 3 4 >extern "C" { > > > > > > ># 1 "/usr/include/bits/fcntl.h" 1 3 4 ># 35 "/usr/include/bits/fcntl.h" 3 4 >struct flock > { > short int l_type; > short int l_whence; > > > > > __off64_t l_start; > __off64_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; > }; > > > ># 1 "/usr/include/bits/fcntl-linux.h" 1 3 4 ># 38 "/usr/include/bits/fcntl-linux.h" 3 4 ># 1 "/usr/include/bits/types/struct_iovec.h" 1 3 4 ># 23 "/usr/include/bits/types/struct_iovec.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 24 "/usr/include/bits/types/struct_iovec.h" 2 3 4 > > >struct iovec > { > void *iov_base; > size_t iov_len; > }; ># 39 "/usr/include/bits/fcntl-linux.h" 2 3 4 ># 265 "/usr/include/bits/fcntl-linux.h" 3 4 >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; > }; ># 354 "/usr/include/bits/fcntl-linux.h" 3 4 ># 1 "/usr/include/linux/falloc.h" 1 3 4 ># 355 "/usr/include/bits/fcntl-linux.h" 2 3 4 > > > >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); > > > > > >extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, > __off64_t *__offout, size_t __len, > unsigned int __flags); > > > > > >extern __ssize_t tee (int __fdin, int __fdout, size_t __len, > unsigned int __flags); ># 417 "/usr/include/bits/fcntl-linux.h" 3 4 >extern int fallocate (int __fd, int __mode, __off64_t __offset, __off64_t __len) __asm__ ("" "fallocate64") > > ; > > > > > >extern int fallocate64 (int __fd, int __mode, __off64_t __offset, > __off64_t __len); > > > > >extern int name_to_handle_at (int __dfd, const char *__name, > struct file_handle *__handle, int *__mnt_id, > int __flags) noexcept (true); > > > > > >extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, > int __flags); > > > >} ># 62 "/usr/include/bits/fcntl.h" 2 3 4 ># 36 "/usr/include/fcntl.h" 2 3 4 ># 78 "/usr/include/fcntl.h" 3 4 ># 1 "/usr/include/bits/stat.h" 1 3 4 ># 25 "/usr/include/bits/stat.h" 3 4 ># 1 "/usr/include/bits/struct_stat.h" 1 3 4 ># 26 "/usr/include/bits/struct_stat.h" 3 4 >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; ># 74 "/usr/include/bits/struct_stat.h" 3 4 > struct timespec st_atim; > struct timespec st_mtim; > struct timespec st_ctim; ># 89 "/usr/include/bits/struct_stat.h" 3 4 > __syscall_slong_t __glibc_reserved[3]; ># 99 "/usr/include/bits/struct_stat.h" 3 4 > }; > > > >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; ># 151 "/usr/include/bits/struct_stat.h" 3 4 > __syscall_slong_t __glibc_reserved[3]; > > > > > }; ># 26 "/usr/include/bits/stat.h" 2 3 4 ># 79 "/usr/include/fcntl.h" 2 3 4 ># 180 "/usr/include/fcntl.h" 3 4 >extern int fcntl (int __fd, int __cmd, ...) __asm__ ("" "fcntl64"); > > > > > >extern int fcntl64 (int __fd, int __cmd, ...); ># 212 "/usr/include/fcntl.h" 3 4 >extern int open (const char *__file, int __oflag, ...) __asm__ ("" "open64") > __attribute__ ((__nonnull__ (1))); > > > > > >extern int open64 (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); ># 237 "/usr/include/fcntl.h" 3 4 >extern int openat (int __fd, const char *__file, int __oflag, ...) __asm__ ("" "openat64") > __attribute__ ((__nonnull__ (2))); > > > > > >extern int openat64 (int __fd, const char *__file, int __oflag, ...) > __attribute__ ((__nonnull__ (2))); ># 258 "/usr/include/fcntl.h" 3 4 >extern int creat (const char *__file, mode_t __mode) __asm__ ("" "creat64") > __attribute__ ((__nonnull__ (1))); > > > > > >extern int creat64 (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1))); ># 305 "/usr/include/fcntl.h" 3 4 >extern int posix_fadvise (int __fd, __off64_t __offset, __off64_t __len, int __advise) noexcept (true) __asm__ ("" "posix_fadvise64") > > ; > > > > > >extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len, > int __advise) noexcept (true); ># 326 "/usr/include/fcntl.h" 3 4 >extern int posix_fallocate (int __fd, __off64_t __offset, __off64_t __len) __asm__ ("" "posix_fallocate64") > > ; > > > > > >extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len); ># 345 "/usr/include/fcntl.h" 3 4 >} ># 6 "../../subprojects/edfst/subprojects/facile/src/io/LiveImage.hpp" 2 ># 1 "/usr/include/sys/stat.h" 1 3 4 ># 99 "/usr/include/sys/stat.h" 3 4 >extern "C" { > ># 1 "/usr/include/bits/stat.h" 1 3 4 ># 102 "/usr/include/sys/stat.h" 2 3 4 ># 227 "/usr/include/sys/stat.h" 3 4 >extern int stat (const char *__restrict __file, struct stat *__restrict __buf) noexcept (true) __asm__ ("" "stat64") > > __attribute__ ((__nonnull__ (1, 2))); >extern int fstat (int __fd, struct stat *__buf) noexcept (true) __asm__ ("" "fstat64") > __attribute__ ((__nonnull__ (2))); ># 240 "/usr/include/sys/stat.h" 3 4 >extern int stat64 (const char *__restrict __file, > struct stat64 *__restrict __buf) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); >extern int fstat64 (int __fd, struct stat64 *__buf) noexcept (true) __attribute__ ((__nonnull__ (2))); ># 279 "/usr/include/sys/stat.h" 3 4 >extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) noexcept (true) __asm__ ("" "fstatat64") > > > __attribute__ ((__nonnull__ (2, 3))); ># 291 "/usr/include/sys/stat.h" 3 4 >extern int fstatat64 (int __fd, const char *__restrict __file, > struct stat64 *__restrict __buf, int __flag) > noexcept (true) __attribute__ ((__nonnull__ (2, 3))); ># 327 "/usr/include/sys/stat.h" 3 4 >extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) noexcept (true) __asm__ ("" "lstat64") > > > __attribute__ ((__nonnull__ (1, 2))); > > > > > > > >extern int lstat64 (const char *__restrict __file, > struct stat64 *__restrict __buf) > noexcept (true) __attribute__ ((__nonnull__ (1, 2))); ># 352 "/usr/include/sys/stat.h" 3 4 >extern int chmod (const char *__file, __mode_t __mode) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern int lchmod (const char *__file, __mode_t __mode) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > >extern int fchmod (int __fd, __mode_t __mode) noexcept (true); > > > > > >extern int fchmodat (int __fd, const char *__file, __mode_t __mode, > int __flag) > noexcept (true) __attribute__ ((__nonnull__ (2))) ; > > > > > > >extern __mode_t umask (__mode_t __mask) noexcept (true); > > > > >extern __mode_t getumask (void) noexcept (true); > > > >extern int mkdir (const char *__path, __mode_t __mode) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern int mkdirat (int __fd, const char *__path, __mode_t __mode) > noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > > > >extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern int mknodat (int __fd, const char *__path, __mode_t __mode, > __dev_t __dev) noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > > >extern int mkfifo (const char *__path, __mode_t __mode) > noexcept (true) __attribute__ ((__nonnull__ (1))); > > > > > >extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) > noexcept (true) __attribute__ ((__nonnull__ (2))); > > > > > > >extern int utimensat (int __fd, const char *__path, > const struct timespec __times[2], > int __flags) > noexcept (true) __attribute__ ((__nonnull__ (2))); ># 452 "/usr/include/sys/stat.h" 3 4 >extern int futimens (int __fd, const struct timespec __times[2]) noexcept (true); ># 465 "/usr/include/sys/stat.h" 3 4 ># 1 "/usr/include/bits/statx.h" 1 3 4 ># 31 "/usr/include/bits/statx.h" 3 4 ># 1 "/usr/include/linux/stat.h" 1 3 4 > > > > ># 1 "/usr/include/linux/types.h" 1 3 4 > > > > ># 1 "/usr/include/asm/types.h" 1 3 4 ># 1 "/usr/include/asm-generic/types.h" 1 3 4 > > > > > > ># 1 "/usr/include/asm-generic/int-ll64.h" 1 3 4 ># 12 "/usr/include/asm-generic/int-ll64.h" 3 4 ># 1 "/usr/include/asm/bitsperlong.h" 1 3 4 ># 11 "/usr/include/asm/bitsperlong.h" 3 4 ># 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4 ># 12 "/usr/include/asm/bitsperlong.h" 2 3 4 ># 13 "/usr/include/asm-generic/int-ll64.h" 2 3 4 > > > > > > > >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; ># 8 "/usr/include/asm-generic/types.h" 2 3 4 ># 2 "/usr/include/asm/types.h" 2 3 4 ># 6 "/usr/include/linux/types.h" 2 3 4 > > > ># 1 "/usr/include/linux/posix_types.h" 1 3 4 > > > > ># 1 "/usr/include/linux/stddef.h" 1 3 4 ># 6 "/usr/include/linux/posix_types.h" 2 3 4 ># 25 "/usr/include/linux/posix_types.h" 3 4 >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; > ># 1 "/usr/include/asm/posix_types.h" 1 3 4 > > > > > > ># 1 "/usr/include/asm/posix_types_64.h" 1 3 4 ># 11 "/usr/include/asm/posix_types_64.h" 3 4 >typedef unsigned short __kernel_old_uid_t; >typedef unsigned short __kernel_old_gid_t; > > >typedef unsigned long __kernel_old_dev_t; > > ># 1 "/usr/include/asm-generic/posix_types.h" 1 3 4 ># 15 "/usr/include/asm-generic/posix_types.h" 3 4 >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; ># 72 "/usr/include/asm-generic/posix_types.h" 3 4 >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; ># 19 "/usr/include/asm/posix_types_64.h" 2 3 4 ># 8 "/usr/include/asm/posix_types.h" 2 3 4 ># 37 "/usr/include/linux/posix_types.h" 2 3 4 ># 10 "/usr/include/linux/types.h" 2 3 4 ># 27 "/usr/include/linux/types.h" 3 4 >typedef __u16 __le16; >typedef __u16 __be16; >typedef __u32 __le32; >typedef __u32 __be32; >typedef __u64 __le64; >typedef __u64 __be64; > >typedef __u16 __sum16; >typedef __u32 __wsum; ># 50 "/usr/include/linux/types.h" 3 4 >typedef unsigned __poll_t; ># 6 "/usr/include/linux/stat.h" 2 3 4 ># 56 "/usr/include/linux/stat.h" 3 4 >struct statx_timestamp { > __s64 tv_sec; > __u32 tv_nsec; > __s32 __reserved; >}; ># 99 "/usr/include/linux/stat.h" 3 4 >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]; > >}; ># 32 "/usr/include/bits/statx.h" 2 3 4 > > > > > > > ># 1 "/usr/include/bits/statx-generic.h" 1 3 4 ># 25 "/usr/include/bits/statx-generic.h" 3 4 ># 1 "/usr/include/bits/types/struct_statx_timestamp.h" 1 3 4 ># 26 "/usr/include/bits/statx-generic.h" 2 3 4 ># 1 "/usr/include/bits/types/struct_statx.h" 1 3 4 ># 27 "/usr/include/bits/statx-generic.h" 2 3 4 ># 58 "/usr/include/bits/statx-generic.h" 3 4 >extern "C" { > > >int statx (int __dirfd, const char *__restrict __path, int __flags, > unsigned int __mask, struct statx *__restrict __buf) > noexcept (true) __attribute__ ((__nonnull__ (2, 5))); > >} ># 40 "/usr/include/bits/statx.h" 2 3 4 ># 466 "/usr/include/sys/stat.h" 2 3 4 > > >} ># 7 "../../subprojects/edfst/subprojects/facile/src/io/LiveImage.hpp" 2 ># 1 "/usr/include/sys/mman.h" 1 3 4 ># 25 "/usr/include/sys/mman.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/stddef.h" 1 3 4 ># 26 "/usr/include/sys/mman.h" 2 3 4 ># 41 "/usr/include/sys/mman.h" 3 4 ># 1 "/usr/include/bits/mman.h" 1 3 4 ># 29 "/usr/include/bits/mman.h" 3 4 ># 1 "/usr/include/bits/mman-map-flags-generic.h" 1 3 4 ># 30 "/usr/include/bits/mman.h" 2 3 4 > > ># 1 "/usr/include/bits/mman-linux.h" 1 3 4 ># 116 "/usr/include/bits/mman-linux.h" 3 4 ># 1 "/usr/include/bits/mman-shared.h" 1 3 4 ># 47 "/usr/include/bits/mman-shared.h" 3 4 >extern "C" { > > > >int memfd_create (const char *__name, unsigned int __flags) noexcept (true); > > > >int mlock2 (const void *__addr, size_t __length, unsigned int __flags) noexcept (true); > > > > > >int pkey_alloc (unsigned int __flags, unsigned int __access_rights) noexcept (true); > > > >int pkey_set (int __key, unsigned int __access_rights) noexcept (true); > > > >int pkey_get (int __key) noexcept (true); > > > >int pkey_free (int __key) noexcept (true); > > > >int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) noexcept (true); > >} ># 117 "/usr/include/bits/mman-linux.h" 2 3 4 ># 33 "/usr/include/bits/mman.h" 2 3 4 ># 42 "/usr/include/sys/mman.h" 2 3 4 > > > > >extern "C" { ># 61 "/usr/include/sys/mman.h" 3 4 >extern void * mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset) noexcept (true) __asm__ ("" "mmap64") > > > ; > > > > > >extern void *mmap64 (void *__addr, size_t __len, int __prot, > int __flags, int __fd, __off64_t __offset) noexcept (true); > > > > >extern int munmap (void *__addr, size_t __len) noexcept (true); > > > > >extern int mprotect (void *__addr, size_t __len, int __prot) noexcept (true); > > > > > > > >extern int msync (void *__addr, size_t __len, int __flags); > > > > >extern int madvise (void *__addr, size_t __len, int __advice) noexcept (true); > > > >extern int posix_madvise (void *__addr, size_t __len, int __advice) noexcept (true); > > > > >extern int mlock (const void *__addr, size_t __len) noexcept (true); > > >extern int munlock (const void *__addr, size_t __len) noexcept (true); > > > > >extern int mlockall (int __flags) noexcept (true); > > > >extern int munlockall (void) noexcept (true); > > > > > > > >extern int mincore (void *__start, size_t __len, unsigned char *__vec) > noexcept (true); ># 133 "/usr/include/sys/mman.h" 3 4 >extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, > int __flags, ...) noexcept (true); > > > >extern int remap_file_pages (void *__start, size_t __size, int __prot, > size_t __pgoff, int __flags) noexcept (true); > > > > >extern int shm_open (const char *__name, int __oflag, mode_t __mode); > > >extern int shm_unlink (const char *__name); > > ># 1 "/usr/include/bits/mman_ext.h" 1 3 4 ># 24 "/usr/include/bits/mman_ext.h" 3 4 >struct iovec; >extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov, > size_t __count, int __advice, > unsigned __flags) > noexcept (true); > >extern int process_mrelease (int pidfd, unsigned int flags) noexcept (true); ># 151 "/usr/include/sys/mman.h" 2 3 4 > >} ># 8 "../../subprojects/edfst/subprojects/facile/src/io/LiveImage.hpp" 2 > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/ModuleImage.hpp" 1 > > > > > ># 5 "../../subprojects/edfst/subprojects/facile/src/io/ModuleImage.hpp" >namespace facile >{ >class ModuleImage >{ >public: > ModuleImage(const std::string& path) : > _path(path) > {} > > virtual ~ModuleImage() {} > > std::string > path() const { return _path; } > > virtual loc_t > base() const = 0; > > virtual loc_t > sentinel() const = 0; > > virtual size_t > size() const = 0; > > virtual void > release() = 0; > >protected: > std::string _path; >}; >} ># 10 "../../subprojects/edfst/subprojects/facile/src/io/LiveImage.hpp" 2 > >namespace facile >{ >class LiveImage : > public ModuleImage >{ >struct bind_tag {}; > >public: > static owner<LiveImage> > bind(const std::string& path, loc_t base, size_t size) > { > return owner<LiveImage>::make(hidden_tag<bind_tag>(), path, base, size); > } > > LiveImage(__attribute__((unused)) bind_tag *tag, const std::string& path, loc_t base, size_t size) : > ModuleImage(path), > _base(base), > _size(size) > {} > > loc_t > base() const override { return _base; } > > loc_t > sentinel() const override { return _base + _size; } > > size_t > size() const override { return _size; } > > void > release() override {} > >private: > const loc_t _base; > const size_t _size; >}; >} ># 5 "../../test/PiiTestFramework.hpp" 2 > ># 1 "../../src/PiiFramework.hpp" 1 > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 1 > > > ># 1 "/usr/include/c++/13/stdlib.h" 1 3 ># 5 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 2 > > > > > > >namespace facile >{ >class FileMap : > public ModuleImage >{ >struct allocate_tag {}; > >public: > static owner<FileMap> > allocate(const std::string& path) > { > int fileHandle = open(path.c_str(), ># 22 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 4 > 00 ># 22 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > ); > > ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ( ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > fileHandle != -1 ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp", 24) << ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠Condition [" << ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > "fileHandle != -1" ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "] " << ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠" ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > << "Failed to open the requested mmap file '" << path << "'" << ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > facile::RequireException::require_sentinel ># 24 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > ; > > struct stat fileStatistics; > ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ( ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > fstat(fileHandle, &fileStatistics) != -1 ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp", 27) << ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠Condition [" << ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > "fstat(fileHandle, &fileStatistics) != -1" ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "] " << ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 27 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠" > ># 28 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > << "Failed to determine the length of the requested mmap file '" << path << "'" << ># 28 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > facile::RequireException::require_sentinel ># 28 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > ; > > size_t fileSize = fileStatistics.st_size; > > loc_t mmapLoc = mmap( ># 32 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 4 > __null ># 32 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > , fileSize, ># 32 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 4 > 0x1 ># 32 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > , ># 32 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 4 > 0x02 ># 32 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > , fileHandle, 0); > ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ( ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > mmapLoc != nullptr ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp", 33) << ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠Condition [" << ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > "mmapLoc != nullptr" ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "] " << ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠" ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > << "Failed to mmap the request for file '" << path << "'" << ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > facile::RequireException::require_sentinel ># 33 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > ; > > ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ( ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > close(fileHandle) != -1 ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp", 35) << ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠Condition [" << ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > "close(fileHandle) != -1" ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "] " << ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠" ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > << "Warning: failed to close the mmap file handle." << ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > facile::RequireException::require_sentinel ># 35 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > ; > > return owner<FileMap>::make(hidden_tag<allocate_tag>(), path, fileSize, mmapLoc); > } > > FileMap(__attribute__((unused)) allocate_tag *tag, const std::string& path, loc_t base, size_t size) : > ModuleImage(path), > _base(base), > _size(size) > {} > > loc_t > base() const override { return _base; } > > loc_t > sentinel() const override { return _base + _size; } > > size_t > size() const override { return _size; } > > void > release() override { unmap(); } > > void > unmap() > { > ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ( ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > munmap(_base, _size) != -1 ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp", 61) << ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠Condition [" << ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > "munmap(_base, _size) != -1" ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "] " << ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > std::endl ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > << "⢠" ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > << "Warning: failed to unmap the contents of file '" << _path << "'" << ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" 3 > facile::RequireException::require_sentinel ># 61 "../../subprojects/edfst/subprojects/facile/src/io/FileMap.hpp" > ; > } > >private: > const loc_t _base; > const size_t _size; >}; >} ># 5 "../../src/PiiFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 1 > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/index/Numerize.hpp" 1 > > >namespace point_util >{ >template<typename E> >class Numerize >{ >using N = Numerize<E>; >using Index = typename std::underlying_type<E>::type; > >public: > constexpr Numerize(E e) : > _e(e) > {} > > constexpr Numerize(Index i) : > _e(static_cast<E>(i)) > {} > > operator E() const { return _e; } > > N > operator +(Index amount) { return Numerize(static_cast<E>(static_cast<Index>(_e) + amount)); } > > N& > operator ++() { return step(), *this; } > > N > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > N original(_e); > return step(), original; > } > > N > operator -(Index amount) { return Numerize(static_cast<E>(static_cast<Index>(_e) - amount)); } > > N& > operator --() { return step(true), *this; } > > N > operator --(__attribute__((unused)) int postfixDisambiguator) > { > N original(_e); > return step(true), original; > } > > bool > operator ==(N n) const { return _e == n._e; } > > bool > operator ==(E e) const { return _e == e; } > > bool > operator ==(Index i) const { return index() == i; } > > bool > operator !=(N n) const { return _e != n._e; } > > bool > operator !=(E e) const { return _e != e; } > > bool > operator !=(Index i) const { return index() != i; } > > bool > operator <(N n) const { return index() < n.index(); } > > bool > operator <(E e) const { return index() < index(e); } > > bool > operator <(Index i) const { return index() < i; } > > bool > operator <=(N n) const { return index() <= n.index(); } > > bool > operator <=(E e) const { return index() <= index(e); } > > bool > operator <=(Index i) const { return index() <= i; } > > bool > operator >(N n) const { return index() > n.index(); } > > bool > operator >(E e) const { return index() > index(e); } > > bool > operator >(Index i) const { return index() > i; } > > bool > operator >=(N n) const { return index() >= n.index(); } > > bool > operator >=(E e) const { return index() >= index(e); } > > bool > operator >=(Index i) const { return index() >= i; } > > inline Index > index() const { return static_cast<Index>(_e); } > >private: > inline void > step(bool down = false) { _e = enumerize(index() + (down ? -1 : 1)); } > > inline static Index > index(E e) { return static_cast<Index>(e); } > > inline static E > enumerize(Index i) { return static_cast<E>(i); } > > E _e; >}; >} ># 4 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 2 > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" 1 > > > > >namespace facile >{ >template<typename T, typename Yank> >class Leash >{ >public: > Leash(Yank yank) : > _t(nullptr), > _yank(yank) > {} > > Leash(owner<T> t, Yank yank) : > _t(std::move(t)), > _yank(yank) > {} > > ~Leash() > { > if (_t != nullptr) > _yank(std::move(_t)); > } > > loan<T> > t() const { return _t; } > > owner<T> > release() > { > ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" 3 > ( ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" > _t != nullptr ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp", 33) << ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" > std::endl ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" 3 > << "⢠Condition [" << ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" > "_t != nullptr" ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" 3 > << "] " << ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" > std::endl ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" 3 > << "⢠" ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" > << "Cannot release a leash from nothing" << ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" 3 > facile::RequireException::require_sentinel ># 33 "../../subprojects/edfst/subprojects/facile/src/scope/Leash.hpp" > ; > > return std::move(_t); > } > >private: > owner<T> _t; > Yank _yank; >}; >} ># 8 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 2 > >using namespace point_util; > >namespace facile >{ >template<typename Specification> >class SplitListBase >{ >using SplitList = SplitListBase<Specification>; >using T = typename Specification::T; >using Id = typename Specification::Id; >using Split = typename Specification::Split; >using S = Numerize<Split>; >using Locator = typename Specification::Locator; >using Position = typename Specification::Position; > >static constexpr bool isIdentity = std::is_same<T, Id>::value; >static constexpr uint32_t dimension = Specification::dimension; >static constexpr S alpha = S(0); >static constexpr S omega = S(dimension - 1); > >using Index = EnumerationIndexArray<Position, Split, dimension>; > >public: > using List = std::vector<T>; > using Reader = typename List::const_iterator; > using Writer = typename List::iterator; > > class Builder > { > using IdList = std::vector<Id>; > > public: > using IdIterator = typename IdList::iterator; > > iterable<IdIterator> > at(Split s) { return _lists.at(s); } > > void > append(Split s, Id id) { _lists.at(s).push_back(id); } > > void > clear() > { > for (IdList& list : _lists) > list.clear(); > } > > private: > using Lists = EnumerationIndexArray<IdList, Split, dimension>; > > Lists _lists; > }; > > struct Yank { > void > operator ()(owner<Builder> abandoned) { SplitList::abandon(std::move(abandoned)); } > }; > > using Tether = Leash<Builder, Yank>; > > struct IndexToken { > const SplitList& list; > > inline Position > sentinel(S s) const { return list.sentinel(s); } > > friend std::ostream& > operator <<(std::ostream& o, const IndexToken& t) > { > o << "["; > Comma comma; > for (Split s : enumerable<Split>::walk(S(0), S(point_util::lastOfQuantity(Specification::dimension)))) > o << comma << t.sentinel(s); > return o << "]"; > } > }; > > template<typename Factory> > SplitList& > build(owner<Builder> builder, Factory f = Factory(), uint32_t size = 1) > { > _list.reserve(size); > for (Split w : enumerable<Split>::walk(dimension)) { > > > > for (Id id : builder->at(w)) { > T t = f(id, w, _list.size()); > > _list.push_back(t); > } > > > > _index.at(w) = _list.size(); > } > return check(std::move(builder)), *this; > } > > bool > empty() const { return _list.empty(); } > > size_t > size() const { return _list.size(); } > > size_t > size(Split s) const { return sentinel(s) - initial(s); } > > iterable<Reader> > iterate() const { return _list; } > > iterable<Reader> > iterate(S first, S last) const { return iterable<Reader>(start(first), end(last)); } > > iterable<Writer> > iterate() { return _list; } > > iterable<Writer> > iterate(S first, S last) { return iterable<Writer>(start(first), end(last)); } > > iterable<Reader> > iterate(Split s) const { return iterable<Reader>(start(s), end(s)); } > > Reader > start(S s) const { return _list.cbegin() + initial(s); } > > Reader > end(S s) const { return _list.cbegin() + sentinel(s); } > > Writer > start(S s) { return _list.begin() + initial(s); } > > Writer > end(S s) { return _list.begin() + sentinel(s); } > > cell<T> > first(S s = alpha) { return cell_wrap(_list, initial(s)); } > > cell<T> > last(S s = omega) { return cell_wrap(_list, terminal(s)); } > > cell<const T> > first(S s = alpha) const { return cell_wrap(_list, initial(s)); } > > cell<const T> > last(S s = omega) const { return cell_wrap(_list, terminal(s)); } > > inline S > locate(cell<T> c) const > { > uint32_t position = (c - cell_wrap(_list)); > S s = alpha; > for ( ; s < omega; s++) { > if (position < _index.at(s)) > return s; > } > return s; > } > > void > append(T t, S s = omega) > { > Position p = _list.size(); > _list.push_back(t); > _index.at(omega)++; > > if (s != omega) > p = rotate(t, cell_wrap(&_list.back()), omega, s); > Locator::set(t, p); > } > > void > rotate(T t, S s) > { > if constexpr (dimension == 1) > return; > > cell<T> c = cell_wrap(_list, Locator::get(t)); > S from = locate(c); > if (from == s) > return; > > Position p = rotate(t, c, from, s); > Locator::set(t, p); > } > > static Tether > builder() { return check(); } > > template<typename Factory> > static SplitList > make(owner<Builder> builder, Factory f = Factory(), uint32_t size = 1) > { > SplitList list; > return list.build(std::move(builder), f, size); > } > > static void > abandon(Tether& t) { check(t.releasee()); } > > static void > abandon(owner<Builder> abandoned) { check(std::move(abandoned)); } > > IndexToken > indexToken() const { return IndexToken{ *this }; } > > > T > raw(Position p) const { return _list.at(p); } > > >private: > static Tether > check(owner<Builder> checkin = nullptr) > { > static owner<Builder> builder = owner<Builder>::make(); > > if (checkin == nullptr) { > ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 3 > ( ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" > builder != nullptr ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp", 227) << ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" > std::endl ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 3 > << "⢠Condition [" << ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" > "builder != nullptr" ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 3 > << "] " << ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" > std::endl ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 3 > << "⢠" ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" > << "Cannot multiplex the singleton builder" << ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" 3 > facile::RequireException::require_sentinel ># 227 "../../subprojects/edfst/subprojects/facile/src/relation/SplitList.hpp" > ; > > return Tether(std::move(builder), Yank()); > } else { > checkin->clear(); > builder = std::move(checkin); > > return Tether(Yank()); > } > } > > Position > rotate(T t, cell<T> c, S from, S to) > { > if (from < to) { > for (S swap = from; swap < to; swap++) { > cell<T> right = last(swap); > if (right != c) { > T r = right.read(); > c.write(r); > Locator::set(r, c.indexIn(_list)); > > c = right; > c.write(t); > } > _index.at(swap)--; > } > } else { > for (S swap = from; swap > to; swap--) { > cell<T> left = first(swap); > if (left != c) { > T l = left.read(); > c.write(l); > Locator::set(l, c.indexIn(_list)); > > c = left; > c.write(t); > } > _index.at(swap - 1)++; > } > > } > return c.indexIn(_list); > } > > inline Position > initial(S s) const { return (s == 0 ? 0 : _index.at(s - 1)); } > > inline Position > terminal(S s) const { return _index.at(s) - 1; } > > inline Position > sentinel(S s) const { return _index.at(s); } > > List _list; > Index _index; >}; >} ># 6 "../../src/PiiFramework.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/StreamStamp.hpp" 1 > > >namespace facile >{ >struct StreamStamp { > template<typename Endpoint> > class Edge { > public: > Edge(unit<Endpoint> tail, unit<Endpoint> head) : > _tail(tail), > _head(head) > {} > > friend std::ostream& > operator <<(std::ostream& o, const Edge& t) > { > return o << "(" << t._tail->token() << " -> " << t._head->token() << ")"; > } > > private: > unit<Endpoint> _tail; > unit<Endpoint> _head; > }; > > template<typename Endpoint> > class Reference { > public: > Reference(unit<Endpoint> head, unit<Endpoint> tail) : > _head(head), > _tail(tail) > {} > > friend std::ostream& > operator <<(std::ostream& o, const Reference& t) > { > return o << "(" << t._head->token() << " <- " << t._tail->token() << ")"; > } > > private: > unit<Endpoint> _head; > unit<Endpoint> _tail; > }; >}; >} ># 7 "../../src/PiiFramework.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/IncrementalTree.hpp" 1 > > > > > ># 1 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 1 > > > > ># 1 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 1 > > > > > > >namespace edfst >{ >namespace profile >{ > > >template<typename TreeComposition> >class Frame : > TreeComposition::LinkSet::Profile::Monitor >{ >using LinkProfile = typename TreeComposition::LinkSet::Profile::Monitor; >using TreeVertex = typename TreeComposition::Vertex; >using OrdinalTree = typename TreeComposition::OrdinalTree; > >public: > struct Token { > Frame& f; > uint32_t index; > > friend std::ostream& > operator <<(std::ostream& o, const Token& t) { return o << t.index << ": " << t.f.v()->token(); } > }; > > Frame(unit<TreeVertex> v) : > _v(v), > _subtree(v->mode() == TreeVertex::Mode::clock ? nullptr : v->ordinalTree() ), > _level(v->level()) > {} > > unit<TreeVertex> > v() { return _v; } > > void > commit(profile::TreeProfile& treeProfile) > { > if (_v->mode() == TreeVertex::Mode::revert) > facile::StreamLog::log(__PRETTY_FUNCTION__, 43, facile::StreamLogLevel::Status) << " --- Committing profile of " << _v->token() << std::endl; > > unit<OrdinalTree> subtree = (_v->mode() == TreeVertex::Mode::clock ? nullptr : _v->ordinalTree() ); > bool isTreeLeaf = (_v->links->treeEdgeCount() == 0); > > treeProfile.d.contour -= _level; > treeProfile.d.contour += _v->level(); > > if (isTreeLeaf) { > if (!_v->links->profile.isTreeLeaf()) > treeProfile.d.leaf++; > } else if (_v->links->profile.isTreeLeaf()) { > treeProfile.d.leaf--; > } > > if (subtree == nullptr) { > treeProfile.clock.d.contour += _v->level(); > if (_subtree == nullptr) { > treeProfile.clock.d.contour -= _level; > > if (isTreeLeaf) { > if (!_v->links->profile.isTreeLeaf()) > treeProfile.clock.d.leaf++; > } else if (_v->links->profile.isTreeLeaf()) { > treeProfile.clock.d.leaf--; > } > } else { > if (_v != _subtree->root()) { > _subtree->profile().d.contour -= _v->ordinalTreeLevelAtCommit(); > treeProfile.ordinal.d.contour -= _v->ordinalTreeLevelAtCommit(); > } > > if (_v->links->profile.isTreeLeaf()) { > _subtree->profile().d.leaf--; > treeProfile.ordinal.d.leaf--; > } > if (isTreeLeaf) > treeProfile.clock.d.leaf++; > } > } else { > if (_subtree == nullptr) { > subtree->profile().d.contour += _v->ordinalTreeLevel(); > treeProfile.ordinal.d.contour += _v->ordinalTreeLevel(); > treeProfile.clock.d.contour -= _level; > > if (_v->links->profile.isTreeLeaf()) > treeProfile.clock.d.leaf--; > if (isTreeLeaf) { > subtree->profile().d.leaf++; > treeProfile.ordinal.d.leaf++; > } > } else { > int64_t levelDelta = Arithmetic::difference(_v->ordinalTreeLevel(), _v->ordinalTreeLevelAtCommit()); > > treeProfile.ordinal.d.contour += levelDelta; > > if (subtree == _subtree) { > subtree->profile().d.contour += levelDelta; > > if (_v->links->profile.isTreeLeaf()) { > if (!isTreeLeaf) { > subtree->profile().d.leaf--; > treeProfile.ordinal.d.leaf--; > } > } else if (isTreeLeaf) { > subtree->profile().d.leaf++; > treeProfile.ordinal.d.leaf++; > } > } else { > subtree->profile().d.contour += _v->ordinalTreeLevel(); > _subtree->profile().d.contour -= _v->ordinalTreeLevelAtCommit(); > > if (_v->links->profile.isTreeLeaf()) { > _subtree->profile().d.leaf--; > if (!isTreeLeaf) > treeProfile.ordinal.d.leaf--; > } > if (isTreeLeaf) > subtree->profile().d.leaf++; > } > } > > _v->commitProfile(); > } > > _v->links->profile.setTreeLeaf(LinkProfile::tag(), isTreeLeaf); > } > > Token > token(uint32_t index) { return Token{ *this, index }; } > >private: > unit<TreeVertex> _v; > unit<OrdinalTree> _subtree; > uint32_t _level; >}; > >template<typename TreeComposition> >class Monitor : > public std::vector<Frame<TreeComposition>>, > TreeComposition::LinkSet::Profile::Monitor >{ >using super = typename std::vector<Frame<TreeComposition>>; >using LinkProfile = typename TreeComposition::LinkSet::Profile::Monitor; >using TreeVertex = typename TreeComposition::Vertex; >using OrdinalTree = typename TreeComposition::OrdinalTree; > >public: > using OrdinalTreeSet = std::unordered_map<Id32, unit<OrdinalTree>>; > using OrdinalTreeSetEntry = std::pair<Id32, unit<OrdinalTree>>; > using OrdinalTreeSetIterable = iterable<typename OrdinalTreeSet::iterator>; > > struct Token { > Monitor& m; > > friend std::ostream& > operator <<(std::ostream& o, const Token& t) > { > o << "Profile monitor with " << t.m.size() << " frames:" << std::endl; > for (uint32_t i = 0; i < t.m.size(); i++) > o << "\t" << t.m.at(i).token(i) << std::endl; > > return o; > } > }; > > Monitor(profile::TreeProfile& treeProfile) : > _treeProfile(treeProfile) > {} > > void > extractTreeState(profile::TreeState& ts) { ts.v = _treeProfile.d.v; } > > bool > push(Frame<TreeComposition>& f) > { > if (!super::empty() && (super::back().v() == f.v())) > return false; > > super::push_back(f); > return true; > } > > bool > push(unit<TreeVertex> v) > { > if (!super::empty() && (super::back().v() == v)) > return false; > > super::emplace_back(v); > return true; > } > > bool > pop(unit<TreeVertex> v = nullptr) > { > if (!super::empty() && ((v == nullptr) || (super::back().v() == v))) { > super::back().commit(_treeProfile); > super::pop_back(); > return true; > } else { > return false; > } > } > > void > alignContour(int32_t delta) { _treeProfile.d.contour += delta; } > > void > addVertex(unit<TreeVertex> v) > { > if (v->mode() == TreeVertex::Mode::clock) { > _treeProfile.clock.d.v++; > } else { > v->ordinalTree()->profile().d.v++; > _treeProfile.ordinal.d.v++; > } > _treeProfile.d.v++; > } > > void > expandVertex(unit<TreeVertex> v) > { > ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ( ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > v->level() == (v->tree()->level() + 1) ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp", 226) << ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠Condition [" << ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > "v->level() == (v->tree()->level() + 1)" ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "] " << ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠" ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > << "Expansion head must be one above its origin" << ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > facile::RequireException::require_sentinel ># 226 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > ; > ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ( ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > !v->links->profile.isTreeLeaf() ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp", 227) << ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠Condition [" << ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > "!v->links->profile.isTreeLeaf()" ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "] " << ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠" ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > << "Expansion head must not have profile flags assigned" << ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > facile::RequireException::require_sentinel ># 227 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > ; > > addVertex(v); > _treeProfile.d.contour += v->level(); > if (v->mode() == TreeVertex::Mode::clock) { > _treeProfile.clock.d.contour += v->level(); > } else { > ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ( ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > !v->isOrdinalRoot() ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp", 234) << ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠Condition [" << ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > "!v->isOrdinalRoot()" ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "] " << ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠" ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > << "Expansion head must not be an ordinal tree root" << ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > facile::RequireException::require_sentinel ># 234 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > ; > > v->ordinalTree()->profile().d.contour += v->ordinalTreeLevel(); > _treeProfile.ordinal.d.contour += v->ordinalTreeLevel(); > v->commitProfile(); > } > > unit<TreeVertex> anchor = v->tree(); > if (anchor->links->profile.isTreeLeaf()) { > anchor->links->profile.setTreeLeaf(LinkProfile::tag(), false); > v->links->profile.setTreeLeaf(LinkProfile::tag()); > } else if (v->links->treeEdgeCount() == 0) { > if (v->mode() == TreeVertex::Mode::clock) { > _treeProfile.clock.d.leaf++; > } else { > v->ordinalTree()->profile().d.leaf++; > _treeProfile.ordinal.d.leaf++; > } > _treeProfile.d.leaf++; > > v->links->profile.setTreeLeaf(LinkProfile::tag()); > } > } > > void > gateStem(unit<TreeVertex> base, unit<TreeVertex> bud) > { > if (base == bud) { > expandVertex(base); > return; > } > > unit<TreeVertex> trunk = base->tree(); > for (unit<TreeVertex> v = bud; v != trunk; v = v->tree()) { > ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ( ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > v->level() == (v->tree()->level() + 1) ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp", 268) << ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠Condition [" << ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > "v->level() == (v->tree()->level() + 1)" ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "] " << ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠" ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > << "Gate stem members must have consecutive levels" << ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > facile::RequireException::require_sentinel ># 268 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > ; > ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ( ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > !v->links->profile.isTreeLeaf() ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp", 269) << ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠Condition [" << ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > "!v->links->profile.isTreeLeaf()" ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "] " << ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠" ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > << "Gate stem base must not have profile flags assigned" << ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > facile::RequireException::require_sentinel ># 269 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > ; > } > > uint32_t length = point_util::quantifyByIndex(bud->level() - base->level()); > uint32_t contour = (base->level() * length) + ((length * point_util::lastOfQuantity(length)) >> 1); > if (base->mode() == TreeVertex::Mode::clock) { > _treeProfile.clock.d.v += length; > } else { > base->ordinalTree()->profile().d.v += length; > _treeProfile.ordinal.d.v += length; > } > _treeProfile.d.v += length; > _treeProfile.d.contour += contour; > if (base->mode() == TreeVertex::Mode::clock) { > _treeProfile.clock.d.contour += contour; > } else { > ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ( ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > !base->isOrdinalRoot() ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp", 285) << ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠Condition [" << ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > "!base->isOrdinalRoot()" ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "] " << ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠" ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > << "Gate stem base must not be an ordinal tree root" << ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > facile::RequireException::require_sentinel ># 285 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > ; > > uint32_t ordinalTreeContour = (contour - (base->ordinalRoot()->level() * length)); > base->ordinalTree()->profile().d.contour += ordinalTreeContour; > _treeProfile.ordinal.d.contour += ordinalTreeContour; > for (unit<TreeVertex> v = bud; v != trunk; v = v->tree()) > v->commitProfile(); > } > > unit<TreeVertex> anchor = base->tree(); > if (anchor->links->profile.isTreeLeaf()) { > anchor->links->profile.setTreeLeaf(LinkProfile::tag(), false); > bud->links->profile.setTreeLeaf(LinkProfile::tag()); > } else if (bud->links->treeEdgeCount() == 0) { > if (bud->mode() == TreeVertex::Mode::clock) { > _treeProfile.clock.d.leaf++; > } else { > bud->ordinalTree()->profile().d.leaf++; > _treeProfile.ordinal.d.leaf++; > } > _treeProfile.d.leaf++; > > bud->links->profile.setTreeLeaf(LinkProfile::tag()); > } > } > > void > addEdge(unit<TreeVertex> tail) > { > if (tail->mode() == TreeVertex::Mode::clock) { > _treeProfile.clock.d.e++; > } else { > tail->ordinalTree()->profile().d.e++; > _treeProfile.ordinal.d.e++; > } > _treeProfile.d.e++; > } > > void > addOrdinalTree(unit<OrdinalTree> ot) > { > _treeProfile.ordinal.subtrees++; > _subtrees.emplace(ot->root()->id(), ot); > } > > void > removeOrdinalTree(unit<OrdinalTree> ot) > { > _treeProfile.ordinal.subtrees--; > _subtrees.erase(_subtrees.find(ot->root()->id())); > } > > OrdinalTreeSetIterable > iterateOrdinalTrees() { return OrdinalTreeSetIterable(_subtrees); } > > uint32_t > ordinalTreeCount() { return _subtrees.size(); } > > void > moveVertex(unit<TreeVertex> v, unit<OrdinalTree> depart, unit<OrdinalTree> arrive) > { > if (depart == arrive) > return; > > if (depart == nullptr) { > _treeProfile.ordinal.d.v++; > _treeProfile.ordinal.d.e += v->links->edgeCount(); > _treeProfile.clock.d.v--; > _treeProfile.clock.d.e -= v->links->edgeCount(); > } else { > depart->profile().d.v--; > depart->profile().d.e -= v->links->edgeCount(); > } > > if (arrive == nullptr) { > _treeProfile.ordinal.d.v--; > _treeProfile.ordinal.d.e -= v->links->edgeCount(); > _treeProfile.clock.d.v++; > _treeProfile.clock.d.e += v->links->edgeCount(); > } else { > arrive->profile().d.v++; > arrive->profile().d.e += v->links->edgeCount(); > } > } > > void > prune(unit<TreeVertex> v) > { > if (v->links->treeEdgeCount() > 0) > return; > > ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ( ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > !v->links->profile.isTreeLeaf() ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp", 376) << ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠Condition [" << ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > "!v->links->profile.isTreeLeaf()" ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "] " << ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > std::endl ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > << "⢠" ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > << "Cannot prune a tree leaf" << ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" 3 > facile::RequireException::require_sentinel ># 376 "../../subprojects/edfst/src/edfst/tree/TreeProfileMonitor.hpp" > ; > > if (v->mode() == TreeVertex::Mode::clock) { > _treeProfile.clock.d.leaf++; > } else { > v->ordinalTree()->profile().d.leaf++; > _treeProfile.ordinal.d.leaf++; > } > _treeProfile.d.leaf++; > v->links->profile.setTreeLeaf(LinkProfile::tag()); > } > > void > creditRebindBypass(unit<OrdinalTree> ot) > { > Balance gain = (ot->profile().d.v * 2); > _treeProfile.ordinal.balance += gain; > ot->profile().histogram.balance += gain; > > ot->profile().histogram.bypassCount++; > } > > void > creditExpansionBypass(unit<OrdinalTree> ot) > { > Balance gain = (ot->profile().d.v * 2); > _treeProfile.ordinal.balance += gain; > ot->profile().histogram.balance += gain; > > ot->profile().histogram.bypassCount++; > } > > void > creditVertexInsert(unit<TreeVertex> v, WalkPosition timelineLength) > { > v->ordinalTree()->profile().histogram.balance += (2 * (timelineLength - v->clockProxy()->timespan().out)); > > double position = Arithmetic::ratio(v->clockProxy()->timespan().out, timelineLength); > double inflatedMeanPosition = _treeProfile.ordinal.insert.meanClockPosition * _treeProfile.ordinal.insert.instances; > inflatedMeanPosition += position; > _treeProfile.ordinal.insert.instances++; > _treeProfile.ordinal.insert.meanClockPosition = Arithmetic::ratio(inflatedMeanPosition, _treeProfile.ordinal.insert.instances); > } > > void > debit(unit<OrdinalTree> ot, Balance cost) > { > _treeProfile.ordinal.balance -= cost; > ot->profile().histogram.balance -= cost; > } > > void > debitSiblingScan(unit<OrdinalTree> ot, unit<TreeVertex> v, unit<TreeVertex> sibling) > { > uint32_t siblingTreePosition = (sibling == nullptr ? 0 : sibling->treePosition()); > debit(ot, Arithmetic::absoluteDifference(v->treePosition(), siblingTreePosition)); > } > > void > updateInsertHistogram(unit<OrdinalTree> ot, WalkPosition timelineLength) > { > Count pending = _treeProfile.ordinal.insert.instances - ot->profile().histogram.insert.cursor; > if (pending == 0) > return; > > double otPosition = Arithmetic::ratio(ot->anchor()->timespan().out, timelineLength); > double offset = otPosition - _treeProfile.ordinal.insert.meanClockPosition; > double scale = 0.0; > if (offset > 0.25) > scale = 1.0; > else if (offset > -0.25) > scale = ((offset * 2) + 0.5); > > ot->profile().histogram.insert.potential += (pending * scale); > ot->profile().histogram.insert.cursor = _treeProfile.ordinal.insert.instances; > } > > Token > token() { return Token{ *this }; } > >private: > profile::TreeProfile& _treeProfile; > OrdinalTreeSet _subtrees; >}; >} >} ># 6 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/tree/TreeWalk.hpp" 1 > > > > >namespace edfst >{ >namespace TreeWalk >{ >enum class Motion { > pop, > walk, > stop >}; > >struct Frame { > Frame(std::size_t frameTypeId ># 16 "../../subprojects/edfst/src/edfst/tree/TreeWalk.hpp" 3 > , ># 16 "../../subprojects/edfst/src/edfst/tree/TreeWalk.hpp" > const std::string& frameTypeName) : > frameTypeId(frameTypeId) > ># 18 "../../subprojects/edfst/src/edfst/tree/TreeWalk.hpp" 3 > , ># 18 "../../subprojects/edfst/src/edfst/tree/TreeWalk.hpp" > frameTypeName(frameTypeName) > {} > > virtual ~Frame() {} > > const std::size_t frameTypeId; > const std::string frameTypeName; > > > virtual Motion > step() = 0; > > virtual void > pushObserved() {} > > virtual void > setObserved(__attribute__((unused)) uint32_t position) {} > > virtual void > popObserved() {} > > virtual std::ostream& > printStackTraceEntry(std::ostream& o) = 0; > > > > > template<typename FrameType> > bool > > isFrameType() { return FrameType::frameTypeId(typeid(FrameType).hash_code()) == frameTypeId; } >}; > > >class Stack : > public std::vector<unit<Frame>> >{ >using super = std::vector<unit<Frame>>; > >public: > void > setHeight(uint32_t height) { super::resize(height); } > > unit<Frame> > top() { return super::back(); } > > template<typename FrameType, typename ... Args> > unit<FrameType> > push(Args&& ... args) > { > unit<FrameType> f = FrameType::make(std::forward<Args>(args) ...); > super::push_back(f.template upcast<Frame>()); > f->pushObserved(); > return f; > } > > template<typename FrameType, typename ... Args> > unit<FrameType> > set(uint32_t position, Args&& ... args) > { > unit<FrameType> f = FrameType::make(std::forward<Args>(args) ...); > super::at(position) = f.template upcast<Frame>(); > f->setObserved(position); > return f; > } > > void > pop() > { > super::back()->popObserved(); > super::pop_back(); > } > > void > walk() > { > Motion motion; > while (!empty()) { > motion = super::back()->step(); > switch (motion) > { > case Motion::pop: > pop(); > > case Motion::walk: > break; > > case Motion::stop: > return; > } > } > } > > void > clear(uint32_t retainCount = 0) > { > while (size() > retainCount) > pop(); > } >}; > > >class StackContext : > public PhaseContext::Block >{ >public: > StackContext(Stack& stack) : > _stack(stack) > {} > > inline std::ostream& > print(std::ostream& o) const override > { > uint32_t i = (_stack.size() - 1); > for (unit<Frame> f : iterable<Stack::reverse_iterator>(_stack.rbegin(), _stack.rend())) { > o << " " << i-- << ") "; > if (f == nullptr) > o << "<null>"; > else > f->printStackTraceEntry(o); > o << std::endl; > } > > return o; > } > >private: > Stack& _stack; >}; > >} >} ># 5 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" 2 > >namespace edfst >{ >template<typename TreeComposition> >struct TreeEpisode { > using TreeVertex = typename TreeComposition::Vertex; > using OrdinalTree = typename TreeComposition::OrdinalTree; > using SiblingWalkPosition = typename TreeComposition::SiblingWalkPosition; > using EdgeEvent = typename TreeComposition::EdgeEvent; > using RebindFootprint = std::vector<unit<TreeVertex>>; > > struct Update { > EpochType epoch; > owner<EdgeEvent> event; > > struct { > TreeRelation relation; > typename TreeVertex::Mode mode; > uint32_t pathBranchLevel; > } > integration; > > Update() : > epoch(0), > event(nullptr) > {} > > loan<EdgeEvent> > start(unit<TreeVertex> tail, unit<TreeVertex> head) { return ((event = owner<EdgeEvent>::make(tail, head))); } > > void > congruent(TreeRelation relation) { event->relation = integration.relation = relation; } > > void > congruent(typename TreeVertex::Mode mode) { event->mode = integration.mode = mode; } > > void > integrate() > { > integration.mode = event->mode; > if (event->isRetrograde) > integration.relation = TreeRelation::tree; > else > integration.relation = event->relation; > if ((event->relation == TreeRelation::cross) && OrdinalTree::isOrdinalRelation(event->tail, event->root)) > integration.pathBranchLevel = (event->root->level() - event->root->ordinalRoot()->level()); > else > integration.pathBranchLevel = 0; > } > > Update(Update&) = delete; > > Update& > operator =(Update&) = delete; > } > update; > > struct Rebind { > EpochType epoch; > unit<TreeVertex> root; > unit<TreeVertex> tail; > unit<TreeVertex> head; > SiblingWalkPosition entryTime; > typename TreeVertex::Mode mode; > bool isInProgress; > > struct Stack { > uint32_t base; > uint32_t levelOffset; > > uint32_t > framePosition(uint32_t rebindFramePosition) { return base + rebindFramePosition; } > } > stack; > > Rebind() : > epoch(0), > root(nullptr), > tail(nullptr), > head(nullptr), > isInProgress(false) > {} > > Rebind(Rebind&) = delete; > > Rebind& > operator =(Rebind&) = delete; > } > rebind; > > struct Expansion { > bool isInProgress; > bool isGate; > unit<TreeVertex> origin; > uint32_t depth; > > Expansion() : > isInProgress(false) > {} > > Expansion(Expansion&) = delete; > > Expansion& > operator =(Expansion&) = delete; > } > expansion; > > struct Clock { > unit<TreeVertex> entry; > > struct Scope { > WalkTimespan delta; > WalkTimespan lambda; > } > scope; > > struct Walk { > bool isLive; > WalkPosition cursor; > WalkPosition entryTime; > } > walk; > > struct Escalation { > bool isActive; > bool isPending; > WalkTimespan span; > } > escalation; > > RebindFootprint footprint; > > > struct Subsumption { > unit<TreeVertex> tail; > unit<TreeVertex> head; > } > subsumption; > > struct Revert { > unit<TreeVertex> tail; > unit<TreeVertex> head; > bool isActive; > bool isInOriginalDelta; > } > revert; > } > clock; > > struct Ordinal { > struct Rebind { > bool isWholeTree; > bool isHeadAtDeltaPath; > uint32_t vertexStep; > uint32_t treeStep; > > > unit<OrdinalTree> cursorOriginSubtree; > RebindFootprint footprint; > PathBranchLevelSequence demotionDeterminants; > WalkPosition cursor; > uint32_t rootFrame; > uint32_t pathBranchLevel; > > void > captureDemotionDeterminant(uint32_t level) > { > demotionDeterminants.resize(point_util::quantifyByIndex(vertexStep)); > demotionDeterminants.at(vertexStep) = level; > } > > inline uint32_t > advanceVertexStep() > { > vertexStep++; > demotionDeterminants.push_back(0); > > ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" 3 > ( ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" > demotionDeterminants.size() == point_util::quantifyByIndex(vertexStep) ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp", 182) << ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" > std::endl ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" 3 > << "⢠Condition [" << ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" > "demotionDeterminants.size() == Q(vertexStep)" ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" 3 > << "] " << ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" > std::endl ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" 3 > << "⢠" ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" > << ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" 3 > facile::RequireException::require_sentinel ># 182 "../../subprojects/edfst/src/edfst/tree/TreeEpisode.hpp" > ; > > return vertexStep; > } > > Rebind() : > pathBranchLevel(0) > {} > } > rebind; > > struct Revert { > unit<OrdinalTree> tree; > profile::Balance threshold; > bool isActive; > bool isInProgress; > } > revert; > } > ordinal; > > uint32_t escalationThreshold; > > struct RebindView { > bool isInProgress; > unit<TreeVertex> root; > unit<TreeVertex> tail; > unit<TreeVertex> head; > unit<TreeVertex> stump; > EdgeEvent event; > }; > > TreeEpisode() > {} > > TreeEpisode(TreeEpisode&) = delete; > > TreeEpisode& > operator =(TreeEpisode&) = delete; > > void > advance() > { > update.epoch++; > if ((rebind.isInProgress = update.event->isRetrograde)) { > rebind.epoch++; > rebind.tail = update.event->tail; > rebind.head = update.event->head; > rebind.root = update.event->root; > } > } > > uint32_t > stackBase() > { > if (expansion.isInProgress) > return 0; > else > return rebind.stack.base; > } >}; >} ># 7 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 2 > > >namespace edfst >{ >template<typename TreeComposition, template<typename> class TreePluginSetBase> >struct TreeIntegrationBase; >} > ># 1 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 1 > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/index/HollowComposition.hpp" 1 > > > > > > > >namespace point_util >{ >template<typename ComponentTuple> >class HollowCompositionTuple >{ >using HollowComposition = HollowCompositionTuple<ComponentTuple>; > >public: > template<unsigned int index> > using ComponentTypeAt = std::tuple_element_t<index, ComponentTuple>; > > template<template<typename, uint> class Functor, typename ... Args> > static void > mux(Args&& ... args) > { > muxBranch<Functor>(TemplateSequence<ComponentCount>{}, std::forward<Args>(args) ...); > } > > static constexpr uint32_t ComponentCount = std::tuple_size<ComponentTuple>::value; > >private: > template<template<typename, uint> class Functor, unsigned int ... ComponentIndices, typename ... Args> > static void > muxBranch(IndexSequence<ComponentIndices ...>, Args&& ... args) > { > __attribute__((unused)) auto Void = { 0, (muxCall<ComponentIndices, Functor, Args ...>(std::forward<Args>(args) ...), 0) ... }; > } > > template<unsigned int index, template<typename, uint> class Functor, typename ... Args> > static void > muxCall(Args&& ... args) { Functor<ComponentTypeAt<index>, index>::relay(std::forward<Args>(args) ...); } >}; > >template<typename ... Components> >using HollowCompositionTypes = HollowCompositionTuple<std::tuple<Components ...>>; > >template<typename ... Components> >using HollowCompositionTuples = HollowCompositionTuple<decltype(std::tuple_cat(Components () ...))>; >} ># 4 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 2 > ># 1 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 1 > > > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/Tokenizer.hpp" 1 > > > > >namespace facile >{ >using TokenList = std::vector<std::string>; >using TokenStep = typename TokenList::iterator; >using TokenWalk = scan<TokenStep>; > >class Tokenizer >{ >friend class owner<Tokenizer>; > >public: > TokenStep > begin() { return _tokens.begin(); } > > TokenStep > end() { return _tokens.end(); } > > TokenWalk > walk() { return TokenWalk(_tokens); } > > friend std::ostream& > operator <<(std::ostream& o, Tokenizer& t) > { > std::string delimiter = ""; > for (const std::string& token : t._tokens) { > o << delimiter << token; > delimiter = std::string(1, t._delimiter); > } > > return o; > } > > static owner<Tokenizer> > parse(const std::string& s, char delimiter) > { > owner<Tokenizer> t = owner<Tokenizer>::make(delimiter); > > std::stringstream ss(s); > std::string token; > while (std::getline(ss, token, delimiter)) > t->_tokens.push_back(token); > > return t; > } > >private: > Tokenizer(char delimiter) : > _delimiter(delimiter) > {} > > char _delimiter; > TokenList _tokens; >}; >} ># 9 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 2 > >using namespace point_util; > >namespace facile >{ >namespace TreeFilter >{ >template<typename BitMask> >class NodeT; > >template<typename BitMask> >class EventT >{ >friend class NodeT<BitMask>; > >public: > uint32_t > level() const { return _level; } > > BitMask > bitmask() const { return _bitmask; } > >private: > uint32_t _level; > BitMask _bitmask; >}; > >template<typename BitMask = BitBlock> >class NodeT { >using NodeType = NodeT<BitMask>; > >struct FullyQualifiedNameToken { > loan<NodeType> node; > > inline std::ostream& > print(std::ostream& o) const > { > static thread_local std::vector<loan<NodeType>> stack; > > stack.clear(); > > loan<NodeType> walk = node; > do { > stack.push_back(walk); > walk = walk->parent(); > } while (walk != nullptr); > > std::string dot = ""; > while (!stack.empty()) { > o << dot; > o << stack.back()->name(); > dot = "."; > stack.pop_back(); > } > > return o; > } > > static constexpr int FacileStreamTokenTag = 0; >}; > >protected: > using Event = EventT<BitMask>; > >public: > NodeT(const std::string& name, Event& event) : > token{loan_wrap(this)}, > _id(0), > _name(name), > _parent(nullptr), > _event(event) > { > _event._level = 0; > } > > NodeT(const std::string& name, loan<NodeType> parent, Event& event) : > token{loan_wrap(this)}, > _id(parent->_subtrees.size()), > _name(name), > _parent(parent), > _event(event) > > { > _event._level = (parent->_event._level+1); > parent->_subtrees.push_back(loan_wrap(this)); > } > > uint32_t > id() { return _id; } > > std::string > name() { return _name; } > > uint32_t > level() { return _event._level; } > > bool > isBound(const Event& event) { return event._bitmask == _event._bitmask; } > > loan<NodeType> > parent() const { return _parent; } > > BitMask > bitmask() const { return _event._bitmask; } > > void > setBitmask(BitMask bitmask) { _event._bitmask = bitmask; } > > > > std::vector<loan<NodeType>>& > subtrees() { return _subtrees; } > > loan<NodeType> > locateSubtree(const std::string& step) > { > for (loan<NodeType> subtree : _subtrees) { > if (subtree->_name == step) > return subtree; > } > > return nullptr; > } > > loan<NodeType> > locatePathLeaf(TokenWalk walk) > { > ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > ( ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > *walk == _name ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp", 136) << ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > std::endl ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "⢠Condition [" << ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > "*walk == _name" ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "] " << ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > std::endl ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "⢠" ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > << "Cannot find path leaf in [TokenWalk operator << missing] starting from node '" << _name << "'" << ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > facile::RequireException::require_sentinel ># 136 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > ; > > walk++; > if (walk.isClosed()) > return loan_wrap(this); > > std::string token = *walk; > loan<NodeType> match = nullptr; > for (loan<NodeType> subtree : _subtrees) { > if (subtree->_name == token) { > match = subtree; > break; > } > } > > if (match == nullptr) > return nullptr; > else > return match->locatePathLeaf(walk); > } > > std::ostream& > printBitmasks(std::ostream& o) > { > o << _name << "(" << _id << "): " << std::hex << "0x" << _event._bitmask.integer() << std::endl; > for (loan<NodeType> subtree : _subtrees) > subtree->printBitmasks(o); > > return o; > } > > const FullyQualifiedNameToken token; > >private: > const uint32_t _id; > const std::string _name; > const loan<NodeType> _parent; > std::vector<loan<NodeType>> _subtrees; > Event& _event; >}; > >template<typename BitMask> >class SchemaT >{ >using SchemaType = SchemaT<BitMask>; >using NodeType = NodeT<BitMask>; > >public: > SchemaT(loan<NodeType> root) : > _root(root) > {} > > loan<NodeType> > root() { return _root; } > > uint32_t > bitmaskLevelShift(uint32_t level) > { > if (level == 0) > return 1; > else > return _bitmaskPositions.at(level-1); > } > > BitMask > bitmaskLevelMask(uint32_t level) > { > uint32_t span = _bitmaskDimensions.at(level); > BitMask mask = ~BitMask(0); > mask >>= (mask.capacity() - span); > return mask; > } > > BitMask > bitmaskRootMask(uint32_t level) > { > uint32_t span = _bitmaskPositions.at(level - 1); > BitMask mask = ~BitMask(0); > mask >>= (mask.capacity() - span); > return mask; > } > > void > compile() > { > using TreeRow = std::vector<loan<NodeType>>; > > struct Worklist { > owner<TreeRow> frontier; > owner<TreeRow> count; > owner<TreeRow> compile; > owner<TreeRow> swap; > > Worklist() : > frontier(owner<TreeRow>::make()), > count(owner<TreeRow>::make()), > compile(owner<TreeRow>::make()), > swap(nullptr) > {} > > void > rotate() > { > swap = std::move(compile); > compile = std::move(count); > count = std::move(frontier); > frontier = std::move(swap); > frontier->clear(); > } > > bool > empty() { return count->empty() && compile->empty(); } > } > worklist; > > worklist.count->push_back(_root); > > uint32_t level = 0; > while (!worklist.empty()) { > uint32_t rowMaxDegree = 0; > for (loan<NodeType> cursor : worklist.count) { > if (!cursor->subtrees().empty()) { > worklist.frontier->insert(worklist.frontier->end(), cursor->subtrees().begin(), cursor->subtrees().end()); > if (cursor->subtrees().size() > rowMaxDegree) > rowMaxDegree = cursor->subtrees().size(); > } > } > for (loan<NodeType> cursor : worklist.compile) { > if (cursor == _root) { > cursor->setBitmask(1); > } else { > uint32_t bitmaskPosition = (cursor->parent() == _root ? 1 : _bitmaskPositions.at(cursor->level() - 2)); > BitMask base = cursor->parent()->bitmask(); > uint64_t levelBitmask = (1ULL << (bitmaskPosition + cursor->id())); > cursor->setBitmask(base | levelBitmask); > } > } > > if (rowMaxDegree > 0) { > _bitmaskDimensions.push_back(rowMaxDegree); > uint32_t basePosition = (level == 0 ? 1 : _bitmaskPositions.at(level-1)); > _bitmaskPositions.push_back(basePosition + rowMaxDegree); > } > > worklist.rotate(); > level++; > } > } > > std::ostream& > printBitmaskMetadata(std::ostream& o) > { > o << std::endl << "\tdimensions : { "; > std::string comma = " "; > for (uint32_t size : _bitmaskDimensions) { > o << comma; > o << size; > comma = ", "; > } > o << " } "; > > o << std::endl << "\tpositions : { "; > comma = " "; > for (uint32_t size : _bitmaskPositions) { > o << comma; > o << size; > comma = ", "; > } > o << " } "; > > return o; > } > > std::ostream& > printBitmasks(std::ostream& o) > { > return _root->printBitmasks(o); > } > >private: > loan<NodeType> _root; > std::vector<uint32_t> _bitmaskDimensions; > std::vector<uint32_t> _bitmaskPositions; >}; > >template<typename BitMask> >class MatcherT >{ >using EventType = EventT<BitMask>; >using NodeType = NodeT<BitMask>; >using SchemaType = SchemaT<BitMask>; >using Matcher = MatcherT<BitMask>; > >struct TreeToken { > loan<Matcher> matcher; > > inline std::ostream& > print(std::ostream& o) const > { > static thread_local std::vector<Frame> stack; > > uint32_t indent = 0; > stack.clear(); > o << std::endl; > > stack.push_back(matcher); > stack.back().print(o, indent++); > while (!stack.empty()) { > Frame& top = stack.back(); > > if (top.isClosed()) { > indent--; > stack.pop_back(); > continue; > } > > loan<Matcher> subtree = top.m->_subtrees.at(top.i++); > stack.push_back(subtree); > stack.back().print(o, indent++); > } > > return o; > } > > static constexpr int FacileStreamTokenTag = 0; > > private: > struct Frame { > uint32_t i; > loan<Matcher> m; > > Frame(loan<Matcher> m) : > i(0), > m(m) > {} > > inline bool > isClosed() { return i == m->_subtrees.size(); } > > inline std::ostream& > print(std::ostream& o, uint32_t indent) > { > return o << "\t" << std::string(indent * 2, ' ') << m->_point.name() << std::endl; > } > }; >}; > >public: > struct Configuration { > std::string name; > owner<Tokenizer> root; > std::vector<owner<Tokenizer>> paths; > > Configuration(const std::string& name) : > name(name) > {} > }; > > MatcherT(loan<SchemaType> schema) : > MatcherT(schema, schema->root()) > {} > > MatcherT(loan<SchemaType> schema, NodeType& point) : > token{loan_wrap(this)}, > _schema(schema), > _point(point) > {} > > loan<Matcher> > add(NodeType& point) > { > ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > ( ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > point.parent().equals(&_point) ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp", 407) << ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > std::endl ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "⢠Condition [" << ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > "point.parent().equals(&_point)" ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "] " << ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > std::endl ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "⢠" ># 407 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > << "TreeFilter::Matcher ending at " << _point.name() > << " cannot be extended with " << point.name() << ># 408 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > facile::RequireException::require_sentinel ># 408 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > ; > > uint32_t index = static_cast<uint32_t>(point.id()); > if (_subtreeMask.is(index)) > return _subtrees.at(index); > > _subtreeMask.set(index); > if (point_util::quantifyByIndex(index) > _subtrees.size()) > _subtrees.resize(point_util::quantifyByIndex(index)); > return (_subtrees[index] = owner<Matcher>::make(_schema, point)); > } > > static owner<Matcher> > load(loan<Configuration> config, loan<SchemaType> schema) > { > loan<NodeType> root = schema->root()->locatePathLeaf(config->root->walk()); > > ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > ( ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > root != nullptr ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp", 425) << ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > std::endl ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "⢠Condition [" << ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > "root != nullptr" ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "] " << ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > std::endl ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "⢠" ># 425 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > << "Failed to locate schema root '" << config->root << "' while loading TreeFilter::Matcher named '" > << config->name << ># 426 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > facile::RequireException::require_sentinel ># 426 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > ; > > owner<Matcher> rootMatcher = owner<Matcher>::make(schema, *root); > for (loan<Tokenizer> path : config->paths) { > loan<NodeType> pathNode = root; > loan<Matcher> pathNodeMatcher = rootMatcher; > for (const std::string& step : fermata(path)) { > pathNode = pathNode->locateSubtree(step); > > ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > ( ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > pathNode != nullptr ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp", 435) << ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > std::endl ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "⢠Condition [" << ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > "pathNode != nullptr" ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "] " << ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > std::endl ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > << "⢠" ># 435 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > << "Failed to locate schema path node '" << step << "' while loading path " > << path << " in TreeFilter::Matcher named '" << config->name << ># 436 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" 3 > facile::RequireException::require_sentinel ># 436 "../../subprojects/edfst/subprojects/facile/src/relation/TreeFilter.hpp" > ; > > pathNodeMatcher = pathNodeMatcher->add(*pathNode); > } > } > > return rootMatcher; > } > > bool > isMatch(const EventType& event) > { > > > uint32_t lowestCommonLevel = std::min(event.level(), _point.level()); > if (lowestCommonLevel > 0) { > BitMask rootMask = _schema->bitmaskRootMask(lowestCommonLevel); > if ((event.bitmask() & rootMask) != (_point.bitmask() & rootMask)) > return false; > } > > if (event.level() < _point.level()) > return false; > > if (event.level() == _point.level()) > return _point.isBound(event); > > > > > if (_subtrees.empty()) > return true; > > uint32_t level = _point.level(); > uint32_t levelShift = _schema->bitmaskLevelShift(level); > BitMask nodeMask = event.bitmask() >> levelShift; > BitMask levelMask = _schema->bitmaskLevelMask(level); > nodeMask &= levelMask; > int32_t index = _subtreeMask.firstMatchIndex(nodeMask); > if (index < 0) > return false; > > if (_subtrees.size() <= static_cast<uint32_t>(index)) > return true; > else > return _subtrees.at(index)->isMatch(event); > } > > const TreeToken token; > >private: > loan<SchemaType> _schema; > NodeType& _point; > > std::vector<owner<Matcher>> _subtrees; > BitMask _subtreeMask; >}; > >using Event = EventT<BitBlock>; >using Node = NodeT<BitBlock>; >using Schema = SchemaT<BitBlock>; >using Matcher = MatcherT<BitBlock>; >} >} ># 6 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/io/StreamTable.hpp" 1 > > > > > >namespace facile >{ >namespace StreamTable >{ >template<typename TableComposition> >class StreamTableBase >{ >using StreamTable = StreamTableBase<TableComposition>; >using RowElement = typename TableComposition::RowElement; >using RowIterable = typename TableComposition::RowIterable; >using Widths = uint32_t[TableComposition::ComponentCount]; > >template<typename T> >using Bounds = Arithmetic::Bounds<T>; > >struct AccountPut { > struct Tally { > class Buffer : > public std::streambuf > { > public: > Buffer() : > _count(0) > {} > > void > clear() { _count = 0; } > > uint32_t > count() const { return _count; } > > protected: > std::streamsize > xsputn(__attribute__((unused)) const char *string, std::streamsize size) override { return _count += size, size; } > > private: > uint32_t _count; > }; > > template<typename T> > friend typename AccountPut::Tally& > operator <<(typename AccountPut::Tally& tally, T t) { return tally.o << t, tally; } > > Buffer b; > std::ostream o; > > Tally() : > o(&b) > {} > }; > > struct CountOut { > class Buffer : > public std::streambuf > { > using super = std::streambuf; > > public: > Buffer(handle<std::ostream> pipe = nullptr) : > _count(0), > _limit(Bounds<uint32_t>::max), > _pipe(pipe) > {} > > void > pipe(handle<std::ostream> o) { _pipe = o; } > > void > clear() { _count = 0; } > > void > reset() > { > clear(); > _limit = Bounds<uint32_t>::max; > } > > uint32_t > count() const { return _count; } > > void > limit(uint32_t l) { _limit = l; } > > void > fill(uint32_t length) { _pipe.reference() << std::string(length, ' '); } > > protected: > using Column = uint32_t; > using Letter = uint32_t; > > std::streamsize > xsputn(const char *string, std::streamsize size) override > { > Column columns = 0; > for (std::streamsize i = 0; i < size; columns++) > i += width(string[i]); > > Column advance = (_count + columns); > if (advance > _limit) { > columns -= (advance - _limit); > size = 0; > for (Column i = 0; i < columns; i++) > size += width(string[size]); > > advance = _limit; > } > _count = advance; > _pipe->write(string, size); > return size; > } > > private: > std::streamsize > width(char code) > { > Letter letter = code; > if ((letter & 0xe0) == 0xc0) > return 2; > else if ((letter & 0xf0) == 0xe0) > return 3; > else if ((letter & 0xf8) == 0xf0) > return 4; > else > return 1; > } > > Column _count; > Column _limit; > > handle<std::ostream> _pipe; > }; > > template<typename T, typename = disable_setw<T>> > friend CountOut& > operator <<(CountOut& co, T t) { return co.o << t, co; } > > Buffer b; > std::ostream o; > > CountOut() : > o(&b) > {} > }; > > Tally tally; > CountOut count; >}; > >template<typename Component, uint index> >struct LayoutDispatch { > static void > relay(typename AccountPut::Tally& tally, Widths& widths, RowElement e) > { > tally.b.clear(); > Component::print(tally, Bounds<uint32_t>::max, e); > if (tally.b.count() > widths[index]) > widths[index] = tally.b.count(); > } >}; > >template<typename Component, uint index> >struct PrintDispatch { > static void > relay(typename AccountPut::CountOut& c, Widths& widths, RowElement e) > { > c.b.clear(); > c.b.limit(widths[index]); > Component::print(c, widths[index], e); > > if (c.b.count() < widths[index]) { > uint32_t fill = widths[index] - c.b.count(); > c.b.fill(fill); > } > } >}; > >public: > StreamTableBase() : > _indentation(0) > {} > > void > setIndentation(uint32_t count) { _indentation = count; } > > void > print(std::ostream& o, RowIterable rows) > { > Widths widths; > memset(widths, 0, sizeof(Widths)); > > _p.count.b.pipe(o); > > for (RowElement row : rows) > TableComposition::template mux<LayoutDispatch>(_p.tally, widths, row); > > for (uint32_t& width : widths) > width++; > > o << std::left; > for (RowElement row : rows) { > o << std::string(_indentation, ' '); > TableComposition::template mux<PrintDispatch>(_p.count, widths, row); > o << std::endl; > } > > std::flush(o); > } > >private: > uint32_t _indentation; > > AccountPut _p; >}; >} >} ># 7 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 2 > > > > > > >namespace edfst >{ >namespace log >{ >template<typename TreeComposition, template<typename> class TreePluginSetBase> >struct TranscriptSchema { > using TreeVertex = typename TreeComposition::Vertex; > using TreeEdge = typename TreeComposition::Edge; > using TreeReference = typename TreeComposition::Reference; > using EdgeEvent = typename TreeComposition::EdgeEvent; > using TreeIntegration = TreeIntegrationBase<TreeComposition, TreePluginSetBase>; > using VertexGate = typename TreeComposition::IVertexGate; > using GatePrecedence = typename TreeComposition::LinkSet::IPrecedenceProfile; > using PrecedenceEvaluation = typename GatePrecedence::IEvaluation; > > enum class EventOrientation { > before, > after > }; > > friend inline std::ostream& > operator <<(std::ostream& o, EventOrientation orientation) > { > switch (orientation) > { > case EventOrientation::before: > return o << "before"; > > case EventOrientation::after: > return o << "after"; > > default: > return o << "<undefined>"; > } > } > > enum class AttachMode { > delta, > retain, > cascade > }; > > friend inline EnumToken > label(AttachMode mode) > { > switch (mode) > { > case AttachMode::delta: > return EnumToken("Î entry"); > > case AttachMode::retain: > return EnumToken("retain"); > > case AttachMode::cascade: > return EnumToken("cascade"); > } > > ># 70 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp", 70) ># 70 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > << "unreachable" << ># 70 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > facile::RequireException::require_sentinel ># 70 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > ; > } > > struct EdgeInput : > public TreeFilter::Node { > EdgeInput(loan<TreeFilter::Node> parent) : > TreeFilter::Node("input", parent, event) > {} > > struct E : > public TreeFilter::Event { > template<typename StreamEdge> > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, StreamEdge e) > { > > o << "new edge " << e << std::endl; > } > } > event; > }; > > struct EdgeEpoch : > public TreeFilter::Node { > EdgeEpoch(loan<TreeFilter::Node> parent) : > TreeFilter::Node("epoch", parent, event) > {} > > struct E : > public TreeFilter::Event { > template<typename StreamEdge> > void > operator ()(std::ostream& o, loan<TreeIntegration> x, StreamEdge e) > { > o << "[E" << x->episode.rebind.epoch << ", U" << x->episode.update.epoch << "]: new edge " << e << std::endl; > } > } > event; > }; > > struct EdgeDelegation : > public TreeFilter::Node { > EdgeDelegation(loan<TreeFilter::Node> parent) : > TreeFilter::Node("delegation", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, > loan<EdgeEvent> edgeEvent, unit<TreeVertex> head, unit<TreeVertex> tail) > { > o << (edgeEvent->isRetrograde ? "Retrograde" : "Congruent") > << " edge " << tail->token().showPosition() << " -> " << head->token().showPosition() > << " in " << (edgeEvent->mode == TreeVertex::Mode::clock ? "clock" : "ordinal") << " mode" << std::endl; > } > } > event; > }; > > struct EdgeConclusion : > public TreeFilter::Node { > EdgeConclusion(loan<TreeFilter::Node> parent) : > TreeFilter::Node("conclusion", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, loan<TreeIntegration> x, __attribute__((unused)) unit<TreeVertex> head, __attribute__((unused)) unit<TreeVertex> tail) > { > o << " === Ordinal Tree Summary ===" << std::endl; > for (typename TreeIntegration::Types::ProfileMonitor::OrdinalTreeSetEntry ot : x->pm.iterateOrdinalTrees()) > o << "\t" << ot.second->profileToken() << std::endl; > > > > } > } > event; > }; > > struct EdgeInterface : > public TreeFilter::Node { > EdgeInterface(loan<TreeFilter::Node> parent) : > TreeFilter::Node("edge", parent, event), > input(loan_downwrap<TreeFilter::Node>(this)), > epoch(loan_downwrap<TreeFilter::Node>(this)), > delegation(loan_downwrap<TreeFilter::Node>(this)), > conclusion(loan_downwrap<TreeFilter::Node>(this)) > {} > > EdgeInput input; > EdgeEpoch epoch; > EdgeDelegation delegation; > EdgeConclusion conclusion; > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << v->token() << ": scan edge " << v->links->token(e) << std::endl; > } > } > event; > }; > > struct Interface : > public TreeFilter::Node { > Interface(loan<TreeFilter::Node> parent) : > TreeFilter::Node("interface", parent, event), > edge(loan_downwrap<TreeFilter::Node>(this)) > {} > > EdgeInterface edge; > > struct E : > public TreeFilter::Event { > } > event; > }; > > > > struct ClockAddVertex : > public TreeFilter::Node { > ClockAddVertex(loan<TreeFilter::Node> parent) : > TreeFilter::Node("add-vertex", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> tail, unit<TreeVertex> v) > { > o << "Add new vertex " << v->token() << " to " << tail->token() << std::endl; > } > } > event; > }; > > struct ClockPush : > public TreeFilter::Node { > ClockPush(loan<TreeFilter::Node> parent) : > TreeFilter::Node("push", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v ># 221 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > , ># 221 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > const std::string & frameTypeName) > { > o << "Stack: push " << v->token() << " [" << frameTypeName << "]" << std::endl; > } > } > event; > }; > > struct ClockSet : > public TreeFilter::Node { > ClockSet(loan<TreeFilter::Node> parent) : > TreeFilter::Node("set", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t position ># 238 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > , ># 238 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > const std::string & frameTypeName) > { > o << "Stack: set " << v->token() << " @ " << position << " [" << frameTypeName << "]" << std::endl; > } > } > event; > }; > > struct ClockPop : > public TreeFilter::Node { > ClockPop(loan<TreeFilter::Node> parent) : > TreeFilter::Node("pop", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v ># 255 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > , ># 255 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > const std::string & frameTypeName) > { > o << "Stack: pop " << v->token() << " [" << frameTypeName << "]" << std::endl; > } > } > event; > }; > > struct ClockLeaf : > public TreeFilter::Node { > ClockLeaf(loan<TreeFilter::Node> parent) : > TreeFilter::Node("leaf", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v ># 272 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > , ># 272 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > const std::string & frameTypeName) > { > o << "Stack: leaf " << v->token() << " [" << frameTypeName << "]" << std::endl; > } > } > event; > }; > > struct ClockScan : > public TreeFilter::Node { > ClockScan(loan<TreeFilter::Node> parent) : > TreeFilter::Node("scan", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << v->token() << ": scan edge " << v->links->token(e) << std::endl; > } > } > event; > }; > > struct ClockRevisit : > public TreeFilter::Node { > ClockRevisit(loan<TreeFilter::Node> parent) : > TreeFilter::Node("revisit", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << "Clock revisit: " << v->links->token(e) << std::endl; > } > } > event; > }; > > struct ClockProbe : > public TreeFilter::Node { > ClockProbe(loan<TreeFilter::Node> parent) : > TreeFilter::Node("probe", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << "Clock probe " << v->links->token(e) << std::endl; > } > } > event; > }; > > struct ClockBypass : > public TreeFilter::Node { > ClockBypass(loan<TreeFilter::Node> parent) : > TreeFilter::Node("bypass", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << "Clock bypasses " << v->links->token(e) << std::endl; > } > } > event; > }; > > struct ClockEscalate : > public TreeFilter::Node { > ClockEscalate(loan<TreeFilter::Node> parent) : > TreeFilter::Node("escalate", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v) > { > o << "Clock escalates at level " << v->level() << ": " << v->token().showPosition() << std::endl; > } > } > event; > }; > > struct ClockAttach : > public TreeFilter::Node { > ClockAttach(loan<TreeFilter::Node> parent) : > TreeFilter::Node("attach", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> tail, unit<TreeVertex> head, > AttachMode mode, EventOrientation orientation) > { > o << "Rebind: attach (" << head->token().showPosition() << ") to the Î subtree at (" << tail->token().showPosition() << ") " > << label(mode) << std::endl; > o << "\tEdges of " << tail->token() << " " << orientation << " the attach: " << std::endl << tail->links->edgeToken() << std::endl; > } > } > event; > }; > > struct ClockDetachRevertOrphan : > public TreeFilter::Node { > ClockDetachRevertOrphan(loan<TreeFilter::Node> parent) : > TreeFilter::Node("orphan", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, EventOrientation orientation) > { > o << "Revert rebind: detach revert orphan " << v->token().showPosition() << " from the tree at " << v->tree()->token().showPosition() << std::endl; > o << "\tEdges of " << v->tree()->token() << " " << orientation << " detach: " << std::endl << v->tree()->links->edgeToken() << std::endl; > } > } > event; > }; > > struct ClockDetach : > public TreeFilter::Node { > ClockDetach(loan<TreeFilter::Node> parent) : > TreeFilter::Node("detach", parent, event), > orphan(loan_downwrap<TreeFilter::Node>(this)) > {} > > ClockDetachRevertOrphan orphan; > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, EventOrientation orientation) > { > o << "Rebind: detach " << v->token().showPosition() << " from the tree at " << v->tree()->token().showPosition() << std::endl; > o << "\tEdges of " << v->tree()->token() << " " << orientation << " detach: " << std::endl << v->tree()->links->edgeToken() << std::endl; > } > } > event; > }; > > struct ClockRebind : > public TreeFilter::Node { > ClockRebind(loan<TreeFilter::Node> parent) : > TreeFilter::Node("rebind", parent, event), > push(loan_downwrap<TreeFilter::Node>(this)), > set(loan_downwrap<TreeFilter::Node>(this)), > pop(loan_downwrap<TreeFilter::Node>(this)), > leaf(loan_downwrap<TreeFilter::Node>(this)), > scan(loan_downwrap<TreeFilter::Node>(this)), > revisit(loan_downwrap<TreeFilter::Node>(this)), > probe(loan_downwrap<TreeFilter::Node>(this)), > bypass(loan_downwrap<TreeFilter::Node>(this)), > escalate(loan_downwrap<TreeFilter::Node>(this)), > attach(loan_downwrap<TreeFilter::Node>(this)), > detach(loan_downwrap<TreeFilter::Node>(this)) > {} > > ClockPush push; > ClockSet set; > ClockPop pop; > ClockLeaf leaf; > ClockScan scan; > ClockRevisit revisit; > ClockProbe probe; > ClockBypass bypass; > ClockEscalate escalate; > ClockAttach attach; > ClockDetach detach; > > enum class Motif { > rebindSingleton, > integrateOrdinalTree, > revertOrdinalTree > }; > > friend inline EnumToken > label(Motif motif) > { > switch (motif) > { > case Motif::rebindSingleton: > return EnumToken("rebind singleton"); > > case Motif::integrateOrdinalTree: > return EnumToken("integrate ordinal tree"); > > case Motif::revertOrdinalTree: > return EnumToken("revert ordinal tree"); > } > > ># 474 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp", 474) ># 474 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > << "unreachable" << ># 474 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > facile::RequireException::require_sentinel ># 474 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > ; > } > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> tail, unit<TreeVertex> head, Motif motif) > { > o << "Initiating " << label(motif) << " on " << tail->token().showPosition() << " -> " << head->token().showPosition() << std::endl; > } > } > event; > }; > > struct ClockMode : > public TreeFilter::Node { > ClockMode(loan<TreeFilter::Node> parent) : > TreeFilter::Node("clock", parent, event), > addVertex(loan_downwrap<TreeFilter::Node>(this)), > rebind(loan_downwrap<TreeFilter::Node>(this)) > {} > > ClockAddVertex addVertex; > ClockRebind rebind; > > struct E : > public TreeFilter::Event { > } > event; > }; > > > > struct OrdinalAddVertex : > public TreeFilter::Node { > OrdinalAddVertex(loan<TreeFilter::Node> parent) : > TreeFilter::Node("add-vertex", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> tail, unit<TreeVertex> v) > { > o << "Add new vertex " << v->token() << " to " << tail->token() << std::endl; > } > } > event; > }; > > struct OrdinalPush : > public TreeFilter::Node { > OrdinalPush(loan<TreeFilter::Node> parent) : > TreeFilter::Node("push", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v ># 533 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > , ># 533 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > const std::string & frameTypeName) > { > o << "Stack: push " << v->token() << " [" << frameTypeName << "]" << std::endl; > } > } > event; > }; > > struct OrdinalSet : > public TreeFilter::Node { > OrdinalSet(loan<TreeFilter::Node> parent) : > TreeFilter::Node("set", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t position ># 550 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > , ># 550 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > const std::string & frameTypeName) > { > o << "Stack: set " << v->token() << " @ " << position << " [" << frameTypeName << "]" << std::endl; > } > } > event; > }; > > struct OrdinalPop : > public TreeFilter::Node { > OrdinalPop(loan<TreeFilter::Node> parent) : > TreeFilter::Node("pop", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v ># 567 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > , ># 567 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > const std::string & frameTypeName) > { > o << "Stack: pop " << v->token() << " [" << frameTypeName << "]" << std::endl; > } > } > event; > }; > > struct OrdinalLeaf : > public TreeFilter::Node { > OrdinalLeaf(loan<TreeFilter::Node> parent) : > TreeFilter::Node("leaf", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v > ># 585 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > , ># 585 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > const std::string & frameTypeName) > { > o << "Stack: leaf " << v->token() << " [" << frameTypeName << "]" << std::endl; > } > } > event; > }; > > struct OrdinalScan : > public TreeFilter::Node { > OrdinalScan(loan<TreeFilter::Node> parent) : > TreeFilter::Node("scan", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << "Rebind frame " << v->token() << ": scan edge " << v->links->token(e) << std::endl; > } > } > event; > }; > > struct OrdinalRevisit : > public TreeFilter::Node { > OrdinalRevisit(loan<TreeFilter::Node> parent) : > TreeFilter::Node("revisit", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << "Rebind frame " << v->token() << ": revisit edge " << v->links->token(e) << std::endl; > } > } > event; > }; > > struct OrdinalTriagePre : > public TreeFilter::Node { > OrdinalTriagePre(loan<TreeFilter::Node> parent) : > TreeFilter::Node("pre", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, EventOrientation orientation) > { > o << "Rebind frame " << v->token() << ": edges " << orientation << " loopback classification: " << v->links->edgeToken() << std::endl; > } > } > event; > }; > > struct OrdinalTriageSort : > public TreeFilter::Node { > OrdinalTriageSort(loan<TreeFilter::Node> parent) : > TreeFilter::Node("sort", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, EventOrientation orientation) > { > o << "Rebind frame " << v->token() << " " << orientation << " sorting: " << std::endl > << "\t⢠edges:" << v->links->edgeToken() << std::endl > << "\t⢠references:" << v->links->referenceToken() << std::endl; > > if (orientation == EventOrientation::after) > o << "\t⢠triage:" << std::endl << v->links->out.ordinal().triageToken(); > } > } > event; > }; > > struct OrdinalTriageCommit : > public TreeFilter::Node { > OrdinalTriageCommit(loan<TreeFilter::Node> parent) : > TreeFilter::Node("commit", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, EventOrientation orientation) > { > o << "Rebind frame " << v->token() << " " << orientation << " commit: " << std::endl > << "\t⢠edges:" << v->links->edgeToken() << std::endl > << "\t⢠references:" << v->links->referenceToken() << std::endl; > > if (orientation == EventOrientation::before) > o << "\t⢠triage:" << std::endl << v->links->out.ordinal().triageToken(); > } > } > event; > }; > > struct OrdinalTriage : > public TreeFilter::Node { > OrdinalTriage(loan<TreeFilter::Node> parent) : > TreeFilter::Node("triage", parent, event), > pre(loan_downwrap<TreeFilter::Node>(this)), > sort(loan_downwrap<TreeFilter::Node>(this)), > commit(loan_downwrap<TreeFilter::Node>(this)) > {} > > OrdinalTriagePre pre; > OrdinalTriageSort sort; > OrdinalTriageCommit commit; ># 709 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << "Rebind frame " << v->token() << ": edge triage [TODO]" << std::endl; > } > } > event; > }; > > struct OrdinalProbe : > public TreeFilter::Node { > OrdinalProbe(loan<TreeFilter::Node> parent) : > TreeFilter::Node("probe", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, cell<TreeEdge> e) > { > o << "Rebind frame " << v->token() << ": probe edge " << v->links->token(e) > << " with tree path: " << std::endl << e->endpoint()->treePathToken().meetFrom(v) << std::endl; > } > } > event; > }; > > struct OrdinalExclude : > public TreeFilter::Node { > OrdinalExclude(loan<TreeFilter::Node> parent) : > TreeFilter::Node("exclude", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v) > { > o << "Rebind frame " << v->token() << ": exclude " << v->token().showPosition() << " from the Î subtree" << std::endl; > } > } > event; > }; > > struct OrdinalDetach : > public TreeFilter::Node { > OrdinalDetach(loan<TreeFilter::Node> parent) : > TreeFilter::Node("detach", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> v, EventOrientation orientation) > { > o << "Rebind: detach " << v->token().showPosition() << " from the tree at " << v->tree()->token().showPosition() << std::endl; > o << "\tEdges of " << v->tree()->token() << " " << orientation << " detach: " << std::endl << v->tree()->links->edgeToken() << std::endl; > } > } > event; > }; > > struct OrdinalAttach : > public TreeFilter::Node { > OrdinalAttach(loan<TreeFilter::Node> parent) : > TreeFilter::Node("attach", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> tail, unit<TreeVertex> head, > AttachMode mode, EventOrientation orientation) > { > o << "Rebind: attach (" << head->token().showPosition() << ") to the Î subtree at (" << tail->token().showPosition() << ") " > << label(mode) << std::endl; > o << "\tEdges of " << tail->token() << " " << orientation << " the attach: " << std::endl << tail->links->edgeToken() << std::endl; > > } > } > event; > }; > > struct OrdinalRebind : > public TreeFilter::Node { > OrdinalRebind(loan<TreeFilter::Node> parent) : > TreeFilter::Node("rebind", parent, event), > push(loan_downwrap<TreeFilter::Node>(this)), > set(loan_downwrap<TreeFilter::Node>(this)), > pop(loan_downwrap<TreeFilter::Node>(this)), > leaf(loan_downwrap<TreeFilter::Node>(this)), > scan(loan_downwrap<TreeFilter::Node>(this)), > revisit(loan_downwrap<TreeFilter::Node>(this)), > triage(loan_downwrap<TreeFilter::Node>(this)), > probe(loan_downwrap<TreeFilter::Node>(this)), > exclude(loan_downwrap<TreeFilter::Node>(this)), > detach(loan_downwrap<TreeFilter::Node>(this)), > attach(loan_downwrap<TreeFilter::Node>(this)) > {} > > OrdinalPush push; > OrdinalSet set; > OrdinalPop pop; > OrdinalLeaf leaf; > OrdinalScan scan; > OrdinalRevisit revisit; > OrdinalTriage triage; > OrdinalProbe probe; > OrdinalExclude exclude; > OrdinalDetach detach; > OrdinalAttach attach; > > enum class Motif { > rebindSingleton, > rebindOrdinalTree, > cascadeOrdinalTree > }; > > friend inline EnumToken > label(Motif motif) > { > switch (motif) > { > case Motif::rebindSingleton: > return EnumToken("rebind singleton"); > > case Motif::rebindOrdinalTree: > return EnumToken("rebind ordinal tree"); > > case Motif::cascadeOrdinalTree: > return EnumToken("cascade ordinal tree"); > } > > ># 844 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp", 844) ># 844 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > << "unreachable" << ># 844 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" 3 > facile::RequireException::require_sentinel ># 844 "../../subprojects/edfst/src/edfst/log/TranscriptSchema.hpp" > ; > } > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> tail, unit<TreeVertex> head, Motif motif) > { > o << "Initiating " << label(motif) << " on " << tail->token().showPosition() << " -> " << head->token().showPosition() << std::endl; > } > } > event; > }; > > struct OrdinalMode : > public TreeFilter::Node { > OrdinalMode(loan<TreeFilter::Node> parent) : > TreeFilter::Node("ordinal", parent, event), > addVertex(loan_downwrap<TreeFilter::Node>(this)), > rebind(loan_downwrap<TreeFilter::Node>(this)) > {} > > OrdinalAddVertex addVertex; > OrdinalRebind rebind; > > struct E : > public TreeFilter::Event { > } > event; > }; > > > > struct RevertInitiate : > public TreeFilter::Node { > RevertInitiate(loan<TreeFilter::Node> parent) : > TreeFilter::Node("initiate", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, unit<TreeVertex> tail, unit<TreeVertex> head) > { > o << "Initiating revert at edge " << tail->token() << " -> " << head->token() << std::endl; > } > } > event; > }; > > struct RevertMode : > public TreeFilter::Node { > RevertMode(loan<TreeFilter::Node> parent) : > TreeFilter::Node("revert", parent, event), > revertInitiate(loan_downwrap<TreeFilter::Node>(this)) > {} > > RevertInitiate revertInitiate; > > struct E : > public TreeFilter::Event { > } > event; > }; > > > > struct GateOpen : > public TreeFilter::Node { > GateOpen(loan<TreeFilter::Node> parent) : > TreeFilter::Node("open", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, handle<VertexGate> gate) > { > o << "Open gate *" << gate->proxy()->token() << " -> " << gate->head()->token() << " with " > << gate->head()->links->referenceCount() << " total references" << std::endl; > > std::vector<unit<TreeVertex>> include, exclude; > for (const TreeReference& r : gate->head()->links->concreteReferences()) { > if (gate->isTail(r.endpoint())) > include.push_back(r.endpoint()); > else > exclude.push_back(r.endpoint()); > } > > Comma c; > o << "⢠include {"; > for (unit<TreeVertex> tail : include) > o << c << tail->token(); > o << "}" << std::endl; > > c.reset(); > o << "⢠exclude {"; > for (unit<TreeVertex> tail : exclude) > o << c << tail->token(); > o << "}" << std::endl; > } > } > event; > }; > > struct GatePrecedentStep : > public TreeFilter::Node { > GatePrecedentStep(loan<TreeFilter::Node> parent) : > TreeFilter::Node("step", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, typename TreeVertex::Mode mode, > unit<TreeVertex> p, unit<TreeVertex> q, unit<TreeVertex> pc = nullptr, unit<TreeVertex> qc = nullptr) > { > o << " ⢠" << mode << " step: "; > if (mode == TreeVertex::Mode::ordinal) { > o << "p." << p->token() << " ⢠q." << q->token() << std::endl; > } else { > if (p->mode() == TreeVertex::Mode::clock) > o << "p." << p->token(); > else > o << "(p." << p->token() << " / pc." << pc->token() << ")" << std::endl; > o << " ⢠"; > if (q->mode() == TreeVertex::Mode::clock) > o << "q." << q->token(); > else > o << "(q." << q->token() << " / qc." << qc->token() << ")" << std::endl; > } > o << std::endl; > } > } > event; > }; > > struct GatePrecedent : > public TreeFilter::Node { > GatePrecedent(loan<TreeFilter::Node> parent) : > TreeFilter::Node("precedent", parent, event), > step(loan_downwrap<TreeFilter::Node>(this)) > {} > > GatePrecedentStep step; > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, typename TreeVertex::Mode mode) > { > o << "⢠precedent discovery in mode " << mode << std::endl; > } > } > event; > }; > > struct GateProfile : > public TreeFilter::Node { > using EvaluationIterator = typename GatePrecedence::EvaluationIterator; > > struct TailColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, handle<const PrecedenceEvaluation> e) { s << e->tail().endpoint()->token(); } > }; > > struct LevelColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, handle<const PrecedenceEvaluation> e) { s << e->level(); } > }; > > struct ForwardColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, handle<const PrecedenceEvaluation> e) { s << (e->isForward() ? "F" : "X"); } > }; > > struct DiscardColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, handle<const PrecedenceEvaluation> e) { s << (e->isDiscard() ? "D" : "P"); } > }; > > struct AnchorColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, handle<const PrecedenceEvaluation> e) { s << (e->isAnchor() ? "A" : ""); } > }; > > struct TableComposition : > HollowCompositionTypes<TailColumn, LevelColumn, ForwardColumn, DiscardColumn, AnchorColumn> { > using RowElement = handle<const PrecedenceEvaluation>; > using RowIterable = iterable<EvaluationIterator>; > }; > using Table = StreamTable::StreamTableBase<TableComposition>; > > GateProfile(loan<TreeFilter::Node> parent) : > TreeFilter::Node("profile", parent, event) > {} > > struct E : > public TreeFilter::Event { > void > operator ()(std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, const std::string& phase, handle<const GatePrecedence> profile) > { > o << "Gate profile in phase " << phase << ":" << std::endl; > > Table t; > t.setIndentation(4); > > t.print(o, EvaluationIterator::iterate(profile)); > } > } > event; > }; > > struct GateEvent : > public TreeFilter::Node { > GateEvent(loan<TreeFilter::Node> parent) : > TreeFilter::Node("gate", parent, event), > open(loan_downwrap<TreeFilter::Node>(this)), > precedent(loan_downwrap<TreeFilter::Node>(this)), > profile(loan_downwrap<TreeFilter::Node>(this)) > {} > > GateOpen open; > GatePrecedent precedent; > GateProfile profile; > > struct E : > public TreeFilter::Event { > } > event; > }; > > > > struct EventSchema : > public TreeFilter::Node { > EventSchema() : > TreeFilter::Node("edfst", globalEvent), > interface(loan_downwrap<TreeFilter::Node>(this)), > clock(loan_downwrap<TreeFilter::Node>(this)), > ordinal(loan_downwrap<TreeFilter::Node>(this)), > revert(loan_downwrap<TreeFilter::Node>(this)), > gate(loan_downwrap<TreeFilter::Node>(this)) > {} > > Interface interface; > ClockMode clock; > OrdinalMode ordinal; > RevertMode revert; > GateEvent gate; > > struct E : > public TreeFilter::Event { > } > globalEvent; > }; > > private: > TranscriptSchema() = delete; >}; >} >} ># 5 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 2 > >namespace edfst >{ >template<typename TreeComposition, template<typename> class TreePluginSetBase> >class IncrementalClockTreeBase >{ >using TreeVertex = typename TreeComposition::Vertex; >using TreeEdge = typename TreeComposition::Edge; >using TreeReference = typename TreeComposition::Reference; >using EdgeEvent = typename TreeComposition::EdgeEvent; >using TreeIntegration = TreeIntegrationBase<TreeComposition, TreePluginSetBase>; >using VertexSet = typename TreeIntegration::Types::VertexSet; >using PrecedenceProfile = typename TreeComposition::LinkSet::IPrecedenceProfile; > >struct LogTypes { > using TranscriptSchema = typename log::TranscriptSchema<TreeComposition, TreePluginSetBase>; > using AttachMode = typename TranscriptSchema::AttachMode; > using ClockRebind = typename TranscriptSchema::ClockRebind; > using OrdinalRebind = typename TranscriptSchema::OrdinalRebind; > using EventOrientation = typename TranscriptSchema::EventOrientation; >}; > >class Relation { >public: > Relation(loan<TreeIntegration> x, loan<EdgeEvent> event) : > _x(x), > _v({ event->tail, event->head }), > _p({ event->tail->clockProxy(), event->head->clockProxy() }), > _event(event) > { > _event->isRetrograde = false; > _event->relation = TreeRelation::cross; > } > > void > discover() > { > if (_p.tail->timespan().out < _p.head->timespan().in) { > _event->isRetrograde = true; > > unit<TreeVertex> walk = _p.tail; > while (true) { > if (walk->tree()->timespan().out > _p.head->timespan().out) { > _event->root = walk->tree(); > break; > } > walk = walk->tree(); > } > > return; > } > > if (_p.head->timespan().out < _p.tail->timespan().in) { > _event->root = _p.tail->meet(_p.head); > return; > } > > if ((_v.tail->mode() == TreeVertex::Mode::clock) && (_v.head->mode() == TreeVertex::Mode::clock)) { > if (_v.tail->timespan().in < _v.head->timespan().in) > _event->root = _v.tail, _event->relation = TreeRelation::forward; > else > _event->root = _v.head, _event->relation = TreeRelation::loopback; > return; > } > > _r.tail = _v.tail->clockFrontierProxy(), _r.head = _v.head->clockFrontierProxy(); > if (_v.tail->mode() == TreeVertex::Mode::ordinal) { > if ((_v.head->mode() == TreeVertex::Mode::ordinal) && (_p.tail == _p.head)) { > _event->root = _p.tail; > _event->isRetrograde = _r.tail->treePosition() < _r.head->treePosition(); > return; > } > > if (_p.tail->timespan().in < _p.head->timespan().in) { > _event->root = _p.tail; > > if (_r.tail->treePosition() == 0) { > _event->isRetrograde = true; > } else { > if (isLeftwardAmongSiblings(_r.tail)) { > unit<TreeVertex> sibling = _r.tail->links->findLeftClockSibling(); > _event->isRetrograde = ((sibling == nullptr) || (_p.head->timespan().in > sibling->timespan().out)); > _x->pm.debitSiblingScan(_v.tail->ordinalTree(), _r.tail, sibling); > } else { > unit<TreeVertex> sibling = _r.tail->links->findRightClockSibling(); > _event->isRetrograde = ((sibling != nullptr) && (_p.head->timespan().in >= sibling->timespan().in)); > _x->pm.debitSiblingScan(_v.tail->ordinalTree(), _r.tail, sibling); > } > } > return; > } > } > > if ((_v.head->mode() == TreeVertex::Mode::ordinal) && (_p.head->timespan().in < _p.tail->timespan().in)) { > _event->root = _p.head; > > if (_r.head->treePosition() > 0) { > if (isLeftwardAmongSiblings(_r.head)) { > unit<TreeVertex> sibling = _r.head->links->findLeftClockSibling(); > _event->isRetrograde = ((sibling != nullptr) && (_p.tail->timespan().in < sibling->timespan().out)); > _x->pm.debitSiblingScan(_v.head->ordinalTree(), _r.head, sibling); > } else { > unit<TreeVertex> sibling = _r.head->links->findRightClockSibling(); > _event->isRetrograde = ((sibling == nullptr) || (_p.tail->timespan().out < sibling->timespan().in)); > _x->pm.debitSiblingScan(_v.head->ordinalTree(), _r.head, sibling); > } > } > return; > } > > if (_v.tail->mode() == TreeVertex::Mode::clock) { > if (_v.head->mode() == TreeVertex::Mode::ordinal) { > _event->relation = TreeRelation::forward; > _event->root = _v.tail; > } else { > _event->root = _p.tail->meet(_p.head); > } > } else if (_v.head->mode() == TreeVertex::Mode::clock) { > _event->relation = TreeRelation::loopback; > _event->root = _v.head; > } > } > >private: > struct SubtreeRelation { > unit<TreeVertex> tail; > unit<TreeVertex> head; > }; > > bool > isLeftwardAmongSiblings(unit<TreeVertex> v) > { > return (Arithmetic::ratio(point_util::quantifyByIndex(v->treePosition()), v->tree()->links->out.clock().treeEdgeCount()) < 0.5); > } > > const loan<TreeIntegration> _x; > > SubtreeRelation _v; > SubtreeRelation _p; > SubtreeRelation _r; > > loan<EdgeEvent> _event; >}; >public: > IncrementalClockTreeBase(loan<TreeIntegration> x) : > _x(x), > _renumberFrameFactory(6), > _expansionFrameFactory(6), > _rebindFrameFactory(6), > _convertFrameFactory(6), > _revertFrameFactory(6) > {} > > void > beginEpoch() > { > _x->episode.clock.revert.isActive = false; > _x->episode.clock.escalation.isPending = _x->episode.clock.escalation.isActive = false; > } > > unit<TreeVertex> > addClockVertex(unit<TreeVertex> tail, unit<TreeVertex> head) > { > ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > isOnWeakClockPath(tail) ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 168) << ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "isOnWeakClockPath(tail)" ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "Cannot add a clock vertex on an interior clock tree path" << ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 168 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > head->setMode(TreeVertex::Mode::clock); > > _x->pm.push(head); > > _x->xs.transcribe(_x->xs.schema.ordinal.addVertex.event, tail, head); > > WalkPosition p = tail->timespan().out + 2; > > head->setTimespan(tail->timespan().out + 1, p++); > unit<TreeVertex> walk = tail; > > do { > walk->setTimeOut(p++); > walk = walk->tree(); > } while (walk != nullptr); > > _x->pm.addVertex(head); > > tail->links->requireViewIntegrity(); > head->links->requireViewIntegrity(); > > return head; > } > > void > expandClockVertex(unit<TreeVertex> origin, unit<TreeVertex> expansion) > { > expansion->setTimespan(origin->timespan().in, origin->timespan().out); > } > > void > integrateEdge(unit<TreeVertex> tail, unit<TreeVertex> head, TreeRelation relation) > { > ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > (relation == TreeRelation::tree) || tail != _x->root ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 203) << ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "(relation == TreeRelation::tree) || tail != _x->root" ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 203 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > tail->links->out.clock().append(head, relation == TreeRelation::tree); > > _x->pm.addEdge(tail); > } > > void > addEventEdge() > { > loan<EdgeEvent> event = _x->episode.update.event; > integrateEdge(event->tail, event->head, _x->episode.update.integration.relation); > _x->template pluginDispatch<plugin::AddEventEdge>(); > } > > void > precedent(unit<TreeVertex> head, handle<VertexSet> subset, handle<PrecedenceProfile> profile) > { > _x->xs.transcribe(_x->xs.schema.gate.precedent.event, TreeVertex::Mode::clock); > > subset->start(); > unit<TreeVertex> p = nullptr, pc = nullptr; > for (TreeReference q : head->links->concreteReferences()) { > if (subset->contains(q.endpoint())) { > p = precedent(p, pc, q, profile); > pc = p->clockProxy(); > } > } > > profile->setClockRelation(); > profile->setRelation(probe(profile->precedent().endpoint(), head)); > } > > void > configureEvent() > { > loan<EdgeEvent> event = _x->episode.update.event; > event->mode = TreeVertex::Mode::clock; > > Relation r(_x, event); > r.discover(); > } > > void > rebindSingleton() > { > unit<TreeVertex> tail = _x->episode.rebind.tail, head = _x->episode.rebind.head; > > _x->pm.push(tail); > _x->pm.push(head); > > _x->xs.transcribe(_x->xs.schema.clock.rebind.event, tail, head, LogTypes::ClockRebind::Motif::rebindSingleton); > _x->xs.transcribe(_x->xs.schema.clock.rebind.attach.event, tail, head, LogTypes::AttachMode::delta, LogTypes::EventOrientation::before); > > _x->episode.rebind.mode = TreeVertex::Mode::clock; > > pushRenumberPath(tail, _x->episode.rebind.root); > _x->stack.template push<RenumberFrame>(_x, tail, tail->links->treeEdgeCount()); > _x->episode.clock.escalation.isPending = _x->episode.expansion.isInProgress; > > _x->detachSubtree(head); > > if (head->mode() == TreeVertex::Mode::ordinal) { > integrateOrdinalSubtree(head); > } else { > head->setRole(TreeVertex::Role::delta, _x->episode.ordinal.rebind.vertexStep); > } > > head->setLevel(tail->level() + 1); > _x->episode.clock.walk.cursor = _x->episode.clock.walk.entryTime = tail->timespan().out; > head->setVisited(); > addEventEdge(); > pushRebindSubtree(tail, head); > > _x->stack.walk(); > > _x->pm.pop(head); > _x->pm.pop(tail); > _x->ordinal.concludeClockEpisode(); > _x->xs.transcribe(_x->xs.schema.clock.rebind.attach.event, tail, head, LogTypes::AttachMode::delta, LogTypes::EventOrientation::after); > } > > void > integrateOrdinalTree() > { > bool revert = _x->episode.ordinal.revert.isInProgress; > unit<TreeVertex> tail = _x->episode.rebind.tail, head = _x->episode.rebind.head; > > _x->xs.transcribe(_x->xs.schema.clock.rebind.event, tail, head, > revert ? LogTypes::ClockRebind::Motif::revertOrdinalTree : LogTypes::ClockRebind::Motif::integrateOrdinalTree); > > ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > !revert || tail->mode() == TreeVertex::Mode::revert ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 294) << ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "!revert || tail->mode() == TreeVertex::Mode::revert" ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 294 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" > ># 295 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "attempt to revert an OT with a rebind tail in " << TreeVertex::tag(tail->mode()) << " mode" << ># 295 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 295 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > revert || tail->mode() == TreeVertex::Mode::ordinal ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 296) << ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "revert || tail->mode() == TreeVertex::Mode::ordinal" ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 296 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" > ># 297 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "attempt to integrate an OT with a rebind tail in " << TreeVertex::tag(tail->mode()) << " mode" << ># 297 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 297 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > unit<TreeVertex> root = tail->ordinalRoot(), anchor = root->tree(); > > root->ifAdvanceEpoch(_x->episode.rebind.epoch); > anchor->ifAdvanceEpoch(_x->episode.rebind.epoch); > > _x->episode.rebind.mode = TreeVertex::Mode::clock; > _x->episode.update.integration.mode = (revert ? TreeVertex::Mode::ordinal : TreeVertex::Mode::clock); > _x->episode.rebind.tail = anchor; > _x->episode.rebind.head = root; > _x->episode.clock.entry = _x->episode.rebind.root; > pushRenumberPath(root, _x->root); > _x->pm.push(root); > _x->episode.clock.escalation.isActive = true; > > if (revert) { > _x->episode.clock.revert.tail = tail; > _x->episode.clock.revert.head = head; > _x->episode.clock.revert.isActive = true; > _x->episode.clock.revert.isInOriginalDelta = false; > } else { > _x->episode.clock.subsumption.tail = tail; > _x->episode.clock.subsumption.head = head; > > root->links->out.ordinal().sortTreePartition(); > } > > uint32_t delta = 0, visited = 0; > if (revert) { > delta = root->links->out.revert().treeEdgeCount(); > visited = root->links->out.revert().deltaEndPosition(); > } > > integrateOrdinalSubtree(root); > root->setTimeIn(_x->episode.rebind.entryTime.walkPosition); > root->setTimeOut(0); > root->setVisited(); > _x->episode.clock.walk.cursor = _x->episode.clock.walk.entryTime = root->timespan().in; > if (revert) > _x->stack.template push<RevertFrame>(_x, root, delta, visited); > else > continueConvertSubtree(root); > > _x->stack.walk(); > > _x->ordinal.concludeClockEpisode(); > _x->episode.clock.subsumption.tail = _x->episode.clock.subsumption.head = nullptr; > _x->episode.clock.revert.tail = _x->episode.clock.revert.head = nullptr; > _x->episode.clock.revert.isActive = false; > } > > void > revertOrdinalTree() > { > unit<TreeVertex> tail = _x->episode.rebind.tail, head = _x->episode.rebind.head; > > _x->xs.transcribe(_x->xs.schema.clock.rebind.event, tail, head, LogTypes::ClockRebind::Motif::revertOrdinalTree); > > _x->pm.push(tail); > _x->stack.clear(); > pushRenumberPath(tail, _x->root); > _x->stack.template push<RenumberFrame>(_x, tail, tail->links->treeEdgeCount()); > _x->episode.clock.escalation.isActive = true; > > _x->episode.clock.entry = tail; > _x->episode.clock.walk.cursor = _x->episode.clock.walk.entryTime = tail->timespan().out; > _x->episode.rebind.mode = _x->episode.update.integration.mode = TreeVertex::Mode::clock; > > head->setTimeIn(++_x->episode.clock.walk.cursor); > _x->pm.push(head); > _x->stack.template push<RevertFrame>(_x, head, head->links->out.revert().treeEdgeCount(), head->links->out.revert().deltaEndPosition()); > integrateOrdinalSubtree(head); > > _x->stack.walk(); > > _x->pm.pop(tail); > _x->ordinal.concludeClockEpisode(); > } > > bool > revertTransformOrdinalRootFrame(unit<TreeVertex> root) > { > if (_x->episode.rebind.mode == TreeVertex::Mode::ordinal) { > _x->pm.pop(root); > return false; > } else { > unit<RevertFrame> xform = RevertFrame::make(_x, root, root->links->out.revert().treeEdgeCount(), > root->links->out.revert().deltaEndPosition()); > _x->stack.back() = xform.template downcast<TreeWalk::Frame>(); > integrateOrdinalSubtree(root); > root->setTimeIn(++_x->episode.clock.walk.cursor); > return true; > } > } > > void > expand(unit<TreeVertex> v) > { > _x->episode.rebind.root = nullptr; > _x->episode.clock.revert.isActive = false; > _x->episode.clock.escalation.isActive = _x->episode.clock.escalation.isPending = false; > _x->episode.clock.walk.cursor = _x->episode.clock.walk.entryTime = v->tree()->timespan().out; > v->setLevel(v->tree()->level() + 1); > v->setTimeIn(++_x->episode.clock.walk.cursor); > > pushRenumberPath(v, _x->root); > _x->template pluginDispatch<plugin::RepositionVertex>(v); > _x->stack.template push<ExpansionFrame>(_x, v, 0); > _x->stack.walk(); > } > > void > closeEpisode() > { > ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > _renumberFrameFactory.empty() ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 412) << ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "_renumberFrameFactory.empty()" ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 412 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > _expansionFrameFactory.empty() ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 413) << ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "_expansionFrameFactory.empty()" ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 413 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > _rebindFrameFactory.empty() ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 414) << ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "_rebindFrameFactory.empty()" ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 414 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > _convertFrameFactory.empty() ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 415) << ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "_convertFrameFactory.empty()" ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 415 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > _revertFrameFactory.empty() ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 416) << ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "_revertFrameFactory.empty()" ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 416 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > } > > void > detachSubtree(unit<TreeVertex> v) > { > unit<TreeVertex> stump = v->tree(); > > if (v->isFlag(TreeVertex::EpochFlags::isRevertOrphan)) { > v->clearFlag(TreeVertex::EpochFlags::isRevertOrphan); > > _x->xs.transcribe(_x->xs.schema.clock.rebind.detach.orphan.event, v, LogTypes::EventOrientation::before); > > if (stump->isOnDeltaStack()) { > unit<TreeWalk::Frame> f = _x->selectWalkFrame(stump->level()); > > if (f->isFrameType<ConvertFrame>()) { > unit<ConvertFrame> cf = f.template downcast<ConvertFrame>(); > cell<TreeEdge> pivot = cf->truncateWalk(); > stump->links->out.clock().rotateTreeEdgeRight(v, pivot); > } > } > > _x->xs.transcribe(_x->xs.schema.clock.rebind.detach.orphan.event, v, LogTypes::EventOrientation::after); > return; > } > > _x->xs.transcribe(_x->xs.schema.clock.rebind.detach.event, v, LogTypes::EventOrientation::before); > > unit<TreeWalk::Frame> detachFrame = (stump->isOnDeltaStack() ? _x->selectWalkFrame(stump->level()) : nullptr); > > if ((detachFrame == nullptr) || !isMutable(detachFrame)) > stump->links->out.clock().demoteSubtree(v); > > if (detachFrame != nullptr) { > unit<ClockWalkFrame> c = detachFrame.template downcast<ClockWalkFrame>(); > if (isMutable(detachFrame) || (detachFrame->isFrameType<RenumberFrame>() && !c->isClosed())) { > cell<TreeEdge> excluded = c->truncateWalk(); > if (isMutable(detachFrame)) { > cell<TreeEdge> detachEdge = stump->links->edgeAt(v->treePosition()); > if (detachEdge < excluded) { > if (detachFrame->isFrameType<ConvertFrame>()) { > stump->links->out.clock().rotateTreeEdgeRight(v, excluded); > } else { > if (excluded->endpoint()->tree() == stump) > excluded->endpoint()->setTreePosition(stump->links->indexOf(detachEdge)); > > v->setTreePosition(stump->links->indexOf(excluded)); > stump->links->swap(detachEdge, excluded); > } > } > } > } > } > > _x->xs.transcribe(_x->xs.schema.clock.rebind.detach.event, v, LogTypes::EventOrientation::after); > } > > bool > isOnWeakClockPath(unit<TreeVertex> v) > { > return (v->mode() == TreeVertex::Mode::clock && (v->timespan().out + v->level() == _x->root->timespan().out)); > } > > bool > isClock(unit<typename TreeWalk::Frame> f) > { > return (f->frameTypeId & _frameTypeMask) == _frameTypeMask; > } > > unit<TreeVertex> > peek(unit<typename TreeWalk::Frame> f) > { > return f.template upcast<ClockWalkFrame>()->v(); > } > > bool > evaluateRenumberingCost(__attribute__((unused)) unit<TreeVertex> tail, unit<TreeVertex> head) > { > uint32_t lambda = _x->episode.clock.scope.lambda.distance(); > uint32_t edgeCount = head->links->edgeCount(); > > if (edgeCount == 0) > return (lambda <= 3); > else if ((edgeCount == 1) && (head->links->edgeAt(0)->endpoint()->links->edgeCount() == 0)) > return (lambda <= 7); > > > double congruentDeltaRatio = Arithmetic::ratio(_x->episode.clock.scope.delta.distance(), lambda); > > return (congruentDeltaRatio < 0.5); > } > >private: > static constexpr std::size_t _frameTypeMask = 0x8000000000000000ULL; > > class ClockWalkFrame : > public TreeWalk::Frame > { > public: > ClockWalkFrame(std::size_t frameTypeHash ># 516 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 516 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > const std::string& frameTypeName, > loan<TreeIntegration> x, unit<TreeVertex> v) : > ClockWalkFrame(frameTypeHash ># 518 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 518 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > frameTypeName, x, v, v->links->cellwalkTreeEdges()) > {} > > ClockWalkFrame(std::size_t frameTypeHash ># 521 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 521 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > const std::string& frameTypeName, > loan<TreeIntegration> x, unit<TreeVertex> v, cellwalk<TreeEdge> edgeWalk) : > TreeWalk::Frame(frameTypeId(frameTypeHash) ># 523 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 523 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > frameTypeName), > _x(x), > _v(v), > _walk(edgeWalk), > _i(_walk.begin()) > {} > > static std::size_t > frameTypeId(std::size_t frameTypeHash) { return frameTypeHash | _frameTypeMask; } > > unit<TreeVertex> > v() { return _v; } > > void > pushObserved() override > { > _x->xs.transcribe(_x->xs.schema.clock.rebind.push.event, _v ># 539 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 539 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > frameTypeName); > > _v->setOnDeltaStack(); > > if (_x->episode.rebind.isInProgress) { > ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > _x->stack.size() == _x->episode.rebind.stack.framePosition(1) || _v->tree()->isOnDeltaStack() ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 544) << ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "_x->stack.size() == _x->episode.rebind.stack.framePosition(1) || _v->tree()->isOnDeltaStack()" ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 544 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" > > ># 546 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "Cannot push a disjoint tree path on delta stack: parent " << _v->tree()->token() << " of " << _v->token() > << " is not on stack." << ># 547 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 547 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > if (_x->stack.size() == _x->episode.rebind.stack.framePosition(1)) > _x->episode.rebind.stack.levelOffset = _v->level(); > } > } > > void > setObserved(uint32_t position) override > { > ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > (position + 1) >= _x->stack.size() || _v->stackSubtree()->tree() == _v ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 557) << ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "(position + 1) >= _x->stack.size() || _v->stackSubtree()->tree() == _v" ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 557 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" > ># 558 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "Cannot push a disjoint tree path on delta stack: subtree frame " << _v->stackSubtree()->token() > << " cannot be reached by a tree path step from " << _v->stackSubtree()->tree()->token() << ># 559 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 559 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > _x->xs.transcribe(_x->xs.schema.clock.rebind.set.event, _v, position ># 561 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 561 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > frameTypeName); > > _v->setOnDeltaStack(); > > if (_x->episode.rebind.isInProgress && (position == _x->episode.rebind.stack.base)) > _x->episode.rebind.stack.levelOffset = _v->level(); > } > > void > popObserved() override > { > _x->xs.transcribe(_x->xs.schema.clock.rebind.pop.event, _v ># 572 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 572 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > frameTypeName); > > _v->setOnDeltaStack(false); > > if (_x->episode.clock.revert.isActive && (_v == _x->episode.update.event->head)) > _x->episode.clock.revert.isInOriginalDelta = false; > } > > bool > isClosed() { return _i == _walk.end(); } > > cell<TreeEdge> > truncateWalk(uint32_t count = 1) > { > _walk.contract(count); > return *_walk.peekEnd(); > } > > protected: > loan<TreeIntegration> _x; > unit<TreeVertex> _v; > cellwalk<TreeEdge> _walk; > typename cell<TreeEdge>::iterator _i; > }; > > class RenumberFrame : > public ClockWalkFrame > { > using super = ClockWalkFrame; > > public: > RenumberFrame(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t nextEdgeIndex) : > ClockWalkFrame(typeid(*this).hash_code() ># 604 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 604 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "Renumber", x, v, v->links->cellwalkTreeEdges(nextEdgeIndex)) > {} > > static unit<RenumberFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t nextEdgeIndex) > { > return x->clock._renumberFrameFactory.makeUnit(x, v, nextEdgeIndex); > } > > TreeWalk::Motion > step() override > { > if (super::_i == super::_walk.end()) { > if (super::_x->episode.clock.escalation.isPending && (super::_v == super::_x->episode.rebind.root)) { > > { > super::_x->xs.transcribe(super::_x->xs.schema.clock.rebind.escalate.event, super::_v); > > super::_x->stack.pop(); > super::_x->clock.pushRenumberPath(super::_v, super::_x->root); > > super::_x->episode.clock.escalation.isActive = true; > super::_x->episode.clock.escalation.isPending = false; > } > return TreeWalk::Motion::walk; > } else { > super::_v->links->requireViewIntegrity(); > return TreeWalk::Motion::pop; > } > } > > cell<TreeEdge> edge = *(super::_i++); > unit<TreeVertex> head = edge->endpoint(); > > head->setTreePosition(super::_v->links->edgeIndex(edge)); > > if (head->mode() == TreeVertex::Mode::ordinal) { > if (super::_x->episode.clock.escalation.isActive && !super::_x->ordinal.isEffective(head->ordinalTree())) { > head->advanceEpoch(super::_x->episode.rebind.epoch); > head->setVisited(); > > head->setTimeIn(++super::_x->episode.clock.walk.cursor); > head->setTimeOut(0); > if (super::_x->episode.clock.entry == nullptr) > super::_x->episode.clock.entry = super::_x->episode.rebind.root; > > super::_x->pm.push(head); > head->links->out.ordinal().sortTreePartition(); > super::_x->clock.integrateOrdinalSubtree(head); > super::_v->setVisited(); > super::_x->clock.continueConvertSubtree(head); > } else { > super::_x->xs.transcribe(super::_x->xs.schema.clock.rebind.bypass.event, super::_v, edge); > super::_x->pm.creditRebindBypass(head->ordinalTree()); > } > } else { > if (head->timespan().in == ++super::_x->episode.clock.walk.cursor) { > super::_x->episode.clock.walk.isLive = false; > std::size_t frameTypeId = super::_x->stack.top()->frameTypeId; > do { > super::_x->stack.pop(); > } while (super::_x->stack.size() > super::_x->episode.stackBase() && super::_x->stack.top()->frameTypeId == frameTypeId); > return TreeWalk::Motion::stop; > } else { > head->setTimeIn(super::_x->episode.clock.walk.cursor); > } > > super::_x->stack.template push<RenumberFrame>(super::_x, head, 0); > } > > return TreeWalk::Motion::walk; > } > > void > popObserved() override > { > if (super::_x->episode.clock.walk.isLive) > super::_v->setTimeOut(++super::_x->episode.clock.walk.cursor); > > ClockWalkFrame::popObserved(); > super::_x->clock._renumberFrameFactory.release(unit<RenumberFrame>::wrap(this)); > } > > std::ostream& > printStackTraceEntry(std::ostream& o) override > { > if (super::isClosed()) > o << "<closed>"; > else > o << "Renumber " << super::_v->links->token(*super::_i); > > return o; > } > }; > > class ExpansionFrame : > public ClockWalkFrame > { > using super = ClockWalkFrame; > > public: > ExpansionFrame(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t nextEdgeIndex) : > ClockWalkFrame(typeid(*this).hash_code() ># 706 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 706 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "Expansion", x, v, v->links->cellwalkTreeEdges(nextEdgeIndex)) > {} > > static unit<ExpansionFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t nextEdgeIndex) > { > return x->clock._expansionFrameFactory.makeUnit(x, v, nextEdgeIndex); > } > > TreeWalk::Motion > step() override > { > if (super::_i == super::_walk.end()) { > super::_x->pm.pop(super::_v); > super::_v->links->requireViewIntegrity(); > return TreeWalk::Motion::pop; > } > > cell<TreeEdge> edge = *(super::_i++); > unit<TreeVertex> head = edge->endpoint(); > > super::_x->pm.push(head); > > if (head->mode() == TreeVertex::Mode::ordinal) { > super::_x->xs.transcribe(super::_x->xs.schema.clock.rebind.bypass.event, super::_v, edge); > > if (head->level() == (head->tree()->level() + 1)) { > super::_x->template pluginDispatch<plugin::RepositionVertex>(head); > super::_x->pm.creditExpansionBypass(head->ordinalTree()); > super::_x->pm.pop(head); > } else { > super::_x->ordinal.expand(head); > } > } else { > > > > > head->setLevel(head->tree()->level() + 1); > head->setTimeIn(++super::_x->episode.clock.walk.cursor); > super::_x->template pluginDispatch<plugin::RepositionVertex>(head); > super::_x->stack.template push<ExpansionFrame>(super::_x, head, 0); > } > > return TreeWalk::Motion::walk; > } > > void > popObserved() override > { > super::_v->setTimeOut(++super::_x->episode.clock.walk.cursor); > > ClockWalkFrame::popObserved(); > super::_x->clock._expansionFrameFactory.release(unit<ExpansionFrame>::wrap(this)); > super::_x->pm.pop(super::_v); > } > > std::ostream& > printStackTraceEntry(std::ostream& o) override > { > if (super::isClosed()) > o << "<closed>"; > else > o << "Expansion " << super::_v->links->token(*super::_i); > > return o; > } > }; > > class RebindFrame : > public ClockWalkFrame > { > using super = ClockWalkFrame; > > public: > RebindFrame(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t skipCount = 0) : > RebindFrame(x, v, skipCount, v->links->edgeCount()) > {} > > RebindFrame(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t startIndex, uint32_t endIndex) : > ClockWalkFrame(typeid(*this).hash_code() ># 786 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 786 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "Clock Rebind", x, v, v->links->cellwalkSpan(startIndex, endIndex)) > {} > > static unit<RebindFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t skipCount = 0) > { > return x->clock._rebindFrameFactory.makeUnit(x, v, skipCount); > } > > static unit<RebindFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t startIndex, uint32_t endIndex) > { > return x->clock._rebindFrameFactory.makeUnit(x, v, startIndex, endIndex); > } > > TreeWalk::Motion > step() override > { > bool isLeafFrame = false; > > do { > if (super::isClosed()) { > super::_v->setTimeOut(++super::_x->episode.clock.walk.cursor); > super::_x->pm.pop(super::_v); > if (!super::_x->clock.isDeltaEntryPoint(super::_v) && > !(super::_x->episode.ordinal.revert.isInProgress && > super::_v->isFlag(TreeVertex::EpochFlags::isDeltaClosed))) > { > super::_x->deltaClose(super::_v); > } > return TreeWalk::Motion::pop; > } > > cell<TreeEdge> edge = *(super::_i++); > unit<TreeVertex> head = edge->endpoint(); > > if (head->isLive(super::_x->episode.rebind.epoch)) { > if (head->isVisited()) { > if (head->tree() == super::_v) > ># 825 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > throw ># 825 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > FacileException ># 825 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 825) ># 825 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "Revisit tree edge " << super::_v->id() << " -> " << head->id() << packContext; > > super::_x->template pluginDispatch<plugin::DeltaEdge>(super::_v, edge, identifyRevisitRelation(super::_v, head), > TreeVertex::Mode::clock); > super::_x->xs.transcribe(super::_x->xs.schema.clock.rebind.revisit.event, super::_v, edge); > > if (head->mode() == TreeVertex::Mode::ordinal) { > cell<TreeReference> reference = head->links->getDual(edge.read()); > if (head->links->in.ordinal().index().identifyPartition(reference) < OrdinalReferencePartition::clock) > head->links->in.ordinal().rotateRight(reference, OrdinalReferencePartition::clock); > } > > continue; > } > } else { > head->advanceEpoch(super::_x->episode.rebind.epoch); > } > > if (head->tree() != super::_v) { > super::_x->xs.transcribe(super::_x->xs.schema.clock.rebind.probe.event, super::_v, edge); > > TreeRelation relation = probeEdge(head); > if (relation != TreeRelation::tree) { > super::_x->template pluginDispatch<plugin::DeltaEdge>(super::_v, edge, relation, TreeVertex::Mode::clock); > continue; > } > } > > super::_x->pm.push(head); > typename LogTypes::AttachMode attachMode = head->tree() == super::_v ? LogTypes::AttachMode::retain : LogTypes::AttachMode::cascade; > super::_x->xs.transcribe(super::_x->xs.schema.clock.rebind.attach.event, super::_v, head, attachMode, LogTypes::EventOrientation::before); > > head->setLevel(super::_v->level() + 1); > head->setVisited(); > > if (head->mode() == TreeVertex::Mode::ordinal) { > bool integrate = true; > if (head->ordinalRoot() == head) > integrate = super::_x->ordinal.evaluateCascadeRebind(head->ordinalTree()); > > if (integrate) { > super::_x->clock.integrateOrdinalSubtree(head); > } > > super::_x->ordinal.inscribeSubordinatePath(head); > } > > if (head->tree() == super::_v) { > if (!super::_x->clock.isDeltaEntryPoint(super::_v)) > super::_v->links->out.clock().rotateFreeToTree(edge); > } else { > super::_x->detachSubtree(head); > super::_v->links->out.clock().rotateFreeToTree(edge); > head->setTree(super::_v); > > if ((head->mode() == TreeVertex::Mode::ordinal) && super::_v->isFlag(TreeVertex::EpochFlags::isOrdinalAtEpoch) && > (super::_v->ordinalTree() == head->ordinalTree())) > { > cell<TreeReference> reference = head->links->getDual(edge.read()); > OrdinalReferencePartition partition = head->links->in.ordinal().index().identifyLinkPartition(edge->dualPosition()); > head->links->in.ordinal().rotateRight(reference, partition, OrdinalReferencePartition::clock); > } > } > > head->setRole(TreeVertex::Role::delta, super::_x->episode.ordinal.rebind.vertexStep); > > super::_x->template pluginDispatch<plugin::DeltaEdge>(super::_v, edge, TreeRelation::tree, TreeVertex::Mode::clock); > super::_x->xs.transcribe(super::_x->xs.schema.clock.rebind.attach.event, super::_v, head, attachMode, LogTypes::EventOrientation::after); > > isLeafFrame = false; > if (head->mode() == TreeVertex::Mode::ordinal) { > super::_x->ordinal.cascadeOrdinalTree(super::_v, head->ordinalTree()); > } else { > super::_x->episode.clock.walk.cursor++; > head->setTimeOut(0); > > isLeafFrame = !super::_x->clock.continueRebindSubtree(head); > } > } while (isLeafFrame); > > return TreeWalk::Motion::walk; > } > > TreeRelation > probeEdge(unit<TreeVertex> head) > { > if (head->isOnDeltaStack()) > return TreeRelation::loopback; > > WalkTimespan hp; > > if (head->mode() == TreeVertex::Mode::ordinal) { > unit<TreeVertex> hr = head->ordinalRoot(); > > if (hr->mode() == TreeVertex::Mode::clock) > return TreeRelation::tree; > > if (hr->isLive(super::_v->rebindEpoch()) && hr->isVisited() && !hr->isFlag(TreeVertex::EpochFlags::isEpisodeExclusion)) > return TreeRelation::tree; > > if (hr->tree() == super::_v) > return (hr->isOnDeltaStack() ? TreeRelation::loopback : TreeRelation::tree); > > if (hr->tree()->isOnDeltaStack()) { > unit<TreeVertex> sibling = hr->tree()->links->edgeAt(hr->tree()->stackTreePosition())->endpoint(); > return (sibling->treePosition() < hr->treePosition() ? TreeRelation::tree : TreeRelation::cross); > } > > hp = hr->tree()->timespan(); > } else { > hp = head->timespan(); > } > > if (hp.out < super::_x->episode.rebind.entryTime.walkPosition) > return TreeRelation::cross; > > WalkTimespan timezone = super::_x->episode.clock.entry->timespan(); > > if ((hp.in < timezone.in) && (hp.out > timezone.out)) > return (head->mode() == TreeVertex::Mode::ordinal ? TreeRelation::cross : TreeRelation::loopback); > > return TreeRelation::tree; > } > > void > popObserved() override > { > ClockWalkFrame::popObserved(); > super::_x->clock._rebindFrameFactory.release(unit<RebindFrame>::wrap(this)); > super::_x->pm.pop(super::_v); > } > > std::ostream& > printStackTraceEntry(std::ostream& o) override > { > if (super::isClosed()) > o << "<closed>"; > else > o << "Clock rebind " << super::_v->links->token(*super::_i); > > return o; > } > > private: > TreeRelation > identifyRevisitRelation(unit<TreeVertex> tail, unit<TreeVertex> head) > { > if (head->isOnDeltaStack()) > return TreeRelation::loopback; > > if (head->isVisited() && (head->clockProxy()->timespan().in >= tail->timespan().in)) > return TreeRelation::forward; > else > return TreeRelation::cross; > } > }; > > class ConvertFrame : > public ClockWalkFrame > { > using super = ClockWalkFrame; > > public: > ConvertFrame(loan<TreeIntegration> x, unit<TreeVertex> v) : > ClockWalkFrame(typeid(*this).hash_code() ># 989 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 989 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "Clock Convert", x, v), > _isSuspended(false) > {} > > ConvertFrame(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t endIndex) : > ConvertFrame(x, v, 0, endIndex) > {} > > ConvertFrame(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t startIndex, uint32_t endIndex) : > ClockWalkFrame(typeid(*this).hash_code() ># 998 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 998 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "Clock Convert", x, v, v->links->cellwalkSpan(startIndex, endIndex)), > _isSuspended(false) > {} > > static unit<ConvertFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v) > { > return x->clock._convertFrameFactory.makeUnit(x, v); > } > > static unit<ConvertFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t endIndex) > { > return x->clock._convertFrameFactory.makeUnit(x, v, endIndex); > } > > static unit<ConvertFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t startIndex, uint32_t endIndex) > { > return x->clock._convertFrameFactory.makeUnit(x, v, startIndex, endIndex); > } > > TreeWalk::Motion > step() override > { > if (_isSuspended) { > _isSuspended = false; > super::_v->links->out.clock().setTreeCursor(*super::_i); > } > > while (true) { > if (super::isClosed()) { > if (super::_v == super::_x->episode.clock.subsumption.tail) { > unit<TreeVertex> head = super::_x->episode.clock.subsumption.head; > super::_x->clock.transformConversionPath(); > > super::_x->pm.push(head); > super::_x->detachSubtree(head); > > super::_x->clock.addEventEdge(); > super::_x->ordinal.inscribeSubordinatePath(head); > > uint32_t addedEdgeIndex = point_util::lastOfQuantity(super::_v->links->treeEdgeCount()); > super::_x->stack.back() = RebindFrame::make(super::_x, super::_v, addedEdgeIndex).template downcast<TreeWalk::Frame>(); > super::_x->clock._convertFrameFactory.release(unit<ConvertFrame>::wrap(this)); > return TreeWalk::Motion::walk; > } else { > super::_v->setTimeOut(++super::_x->episode.clock.walk.cursor); > return TreeWalk::Motion::pop; > } > } > > cell<TreeEdge> edge = *(super::_i++); > unit<TreeVertex> head = edge->endpoint(); > > ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > head->mode() != TreeVertex::Mode::clock ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 1053) << ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "head->mode() != TreeVertex::Mode::clock" ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "Cannot convert " << head->token() << " to clock mode" << ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 1053 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > head->ifAdvanceEpoch(super::_x->episode.rebind.epoch); > super::_x->pm.push(head); > head->setLevel(super::_v->level() + 1); > head->setVisited(); > > head->links->out.ordinal().sortTreePartition(); > super::_x->clock.integrateOrdinalSubtree(head); > head->setTimeIn(++super::_x->episode.clock.walk.cursor); > super::_v->links->out.clock().rotateFreeToTree(edge); > > if (super::_x->clock.continueConvertSubtree(head)) { > head->setTimeOut(0); > return TreeWalk::Motion::walk; > } > > super::_x->pm.pop(head); > head->setTimeOut(++super::_x->episode.clock.walk.cursor); > } > > return TreeWalk::Motion::stop; > } > > void > suspend(bool b = true) { _isSuspended = b; } > > void > popObserved() override > { > ClockWalkFrame::popObserved(); > super::_x->clock._convertFrameFactory.release(unit<ConvertFrame>::wrap(this)); > super::_x->pm.pop(super::_v); > } > > std::ostream& > printStackTraceEntry(std::ostream& o) override > { > return o << "Clock convert " << super::_v->links->token(*super::_i); > } > > private: > bool _isSuspended; > }; > > class RevertFrame : > public ClockWalkFrame > { > using super = ClockWalkFrame; > > public: > RevertFrame(loan<TreeIntegration> x, unit<TreeVertex> v) : > ClockWalkFrame(typeid(*this).hash_code() ># 1105 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 1105 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "Clock Revert", x, v), > _deltaEnd(0) > {} > > RevertFrame(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t endIndex, uint32_t deltaEnd) : > ClockWalkFrame(typeid(*this).hash_code() ># 1110 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 1110 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "Clock Revert", x, v, v->links->cellwalkSpan(0, endIndex)), > _deltaEnd(deltaEnd) > {} > > static unit<RevertFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v) > { > return x->clock._revertFrameFactory.makeUnit(x, v); > } > > static unit<RevertFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v, uint32_t endIndex, uint32_t deltaEnd) > { > return x->clock._revertFrameFactory.makeUnit(x, v, endIndex, deltaEnd); > } > > TreeWalk::Motion > step() override > { > > > while (true) { > if (super::isClosed()) { > transform(); > > super::_v->setTimeOut(++super::_x->episode.clock.walk.cursor); > > if (super::_v->isFlag(TreeVertex::EpochFlags::isDeltaCursor)) { > super::_x->episode.clock.revert.isActive = false; > return TreeWalk::Motion::walk; > } > > return TreeWalk::Motion::walk; > } > > cell<TreeEdge> edge = *(super::_i++); > unit<TreeVertex> head = edge->endpoint(); > > head->ifAdvanceEpoch(super::_x->episode.rebind.epoch); > head->setVisited(); > > if (head->mode() == TreeVertex::Mode::ordinal) > head->links->transformMode(TreeVertex::Mode::revert); > > bool isLeaf = ((head->links->out.revert().deltaEndPosition() == 0) && > !head->isFlag(TreeVertex::EpochFlags::isOnRevertFrontier)); > isLeaf |= (head->links->edgeCount() == 0); > > ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > head->mode() == TreeVertex::Mode::revert ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 1158) << ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "head->mode() == TreeVertex::Mode::revert" ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 1158 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > head->setTimeIn(++super::_x->episode.clock.walk.cursor); > if (isLeaf) { > head->setTimeOut(++super::_x->episode.clock.walk.cursor); > if (head->isFlag(TreeVertex::EpochFlags::isDeltaCursor)) { > if (super::isClosed()) > transform(); > cell<TreeEdge> delta = head->links->out.revert().delta(); > super::_x->clock.integrateOrdinalSubtree(head); > head->links->out.clock().setTreeCursor(delta); > super::_x->episode.clock.revert.isActive = false; > return TreeWalk::Motion::walk; > } > > super::_x->pm.push(head); > super::_x->clock.integrateOrdinalSubtree(head); > super::_x->pm.pop(head); > } else { > if (super::isClosed()) > transform(); > > super::_x->pm.push(head); > cell<TreeEdge> delta = head->links->out.revert().delta(); > super::_x->stack.template push<RevertFrame>(super::_x, head, head->links->out.revert().treeEdgeCount(), > head->links->out.revert().deltaEndPosition()); > > ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > head->mode() == TreeVertex::Mode::revert ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 1185) << ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "head->mode() == TreeVertex::Mode::revert" ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 1185 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "How can a node in mode " > << TreeVertex::tag(head->mode()) << " get here?" << ># 1186 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 1186 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > if (!head->isFlag(TreeVertex::EpochFlags::isDeltaCursor)) > head->links->out.revert().sortDelta(); > > super::_x->clock.integrateOrdinalSubtree(head); > if (head->isFlag(TreeVertex::EpochFlags::isDeltaCursor)) > head->links->out.clock().setTreeCursor(delta); > > return TreeWalk::Motion::walk; > } > } > } > > void > pushObserved() override > { > super::pushObserved(); > > if (super::_x->episode.clock.revert.isActive && (super::_v == super::_x->episode.update.event->head)) > super::_x->episode.clock.revert.isInOriginalDelta = true; > } > > void > popObserved() override > { > ClockWalkFrame::popObserved(); > super::_x->clock._revertFrameFactory.release(unit<RevertFrame>::wrap(this)); > super::_x->pm.pop(super::_v); > } > > std::ostream& > printStackTraceEntry(std::ostream& o) override > { > return o << "Clock revert " << super::_v->links->token(*super::_i); > } > > private: > void > transform() > { > > > > > > > > if (super::_x->episode.clock.revert.isActive && (super::_v->level() <= super::_x->episode.clock.revert.tail->level())) > super::_x->stack.template set<ConvertFrame>(point_util::lastOfQuantity(super::_x->stack.size()), super::_x, super::_v, super::_v->links->treeEdgeCount(), _deltaEnd); > else > super::_x->stack.template set<RebindFrame>(point_util::lastOfQuantity(super::_x->stack.size()), super::_x, super::_v, super::_v->links->treeEdgeCount(), _deltaEnd); > > super::_x->clock._revertFrameFactory.release(unit<RevertFrame>::wrap(this)); > } > > uint32_t _deltaEnd; > }; > > void > pushRenumberPath(unit<TreeVertex> tail, unit<TreeVertex> head) > { > _x->episode.clock.walk.isLive = true; > > if (tail->level() < head->level()) > return; > > unit<TreeVertex> walk = tail->tree(); > uint32_t treePosition = tail->treePosition(); > uint32_t frameCount = (tail->level() - head->level()), i = frameCount; > > if (frameCount == 0) > return; > > _x->stack.setHeight(frameCount); > > while (i > 0) { > walk->ifAdvanceEpoch(_x->episode.rebind.epoch); > _x->stack.template set<RenumberFrame>(--i, _x, walk, treePosition + 1); > treePosition = walk->treePosition(); > walk = walk->tree(); > } > } > > > void > pushExpansionPath(unit<TreeVertex> tail, unit<TreeVertex> head) > { > _x->episode.clock.walk.isLive = true; > > if (tail->level() < head->level()) > return; > > unit<TreeVertex> walk = tail->tree(); > uint32_t treePosition = tail->treePosition(); > uint32_t frameCount = (tail->level() - head->level()), i = frameCount; > > if (frameCount == 0) > return; > > _x->stack.setHeight(frameCount); > > while (i > 0) { > walk->ifAdvanceEpoch(_x->episode.rebind.epoch); > _x->stack.template set<ExpansionFrame>(--i, _x, walk, treePosition + 1); > treePosition = walk->treePosition(); > walk = walk->tree(); > } > } > > bool > pushRebindSubtree(unit<TreeVertex> tail, unit<TreeVertex> head) > { > _x->pm.push(head); > > head->setTimeOut(0); > > if (!continueRebindSubtree(head)) { > _x->pm.pop(head); > return false; > } > > _x->ordinal.inscribeSubordinatePath(head); > _x->episode.clock.entry = tail; > tail->setVisited(); > > return true; > } > > bool > continueRebindSubtree(unit<TreeVertex> head) > { > head->setTimeIn(_x->episode.clock.walk.cursor); > > if (head->links->edgeCount() == 0) { > head->setTimeOut(++_x->episode.clock.walk.cursor); > if (!isDeltaEntryPoint(head)) > _x->deltaClose(head); > _x->pm.pop(head); > _x->xs.transcribe(_x->xs.schema.clock.rebind.leaf.event, head ># 1325 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > , ># 1325 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "Clock rebind"); > return false; > } > > head->links->out.clock().resetTreeCursor(); > _x->stack.template push<RebindFrame>(_x, head); > return true; > } > > bool > continueConvertSubtree(unit<TreeVertex> head) > { > if ((_x->episode.clock.subsumption.tail == nullptr) && (head->links->edgeCount() == 0)) { > head->setTimeOut(++_x->episode.clock.walk.cursor); > _x->pm.pop(head); > return false; > } > > _x->stack.template push<ConvertFrame>(_x, head); > head->links->out.clock().resetTreeCursor(); > return true; > } > > void > transformConversionPath() > { > for (TreeWalk::Stack::reverse_iterator i = _x->stack.rbegin() + 1, end = _x->stack.rend(); i < end; i++) { > unit<TreeWalk::Frame> f = *i; > if (f->isFrameType<RenumberFrame>()) > break; > > f.upcast<ConvertFrame>()->suspend(); > } > } > > void > integrateOrdinalSubtree(unit<TreeVertex> v) > { > ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > v->mode() != TreeVertex::Mode::clock ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 1363) << ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "v->mode() != TreeVertex::Mode::clock" ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 1363 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > if (!_x->episode.clock.escalation.isActive) > _x->episode.clock.escalation.isActive = _x->episode.clock.escalation.isPending = true; > > if (_x->episode.ordinal.rebind.cursorOriginSubtree != v->ordinalTree()) { > if (v != v->ordinalRoot()) { > v->ordinalRoot()->ifAdvanceEpoch(_x->episode.rebind.epoch); > v->ordinalTree()->setCrossEntry(); > } > if (_x->episode.ordinal.rebind.cursorOriginSubtree != nullptr) > _x->episode.ordinal.rebind.cursorOriginSubtree->setCrossEntry(); > } > _x->episode.ordinal.rebind.cursorOriginSubtree = v->ordinalTree(); > > _x->moveVertex(v, v->ordinalTree(), nullptr); > > v->links->transformMode(TreeVertex::Mode::clock); > } > > bool > isDeltaEntryPoint(unit<TreeVertex> v) > { > if (_x->episode.rebind.mode == TreeVertex::Mode::ordinal) > return v == _x->episode.rebind.tail; > else > return ((v == _x->episode.clock.entry) || (v == _x->episode.clock.subsumption.tail)); > } > > bool > isMutable(unit<TreeWalk::Frame> f) > { > return (f->isFrameType<RebindFrame>() || f->isFrameType<ConvertFrame>()); > } > > TreeRelation > probe(unit<TreeVertex> tail, unit<TreeVertex> head) const > { > unit<TreeVertex> tc = tail->clockProxy(), hc = head->clockProxy(); > > ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > !TreeVertex::Types::OrdinalTree::isOrdinalRelation(tail, head) ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 1403) << ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "!TreeVertex::Types::OrdinalTree::isOrdinalRelation(tail, head)" ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1403 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" > ># 1404 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "Cannot identify the relation (" << tail->token() << " -> " << head->token() << ") in ordinal space" << ># 1404 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 1404 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ( ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > tc->timespan().out >= hc->timespan().in ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp", 1405) << ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠Condition [" << ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > "tc->timespan().out >= hc->timespan().in" ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "] " << ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > std::endl ># 1405 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > << "⢠" > ># 1406 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > << "Cannot probe (" << tail->token() << " -> " << head->token() << ") for retrograde relations" << ># 1406 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" 3 > facile::RequireException::require_sentinel ># 1406 "../../subprojects/edfst/src/edfst/tree/IncrementalClockTree.hpp" > ; > > if (tc == head) > return TreeRelation::loopback; > else if (hc == tail) > return (tail->tree() == head) ? TreeRelation::tree : TreeRelation::forward; > > unit<TreeVertex> tp = (tail->mode() == TreeVertex::Mode::ordinal) ? tc : tail->tree(); > unit<TreeVertex> hp = (head->mode() == TreeVertex::Mode::ordinal) ? hc : head->tree(); > if (tp == hp) > return TreeRelation::cross; > > if (hc->timespan().out < tc->timespan().in) > return TreeRelation::cross; > else if (hc->level() > tc->level()) > return (tail == tc) ? TreeRelation::forward : TreeRelation::cross; > else > return (head == hc) ? TreeRelation::loopback : TreeRelation::cross; > } > > unit<TreeVertex> > precedent(unit<TreeVertex> p, unit<TreeVertex> pc, TreeReference q, handle<PrecedenceProfile> profile) > { > if (p == nullptr) { > return profile->prefer(q), q.endpoint(); > } > > if (TreeVertex::Types::OrdinalTree::isOrdinalRelation(p, q.endpoint())) > return _x->ordinal.precedent(p, q, profile); > else if (precedent(p, pc, q.endpoint())) > return p; > else > return profile->prefer(q), q.endpoint(); > } > > bool > precedent(unit<TreeVertex> p, unit<TreeVertex> pc, unit<TreeVertex> q) > { > unit<TreeVertex> qc = q->clockProxy(); > > _x->xs.transcribe(_x->xs.schema.gate.precedent.step.event, TreeVertex::Mode::clock, p, q, pc, qc); > > if (p == qc) > return false; > else if (q == pc) > return true; > else if (pc == qc) > return (p->ordinalRoot()->treePosition() < q->ordinalRoot()->treePosition()); > else if ((p->mode() == TreeVertex::Mode::ordinal) && (pc == qc->tree())) > return (p->clockFrontierProxy()->treePosition() < qc->treePosition()); > else if ((q->mode() == TreeVertex::Mode::ordinal) && (qc == pc->tree())) > return (q->clockFrontierProxy()->treePosition() > pc->treePosition()); > else if (pc->timespan().out < qc->timespan().in) > return true; > else if (qc->timespan().out < pc->timespan().in) > return false; > > if (pc->level() < qc->level()) > return (p->mode() == TreeVertex::Mode::ordinal && p->ordinalRoot()->links->findRightClockSibling(qc) != nullptr); > else > return (q->mode() != TreeVertex::Mode::ordinal || q->ordinalRoot()->links->findRightClockSibling(pc) == nullptr); > } > > const loan<TreeIntegration> _x; > > ObjectBlock<RenumberFrame> _renumberFrameFactory; > ObjectBlock<ExpansionFrame> _expansionFrameFactory; > ObjectBlock<RebindFrame> _rebindFrameFactory; > ObjectBlock<ConvertFrame> _convertFrameFactory; > ObjectBlock<RevertFrame> _revertFrameFactory; >}; >} ># 16 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 1 > > > > > > >namespace edfst >{ >template<typename TreeComposition, template<typename> class TreePluginSetBase> >class IncrementalOrdinalTreeBase >{ >using TreeVertex = typename TreeComposition::Vertex; >using TreeEdge = typename TreeComposition::Edge; >using TreeReference = typename TreeComposition::Reference; >using TreeLinkSet = typename TreeComposition::LinkSet; >using OrdinalTree = typename TreeComposition::OrdinalTree; >using SiblingWalkPosition = typename TreeComposition::SiblingWalkPosition; >using EdgeEvent = typename TreeComposition::EdgeEvent; >using OrdinalTreeFactory = typename TreeComposition::OrdinalTreeFactory; >using TreeIntegration = TreeIntegrationBase<TreeComposition, TreePluginSetBase>; >using VertexSet = typename TreeIntegration::Types::VertexSet; >using PrecedenceProfile = typename TreeLinkSet::IPrecedenceProfile; > >struct LogTypes { > using TranscriptSchema = typename log::TranscriptSchema<TreeComposition, TreePluginSetBase>; > using AttachMode = typename TranscriptSchema::AttachMode; > using ClockRebind = typename TranscriptSchema::ClockRebind; > using OrdinalRebind = typename TranscriptSchema::OrdinalRebind; > using EventOrientation = typename TranscriptSchema::EventOrientation; >}; > >public: > IncrementalOrdinalTreeBase(loan<TreeIntegration> x) : > _x(x), > _placeholderFrameFactory(5), > _rebindFrameFactory(5), > _expansionFrameFactory(5) > {} > > ~IncrementalOrdinalTreeBase() > { > for (typename TreeIntegration::Types::ProfileMonitor::OrdinalTreeSetEntry ot : _x->pm.iterateOrdinalTrees()) > _x->factories.ordinalTree.release(ot.second); > } > > void > beginEpoch() > { > _x->episode.ordinal.rebind.isHeadAtDeltaPath = true; > _x->episode.ordinal.rebind.cursorOriginSubtree = nullptr; > _x->episode.ordinal.revert.threshold = 0; > _x->episode.ordinal.revert.isActive = _x->episode.ordinal.revert.isInProgress = false; > } > > unit<TreeVertex> > addOrdinalVertex(unit<TreeVertex> tail, unit<TreeVertex> head) > { > head->links->out.ordinal().inflate(); > head->links->in.ordinal().inflate(); > _x->pm.push(head); > > _x->xs.transcribe(_x->xs.schema.ordinal.addVertex.event, tail, head); > > if (tail->mode() == TreeVertex::Mode::clock) { > _x->factories.ordinalTree.makeUnit(head); > _x->pm.addOrdinalTree(head->ordinalTree()); > } else { > tail->ordinalTree()->attach(head); > } > > _x->pm.addVertex(head); > return head; > } > > void > integrateEdge(unit<TreeVertex> tail, unit<TreeVertex> head, TreeRelation relation, > typename TreeVertex::Mode mode = TreeVertex::Mode::ordinal, uint32_t pathBranchLevel = 0) > { > OrdinalEdgePartition partition; > if (relation == TreeRelation::tree) > partition = OrdinalEdgePartition::tree; > else if (mode == TreeVertex::Mode::clock) > partition = OrdinalEdgePartition::clock; > else > partition = OrdinalEdgePartitionAdapter::from(relation); > tail->links->out.ordinal().append(head, partition, pathBranchLevel); > > _x->pm.addEdge(tail); > } > > void > addEventEdge() > { > loan<EdgeEvent> event = _x->episode.update.event; > integrateEdge(event->tail, event->head, _x->episode.update.integration.relation , > _x->episode.update.integration.mode , _x->episode.update.integration.pathBranchLevel); > _x->template pluginDispatch<plugin::AddEventEdge>(); > } > > void > expandOrdinalVertex(unit<TreeVertex> origin, unit<TreeVertex> expansion) > { > expansion->links->out.ordinal().inflate(); > expansion->links->in.ordinal().inflate(); > > _x->xs.transcribe(_x->xs.schema.ordinal.addVertex.event, origin, expansion); > > origin->ordinalTree()->attach(expansion); > } > > void > precedent(unit<TreeVertex> head, handle<VertexSet> subset, handle<PrecedenceProfile> profile) > { > using Index = typename TreeLinkSet::OrdinalReferenceSet::PartitionIndex; > > _x->xs.transcribe(_x->xs.schema.gate.precedent.event, TreeVertex::Mode::ordinal); > > Index& index = head->links->in.ordinal().index(); > unit<TreeVertex> p = nullptr; > uint32_t loopbacks = index.size(OrdinalReferencePartition::loopback); > if (loopbacks > 0) { > cell<TreeReference> cursor = index.wrapStart(OrdinalReferencePartition::loopback); > cell<TreeReference> sentinel = index.wrapEnd(OrdinalReferencePartition::loopback); > > for ( ; cursor < sentinel; cursor++) { > if (subset->contains(cursor->endpoint())) { > p = cursor->endpoint(); > profile->prefer(cursor.read(), cursor->endpoint()->ordinalTreeLevel() , true ); > cursor++; > break; > } > } > if (p != nullptr) { > for ( ; cursor < sentinel; cursor++) { > if (!subset->contains(cursor->endpoint())) > continue; > p = precedent(p, cursor.read(), profile); > } > profile->setRelation(TreeRelation::loopback); > return; > } > } > > bool pf = true; > uint32_t pl = 0; > cell<TreeReference> cursor = index.wrapStart(OrdinalReferencePartition::forward); > cell<TreeReference> firstCross = index.wrapStart(OrdinalReferencePartition::cross); > cell<TreeReference> sentinel = index.wrapEnd(OrdinalReferencePartition::cross); > for ( ; cursor < sentinel; cursor++) { > if (subset->contains(cursor->endpoint())) { > pf = (cursor < firstCross); > p = cursor->endpoint(); > profile->prefer(cursor.read(), cursor->endpoint()->ordinalTreeLevel() , true ); > pl = (pf ? cursor->endpoint()->ordinalTreeLevel() : cursor->pathBranchLevel()); > cursor++; > break; > } > } > if (p != nullptr) { > for ( ; cursor < firstCross; cursor++) { > if (!subset->contains(cursor->endpoint())) > continue; > > uint32_t ql = cursor->endpoint()->ordinalTreeLevel(); > if (p->ordinalTreeLevel() < ql) { > profile->prefer(cursor.read(), ql, true); > p = cursor->endpoint(); > pl = ql; > } else { > profile->discard(cursor.read(), ql, true); > } > } > for ( ; cursor < sentinel; cursor++) { > if (!subset->contains(cursor->endpoint())) > continue; > > uint32_t ql = cursor->pathBranchLevel(); > if (pf) { > if (pl <= ql) { > profile->prefer(cursor.read(), cursor->endpoint()->ordinalTreeLevel() , true); > p = cursor->endpoint(); > pl = ql; > pf = false; > } else { > profile->discard(cursor.read(), ql, false); > } > } else { > if (ql == pl) { > p = precedent(p, cursor.read(), profile); > } else { > if (pl < ql) { > profile->prefer(cursor.read(), pl , false); > p = cursor->endpoint(); > pl = ql; > pf = false; > } else { > profile->discard(cursor.read(), ql, false); > } > } > } > } > profile->setRelation(pf ? TreeRelation::forward : TreeRelation::cross); > return; > } > > _x->clock.precedent(head, subset, profile); > } > > unit<TreeVertex> > precedent(unit<TreeVertex> tentative, TreeReference candidate, handle<PrecedenceProfile> profile) > { > _x->xs.transcribe(_x->xs.schema.gate.precedent.step.event, TreeVertex::Mode::ordinal, tentative, candidate.endpoint()); > > struct Walk { > unit<TreeVertex> v; > uint32_t level; > > Walk(unit<TreeVertex> v) : > v(v), > level(v->level()) > {} > } > i(tentative), j(candidate.endpoint()); > > if (i.level > j.level) { > do { > i.v = i.v->tree(); > } while (--i.level > j.level); > if (i.v == candidate.endpoint()) { > profile->discard(candidate, candidate.endpoint()->ordinalTreeLevel(), true); > return tentative; > } > } else if (i.level < j.level) { > while (--j.level > i.level) > j.v = j.v->tree(); > if (j.v->tree() == tentative) { > profile->prefer(candidate, candidate.endpoint()->ordinalTreeLevel(), true); > return candidate.endpoint(); > } > > j.v = j.v->tree(); > } > > while (i.v->tree() != j.v->tree()) > i.v = i.v->tree(), j.v = j.v->tree(); > if (i.v->ordinal() < j.v->ordinal()) > return profile->discard(candidate, i.v->tree()->ordinalTreeLevel(), false), tentative; > else > return profile->prefer(candidate, i.v->tree()->ordinalTreeLevel(), false), candidate.endpoint(); > } > > void > configureEvent() > { > loan<EdgeEvent> event = _x->episode.update.event; > event->mode = TreeVertex::Mode::ordinal; > > struct Walk { > unit<TreeVertex> v; > uint32_t level; > > Walk(unit<TreeVertex> v) : > v(v), > level(v->level()) > {} > } > i(event->tail), j(event->head); > > if (i.level > j.level) { > do { > i.v = i.v->tree(); > } while (--i.level > j.level); > if (i.v == event->head) { > event->relation = TreeRelation::loopback; > event->root = event->head; > event->isRetrograde = false; > return; > } > } else if (i.level < j.level) { > _x->pm.debit(i.v->ordinalTree(), j.level - i.level); > > while (--j.level > i.level) > j.v = j.v->tree(); > if (j.v->tree() == event->tail) { > event->relation = TreeRelation::forward; > event->root = event->tail; > event->isRetrograde = false; > return; > } > > j.v = j.v->tree(); > } > > configureCrossEvent(event, i.v, j.v); > } > > void > configureExpansionEvent() > { > loan<EdgeEvent> event = _x->episode.update.event; > event->mode = TreeVertex::Mode::ordinal; > > unit<TreeVertex> walk = event->tail; > while (walk->level() > event->head->level()) > walk = walk->tree(); > > if (walk->tree() == event->head) { > event->relation = TreeRelation::loopback; > event->root = event->head; > event->isRetrograde = false; > } else { > configureCrossEvent(event, walk, event->head); > } > } > > void > rebindSingleton() > { > unit<TreeVertex> tail = _x->episode.rebind.tail, head = _x->episode.rebind.head; > > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.event, tail, head, LogTypes::OrdinalRebind::Motif::rebindSingleton); > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.attach.event, tail, head, LogTypes::AttachMode::delta, LogTypes::EventOrientation::before); > > _x->pm.push(tail); > _x->pm.push(head); > > _x->episode.rebind.mode = _x->episode.update.integration.mode = TreeVertex::Mode::ordinal; > _x->episode.ordinal.rebind.cursor = 1; > _x->episode.ordinal.rebind.rootFrame = _x->stack.size(); > _x->episode.ordinal.rebind.pathBranchLevel = tail->level(); > > configureRevert(tail->ordinalTree()); > > pushRebindPath(tail); > > ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > tail->getRole(TreeVertex::Role::subordinate) == 0 ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 336) << ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "tail->getRole(TreeVertex::Role::subordinate) == 0" ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << "Forward edge rebind is invalid" << ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 336 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > > tail->setRole(TreeVertex::Role::precedent, _x->episode.ordinal.rebind.vertexStep); > > tail->setVisited(); > _x->episode.ordinal.rebind.cursorOriginSubtree = tail->ordinalTree(); > _x->pm.updateInsertHistogram(tail->ordinalTree(), _x->root->timespan().out); > tail->ordinalTree()->setCrossEntry(); > > unit<TreeVertex> stump = head->tree(); > > stump->ifAdvanceEpoch(_x->episode.rebind.epoch); > integrateSubtree(tail, head); > > head->setLevel(tail->level() + 1); > > if (_x->episode.update.event->mode == TreeVertex::Mode::ordinal) > head->links->setPathBranchLevel(_x->episode.rebind.root->level() - tail->ordinalRoot()->level()); > > _x->detachSubtree(head); > head->setTree(tail); > > > addEventEdge(); > > tail->links->requireTreePositionIntegrity(); > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.attach.event, tail, head, LogTypes::AttachMode::delta, LogTypes::EventOrientation::after); > > _x->xs.setTriageCursor(head); > > deltaPreTriage(head); > > _x->episode.ordinal.rebind.isWholeTree = false; > > pushRebindFrame(head); > > _x->stack.walk(); > > _x->episode.ordinal.rebind.pathBranchLevel = 0; > > _x->pm.pop(tail); > if (_x->episode.ordinal.revert.isInProgress) { > _x->clock.integrateOrdinalTree(); > _x->episode.ordinal.rebind.footprint.clear(); > return; > } > > concludeRebindStep(); > } > > void > rebindOrdinalTree() > { > unit<TreeVertex> tail = _x->episode.rebind.tail, head = _x->episode.rebind.head; > > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.event, tail, head, LogTypes::OrdinalRebind::Motif::rebindOrdinalTree); > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.attach.event, tail, head, LogTypes::AttachMode::delta, LogTypes::EventOrientation::before); > > _x->episode.ordinal.rebind.cursor = 1; > _x->episode.ordinal.rebind.rootFrame = _x->stack.size(); > _x->episode.ordinal.rebind.pathBranchLevel = 0; > _x->episode.rebind.mode = TreeVertex::Mode::ordinal; > pushRebindPath(tail); > inscribeSubordinatePath(head); > _x->detachSubtree(head); > _x->pm.push(tail); > _x->pm.push(head); > > head->setLevel(tail->level() + 1); > > _x->clock.addEventEdge(); > > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.attach.event, tail, head, LogTypes::AttachMode::delta, LogTypes::EventOrientation::before); > > if (head->mode() == TreeVertex::Mode::clock) { > _x->factories.ordinalTree.makeUnit(head); > _x->pm.addOrdinalTree(head->ordinalTree()); > integrateClockSubtree(head->ordinalTree(), head); > } > > configureRevert(head->ordinalTree()); > > deltaPreTriage(head); > if (isRebindLeaf(head)) { > _x->stack.clear(_x->episode.rebind.stack.base); > } else { > _x->episode.ordinal.rebind.cursorOriginSubtree = head->ordinalTree(); > _x->episode.ordinal.rebind.isWholeTree = true; > _x->episode.ordinal.rebind.treeStep = _x->episode.ordinal.rebind.advanceVertexStep(); > > pushRebindFrame(head); > _x->stack.walk(); > } > > _x->pm.pop(head); > _x->pm.pop(tail); > > if (_x->episode.ordinal.revert.isInProgress) { > _x->clock.revertOrdinalTree(); > _x->episode.ordinal.rebind.footprint.clear(); > return; > } > > concludeRebindStep(); > } > > void > cascadeOrdinalTree(unit<TreeVertex> anchor, unit<OrdinalTree> ot) > { > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.event, anchor, ot->root(), LogTypes::OrdinalRebind::Motif::cascadeOrdinalTree); > > _x->episode.ordinal.rebind.cursorOriginSubtree = ot; > _x->episode.ordinal.rebind.isWholeTree = true; > _x->episode.ordinal.rebind.treeStep = _x->episode.ordinal.rebind.advanceVertexStep(); > _x->episode.ordinal.rebind.cursor = 1; > _x->episode.ordinal.rebind.rootFrame = _x->stack.size(); > > > _x->episode.ordinal.revert.tree = ot; > _x->episode.ordinal.revert.isActive = _x->episode.ordinal.revert.isInProgress = false; > _x->episode.ordinal.revert.threshold = calculateCascadeRevertThreshold(ot); > > _x->xs.setTriageCursor(ot->root()); > > deltaPreTriage(ot->root()); > pushRebindFrame(ot->root()); > } > > void > revertUnwind() > { > _x->stack.pop(); > > while (!_x->stack.empty()) { > unit<TreeWalk::Frame> f = _x->stack.back(); > > unit<WalkFrame> w = f.template upcast<WalkFrame>(); > if (w->revert()) > break; > > ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > w->v->tree()->mode() == TreeVertex::Mode::ordinal ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 476) << ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "w->v->tree()->mode() == TreeVertex::Mode::ordinal" ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 476 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > > _x->stack.pop(); > } > } > > void > concludeClockEpisode() > { > for (unit<TreeVertex> m : _x->episode.ordinal.rebind.footprint) { > if (m->mode() == TreeVertex::Mode::clock) { > if ( (m->getRole(TreeVertex::Role::subordinate) > 0)) > m->links->out.clock().classifyTrimmedSubordinateReferences(); > > continue; > } > > m->ordinalTree()->profile().evaluate(captureTreeState()); > > if (m->getRole(TreeVertex::Role::delta) > 0) { > if (!m->ordinalTree()->isCrossEntry()) > continue; > > classifyDeltaActor(m); > } > > m->links->out.ordinal().classifyTrimmedSubordinateEdges(_x->episode.ordinal.rebind.treeStep); > } > } > > void > expand(unit<TreeVertex> v) > { > v->setLevel(v->tree()->level() + 1); > > _x->template pluginDispatch<plugin::RepositionVertex>(v); > _x->stack.template push<ExpansionFrame>(_x, v); > _x->stack.walk(); > } > > void > closeEpisode() > { > for (unit<OrdinalTree> ot : _ordinalTreePurgatory) { > ot->profile().requireEmpty(); > _x->factories.ordinalTree.release(ot); > } > > _ordinalTreePurgatory.clear(); > > ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > _x->factories.ordinalTree.getActiveInstanceCount() == _x->pm.ordinalTreeCount() ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 526) << ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "_x->factories.ordinalTree.getActiveInstanceCount() == _x->pm.ordinalTreeCount()" ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > _placeholderFrameFactory.empty() ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 527) << ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "_placeholderFrameFactory.empty()" ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > _rebindFrameFactory.empty() ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 528) << ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "_rebindFrameFactory.empty()" ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 528 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > _expansionFrameFactory.empty() ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 529) << ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "_expansionFrameFactory.empty()" ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 529 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > } > > > > > void > inscribeSubordinatePath(unit<TreeVertex> v) > { > unit<TreeVertex> walk = v; > > while (!(walk = walk->tree())->isOnDeltaStack()) { > if (joinEpisode(walk, TreeVertex::Role::subordinate)) > _x->episode.ordinal.rebind.isHeadAtDeltaPath = false; > else > break; > } > > if (v->mode() == TreeVertex::Mode::ordinal) { > PathBranchLevelSequence& dd = _x->episode.ordinal.rebind.demotionDeterminants; > if (walk->isOnDeltaStack()) { > if (walk->getRole(TreeVertex::Role::delta) > 0) { > dd.at(_x->episode.ordinal.rebind.vertexStep) = dd.at(walk->getRole(TreeVertex::Role::delta)); > } else if (walk->mode() == TreeVertex::Mode::ordinal) { > dd.at(_x->episode.ordinal.rebind.vertexStep) = walk->ordinalTreeLevel(); > } > } else { > dd.at(_x->episode.ordinal.rebind.vertexStep) = dd.at(walk->getRole(TreeVertex::Role::subordinate)); > } > } > } > > bool > joinEpisode(unit<TreeVertex> v, typename TreeVertex::Role role) > { > v->ifAdvanceEpoch(_x->episode.rebind.epoch); > > if (v->mode() == TreeVertex::Mode::ordinal) { > if (!v->isFlag(TreeVertex::EpochFlags::isEpisodeStepActor)) { > if ((_x->episode.rebind.mode == TreeVertex::Mode::ordinal)) > _x->episode.ordinal.rebind.footprint.push_back(v); > v->setFlag(TreeVertex::EpochFlags::isEpisodeStepActor); > } > } > > if ((role != TreeVertex::Role::none) && (v->getRole(role) < _x->episode.ordinal.rebind.treeStep)) { > if (role == TreeVertex::Role::delta) > v->setVisited(); > v->setRole(role, _x->episode.ordinal.rebind.vertexStep); > return true; > } else { > return false; > } > } > > void > detachSubtree(unit<TreeVertex> v) > { > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.detach.event, v, LogTypes::EventOrientation::before); > > inscribeSubordinatePath(v); > > OrdinalEdgePartition demotion = OrdinalEdgePartition::clock; > > if (v->tree()->isOnDeltaStack() && OrdinalTree::isOrdinalRelation(v, v->tree())) > demotion = OrdinalEdgePartition::forward; > else if (OrdinalTree::isOrdinalRelation(_x->episode.rebind.tail, v->tree())) > demotion = OrdinalEdgePartition::cross; > > cell<TreeEdge> demotionEdge = v->tree()->links->edgeAt(v->treePosition()); > > if (v->mode() == TreeVertex::Mode::ordinal) { > v->links->in.ordinal().rotateRight(v->links->getDual(demotionEdge.read()), OrdinalReferencePartition::forward, > OrdinalPartition::getDual(demotion)); > } > v->tree()->links->out.ordinal().rotateRight(demotionEdge, OrdinalEdgePartition::tree, demotion); > > v->tree()->links->requireTreePositionIntegrity(); > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.detach.event, v, LogTypes::EventOrientation::after); > } > > void > releaseOrdinalTree(unit<OrdinalTree> ot) > { > _x->pm.removeOrdinalTree(ot); > _ordinalTreePurgatory.push_back(ot); > } > > unit<TreeVertex> > peek(unit<typename TreeWalk::Frame> f) > { > return f.template upcast<WalkFrame>()->v; > } > > bool > isEffective(unit<OrdinalTree> ot) > { > profile::OrdinalTreeProfile& profile = ot->profile(); > return ((profile.histogram.balance >= 0) || (profile.projection.efficiency >= 0.0)); > } > > bool > evaluateEffectiveness(unit<OrdinalTree> ot) > { > if (isEffective(ot)) > return true; > > profile::OrdinalTreeProfile& profile = ot->profile(); > > > profile::Count deficit = static_cast<profile::Count>(-profile.histogram.balance); > profile::Count escalationDistance = _x->episode.clock.escalation.span.distance(); > > if (deficit >= escalationDistance) > return false; > > double risk = (deficit * (profile.projection.efficiency * profile.projection.efficiency)); > > if (risk > (double) escalationDistance) { > profile::Balance revertThreshold = calculateRevertThreshold(ot); > return (revertThreshold < ot->profile().histogram.balance); > } > > return false; > } > > bool > evaluateCascadeRebind(unit<OrdinalTree> ot) > { > profile::Balance threshold = calculateCascadeRevertThreshold(ot); > return (threshold < ot->profile().histogram.balance); > } > > > > > > >private: > struct DeltaEdgeEventRelay { > template<typename ... EventComponents> > void > dispatch(EventComponents&& ... c) > { > _x->template pluginDispatch<plugin::DeltaEdge>(std::forward<EventComponents>(c) ..., _demotionDeterminant); > } > > DeltaEdgeEventRelay(const loan<TreeIntegration> x, unit<TreeVertex> tail) : > _x(x), > _demotionDeterminant(_x->episode.ordinal.rebind.demotionDeterminants.at(tail->getRole(TreeVertex::Role::subordinate))) > {} > > private: > const loan<TreeIntegration> _x; > uint32_t _demotionDeterminant; > }; > > > struct WalkFrame : > public TreeWalk::Frame { > WalkFrame(std::size_t frameTypeHash ># 689 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > , ># 689 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > const std::string& frameTypeName, loan<TreeIntegration> x, unit<TreeVertex> v) : > TreeWalk::Frame(frameTypeId(frameTypeHash) ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > , ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > frameTypeName), > v(v), > _x(x) > {} > > static std::size_t > frameTypeId(std::size_t frameTypeHash) { return frameTypeHash & _frameTypeMask; } > > void > pushObserved() override > { > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.push.event, v ># 701 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > , ># 701 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > frameTypeName); > > if (_x->episode.rebind.isInProgress) { > ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > _x->stack.size() == _x->episode.rebind.stack.framePosition(1) || v->tree()->isOnDeltaStack() ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 704) << ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "_x->stack.size() == _x->episode.rebind.stack.framePosition(1) || v->tree()->isOnDeltaStack()" ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 704 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" > ># 705 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << "Cannot push a disjoint tree path on delta stack: parent " << v->tree()->token() << " of " << v->token() > << " is not on stack." << ># 706 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 706 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > > v->setOnDeltaStack(); > > if (_x->stack.size() == _x->episode.rebind.stack.framePosition(1)) > _x->episode.rebind.stack.levelOffset = v->level(); > } > } > > void > setObserved(uint32_t position) override > { > ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > (position + 1) >= _x->stack.size() || v->stackSubtree()->tree() == v ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 718) << ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "(position + 1) >= _x->stack.size() || v->stackSubtree()->tree() == v" ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" > ># 719 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << "Cannot push a disjoint tree path on delta stack: subtree frame " << v->stackSubtree()->token() > << " is a subtree of " << v->stackSubtree()->tree()->token() << ># 720 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 720 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.set.event, v, position ># 722 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > , ># 722 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > frameTypeName); > > if (_x->episode.rebind.isInProgress) { > v->setOnDeltaStack(); > > if (position == _x->episode.rebind.stack.base) > _x->episode.rebind.stack.levelOffset = v->level(); > } > } > > void > popObserved() override > { > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.pop.event, v ># 735 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > , ># 735 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > frameTypeName); > > if (_x->episode.rebind.isInProgress) > v->setOnDeltaStack(false); > } > > bool > revert() > { > if (v == _x->episode.rebind.tail) { > revertEntryPath(); > _x->stack.clear(); > return true; > } > > ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > super::isFrameType<RebindFrame>() ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 750) << ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "super::isFrameType<RebindFrame>()" ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 750 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > > return ((RebindFrame *) this)->revert(); > } ># 763 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > unit<TreeVertex> v; > > protected: > using super = TreeWalk::Frame; > > static constexpr std::size_t _frameTypeMask = 0x7fffffffffffffffULL; > > void > revertEntryPath() > { > v->links->transformMode(TreeVertex::Mode::revert); > unit<TreeVertex> tail = v, head = _x->episode.rebind.head; > > while (true) { > tail->setFlag(TreeVertex::EpochFlags::isOnRevertFrontier); > tail->links->out.revert().sortVisited(); > > bool pastFrontier = false; > uint32_t treePositionCursor = 0; > for (TreeEdge& e : tail->links->iterateRevertEdges()) { > unit<TreeVertex> subtree = e.endpoint(); > > subtree->ifAdvanceEpoch(_x->episode.rebind.epoch); > subtree->setTreePosition(treePositionCursor); > if (subtree == head) { > tail->links->out.revert().setDeltaStartPosition(treePositionCursor + 1); > pastFrontier = true; > } else if (pastFrontier) { > subtree->setFlag(TreeVertex::EpochFlags::isRevertOrphan); > } > treePositionCursor++; > } > > if (tail == _x->episode.ordinal.revert.tree->root()) > break; > > head = tail; > tail = tail->tree(); > > if (tail->mode() == TreeVertex::Mode::ordinal) > tail->links->transformMode(TreeVertex::Mode::revert); > > tail->ifAdvanceEpoch(_x->episode.rebind.epoch); > } > } > > loan<TreeIntegration> _x; > }; > > class PlaceholderFrame : > public WalkFrame > { > using super = WalkFrame; > > public: > PlaceholderFrame(loan<TreeIntegration> x, unit<TreeVertex> v) : > WalkFrame(typeid(*this).hash_code() ># 819 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > , ># 819 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "Ordinal Placeholder", x, v) > {} > > static unit<PlaceholderFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v) > { > return x->ordinal._placeholderFrameFactory.makeUnit(x, v); > } > > TreeWalk::Motion > step() override { return TreeWalk::Motion::pop; } > > void > popObserved() override > { > WalkFrame::popObserved(); > super::_x->ordinal._placeholderFrameFactory.release(unit<PlaceholderFrame>::wrap(this)); > } > > std::ostream& > printStackTraceEntry(std::ostream& o) override > { > return o << "Placeholder[" << super::v->id() << "]"; > } > }; > > class RebindFrame : > public WalkFrame > { > using super = WalkFrame; > > public: > RebindFrame(loan<TreeIntegration> x, unit<TreeVertex> v) : > WalkFrame(typeid(*this).hash_code() ># 852 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > , ># 852 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "Ordinal Rebind", x, v) > {} > > static unit<RebindFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v) > { > return x->ordinal._rebindFrameFactory.makeUnit(x, v); > } > > void > begin() > { > _edgeScan = super::v->links->out.ordinal().scanLooseEdges(); > } > > TreeWalk::Motion > step() override > { > super::_x->xs.setTriageCursor(super::v); > > while (true) { > if (_edgeScan.isClosed()) { > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.triage.commit.event, super::v, LogTypes::EventOrientation::before); > > unit<typename TreeLinkSet::OrdinalEdgeSet::EdgeTriageSet> edgeTriage = super::v->links->out.ordinal().deltaCommitTriage(); > super::_x->factories.edgeTriage.release(edgeTriage); > > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.triage.commit.event, super::v, LogTypes::EventOrientation::after); > > super::_x->deltaClose(super::v); > super::_x->pm.pop(super::v); > return TreeWalk::Motion::pop; > } > > if (super::_x->episode.ordinal.revert.threshold != 0) { > if (super::_x->episode.ordinal.revert.tree->profile().histogram.balance <= super::_x->episode.ordinal.revert.threshold) { > initiateRevert(super::v, _edgeScan.get()->endpoint()); > return (super::_x->episode.rebind.mode == TreeVertex::Mode::ordinal ? TreeWalk::Motion::stop : TreeWalk::Motion::walk); > } > } > > cell<TreeEdge> e = _edgeScan.get(); > _edgeScan.next(); > unit<TreeVertex> head = e->endpoint(), stump = nullptr; > bool isExistingTreeEdge = false; > > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.scan.event, super::v, e); > > if (super::v == head->tree()) { > isExistingTreeEdge = true; > > } else if (head->isOnDeltaStack()) { > ># 904 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > throw ># 904 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > FacileException ># 904 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 904) ># 904 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << "Missed pre-tri of edge " << super::v->links->token(e) << " (on stack)" << packContext; > > } else if (head->isLive(super::_x->episode.rebind.epoch) && head->isVisited()) { > DeltaEdgeEventRelay eventRelay(super::_x, super::v); > super::v->links->out.ordinal().deltaCursorTriage(e, eventRelay); > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.revisit.event, super::v, e); > continue; > } > > super::_x->episode.ordinal.rebind.advanceVertexStep(); > > DeltaEdgeEventRelay eventRelay(super::_x, super::v); > > if (isExistingTreeEdge) { > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.attach.event, super::v, e->endpoint(), LogTypes::AttachMode::retain, LogTypes::EventOrientation::before); > > head->ifAdvanceEpoch(super::_x->episode.rebind.epoch); > > super::_x->pm.push(head); > > head->setTreePosition(super::v->links->out.ordinal().edgeTriagePartitionSize(OrdinalEdgePartition::tree)); > head->setLevel(super::v->level() + 1); > > super::_x->ordinal.integrateSubtree(super::v, head); > > super::v->links->out.ordinal().edgeTriageClassify(OrdinalEdgePartition::tree, e); > > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.attach.event, super::v, e->endpoint(), LogTypes::AttachMode::retain, LogTypes::EventOrientation::after); > } else { > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.probe.event, super::v, e); > > OrdinalEdgePartition partition = probe(e); > if (partition != OrdinalEdgePartition::tree) { > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.exclude.event, e->endpoint()); > > super::_x->ordinal.episodeExclude(head); > head->setDeltaPeripheryStackMeet(e->pathBranchLevel()); > > > > switch (partition) > { > case OrdinalEdgePartition::cross: > e->inferPathBranchLevel(super::v); > > [[fallthrough]]; > > case OrdinalEdgePartition::clock: > super::v->links->out.ordinal().edgeTriageClassify(OrdinalEdgePartition::cross, e); > > eventRelay.dispatch(super::v, e, TreeRelation::cross, TreeVertex::Mode::ordinal); > break; > > default: > super::v->links->out.ordinal().edgeTriageClassify(OrdinalEdgePartition::forward, e); > > > eventRelay.dispatch(super::v, e, TreeRelation::forward, TreeVertex::Mode::ordinal); > } > > continue; > } > > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.attach.event, super::v, e->endpoint(), LogTypes::AttachMode::cascade, LogTypes::EventOrientation::before); > > super::v->setVisited(); > head->ifAdvanceEpoch(super::_x->episode.rebind.epoch); > > stump = head->tree(); > stump->ifAdvanceEpoch(super::_x->episode.rebind.epoch); > > super::_x->pm.push(head); > > super::_x->ordinal.integrateSubtree(super::v, head); > head->setLevel(super::v->level() + 1); > > > OrdinalEdgePartition ePartition = super::v->links->out.ordinal().index().identifyPartition(e); > if (stump->getRole(TreeVertex::Role::delta) == 0) { > uint32_t pathBranchLevel = (ePartition == OrdinalEdgePartition::forward) ? super::v->level() : e->pathBranchLevel(); > ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > OrdinalTree::isOrdinalRelation(super::v, head) ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 984) << ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "OrdinalTree::isOrdinalRelation(super::v, head)" ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << "was a branch, but seems redundant" << ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 984 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > head->links->setPathBranchLevel(pathBranchLevel); > super::_x->detachSubtree(head); > } > > head->setTree(super::v); > head->setTreePosition(super::v->links->out.ordinal().edgeTriagePartitionSize(OrdinalEdgePartition::tree)); > super::v->links->out.ordinal().edgeTriageClassify(OrdinalEdgePartition::tree, e); > > super::v->links->requireTreePositionIntegrity(); > super::_x->xs.transcribe(super::_x->xs.schema.ordinal.rebind.attach.event, super::v, e->endpoint(), LogTypes::AttachMode::cascade, LogTypes::EventOrientation::after); > } > > eventRelay.dispatch(super::v, e, TreeRelation::tree, TreeVertex::Mode::ordinal); > > super::_x->xs.setTriageCursor(head); > > super::_x->ordinal.deltaPreTriage(head); > super::_x->ordinal.pushRebindFrame(head); > > return TreeWalk::Motion::walk; > } > > return TreeWalk::Motion::walk; > } > > void > popObserved() override > { > WalkFrame::popObserved(); > super::_x->ordinal._rebindFrameFactory.release(unit<RebindFrame>::wrap(this)); > } > > bool > revert() > { > unit<typename TreeLinkSet::OrdinalEdgeSet::EdgeTriageSet> edgeTriage = super::v->links->out.ordinal().revertCommitTriage(_edgeScan.peek()); > if (edgeTriage != nullptr) > super::_x->factories.edgeTriage.release(edgeTriage); > > if (super::v == super::_x->episode.ordinal.revert.tree->root()) { > if (super::_x->clock.revertTransformOrdinalRootFrame(super::v)) > super::_x->ordinal._rebindFrameFactory.release(unit<RebindFrame>::wrap(this)); > return true; > } > > super::_x->pm.pop(super::v); > return false; > } > > std::ostream& > printStackTraceEntry(std::ostream& o) override > { > if (_edgeScan.isClosed()) > o << "<closed>"; > else > o << "Ordinal Rebind " << super::v->links->token(_edgeScan.get()); > > return o; > } > > private: > using EdgeCellSequence = std::vector<cell<TreeEdge>>; > using EdgeCellScan = scan<typename EdgeCellSequence::iterator>; > > OrdinalEdgePartition > probe(cell<TreeEdge> e) > { > if (e->endpoint()->mode() == TreeVertex::Mode::ordinal) { > if (e->endpoint()->ordinalRoot()->tree()->mode() == TreeVertex::Mode::ordinal) > return OrdinalEdgePartition::tree; > > if (super::v->ordinalTree() == e->endpoint()->ordinalTree()) > return probeOrdinal(e); > } > > return probeClock(e->endpoint()); > } > > OrdinalEdgePartition > probeOrdinal(cell<TreeEdge> e) > { > uint32_t steps = 1; > unit<TreeVertex> walk = e->endpoint(); > > if (walk->level() <= super::_x->episode.rebind.root->level()) > return OrdinalEdgePartition::cross; > > while (!walk->tree()->isOnDeltaStack()) { > if (walk->level() <= super::_x->episode.rebind.root->level()) > return super::_x->pm.debit(super::v->ordinalTree(), steps), OrdinalEdgePartition::cross; > > walk = walk->tree(); > steps++; > > if (walk->tree() == super::v) { > super::_x->pm.debit(super::v->ordinalTree(), steps); > return (e->endpoint()->ordinal() < walk->ordinal()) ? OrdinalEdgePartition::tree : OrdinalEdgePartition::forward; > } > } > > if (walk->tree()->mode() == TreeVertex::Mode::clock) > return super::_x->pm.debit(super::v->ordinalTree(), steps), OrdinalEdgePartition::tree; > > super::_x->pm.debit(super::v->ordinalTree(), steps * 2 ); > > int64_t contourDelta = 0; > uint32_t levelFix = (walk->tree()->level() + steps); > > for (unit<TreeVertex> fixWalk = e->endpoint(); fixWalk != walk->tree(); fixWalk = fixWalk->tree(), levelFix--) { > contourDelta += Arithmetic::difference(levelFix, fixWalk->level()); > fixWalk->setLevel(levelFix); > } > > if (contourDelta != 0) > super::_x->pm.alignContour(contourDelta); > > uint32_t ordinalRootFrameLevel = super::_x->stack.at(super::_x->episode.ordinal.rebind.rootFrame).template upcast<WalkFrame>()->super::v->level(); > uint32_t siblingLevel = walk->level(), siblingFrameOffset = Arithmetic::difference(siblingLevel, ordinalRootFrameLevel); > unit<TreeVertex> sibling = super::_x->stack.at(super::_x->episode.ordinal.rebind.rootFrame + siblingFrameOffset).template upcast<WalkFrame>()->v; > > if (OrdinalTree::isOrdinalRelation(walk, sibling)) { > e->setPathBranchLevel(walk->level() - 1 - walk->ordinalRoot()->level()); > if (walk->tree() == super::_x->episode.rebind.tail) { > if (sibling->ordinal() < walk->ordinal()) > sibling->ordinalTree()->bounce(sibling); > return OrdinalEdgePartition::cross; > } > return sibling->ordinal() < walk->ordinal() ? OrdinalEdgePartition::tree : OrdinalEdgePartition::cross; > } else { > return OrdinalEdgePartition::tree; > } > } > > OrdinalEdgePartition > probeClock(unit<TreeVertex> head) > { > unit<TreeVertex> hc = head->clockProxy(); > > if ((head->isLive(super::_x->episode.rebind.epoch) && head->isVisited()) || head->isOnDeltaStack()) > return OrdinalEdgePartition::clock; > > unit<TreeVertex> tc = super::v->clockProxy(); > > > if ( (tc->timespan().out < hc->timespan().in)) > return OrdinalEdgePartition::tree; > > unit<TreeVertex> rt = super::_x->episode.rebind.tail, rh = super::_x->episode.rebind.head; > > if (hc->isOnDeltaStack()) { > unit<TreeVertex> hr = head->ordinalRoot(); > > ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ( ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > head->mode() == TreeVertex::Mode::ordinal ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 1137) << ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠Condition [" << ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "head->mode() == TreeVertex::Mode::ordinal" ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "] " << ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > std::endl ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > << "⢠" ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 1137 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > > if (super::_x->episode.rebind.head->isOnDeltaStack() && (head->mode() == TreeVertex::Mode::ordinal)) { > if (hr->mode() == TreeVertex::Mode::clock) > return OrdinalEdgePartition::tree; > else if (hr->isLive(super::_x->episode.rebind.epoch) && !hr->isOnDeltaStack() && head->ordinalTree()->isCrossEntry()) > return OrdinalEdgePartition::tree; > } > return (hr->treePosition() > hc->stackTreePosition() ? OrdinalEdgePartition::tree : OrdinalEdgePartition::clock); > } > > if ((hc->timespan().in < rt->clockProxy()->timespan().in) || (hc->timespan().out < rh->clockProxy()->timespan().in)) > return OrdinalEdgePartition::clock; > > if (!tc->isOnDeltaStack()) > return OrdinalEdgePartition::clock; > > unit<TreeVertex> pathBranch = rt, mark = rh; > > if (rt->mode() == TreeVertex::Mode::ordinal) { > pathBranch = tc; > mark = tc->stackSubtree(); > } > > if (mark->treePosition() == 0) > return OrdinalEdgePartition::tree; > > OrdinalEdgePartition partition = OrdinalEdgePartition::tree; > unit<TreeVertex> sibling = mark->links->findLeftClockSibling(); > > if ((sibling != nullptr) && (sibling->mode() == TreeVertex::Mode::clock)) { > if ((sibling == hc) || (hc->timespan().out < sibling->timespan().out)) > partition = OrdinalEdgePartition::clock; > } > > super::_x->pm.debitSiblingScan(super::v->ordinalTree(), mark, sibling); > > return partition; > } > > void > initiateRevert(unit<TreeVertex> tail, unit<TreeVertex> head) > { > super::_x->xs.transcribe(super::_x->xs.schema.revert.revertInitiate.event, tail, head); > > super::_x->episode.ordinal.revert.threshold = 0; > super::_x->episode.ordinal.revert.isActive = super::_x->episode.ordinal.revert.isInProgress = true; > > super::v->setFlag(TreeVertex::EpochFlags::isDeltaCursor); > > if (super::v != super::_x->episode.ordinal.revert.tree->root()) > super::_x->pm.pop(super::v); > > unit<typename TreeLinkSet::OrdinalEdgeSet::EdgeTriageSet> edgeTriage = super::v->links->out.ordinal().revertCommitTriage(_edgeScan.peek()); > if (edgeTriage != nullptr) > super::_x->factories.edgeTriage.release(edgeTriage); > > if (super::v == super::_x->episode.ordinal.revert.tree->root()) { > if (super::_x->clock.revertTransformOrdinalRootFrame(super::v)) > super::_x->ordinal._rebindFrameFactory.release(unit<RebindFrame>::wrap(this)); > return; > } > > super::_x->ordinal.revertUnwind(); > } > > EdgeCellScan _edgeScan; > }; > > class ExpansionFrame : > public WalkFrame > { > using super = WalkFrame; > > public: > ExpansionFrame(loan<TreeIntegration> x, unit<TreeVertex> v) : > WalkFrame(typeid(*this).hash_code() ># 1213 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > , ># 1213 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > "Ordinal Expansion", x, v), > _edgeScan(v->links->scanTreeEdges()) > {} > > static unit<ExpansionFrame> > make(loan<TreeIntegration> x, unit<TreeVertex> v) > { > return x->ordinal._expansionFrameFactory.makeUnit(x, v); > } > > TreeWalk::Motion > step() override > { > while (true) { > if (_edgeScan.isClosed()) { > super::_x->pm.pop(super::v); > return TreeWalk::Motion::pop; > } > > cell<TreeEdge> e = _edgeScan.get(); > _edgeScan.next(); > unit<TreeVertex> head = e->endpoint(); > > super::_x->pm.push(head); > > if (super::_x->episode.expansion.origin->mode() != TreeVertex::Mode::clock) { > for (TreeEdge& cross : head->links->out.ordinal().index().iterateLinks(OrdinalEdgePartition::cross)) { > if (cross.pathBranchLevel() >= super::_x->episode.expansion.origin->ordinalTreeLevel()) > cross.setPathBranchLevel(cross.pathBranchLevel() + super::_x->episode.expansion.depth); > } > } > > head->setLevel(super::v->level() + 1); > super::_x->template pluginDispatch<plugin::RepositionVertex>(head); > if (head->links->treeEdgeCount() > 0) > super::_x->stack.template push<ExpansionFrame>(super::_x, head); > else > super::_x->pm.pop(head); > > return TreeWalk::Motion::walk; > } > } > > void > popObserved() override > { > WalkFrame::popObserved(); > super::_x->ordinal._expansionFrameFactory.release(unit<ExpansionFrame>::wrap(this)); > super::_x->pm.pop(super::v); > } > > std::ostream& > printStackTraceEntry(std::ostream& o) override > { > if (_edgeScan.isClosed()) > o << "<closed>"; > else > o << "Ordinal Expansion " << super::v->links->token(_edgeScan.get()); > > return o; > } > > private: > using EdgeScan = typename TreeVertex::Types::LinkSet::EdgeScan; > > EdgeScan _edgeScan; > }; > > void > configureCrossEvent(loan<EdgeEvent> event, unit<TreeVertex> i, unit<TreeVertex> j) > { > while (i->tree() != j->tree()) > i = i->tree(), j = j->tree(); > > event->relation = TreeRelation::cross; > event->root = i->tree(); > event->isRetrograde = (i->ordinal() < j->ordinal()); > } > > void > pushRebindPath(unit<TreeVertex> tail) > { > unit<TreeVertex> head = _x->episode.rebind.root; > > if (tail->level() < head->level()) > return; > > unit<TreeVertex> walk = tail; > uint32_t frameCount = (tail->level() - head->level() + 1), i = frameCount; > > if (frameCount == 0) > return; > > _x->stack.setHeight(frameCount); > > while (i > 0) { > walk->ifAdvanceEpoch(_x->episode.rebind.epoch); > _x->stack.template set<PlaceholderFrame>(--i, _x, walk); > walk = walk->tree(); > } > } > > void > pushRebindFrame(unit<TreeVertex> v) > { > v->ifAdvanceEpoch(_x->episode.rebind.epoch); ># 1327 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > v->setOrdinalRebindPosition(_x->episode.ordinal.rebind.cursor++); > v->setRole(TreeVertex::Role::precedent, _x->episode.ordinal.rebind.vertexStep); > if (v->getRole(TreeVertex::Role::subordinate) > 0) > v->setFlag(TreeVertex::EpochFlags::isForwardMutable); > > DeltaEdgeEventRelay eventRelay(_x, v); > > if (isRebindLeaf(v)) { > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.leaf.event, v, "Ordinal Rebind"); > > > if (!(v->links->out.ordinal().index().empty(OrdinalEdgePartition::cross) && > v->links->out.ordinal().index().empty(OrdinalEdgePartition::loopback))) > { > uint32_t ceiling = _x->episode.rebind.root->level(); > for (TreeEdge& b : v->links->out.ordinal().index().iterateLinks(OrdinalEdgePartition::loopback)) { > unit<TreeVertex> head = b.endpoint(); > TreeRelation relation = (head->isOnDeltaStack() || (head->level() < ceiling)) ? TreeRelation::loopback : TreeRelation::cross; > eventRelay.dispatch(v, cell<TreeEdge>(b), relation, v->ordinalTree()->edgeMode(head)); > } > for (TreeEdge& x : v->links->out.ordinal().index().iterateLinks(OrdinalEdgePartition::cross)) { > unit<TreeVertex> head = x.endpoint(); > eventRelay.dispatch(v, cell<TreeEdge>(x), TreeRelation::cross, v->ordinalTree()->edgeMode(head)); > } > } > > _x->deltaClose(v); > _x->pm.pop(v); > } else { > _x->pm.push(v); > unit<RebindFrame> f = _x->stack.template push<RebindFrame>(_x, v); > > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.triage.sort.event, v, LogTypes::EventOrientation::before); > > SiblingWalkPosition entryTime; > if (_x->episode.rebind.root->mode() == TreeVertex::Mode::clock) > entryTime = _x->episode.rebind.entryTime; > unit<typename TreeLinkSet::OrdinalEdgeSet::EdgeTriageSet> edgeTriage = _x->factories.edgeTriage.makeUnit(); > bool isRootEntry = _x->episode.ordinal.rebind.isWholeTree && !v->ordinalTree()->isCrossEntry(); > if (!v->links->out.ordinal().prepareRebindEdgeTriage(edgeTriage, isRootEntry, entryTime, eventRelay)) > _x->factories.edgeTriage.release(edgeTriage); > > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.triage.sort.event, v, LogTypes::EventOrientation::after); > > > > f->begin(); > } > } > > void > deltaPreTriage(unit<TreeVertex> v) > { > joinEpisode(v, TreeVertex::Role::delta); > > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.triage.pre.event, v, LogTypes::EventOrientation::before); > > if (isRebindLeaf(v)) { > DeltaEdgeEventRelay eventRelay(_x, v); > v->links->out.ordinal().deltaLeafTriage(_x->episode.ordinal.rebind.isHeadAtDeltaPath, _x->episode.rebind.root->level(), eventRelay); > } else { > v->links->out.ordinal().deltaPreTriage(_x->episode.ordinal.rebind.isHeadAtDeltaPath, _x->episode.rebind.root->level()); > } > > > if (_x->episode.rebind.mode == TreeVertex::Mode::clock) { > v->links->in.ordinal().deltaPreTriage(); > _x->pm.debit(v->ordinalTree(), v->links->in.ordinal().index().size(OrdinalReferencePartition::forward)); > } > > _x->xs.transcribe(_x->xs.schema.ordinal.rebind.triage.pre.event, v, LogTypes::EventOrientation::after); > } > > void > concludeRebindStep() > { > for (unit<TreeVertex> m : _x->episode.ordinal.rebind.footprint) { > m->ordinalTree()->profile().evaluate(captureTreeState()); > > if (m->getRole(TreeVertex::Role::delta) > 0) { > if (m->mode() == TreeVertex::Mode::ordinal) > classifyDeltaActor(m); > > continue; > } > > if (m != _x->episode.rebind.root) > classifyStepActor(m); > } > > _x->episode.ordinal.rebind.footprint.clear(); > _x->episode.ordinal.rebind.treeStep = _x->episode.ordinal.rebind.advanceVertexStep(); > } > > void > classifyDeltaActor(unit<TreeVertex> v) > { > if (v->mode() == TreeVertex::Mode::clock) { > if (_x->episode.ordinal.revert.isActive) > return; > else > ># 1428 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 1428) ># 1428 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << "Cannot classify ordinal membership for clock vertex " << v->token() << ># 1428 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > facile::RequireException::require_sentinel ># 1428 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > ; > } > > v->links->in.ordinal().classifyDeltaActor(_x->episode.ordinal.rebind.demotionDeterminants.at(v->getRole(TreeVertex::Role::delta))); > } > > void > classifyStepActor(unit<TreeVertex> v) > { > v->links->out.ordinal().classifyStepActor(_x->episode.rebind.root, _x->episode.ordinal.rebind.treeStep, > _x->episode.ordinal.rebind.demotionDeterminants.at(v->getRole(TreeVertex::Role::subordinate))); > } > > void > advanceDemotionDeterminants() > { > unit<WalkFrame> top = _x->stack.top().template downcast<WalkFrame>(); > uint32_t topDeterminant = _x->episode.ordinal.rebind.demotionDeterminants.at(top->v->getRole(TreeVertex::Role::delta)); > > _x->episode.ordinal.rebind.demotionDeterminants.at(_x->episode.ordinal.rebind.vertexStep) = topDeterminant; > } > > void > integrateSubtree(unit<TreeVertex> tail, unit<TreeVertex> head) > { > if (head->tree() != tail) > inscribeSubordinatePath(head); > else > advanceDemotionDeterminants(); > > if (head->mode() == TreeVertex::Mode::ordinal) { > if (tail->ordinalTree() == head->ordinalTree()) > return; > > joinOrdinalTree(tail->ordinalTree(), head); > } else { > integrateClockSubtree(tail->ordinalTree(), head); > } > } > > void > integrateClockSubtree(unit<OrdinalTree> ot, unit<TreeVertex> head) > { > joinOrdinalTree(ot, head); > > > > unit<typename TreeLinkSet::OrdinalEdgeSet::EdgeTriageSet> edgeTriage = _x->factories.edgeTriage.makeUnit(); > > head->links->out.ordinal().transformClockEdges(edgeTriage, _x->episode.ordinal.rebind.pathBranchLevel); > _x->factories.edgeTriage.release(edgeTriage); > > head->links->in.ordinal().transformClockReferences(); > } > > void > joinOrdinalTree(unit<OrdinalTree> ot, unit<TreeVertex> head) > { > unit<OrdinalTree> otHead = nullptr; > > if (head->mode() == TreeVertex::Mode::ordinal) { > otHead = head->ordinalTree(); > > if (otHead == ot) > return; > > otHead->root()->ifAdvanceEpoch(_x->episode.rebind.epoch); > if (_x->episode.ordinal.rebind.cursorOriginSubtree != otHead) { > if (otHead->root() != head) > otHead->setCrossEntry(); > if (_x->episode.ordinal.rebind.cursorOriginSubtree != nullptr) > _x->episode.ordinal.rebind.cursorOriginSubtree->setCrossEntry(); > } > _x->episode.ordinal.rebind.cursorOriginSubtree = otHead; > } else { > head->links->transformMode(TreeVertex::Mode::ordinal); > > if (_x->episode.ordinal.rebind.cursorOriginSubtree != nullptr) > _x->episode.ordinal.rebind.cursorOriginSubtree->setCrossEntry(); > _x->episode.ordinal.rebind.cursorOriginSubtree = nullptr; > } > > _x->moveVertex(head, otHead, ot); > > if (head->ordinalTree() != ot) > ot->attach(head); > } > > void > episodeExclude(unit<TreeVertex> v) > { > if (!v->ifAdvanceEpoch(_x->episode.rebind.epoch) && v->isFlag(TreeVertex::EpochFlags::isEpisodeExclusion)) > ># 1520 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > throw ># 1520 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > FacileException ># 1520 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" 3 > ("../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp", 1520) ># 1520 "../../subprojects/edfst/src/edfst/tree/IncrementalOrdinalTree.hpp" > << "Already excluded " << v->id(); > > v->setVisited(); > v->setFlag(TreeVertex::EpochFlags::isEpisodeExclusion); > > advanceDemotionDeterminants(); > } > > void > configureRevert(unit<OrdinalTree> ot) > { > _x->episode.ordinal.revert.tree = ot; > _x->episode.ordinal.revert.isActive = _x->episode.ordinal.revert.isInProgress = false; > > profile::Balance lambdaRenumberingCost = Arithmetic::difference(_x->episode.clock.scope.lambda.distance(), > _x->episode.clock.scope.delta.distance()); > profile::OrdinalTreeProfile& profile = ot->profile(); > profile.histogram.balance += lambdaRenumberingCost; > > _x->episode.ordinal.revert.threshold = calculateRevertThreshold(ot); > > > > > > > > } > > profile::Balance > calculateRevertThreshold(__attribute__((unused)) unit<OrdinalTree> ot) > { > > > profile::Balance escalationCost = Arithmetic::difference(_x->root->timespan().out, _x->episode.clock.scope.lambda.out); > return -escalationCost; > } > > profile::Balance > calculateCascadeRevertThreshold(unit<OrdinalTree> ot) > { > if (_x->episode.clock.escalation.isActive) > return 0; > > WalkPosition otClockOut = ot->anchor()->timespan().out; > return -Arithmetic::difference(_x->root->timespan().out, otClockOut); > } > > bool > isRebindLeaf(unit<TreeVertex> v) > { > if ((v->links->out.ordinal().index().size(OrdinalEdgePartition::tree) > 0) || > (v->links->out.ordinal().index().size(OrdinalEdgePartition::cross) > 0) || > (v->links->out.ordinal().index().size(OrdinalEdgePartition::clock) > 0)) > { > return false; > } > > if (v->isFlag(TreeVertex::EpochFlags::isForwardMutable) && (v->links->out.ordinal().index().size(OrdinalEdgePartition::forward) > 0)) > return false; > > return true; > } > > profile::TreeState > captureTreeState() > { > profile::TreeState ts = { _x->episode.rebind.epoch, 0 }; > > _x->pm.extractTreeState(ts); > return ts; > } > > const loan<TreeIntegration> _x; > > std::vector<unit<OrdinalTree>> _ordinalTreePurgatory; > > ObjectBlock<PlaceholderFrame> _placeholderFrameFactory; > ObjectBlock<RebindFrame> _rebindFrameFactory; > ObjectBlock<ExpansionFrame> _expansionFrameFactory; >}; >} ># 17 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 1 > > > > > >namespace edfst >{ >template<typename TreeComposition, template<typename> class TreePluginSetBase> >class IncrementalGateBase >{ >using IncrementalGate = IncrementalGateBase<TreeComposition, TreePluginSetBase>; >using TreeVertex = typename TreeComposition::Vertex; >using TreeEdge = typename TreeComposition::Edge; >using TreeReference = typename TreeComposition::Reference; >using EdgeEvent = typename TreeComposition::EdgeEvent; >using EdgeStreamEndpoint = typename TreeComposition::EdgeStreamEndpoint; >using TreeIntegration = TreeIntegrationBase<TreeComposition, TreePluginSetBase>; >using TreeLinkSet = typename TreeComposition::LinkSet; >using OrdinalTree = typename TreeComposition::OrdinalTree; >using IVertexGate = typename TreeComposition::IVertexGate; >using Index = typename TreeLinkSet::OrdinalReferenceSet::PartitionIndex; > >template<typename I> >using Bounds = Arithmetic::Bounds<I>; > >public: > using Reader = typename VertexSet<TreeVertex>::Reader; > using Writer = typename VertexSet<TreeVertex>::Writer; > > IncrementalGateBase(loan<TreeIntegration> x) : > _x(x), > _set(*this) > {} > > handle<IVertexGate> > open(unit<TreeVertex> head) { return _set.start(head), _set; } > >private: > class GateSet : > public IVertexGate > { > using Stem = std::vector<unit<TreeVertex>>; > using StemReader = typename Stem::const_iterator; > > public: > using StemWalk = iterable<StemReader>; > > GateSet(IncrementalGate& g) : > _g(g), > _anchor(nullptr), > _proxy(nullptr), > _graft(nullptr), > _reader(_writer) > {} > > unit<TreeVertex> > head() const override { return _head; } > > handle<Reader> > tails() { return _reader; } > > StemWalk > walkStem() const { return StemWalk(_stem); } > > bool > isTail(unit<TreeVertex> v) const override { return _reader.contains(v); } > > void > start(unit<TreeVertex> head) > { > _head = head; > _writer.clear(); > _stem.clear(); > } > > void > tail(EdgeStreamEndpoint tail) override { _writer.emplace(_g._x->factories.vertex.vertexMap.find(tail.id())); } > > void > tail(unit<TreeVertex> v) override { _writer.emplace(v); } > > unit<TreeVertex> > bud() const override { return (_stem.empty() ? nullptr : _stem.back()); } > > void > bud(unit<TreeVertex> v) override { _stem.push_back(v); } > > void > close(EdgeStreamEndpoint graft) override { close(_g._x->factories.vertex.emplace(graft).first); } > > void > close(unit<TreeVertex> graft) override > { > if (_stem.empty()) { > ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > graft->links->edgeCount() == 0 && graft->links->referenceCount() == 0 ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 95) << ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "graft->links->edgeCount() == 0 && graft->links->referenceCount() == 0" ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 95 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" > ># 96 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Cannot graft a gate stem that already has edges or references" << ># 96 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 96 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > > _proxy = _graft = graft; > _stem.push_back(graft); > } else { > ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > graft == _stem.back() ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 101) << ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "graft == _stem.back()" ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Cannot branch a gate stem" << ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 101 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > for (unit<TreeVertex> bud : _stem) { > ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > bud->links->edgeCount() == 0 && bud->links->referenceCount() == 0 ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 103) << ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "bud->links->edgeCount() == 0 && bud->links->referenceCount() == 0" ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 103 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" > ># 104 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Cannot graft a gate stem that already has edges or references" << ># 104 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 104 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > } > > _proxy = _stem.front(); > _graft = graft; > } > _g.close(); > } > > unit<TreeVertex> > anchor() const { return _anchor; } > > void > setAnchor(unit<TreeVertex> anchor) > { > _anchor = anchor; > _writer.erase(_anchor); > } > > bool > reflex() { return (_writer.erase(_head) > 0); } > > unit<TreeVertex> > proxy() const override { return _proxy; } > > unit<TreeVertex> > graft() const override { return _graft; } > > private: > IncrementalGate& _g; > > unit<TreeVertex> _head; > unit<TreeVertex> _anchor; > unit<TreeVertex> _proxy; > unit<TreeVertex> _graft; > > Writer _writer; > Reader _reader; > Stem _stem; > }; > > class PrecedenceProfile : > public TreeLinkSet::IPrecedenceProfile > { > using I = typename TreeLinkSet::IPrecedenceProfile; > using IEvaluation = typename I::IEvaluation; > > public: > PrecedenceProfile(uint32_t count) : > _isClockRelation(false), > _roofline(count), > _cursor(_roofline.start()), > _ancestors(0) > {} > > void > prefer(TreeReference tail) override > { > if (tail.endpoint()->mode() == TreeVertex::Mode::ordinal) > prefer(tail, tail.endpoint()->ordinalTreeLevel() , true ); > else > setPrecedent(tail); > } > > void > prefer(TreeReference tail, uint32_t level, bool isForward) override > { > if (_precedent.endpoint() == nullptr) { > isForward = true; > } else { > if (!OrdinalTree::isOrdinalRelation(_precedent.endpoint(), tail.endpoint())) { > _cursor = _roofline.start(); > isForward = true; > } > } > > _precedent = tail; > > evaluation(Evaluation(tail, level, false, isForward)); > } > > void > discard(TreeReference tail, uint32_t level, bool isForward) override { evaluation(Evaluation(tail, level, true, isForward)); } > > TreeReference > precedent() const override { return _precedent; } > > void > setPrecedent(TreeReference tail) override > { > _precedent = tail; > _cursor = _roofline.start(); > } > > TreeRelation > relation() const override { return _relation; } > > void > setRelation(TreeRelation relation) override { _relation = relation; } > > bool > isClockRelation() const { return _isClockRelation; } > > void > setClockRelation(bool b = true) { _isClockRelation = b; } > > uint32_t > ordinalTreeMembers() const { return _roofline.positionIn(_cursor); } > > void > finalize() > { > enum class ForwardPrecedent { > off, > pivot, > any > }; > > if (ordinalTreeMembers() == 0) > return; > > ForwardPrecedent fp = ForwardPrecedent::off; > cell<Evaluation> anchor = _roofline.start() + _precedent.endpoint()->precedenceEvaluationIndex(); > anchor->setAnchor(); > for (cell<Evaluation> walk = (_cursor - 1) ; walk > anchor; --walk) { > ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > walk->isDiscard() ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 229) << ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "walk->isDiscard()" ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Precedent cannot follow the anchor in the roofline sequence" << ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 229 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > > if (walk->isForward()) > _ancestors++; > } > _ancestors++; > fp = (anchor->isForward() ? ForwardPrecedent::any : ForwardPrecedent::off); > > uint32_t pivot = anchor->level(); > for (cell<Evaluation> walk = anchor - 1; walk >= _roofline.start(); --walk) { > bool isProfileForward = walk->isForward(); > if (walk->isForward()) { > if (walk->level() <= pivot) > _ancestors++; > else > walk->setCross(pivot); > } else if (!walk->isDiscard()) { > if (walk->level() < pivot) { > if (walk->tail().endpoint()->ordinalTreeLevel() <= pivot) { > if (fp != ForwardPrecedent::off) { > walk->setForward(); > _ancestors++; > } > } else { > if (fp == ForwardPrecedent::any) { > walk->setForward(); > _ancestors++; > } > } > pivot = walk->exchange(pivot); > } else { > walk->raise(pivot); > if (fp == ForwardPrecedent::any) { > walk->setForward(); > _ancestors++; > } > } > } else { > walk->raise(pivot); > } > if (!walk->isDiscard()) > fp = (isProfileForward ? (walk->isForward() ? ForwardPrecedent::any : ForwardPrecedent::pivot) : ForwardPrecedent::off); > } > } > > uint32_t > ancestors() const { return _ancestors; } > > bool > isAncestor(TreeReference r) const > { > ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > _roofline.at(r.endpoint()->precedenceEvaluationIndex()).tail().endpoint() == r.endpoint() ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 280) << ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "_roofline.at(r.endpoint()->precedenceEvaluationIndex()).tail().endpoint() == r.endpoint()" ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 280 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" > ># 281 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Found " << _roofline.at(r.endpoint()->precedenceEvaluationIndex()).tail().endpoint()->token() << " at roofline index " > << r.endpoint()->precedenceEvaluationIndex() << " for " << r.endpoint()->token() << ># 282 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 282 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > > return _roofline.at(r.endpoint()->precedenceEvaluationIndex()).isForward(); > } > > uint32_t > pathBranchLevel(TreeReference r) const { return _roofline.at(r.endpoint()->precedenceEvaluationIndex()).level(); } > > uint32_t > size() const { return _roofline.positionIn(_cursor); } > > handle<const IEvaluation> > evaluation(uint32_t i) const { return _roofline.at(i); } > > private: > class Evaluation : > public IEvaluation { > public: > Evaluation() : > _tail(), > _level(0), > _isDiscard(false), > _isForward(false), > _isAnchor(false) > {} > > Evaluation(TreeReference tail, uint32_t level, bool isDiscard, bool isForward) : > _tail(tail), > _level(level), > _isDiscard(isDiscard), > _isForward(isForward), > _isAnchor(false) > {} > > TreeReference > tail() const override { return _tail; } > > uint32_t > level() const override { return _level; } > > bool > isDiscard() const override { return _isDiscard; } > > bool > isForward() const override { return _isForward; } > > bool > isAnchor() const override { return _isAnchor; } > > void > setLevel(uint32_t level) { _level = level; } > > void > setForward() { _isForward = true; } > > void > setCross(uint32_t pivot) > { > _isForward = false; > raise(pivot); > } > > void > setAnchor() { _isAnchor = true; } > > void > raise(uint32_t pivot) > { > if (_level > pivot) > _level = pivot; > } > > uint32_t > exchange(uint32_t pivot) > { > uint32_t swap = _level; > return _level = pivot, swap; > } > > private: > TreeReference _tail; > uint32_t _level; > bool _isDiscard; > bool _isForward; > bool _isAnchor; > }; > > inline void > evaluation(Evaluation e) > { > e.tail().endpoint()->setPrecedenceEvaluationIndex(_roofline.positionIn(_cursor)); > _cursor.writeStep(e); > } > > TreeReference _precedent; > TreeRelation _relation; > bool _isClockRelation; > > atomblock<Evaluation> _roofline; > cell<Evaluation> _cursor; > > uint32_t _ancestors; > }; > > struct Accumulator { > Accumulator(unit<TreeVertex> proxy) : > _proxy(proxy) > {} > > virtual ~Accumulator() {} > > protected: > void > transfer(cell<TreeReference>& sink, const TreeReference& r, > OrdinalEdgePartition partition = OrdinalEdgePartition::clock, uint32_t pathBranchLevel = Bounds<uint32_t>::max) const > { > unit<TreeVertex> tail = r.endpoint(); > cell<TreeEdge> e = tail->links->getDual(r); > e->redirect(_proxy, sink - _proxy->links->startReferences()); > if (pathBranchLevel < Bounds<uint32_t>::max) > e->setPathBranchLevel(pathBranchLevel); > sink.writeStep(r); > if (tail->mode() == TreeVertex::Mode::ordinal) { > OrdinalEdgePartition present = tail->links->out.ordinal().index().identifyPartition(e); > if (present < partition) > tail->links->out.ordinal().rotateRight(e, present, partition); > else if (present > partition) > tail->links->out.ordinal().rotateLeft(e, present, partition); > } > } > > unit<TreeVertex> _proxy; > }; > > class ClockAccumulator : > public Accumulator, > public IExtract<TreeReference> > { > using super = Accumulator; > > public: > ClockAccumulator(unit<TreeVertex> proxy) : > Accumulator(proxy) > {} > > handle<ClockAccumulator> > start() > { > ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > super::_proxy->mode() == TreeVertex::Mode::clock ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 430) << ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "super::_proxy->mode() == TreeVertex::Mode::clock" ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 430 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Cannot accumulate unpartitioned references of ordinal proxy " > << super::_proxy->token() << ># 431 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 431 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > > return startReferences(), *this; > } > > void > transfer(const TreeReference& r) override { super::transfer(_cursor, r); } > > protected: > void > startReferences() { _cursor = super::_proxy->links->startReferences() + 1; } > > private: > cell<TreeReference> _cursor; > }; > > class PartitionDiscardAccumulator : > public ClockAccumulator, > public IPartitionExtract<TreeReference, OrdinalReferencePartition> > { > using super = ClockAccumulator; > > public: > PartitionDiscardAccumulator(unit<TreeVertex> proxy) : > ClockAccumulator(proxy) > {} > > handle<PartitionDiscardAccumulator> > start() { return super::startReferences(), *this; } > > void > transfer(const TreeReference& r) override { super::transfer(r); } > > void > part(__attribute__((unused)) OrdinalReferencePartition p) override {} > }; > > class PartitionRetentionAccumulator : > public Accumulator, > public IPartitionExtract<TreeReference, OrdinalReferencePartition> > { > using super = Accumulator; > > public: > PartitionRetentionAccumulator(unit<TreeVertex> proxy) : > Accumulator(proxy), > _index(super::_proxy->links->in.ordinal().index()), > _partition(OrdinalEdgePartition::forward) > {} > > handle<PartitionRetentionAccumulator> > start() > { > ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > super::_proxy->mode() == TreeVertex::Mode::ordinal ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 484) << ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "super::_proxy->mode() == TreeVertex::Mode::ordinal" ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 484 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Cannot accumulate references into partitions of clock proxy " > << super::_proxy->token() << ># 485 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 485 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > > _cursor = super::_proxy->links->startReferences() + 1; > return *this; > } > > void > transfer(const TreeReference& r) override { super::transfer(_cursor, r, _partition); } > > void > part(OrdinalReferencePartition p) override > { > _partition = OrdinalPartition::getDual(p + 1); > if (p < OrdinalReferencePartition::clock) > _index.setEnd(p, super::_proxy->links->referenceIndex(_cursor)); > } > > private: > Index& _index; > cell<TreeReference> _cursor; > OrdinalEdgePartition _partition; > }; > > class OrdinalTreeRooflineAccumulator : > public Accumulator, > public IPartitionExtract<TreeReference, OrdinalReferencePartition> > { > using super = Accumulator; > > public: > OrdinalTreeRooflineAccumulator(handle<PrecedenceProfile> profile, unit<TreeVertex> proxy) : > Accumulator(proxy), > _profile(profile), > _index(super::_proxy->links->in.ordinal().index()) > {} > > void > start() > { > ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > super::_proxy->mode() == TreeVertex::Mode::ordinal ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 524) << ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "super::_proxy->mode() == TreeVertex::Mode::ordinal" ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 524 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Roofline classification is not compatible with clock proxy " > << super::_proxy->token() << ># 525 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 525 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > _profile->precedent().endpoint() != super::_proxy ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 526) << ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "_profile->precedent().endpoint() != super::_proxy" ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 526 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Roofline classification is not compatible with reflexive proxy " > << super::_proxy->token() << ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 527 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > } > > protected: > handle<PrecedenceProfile> _profile; > > Index& _index; > }; > > class OrdinalTreeLoopbackProxyAccumulator : > public OrdinalTreeRooflineAccumulator > { > using super = OrdinalTreeRooflineAccumulator; > static constexpr const char *type = "OrdinalTreeLoopbackProxyAccumulator"; > > public: > OrdinalTreeLoopbackProxyAccumulator(handle<PrecedenceProfile> profile, unit<TreeVertex> proxy) : > super(profile, proxy), > _transforms(profile) > {} > > handle<OrdinalTreeLoopbackProxyAccumulator> > start() > { > super::start(); > > _partition = OrdinalEdgePartition::forward; > _cursor = _forward = super::_index.wrapStart(OrdinalReferencePartition::forward) + 1; > return *this; > } > > void > transfer(const TreeReference& r) override > { > if (_cursor == nullptr) { > if (super::_profile->isAncestor(r)) > Accumulator::transfer(_forward, r, OrdinalEdgePartition::forward); > else > Accumulator::transfer(_cross, r, OrdinalEdgePartition::cross, super::_profile->pathBranchLevel(r)); > } else { > Accumulator::transfer(_cursor, r, _partition); > } > } > > void > part(OrdinalReferencePartition p) override > { > uint32_t originals, total, position; > _partition = OrdinalPartition::getDual(p + 1); > > switch (p) > { > case OrdinalReferencePartition::forward: > originals = super::_proxy->links->referenceIndex(_cursor); > total = originals + _transforms.forward; > super::_index.setEnd(OrdinalReferencePartition::forward, total); > > _forward = _cursor; > _cursor = super::_index.wrapStart(OrdinalReferencePartition::cross); > break; > case OrdinalReferencePartition::cross: > > originals = (super::_proxy->links->referenceIndex(_cursor) - super::_index.end(OrdinalReferencePartition::forward)); > total = originals + _transforms.cross; > position = (total + super::_index.end(OrdinalReferencePartition::forward)); > super::_index.setEnd(OrdinalReferencePartition::cross, position); > super::_index.setEnd(OrdinalReferencePartition::loopback, position); > > _cross = _cursor; > _cursor = nullptr; > break; > case OrdinalReferencePartition::loopback: > _cursor = super::_index.wrapStart(OrdinalReferencePartition::clock); > break; > case OrdinalReferencePartition::clock: > ># 602 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 602) ># 602 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << type << " cannot partition references at the sentinel (clock partition)" << ># 602 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 602 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > } > } > > void > requirePartitionIntegrity() const > { > int delta = (super::_index.wrapEnd(OrdinalReferencePartition::forward) - _forward); > ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > delta == 0 ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 610) << ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "delta == 0" ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << type << " misplaced forward references by " << delta << ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 610 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > delta = (super::_index.wrapEnd(OrdinalReferencePartition::cross) - _cross); > ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > delta == 0 ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 612) << ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "delta == 0" ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << type << " misplaced cross references by " << delta << ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 612 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > delta = (super::_index.wrapEnd(OrdinalReferencePartition::clock) - _cursor); > ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > delta == 0 ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 614) << ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "delta == 0" ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << type << " misplaced clock references by " << delta << ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 614 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > super::_index.size(OrdinalReferencePartition::loopback) == 0 ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 615) << ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "super::_index.size(OrdinalReferencePartition::loopback) == 0" ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 615 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" > ># 616 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Proxy in " << type << " is never a loop head" << ># 616 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 616 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > } > > private: > const struct Transforms { > const uint32_t forward; > const uint32_t cross; > > Transforms(handle<PrecedenceProfile> profile) : > forward(profile->ancestors() - 1 ), > cross(profile->ordinalTreeMembers() - profile->ancestors()) > {} > } > _transforms; > > cell<TreeReference> _forward; > cell<TreeReference> _cross; > > OrdinalEdgePartition _partition; > cell<TreeReference> _cursor; > }; > > class OrdinalTreeCrossProxyAccumulator : > public OrdinalTreeRooflineAccumulator > { > using super = OrdinalTreeRooflineAccumulator; > > public: > OrdinalTreeCrossProxyAccumulator(handle<PrecedenceProfile> profile, unit<TreeVertex> proxy) : > super(profile, proxy) > {} > > handle<OrdinalTreeCrossProxyAccumulator> > start() > { > super::start(); > > uint32_t internalization = super::_profile->ordinalTreeMembers(); > super::_index.setEnd(OrdinalReferencePartition::forward, super::_profile->ancestors()); > super::_index.setEnd(OrdinalReferencePartition::cross, internalization); > super::_index.setEnd(OrdinalReferencePartition::loopback, internalization); > > _forward = super::_index.wrapStart(OrdinalReferencePartition::forward) + 1; > _cross = super::_index.wrapStart(OrdinalReferencePartition::cross); > _clock = super::_index.wrapStart(OrdinalReferencePartition::clock); > return *this; > } > > void > transfer(const TreeReference& r) override > { > if (OrdinalTree::isOrdinalRelation(r.endpoint(), super::_proxy)) { > if (super::_profile->isAncestor(r)) > Accumulator::transfer(_forward, r, OrdinalEdgePartition::forward); > else > Accumulator::transfer(_cross, r, OrdinalEdgePartition::cross, super::_profile->pathBranchLevel(r)); > } else { > Accumulator::transfer(_clock, r); > } > } > > void > part(__attribute__((unused)) OrdinalReferencePartition p) override {} > > void > requirePartitionIntegrity() const > { > static constexpr const char *type = "OrdinalTreeCrossProxyAccumulator"; > > int delta = (super::_index.wrapEnd(OrdinalReferencePartition::forward) - _forward); > ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > delta == 0 ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 686) << ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "delta == 0" ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << type << " misplaced forward references by " << delta << ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 686 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > delta = (super::_index.wrapEnd(OrdinalReferencePartition::cross) - _cross); > ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > delta == 0 ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 688) << ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "delta == 0" ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << type << " misplaced cross references by " << delta << ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 688 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > delta = (super::_index.wrapEnd(OrdinalReferencePartition::clock) - _clock); > ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > delta == 0 ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 690) << ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "delta == 0" ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << type << " misplaced clock references by " << delta << ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 690 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > super::_index.size(OrdinalReferencePartition::loopback) == 0 ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 691) << ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "super::_index.size(OrdinalReferencePartition::loopback) == 0" ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 691 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" > ># 692 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Proxy in " << type << " is never a loop head" << ># 692 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 692 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > } > > private: > cell<TreeReference> _forward; > cell<TreeReference> _cross; > cell<TreeReference> _clock; > }; > > void > close() > { > _x->xs.transcribe(_x->xs.schema.gate.open.event, _set); > > unit<TreeVertex> proxy = _set.proxy(), graft = _set.graft(), head = _set.head(); > > ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > !_set.tails()->contains(proxy) && !_set.tails()->contains(graft) ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 708) << ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "!_set.tails()->contains(proxy) && !_set.tails()->contains(graft)" ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Cannot gate reflexively" << ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 708 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > for (unit<TreeVertex> tail : _set.tails()->start()) > ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > (head->links->isReflexive() && tail == head) || tail->links->findEdge(head) ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 710) << ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "(head->links->isReflexive() && tail == head) || tail->links->findEdge(head)" ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Cannot gate indirectly" << ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 710 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > > bool isReflexive = _set.reflex(), isReflexiveProxy = false; > if (isReflexive) > head->links->setReflexive(false); > > PrecedenceProfile profile(_set.tails()->size()); > if (_set.tails()->size() == 0) { > ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ( ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > isReflexive ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 718) << ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠Condition [" << ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > "isReflexive" ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "] " << ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > std::endl ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > << "⢠" ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Cannot gate 0 tails of " << head->token() << ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 718 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > facile::StreamLog::log(__PRETTY_FUNCTION__, 719, facile::StreamLogLevel::Status) << "⢠singleton reflexive gate" << std::endl; > > isReflexiveProxy = true; > } else if (_set.tails()->contains(head->tree())) { > profile.setPrecedent(head->links->getDual(head->links->treeEdge()).read()); > profile.setRelation(TreeRelation::tree); > > proxy->setTreePosition(head->treePosition()); > head->setTree(graft); > head->setTreePosition(0); > } else { > if (head->mode() == TreeVertex::Mode::ordinal) { > if (isReflexive && isReflexivePrecedent()) > isReflexiveProxy = true; > else > _x->ordinal.precedent(head, _set.tails(), profile); > } else { > _x->clock.precedent(head, _set.tails(), profile); > isReflexiveProxy = (isReflexive && (profile.relation() != TreeRelation::loopback)); > } > > _x->xs.transcribe(_x->xs.schema.gate.profile.event, "anchor", profile); > profile.finalize(); > _x->xs.transcribe(_x->xs.schema.gate.profile.event, "extract", profile); > } > > if (isReflexiveProxy) > _set.setAnchor(head); > else > _set.setAnchor(profile.precedent().endpoint()); > proxy->setLevel(_set.anchor()->level() + 1); > proxy->setMode(_set.anchor()->mode()); > if (_set.anchor()->mode() == TreeVertex::Mode::ordinal) > _x->ordinal.expandOrdinalVertex(_set.anchor(), proxy); > > unit<TreeVertex> base = nullptr; > for (unit<TreeVertex> bud : _set.walkStem()) { > if (base != nullptr) { > bud->setMode(base->mode()); > if (proxy->mode() == TreeVertex::Mode::clock) { > _x->clock.expandClockVertex(base, bud); > _x->clock.integrateEdge(base, bud, TreeRelation::tree); > } else { > _x->ordinal.expandOrdinalVertex(base, bud); > _x->ordinal.integrateEdge(base, bud, TreeRelation::tree); > } > } > base = bud; > } > > _x->episode.update.event->isRetrograde = false; > _x->episode.advance(); > if ((head->tree() == graft) || (graft->mode() == TreeVertex::Mode::clock)) { > _x->template pluginDispatch<plugin::BeginUpdate>(); > > > } > > if (isReflexiveProxy) { > if (proxy->mode() == TreeVertex::Mode::clock) { > _x->clock.integrateEdge(head, proxy, TreeRelation::tree); > _x->clock.integrateEdge(graft, head, TreeRelation::loopback); > } else { > _x->ordinal.integrateEdge(head, proxy, TreeRelation::tree); > _x->ordinal.integrateEdge(graft, head, TreeRelation::loopback); > } > if (_set.tails()->size() > 0) > proxy->links->resizeReferences(_set.tails()->size()); > > profile.setRelation(TreeRelation::loopback); > profile.setPrecedent(proxy->links->getDual(proxy->links->treeEdge()).read()); > } else { > TreeLinkSet::proxy(proxy, profile.precedent(), graft, profile.relation(), profile.isClockRelation(), _set.tails()->size()); > > _x->pm.addEdge(_set.anchor()); > if (profile.relation() == TreeRelation::tree) { > ElasticOrdinal swap = proxy->ordinal(); > proxy->setOrdinal(head->ordinal()); > head->setOrdinal(swap); > } > } > > facile::StreamLog::log(__PRETTY_FUNCTION__, 801, facile::StreamLogLevel::Detail) << "Gate " << (_set.tails()->size() + 1 ) << " tails of " << head->token() << " with "; > if (proxy == graft) { > facile::StreamLog::getLogStream(facile::StreamLogLevel::Detail) << proxy->token(); > } else { > facile::StreamLog::getLogStream(facile::StreamLogLevel::Detail) << "(" << proxy->token() << " "; > if (_set.walkStem().count() > 2) > facile::StreamLog::getLogStream(facile::StreamLogLevel::Detail) << "*" << (_set.walkStem().count() - 2); > facile::StreamLog::getLogStream(facile::StreamLogLevel::Detail) << "-> " << graft->token() << ")"; > } > facile::StreamLog::getLogStream(facile::StreamLogLevel::Detail) << " via " << _set.anchor()->token() << std::endl; > > if (head->mode() == TreeVertex::Mode::ordinal) { > if (proxy->mode() == TreeVertex::Mode::ordinal) { > if ((profile.relation() == TreeRelation::tree) || (profile.ordinalTreeMembers() == 0)) { > PartitionRetentionAccumulator a(proxy); > head->links->in.ordinal().extract(_set.tails(), a.start()); > } else if (OrdinalTree::isOrdinalRelation(head, proxy) && (profile.relation() == TreeRelation::loopback)) { > OrdinalTreeLoopbackProxyAccumulator a(profile, proxy); > head->links->in.ordinal().extract(_set.tails(), a.start()); > a.requirePartitionIntegrity(); > } else { > OrdinalTreeCrossProxyAccumulator a(profile, proxy); > head->links->in.ordinal().extract(_set.tails(), a.start()); > a.requirePartitionIntegrity(); > } > } else { > PartitionDiscardAccumulator a(proxy); > head->links->in.ordinal().extract(_set.tails(), a.start()); > } > } else { > if (proxy->mode() == TreeVertex::Mode::ordinal) { > OrdinalTreeCrossProxyAccumulator a(profile, proxy); > head->links->in.clock().extract(_set.tails(), a.start()); > a.requirePartitionIntegrity(); > } else { > ClockAccumulator a(proxy); > head->links->in.clock().extract(_set.tails(), a.start()); > } > } > > if (isReflexive) { > if (profile.relation() == TreeRelation::tree) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 843, facile::StreamLogLevel::Status) << "⢠gate the reflexive edge with loopback (" << head->token() << " -> " << proxy->token() << ")" << std::endl; > > if (head->mode() == TreeVertex::Mode::clock) > _x->clock.integrateEdge(head, proxy, TreeRelation::loopback); > else > _x->ordinal.integrateEdge(head, proxy, TreeRelation::loopback, OrdinalTree::relationMode(head, proxy)); > } else if (profile.relation() == TreeRelation::loopback) { > if (!isReflexiveProxy) { > if (head->mode() == TreeVertex::Mode::clock) > _x->clock.integrateEdge(head, proxy, TreeRelation::forward); > else > _x->ordinal.integrateEdge(head, proxy, TreeRelation::forward); > } > } else { > ># 857 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp", 857) ># 857 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > << "Reflexive gate must have TreeRelation::tree or TreeRelation::loopback for proxy edge (" > << proxy->token() << " -> " << head->token() << ")" << ># 858 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" 3 > facile::RequireException::require_sentinel ># 858 "../../subprojects/edfst/src/edfst/tree/IncrementalGate.hpp" > ; > } > } > > _x->pm.gateStem(proxy, graft); > _x->episode.update.start(graft, head); > _x->episode.update.event->root = proxy; > _x->episode.update.event->mode = proxy->mode(); > _x->episode.update.event->relation = profile.relation(); > _x->episode.expansion.isInProgress = true; > _x->episode.expansion.depth = _set.walkStem().count(); > _x->episode.expansion.isGate = true; > _x->episode.expansion.origin = proxy; > OnScopeExit::Copy episodeFlag([&]() { this->_x->episode.expansion.isInProgress = false; }); > if ((head->tree() == graft) || (graft->mode() == TreeVertex::Mode::clock)) { > _x->pm.push(proxy); > if (proxy->mode() == TreeVertex::Mode::clock) > _x->clock.expand(proxy); > else > _x->ordinal.expand(proxy); > _x->pm.pop(); > } > > _x->template pluginDispatch<plugin::GateVertex>(proxy); > > _x->closeEpisode(proxy, head); > } > > bool > isReflexivePrecedent() > { > for (const TreeReference& r : _set.head()->links->in.ordinal().index().iterateLinks(OrdinalReferencePartition::loopback)) { > if (_set.tails()->contains(r.endpoint())) > return false; > } > return true; > } > > const loan<TreeIntegration> _x; > GateSet _set; >}; >} ># 18 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 1 > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/relation/StateFilter.hpp" 1 > > >namespace facile >{ >namespace StateFilter >{ >template<typename State> >struct Condition { > virtual ~Condition() {} > > virtual bool > operator ()(loan<State> state) = 0; >}; ># 24 "../../subprojects/edfst/subprojects/facile/src/relation/StateFilter.hpp" >template<typename State> >class Evaluator >{ >using Atom = Condition<State>; > >public: > bool > operator ()(loan<State> state) > { > for (loan<Atom> atom : _evaluation) { > if (!atom.query(state)) > return false; > } > > return true; > } > > void > registerCondition(loan<Atom> condition) { _evaluation.push_back(condition); } > >private: > std::vector<loan<Atom>> _evaluation; >}; >} >} ># 5 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 2 > > ># 1 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 1 > > > > > ># 1 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 1 > > > > > > >namespace facile >{ >template<typename E> >class EnumParser { >public: > struct Metadata { > E entry; > const std::string label; > }; > > struct Selection { > class iterator { > public: > typedef iterator self_type; > typedef E value_type; > typedef E reference; > typedef E pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > iterator(typename BitBlock::iterator i) : > _i(i) > {} > > self_type > operator ++() > { > ++_i; > return *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > operator ++(); > return pre; > } > > reference > operator *() { return static_cast<E>(*_i); } > > pointer > operator ->() { return static_cast<E>(*_i); } > > bool > operator ==(const self_type& other) const { return _i == other._i; } > > bool > operator !=(const self_type& other) const { return !operator ==(other); } > > private: > typename BitBlock::iterator _i; > }; > > Selection() : > _b(0), > _size(0) > {} > > iterator > begin() { return iterator(_b.begin()); } > > iterator > end() { return iterator(_b.end()); } > > bool > is(E entry) { return _b.is(static_cast<uint32_t>(entry)); } > > void > add(E entry) { _b.set(static_cast<uint32_t>(entry)); } > > BitBlock _b; > uint32_t _size; > }; > > EnumParser(json& j, const std::string& key) : > _j(j), > _key(key) > {} > > void > addEntry(E entry, const std::string& label) { _metadata.push_back({ entry, label }); } > > E > parseUnique() > { > json entryConfig = _j.at(_key); > > ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > ( ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > entryConfig.is_string() ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp", 96) << ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > std::endl ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > << "⢠Condition [" << ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > "entryConfig.is_string()" ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > << "] " << ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > std::endl ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > << "⢠" ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > << _key << " configuration must be a single string" << ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > facile::RequireException::require_sentinel ># 96 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > ; > > std::string labelConfig = entryConfig.get<std::string>(); > for (const Metadata& em : _metadata) { > if (em.label == labelConfig) > return em.entry; > } > > std::stringstream ss; > ss << "Input error: " << _key << " must be one of the set {"; > std::string comma = ""; > for (const Metadata& em : _metadata) { > ss << comma << em.label; > comma = ", "; > } > ss << "}"; > ># 112 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp", 112) ># 112 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > << ss.str() << ># 112 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > facile::RequireException::require_sentinel ># 112 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > ; > > return static_cast<E>(0); > } > > Selection > parseList() > { > Selection s; > > json entryConfig = _j.at(_key); > > if (entryConfig.is_string()) { > E unique = parseUnique(); > s.add(unique); > return s; > } > > ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > ( ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > entryConfig.is_array() ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp", 130) << ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > std::endl ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > << "⢠Condition [" << ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > "entryConfig.is_array()" ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > << "] " << ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > std::endl ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > << "⢠" ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > << _key << " configuration must be a single string or an array of strings" << ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > facile::RequireException::require_sentinel ># 130 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > ; > > for (json entryConfigElement : entryConfig) { > std::string labelConfig = entryConfigElement.get<std::string>(); > Metadata& em = lookup(labelConfig); > s.add(em.entry); > } > > return s; > } > >private: > Metadata& > lookup(const std::string& label) > { > for (Metadata& em : _metadata) { > if (em.label == label) > return em; > } > > std::stringstream ss; > ss << "Input error on '" << label << " ': " << _key << " elements must belong to the set {"; > std::string comma = ""; > for (const Metadata& em : _metadata) { > ss << comma << em.label; > comma = ", "; > } > ss << "}"; > ># 158 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp", 158) ># 158 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > << ss.str() << ># 158 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" 3 > facile::RequireException::require_sentinel ># 158 "../../subprojects/edfst/subprojects/facile/src/io/ObjectParser.hpp" > ; > > return _metadata.at(0); > } > > json& _j; > const std::string _key; > std::vector<Metadata> _metadata; >}; >} ># 7 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 2 > > >namespace edfst >{ >namespace log >{ >template<typename TreeComposition> >struct TranscriptScope { > using TreeVertex = typename TreeComposition::Vertex; > > class StateScope > { > friend class owner<StateScope>; > > public: > enum class Table { > update, > rebind, > transitory > }; > > friend inline std::ostream& > operator <<(std::ostream& o, Table t) > { > switch (t) > { > case Table::update: > return o << "update"; > > case Table::rebind: > return o << "rebind"; > > default: > return o << "<undefined>"; > } > } > > enum class Field { > epoch, > head, > tail, > mode, > triageCursor > }; > > friend inline std::ostream& > operator <<(std::ostream& o, Field f) > { > switch (f) > { > case Field::epoch: > return o << "epoch"; > > case Field::head: > return o << "head"; > > case Field::tail: > return o << "tail"; > > case Field::mode: > return o << "mode"; > > case Field::triageCursor: > return o << "triage-cursor"; > > default: > return o << "<undefined>"; > } > } > > enum class FieldType { > undefined, > vertex, > integral, > sequence, > mode > }; > > friend inline std::ostream& > operator <<(std::ostream& o, FieldType t) > { > switch (t) > { > case FieldType::vertex: > return o << "vertex"; > > case FieldType::integral: > return o << "integral"; > > case FieldType::sequence: > return o << "sequence"; > > case FieldType::mode: > return o << "mode"; > > default: > return o << "undefined"; > } > } > > struct Span { > uint32_t first; > uint32_t last; > }; > > struct FieldMetadata { > Field field; > std::string name; > FieldType type; > > void > prepareParse(EnumParser<Field>& parser) { parser.addEntry(field, name); } > }; > > using Set = std::set<uint32_t>; > > enum class RangeType { > all, > set, > span, > subtree > }; > > friend inline std::ostream& > operator <<(std::ostream& o, RangeType t) > { > switch (t) > { > case RangeType::all: > return o << "all"; > > case RangeType::set: > return o << "set"; > > case RangeType::span: > return o << "span"; > > case RangeType::subtree: > return o << "subtree"; > > default: > return o << "undefined"; > } > } > > struct Range { > RangeType type; > union { > owner<Set> set; > Span span; > uint32_t subtree; > }; > > Range() : > type(RangeType::all), > set(nullptr) > {} > > ~Range() > { > if (type == RangeType::set) > set.reset(); > } > > void > activateSet() > { > type = RangeType::set; > set = owner<Set>::make(); > } > > template<typename E> > bool > is(E element) const { return set->count(static_cast<uint32_t>(element)) > 0; } > > bool > contains(uint32_t i) const { return (i >= span.first) && (i <= span.last); } > > bool > isCompatible(FieldType fieldType) const > { > switch (type) > { > case RangeType::subtree: > return (fieldType == FieldType::vertex); > > case RangeType::span: > return (fieldType == FieldType::sequence); > > default: > return true; > } > } > > static owner<const Range> > parse(json& config, const std::string& key, FieldType fieldType) > { > typename owner<Range>::const_builder range = owner<Range>::const_builder::make(); > > json::iterator rangeConfig = config.find(key); > if (rangeConfig != config.end()) { > ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > ( ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > rangeConfig->is_string() ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp", 208) << ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > std::endl ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "⢠Condition [" << ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > "rangeConfig->is_string()" ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "] " << ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > std::endl ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "⢠" ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > << "Range configuration must be a single string" << ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > facile::RequireException::require_sentinel ># 208 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ; > > std::string rangeString = rangeConfig->get<std::string>(); > > if ((rangeString.length() == 0) || (rangeString == "*")) > return range.seal(); > > if (rangeString.at(0) == '^') { > range->type = RangeType::subtree; > range->subtree = std::stoul(rangeString.substr(1), ># 217 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 4 > __null ># 217 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > , 10); > } else { > std::string::size_type dash = rangeString.find('-'); > if (dash != std::string::npos) { > range->type = RangeType::span; > range->span.first = ((dash == 0) ? 0 : std::stoul(rangeString.substr(0, dash), ># 222 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 4 > __null ># 222 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > , 10)); > range->span.last = ((dash == (rangeString.size()-1)) ? 0xffffffffUL : std::stoul(rangeString.substr(dash + 1), ># 223 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 4 > __null ># 223 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > , 10)); > } else { > range->activateSet(); > if (fieldType == FieldType::mode) { > for (const std::string& token : Tokenizer::parse(rangeString, ',')) { > typename TreeVertex::Mode mode = TreeVertex::parseMode(token); > range->set->emplace(static_cast<uint32_t>(mode)); > } > } else { > for (const std::string& token : Tokenizer::parse(rangeString, ',')) > range->set->emplace(std::stoul(token, ># 233 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 4 > __null ># 233 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > , 10)); > } > } > } > } > > return range.seal(); > } > }; > > std::string > id() const { return _id; } > > std::string > name() const { return _name; } > > Table > table() const { return _table; } > > typename EnumParser<Field>::Selection > fields() const { return _fields; } > > loan<const Range> > range() const { return _range; } > > static owner<StateScope> > parse(const std::string& id, json& config) > { > > struct FieldSchema { > FieldMetadata epoch; > FieldMetadata head; > FieldMetadata tail; > FieldMetadata mode; > FieldMetadata triageCursor; > > FieldSchema() : > epoch{Field::epoch, "epoch", FieldType::sequence}, > head{Field::head, "head", FieldType::vertex}, > tail{Field::tail, "tail", FieldType::vertex}, > mode{Field::mode, "mode", FieldType::mode}, > triageCursor{Field::triageCursor, "triage-cursor", FieldType::vertex} > {} > > inline FieldMetadata > at(Field field) > { > switch (field) > { > case Field::epoch: > return epoch; > > case Field::head: > return head; > > case Field::tail: > return tail; > > case Field::mode: > return mode; > > case Field::triageCursor: > return triageCursor; > } > > ># 298 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp", 298) ># 298 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > << "No metadata can be associated with field " << field << ># 298 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > facile::RequireException::require_sentinel ># 298 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ; > } > } > fieldSchema; > > owner<StateScope> ss = owner<StateScope>::make(id); > ss->_name = config.at("name").get<std::string>(); > > EnumParser<Table> tableParser(config, "table"); > tableParser.addEntry(Table::update, "update"); > tableParser.addEntry(Table::rebind, "rebind"); > tableParser.addEntry(Table::transitory, "transitory"); > ss->_table = tableParser.parseUnique(); > > EnumParser<Field> fieldParser(config, "field"); > fieldSchema.epoch.prepareParse(fieldParser); > fieldSchema.head.prepareParse(fieldParser); > fieldSchema.tail.prepareParse(fieldParser); > fieldSchema.mode.prepareParse(fieldParser); > fieldSchema.triageCursor.prepareParse(fieldParser); > ss->_fields = fieldParser.parseList(); > > FieldType fieldType = FieldType::undefined; > for (Field f : ss->_fields) { > FieldMetadata fm = fieldSchema.at(f); > > if (fieldType == FieldType::undefined) { > fieldType = fm.type; > } else { > ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > ( ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > fieldType == fm.type ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp", 327) << ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > std::endl ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "⢠Condition [" << ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > "fieldType == fm.type" ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "] " << ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > std::endl ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "⢠" ># 327 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > << "Error in StateScope " << ss->_name > << ": Cannot mix field types " << fm.type << " and " << fieldType << ># 328 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > facile::RequireException::require_sentinel ># 328 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ; > } > } > > ss->_range = Range::parse(config, "range", fieldType); > > ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > ( ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ss->_range->isCompatible(fieldType) ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp", 334) << ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > std::endl ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "⢠Condition [" << ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > "ss->_range->isCompatible(fieldType)" ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "] " << ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > std::endl ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "⢠" ># 334 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > << "Range type " << ss->_range->type << " cannot be applied to fields of type " > << fieldType << ># 335 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > facile::RequireException::require_sentinel ># 335 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ; > > return ss; > } > > private: > StateScope(const std::string& id) : > _id(id) > {} > > std::string _id; > std::string _name; > Table _table; > typename EnumParser<Field>::Selection _fields; > owner<const Range> _range; > }; > > class ChapterScope > { > friend class TranscriptScope; > > public: > using EventFilter = TreeFilter::Matcher::Configuration; > using EventFilterList = std::vector<loan<EventFilter>>; > using EventFilterIterable = iterable<typename EventFilterList::const_iterator>; > using StateScopeList = std::vector<loan<StateScope>>; > using StateScopeIterable = iterable<typename StateScopeList::const_iterator>; > > ChapterScope(const std::string& name) : > _name(name) > {} > > std::string > name() { return _name; } > > EventFilterIterable > eventFilters() const { return EventFilterIterable(_eventFilters); } > > StateScopeIterable > stateScopes() const { return StateScopeIterable(_stateScopes); } > > private: > std::string _name; > > EventFilterList _eventFilters; > StateScopeList _stateScopes; > }; > > using ChapterScopeList = std::vector<owner<ChapterScope>>; > using ChapterScopeIterator = iterable<typename ChapterScopeList::iterator>; > > TranscriptScope(owner<json> scope, owner<json> transcript) : > _scope(std::move(scope)), > _transcript(std::move(transcript)) > {} > > void > parse() > { > json eventScopes = _scope->at("event-filters"); > for (json eventScope : eventScopes) { > std::string name = eventScope.at("name").get<std::string>(); > _eventFilters.emplace(name, parseEventFilter(name, eventScope)); > } > json stateScopes = _scope->at("state-scopes"); > for (json stateScope : stateScopes) { > std::string id = stateScope.at("id").get<std::string>(); > _stateScopes.emplace(id, StateScope::parse(id, stateScope)); > } > > for (json::iterator i = _transcript->begin(), end = _transcript->end(); i != end; i++) { > owner<ChapterScope> c = owner<ChapterScope>::make(i.key()); > > json::iterator eventFilters = i->find("event"); > if (eventFilters != i->end()) { > if (eventFilters->is_string()) { > c->_eventFilters.push_back(_eventFilters.at(eventFilters->get<std::string>())); > } else if (eventFilters->is_array()) { > for (json eventFilter : *eventFilters) > c->_eventFilters.push_back(_eventFilters.at(eventFilter.get<std::string>())); > } else { > ># 416 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp", 416) ># 416 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > << "The event filters of a transcript event filter must either be a string or an array (or absent)" << ># 416 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > facile::RequireException::require_sentinel ># 416 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ; > } > } > > json::iterator stateScopes = i->find("state"); > if (stateScopes != i->end()) { > if (stateScopes->is_string()) { > c->_stateScopes.push_back(_stateScopes.at(stateScopes->get<std::string>())); > } else if (stateScopes->is_array()) { > for (json stateScope : *stateScopes) > c->_stateScopes.push_back(_stateScopes.at(stateScope.get<std::string>())); > } else { > ># 428 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp", 428) ># 428 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > << "The state scopes of a transcript event filter must either be a string or an array (or absent)" << ># 428 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > facile::RequireException::require_sentinel ># 428 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ; > } > } > > _chapters.push_back(std::move(c)); > } > } > > ChapterScopeIterator > chapters() > { > return ChapterScopeIterator(_chapters); > } > > private: > owner<TreeFilter::Matcher::Configuration> > parseEventFilter(const std::string& name, json& config) > { > owner<TreeFilter::Matcher::Configuration> filterConfig = owner<TreeFilter::Matcher::Configuration>::make(name); > > json::iterator rootPath = config.find("root"); > ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > ( ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > rootPath != config.end() ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp", 449) << ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > std::endl ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "⢠Condition [" << ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > "rootPath != config.end()" ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "] " << ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > std::endl ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > << "⢠" ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > << "A transcript event filter must indicate a root" << ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > facile::RequireException::require_sentinel ># 449 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ; > filterConfig->root = Tokenizer::parse(rootPath->get<std::string>(), '.'); > > json::iterator paths = config.find("paths"); > if (paths != config.end()) { > if (paths->is_string()) { > filterConfig->paths.push_back(Tokenizer::parse(paths->get<std::string>(), '.')); > } else if (paths->is_array()) { > for (json path : *paths) > filterConfig->paths.push_back(Tokenizer::parse(path.get<std::string>(), '.')); > } else { > ># 460 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp", 460) ># 460 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > << "The paths of a transcript event filter must either be a string or an array (or absent)" << ># 460 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" 3 > facile::RequireException::require_sentinel ># 460 "../../subprojects/edfst/src/edfst/log/TranscriptScope.hpp" > ; > } > } > > return filterConfig; > } > > owner<json> _scope; > owner<json> _transcript; > > std::map<std::string, owner<TreeFilter::Matcher::Configuration>> _eventFilters; > std::map<std::string, owner<StateScope>> _stateScopes; > > ChapterScopeList _chapters; >}; >} >} ># 8 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 2 > > >namespace edfst >{ >namespace log >{ >template<typename TreeComposition, template<typename> class TreePluginSetBase> >class IncrementalTreeTranscriptBase >{ >using TreeVertex = typename TreeComposition::Vertex; >using TreeIntegration = TreeIntegrationBase<TreeComposition, TreePluginSetBase>; >using StateScope = typename TranscriptScope<TreeComposition>::StateScope; >using ChapterScope = typename TranscriptScope<TreeComposition>::ChapterScope; >using EventSchema = typename TranscriptSchema<TreeComposition, TreePluginSetBase>::EventSchema; ># 35 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" >struct TransitoryState { > > unit<TreeVertex> triageCursor; >} >transitory; > >struct TreeState { > typename TreeEpisode<TreeComposition>::Update& update; > typename TreeEpisode<TreeComposition>::Rebind& rebind; > TransitoryState& transitory; > > TreeState(TransitoryState& transitory, loan<TreeIntegration> x) : > update(x->episode.update), > rebind(x->episode.rebind), > transitory(transitory) > { > } > > TreeState(TreeState&) = delete; > > TreeState& > operator = (TreeState&) = delete; >}; > >struct StateEvaluator { > loan<TreeState> state; > loan<const typename StateScope::Range> range; > > virtual ~StateEvaluator() {} > > virtual bool > isCorresponding(typename StateScope::Field field) = 0; >}; > >static bool >isInSubtree(unit<TreeVertex> stateField, uint32_t subtreeId) >{ > for (unit<TreeVertex> walk = stateField; walk != nullptr; walk = walk->tree()) { > if (walk->id().isIndex(subtreeId)) > return true; > } > > return false; >} > >struct UpdateEvaluator : > public StateEvaluator { > using super = StateEvaluator; > > bool > isCorresponding(typename StateScope::Field field) override > { > switch (field) > { > case StateScope::Field::epoch: > { > if (super::range->type == StateScope::RangeType::set) > return super::range->is(super::state->update.epoch); > else > return super::range->contains(super::state->update.epoch); > } > break; > > case StateScope::Field::head: > if (super::state->update.event == nullptr) > return false; > > if (super::range->type == StateScope::RangeType::subtree) > return isInSubtree(super::state->update.event->head, super::range->subtree); > else > return super::range->is(super::state->update.event->head->id().index()); > > case StateScope::Field::tail: > if (super::state->update.event == nullptr) > return false; > > if (super::range->type == StateScope::RangeType::subtree) > return isInSubtree(super::state->update.event->tail, super::range->subtree); > else > return super::range->is(super::state->update.event->tail->id().index()); > > case StateScope::Field::mode: > return super::range->is(super::state->update.event->mode); > > default: > ># 120 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp", 120) ># 120 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" > << "No such field " << field << " in table 'update'" << ># 120 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 3 > facile::RequireException::require_sentinel ># 120 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" > ; > } > } >}; > >struct RebindEvaluator : > public StateEvaluator { > using super = StateEvaluator; > > bool > isCorresponding(typename StateScope::Field field) override > { > switch (field) > { > case StateScope::Field::epoch: > { > if (super::range->type == StateScope::RangeType::set) > return super::range->is(super::state->update.epoch); > else > return super::range->contains(super::state->update.epoch); > } > break; > > case StateScope::Field::head: > if (super::state->rebind.head == nullptr) > return false; > > if (super::range->type == StateScope::RangeType::subtree) > return isInSubtree(super::state->rebind.head, super::range->subtree); > else > return super::range->is(super::state->rebind.head->id().index()); > > case StateScope::Field::tail: > if (super::state->rebind.tail == nullptr) > return false; > > if (super::range->type == StateScope::RangeType::subtree) > return isInSubtree(super::state->rebind.tail, super::range->subtree); > else > return super::range->is(super::state->rebind.tail->id().index()); > > case StateScope::Field::mode: > return super::range->is(super::state->rebind.mode); > > default: > ># 165 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp", 165) ># 165 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" > << "No such field " << field << " in table 'rebind'" << ># 165 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 3 > facile::RequireException::require_sentinel ># 165 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" > ; > } > } >}; > >struct TransitoryEvaluator : > public StateEvaluator { > using super = StateEvaluator; > > bool > isCorresponding(typename StateScope::Field field) override > { > if (field == StateScope::Field::triageCursor) { > if (super::state->transitory.triageCursor == nullptr) > return false; > > if (super::range->type == StateScope::RangeType::subtree) > return isInSubtree(super::state->transitory.triageCursor, super::range->subtree); > else > return super::range->is(super::state->transitory.triageCursor->id().index()); > } > > ># 187 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp", 187) ># 187 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" > << "No such field " << field << " in table 'transitory'" << ># 187 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" 3 > facile::RequireException::require_sentinel ># 187 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" > ; > } >}; > >struct EvaluatorFactory { > template<typename Evaluator> > static loan<Evaluator> > acquire(loan<TreeState> state, loan<const typename StateScope::Range> range) > { > static owner<Evaluator> instance = owner<Evaluator>::make(); > > instance->state = state; > instance->range = range; > return instance; > } >}; > >class Chapter >{ >struct StateCondition : > public StateFilter::Condition<TreeState> { > StateCondition(loan<StateScope> condition) : > _condition(condition) > {} > > bool > operator () (loan<TreeState> state) > { > loan<const typename StateScope::Range> range = _condition->range(); > if (range->type == StateScope::RangeType::all) > return true; > > static EvaluatorFactory factory; > loan<StateEvaluator> e; > switch (_condition->table()) > { > case StateScope::Table::update: > e = factory.template acquire<UpdateEvaluator>(state, range).template downcast<StateEvaluator>(); > break; > > case StateScope::Table::rebind: > e = factory.template acquire<RebindEvaluator>(state, range).template downcast<StateEvaluator>(); > break; > > case StateScope::Table::transitory: > e = factory.template acquire<TransitoryEvaluator>(state, range).template downcast<StateEvaluator>(); > break; > } > > for (typename StateScope::Field field : _condition->fields()) { > if (e->isCorresponding(field)) > return true; > } > > return false; > } > > private: > loan<StateScope> _condition; >}; > >public: > struct TreeContext { > EventSchema& schema; > loan<TreeState> state; > }; > > Chapter(TreeContext context) : > _context(context), > _schema(nullptr) > {} > > std::string > name() { return _name; } > > void > configure(loan<ChapterScope> scope) > { > _name = scope->name(); > > _schema = owner<TreeFilter::Schema>::make(loan_downwrap<TreeFilter::Node>(&_context.schema)); > _schema->compile(); > > for (loan<typename ChapterScope::EventFilter> filter : scope->eventFilters()) > _matchers.push_back(TreeFilter::Matcher::load(filter, _schema)); > > for (loan<StateScope> condition : scope->stateScopes()) { > _stateConditions.push_back(owner<StateCondition>::make(condition)); > _stateFilter.registerCondition(_stateConditions.back()); > } > } > > template<typename EventType, typename ... A> > bool > ifTranscribe(EventType& event, std::ostream& o, __attribute__((unused)) loan<TreeIntegration> x, A&& ... args) > { > bool transcribed = false, matched = false; > for (loan<TreeFilter::Matcher> matcher : _matchers) { > if (matcher->isMatch(event)) { > matched = true; > break; > } > } > if (matched && _stateFilter(_context.state)) { > o << "\t[[" << _name << "]]: "; > event(o, x, std::forward<A>(args) ...); > transcribed = true; > } > > return transcribed; > } > >private: > std::string _name; > TreeContext _context; > StateFilter::Evaluator<TreeState> _stateFilter; > owner<TreeFilter::Schema> _schema; > std::vector<owner<TreeFilter::Matcher>> _matchers; > > std::vector<owner<StateCondition>> _stateConditions; >}; > >public: > IncrementalTreeTranscriptBase(loan<TreeIntegration> x) : > _x(x), > _state(owner<TreeState>::make(transitory, x)) > {} > > void > configure(loan<TranscriptScope<TreeComposition>> transcriptScope) > { > typename Chapter::TreeContext context = { schema, _state }; > for (loan<ChapterScope> c : transcriptScope->chapters()) { > owner<Chapter> chapter = owner<Chapter>::make(context); > chapter->configure(c); > _chapters.push_back(std::move(chapter)); > } > } > > > > template<typename EventType, typename ... A> > void > transcribe(EventType& event, A&& ... args) > { > for (loan<Chapter> c : _chapters) > c->ifTranscribe(event, facile::StreamLog::getLogStream(facile::StreamLogLevel::Status), _x, std::forward<A>(args) ...); > } > > void > setTriageCursor(unit<TreeVertex> v) { transitory.triageCursor = v; } ># 347 "../../subprojects/edfst/src/edfst/log/IncrementalTreeTranscript.hpp" > EventSchema schema; > >private: > loan<TreeIntegration> _x; > > owner<TreeState> _state; > std::vector<owner<Chapter>> _chapters; >}; >} >} ># 19 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 2 > >namespace edfst >{ >template<typename TreeComposition, template<typename> class TreePluginSetBase> >struct TreeIntegrationBase { > using IncrementalClockTree = IncrementalClockTreeBase<TreeComposition, TreePluginSetBase>; > using IncrementalOrdinalTree = IncrementalOrdinalTreeBase<TreeComposition, TreePluginSetBase>; > using IncrementalGate = IncrementalGateBase<TreeComposition, TreePluginSetBase>; > using IncrementalTreeTranscript = log::IncrementalTreeTranscriptBase<TreeComposition, TreePluginSetBase>; > struct Types { > using TreeIntegration = TreeIntegrationBase<TreeComposition, TreePluginSetBase>; > using EdgeEvent = typename TreeComposition::EdgeEvent; > using TreeVertex = typename TreeComposition::Vertex; > using TreeEdge = typename TreeComposition::Edge; > using TreeReference = typename TreeComposition::Reference; > using TreeLinkSet = typename TreeComposition::LinkSet; > using OrdinalTree = typename TreeComposition::OrdinalTree; > using ProfileMonitor = profile::Monitor<TreeComposition>; > using VertexSet = typename IncrementalGate::Reader; > }; > using EdgeStreamEndpoint = typename TreeComposition::EdgeStreamEndpoint; > using StreamEdge = EdgeStream::StreamEdgeBase<EdgeStreamEndpoint>; > using VertexExpansion = EdgeStream::VertexExpansionBase<EdgeStreamEndpoint>; > using IVertexGate = typename TreeComposition::IVertexGate; > using TreeVertex = typename TreeComposition::Vertex; > using TreeEdge = typename TreeComposition::Edge; > using TreeReference = typename TreeComposition::Reference; > using OrdinalTree = typename TreeComposition::OrdinalTree; > using EdgeEvent = typename TreeComposition::EdgeEvent; > using ElementFactories = typename TreeComposition::ElementFactories; > using PluginSetType = TreePluginSetBase<typename Types::TreeIntegration>; > > ElementFactories& factories; > > TreeWalk::Stack stack; > typename Types::ProfileMonitor pm; > > const unit<TreeVertex> root; > TreeEpisode<TreeComposition> episode; > > IncrementalClockTree clock; > IncrementalOrdinalTree ordinal; > IncrementalGate gate; > > IncrementalTreeTranscript xs; > > PluginSetType& pluginSet; > > TreeIntegrationBase(profile::TreeProfile& treeProfile, ElementFactories& elementFactories, PluginSetType& pluginSet) : > factories(elementFactories), > pm(treeProfile), > root(configureRoot()), > clock(loan_wrap(this)), > ordinal(loan_wrap(this)), > gate(loan_wrap(this)), > xs(loan_wrap(this)), > pluginSet(pluginSet), > _gate(loan_wrap(this)) > ># 77 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > , ># 77 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > _stackContext(owner<TreeWalk::StackContext>::make(stack)) > { > PhaseContext::Registry::get()->addBlock(_stackContext); > > pluginSet.initialize(loan_wrap(this)); > } > > ~TreeIntegrationBase() { PhaseContext::Registry::get()->removeBlock(_stackContext); } ># 103 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::pair<unit<TreeVertex>, bool> > emplaceVertex(EdgeStreamEndpoint endpoint) { return factories.vertex.emplace(endpoint); } > > TreeRelation > addEdge(StreamEdge edge) > { > InflatedEdge i = inflateTail(edge); > > if (edge.isReflexive()) { > ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > !i.tail.v->links->isReflexive() ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 112) << ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "!i.tail.v->links->isReflexive()" ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 112 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" > ># 113 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Duplicate edge (" << i.tail.v->token() << " -> " << i.tail.v->token() << ")" << ># 113 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 113 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > > episode.update.start(i.tail.v, i.tail.v); > episode.update.event->relation = TreeRelation::loopback; > episode.update.event->mode = i.tail.v->mode(); > episode.update.integrate(); > episode.advance(); > i.tail.v->links->setReflexive(); > pluginDispatch<plugin::AddEventEdge>(); > pm.pop(i.tail.v); > return episode.update.event->relation; > } > > i.head.initialize(factories.vertex.vertexMap.find(edge.head.id())); > if (i.head.isNew) { > if (i.head.isEmpty) > i.head.v = factories.vertex.emplace(edge.head).first; > if (clock.isOnWeakClockPath(i.tail.v) && (i.tail.v->level() <= 3)) { > clock.addClockVertex(i.tail.v, i.head.v); > } else { > ordinal.addOrdinalVertex(i.tail.v, i.head.v); > } > } > > episode.update.start(i.tail.v, i.head.v); > if (i.tail.isNew) { > if (!i.head.isNew) > episode.update.congruent(TreeRelation::cross); > } else { > if (i.head.isNew) { > if (i.tail.v->mode() == TreeVertex::Mode::ordinal) > episode.update.congruent(TreeVertex::Mode::ordinal); > } else { > if (OrdinalTree::isOrdinalRelation(i.tail.v, i.head.v)) > ordinal.configureEvent(); > else > clock.configureEvent(); > episode.update.integrate(); > } > } > > integrateEdge(i); > > ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > pm.empty() ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 156) << ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "pm.empty()" ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 156 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" > ># 157 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Profile monitor stack has " << pm.size() << " dangling frames after update " << episode.update.epoch << ># 157 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 157 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > > return episode.update.event->relation; > } > > TreeRelation > expandVertex(VertexExpansion x) > { > unit<TreeVertex> origin = factories.vertex.vertexMap.find(x.origin.id()); > > if (origin == nullptr) { > if (x.origin == x.initiator) > return addEdge(x.initiatorEdge()); > > ># 171 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 171) ># 171 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Cannot expand vertex " << x.origin.id() << " which does not exist yet" << ># 171 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 171 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > } > > episode.expansion.isInProgress = true; > episode.expansion.isGate = false; > episode.expansion.origin = origin; > episode.expansion.depth = 1; > OnScopeExit::Copy episodeFlag([&]() { this->episode.expansion.isInProgress = false; }); > > unit<TreeVertex> expansion = factories.vertex.vertexMap.find(x.expansion.id()); > > ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > expansion == nullptr ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 182) << ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "expansion == nullptr" ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Cannot expand vertex " << x.origin.id() << " at " << x.expansion.id() << " which already exists" << ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 182 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > > > > > > expansion = factories.vertex.emplace(x.expansion, origin->mode()).first; > if (origin->mode() == TreeVertex::Mode::clock) > clock.expandClockVertex(origin, expansion); > else > ordinal.expandOrdinalVertex(origin, expansion); > > bool isReflexive = origin->links->isReflexive(); > origin->links->transferEdgeSetTo(expansion); > if (origin->mode() == TreeVertex::Mode::clock) > clock.integrateEdge(origin, expansion, TreeRelation::tree); > else > ordinal.integrateEdge(origin, expansion, TreeRelation::tree); > pm.expandVertex(expansion); > > ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > pm.empty() ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 202) << ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "pm.empty()" ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" ># 202 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Profile monitor stack has " << pm.size() << " dangling frames after expansion initialization in update " > << episode.update.epoch << ># 203 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 203 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > > ExpansionWalk w{ *this, isReflexive, origin, expansion }; > if (x.initiator == x.origin) { > episode.update.start(origin, expansion); > w.congruent(); > w.reflex(); > pluginDispatch<plugin::ExpandVertex>(origin, origin, expansion); > closeEpisode(origin, expansion); > } else { > InflatedEdge i = inflateTail(x.initiatorEdge()); > unit<TreeVertex> initiator = i.tail.v; > i.head.initialize(expansion); > > episode.update.start(initiator, expansion); > if (i.tail.isNew) { > episode.update.congruent(TreeRelation::cross); > } else { > if (OrdinalTree::isOrdinalRelation(initiator, expansion)) { > if (initiator->level() >= expansion->level()) > ordinal.configureExpansionEvent(); > else > ordinal.configureEvent(); > } else { > clock.configureEvent(); > } > episode.update.integrate(); > } > > if (!episode.update.event->isRetrograde) > w.reflex(); > pluginDispatch<plugin::ExpandVertex>(initiator, origin, expansion); > integrateEdge(i, w); > } > > ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > pm.empty() ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 238) << ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "pm.empty()" ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" ># 238 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Profile monitor stack has " << pm.size() << " dangling frames after expansion integration in update " > << episode.update.epoch << std::endl << pm.token() << ># 239 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 239 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > > return episode.update.event->relation; > } > > void > prepareOrdinalRebind(unit<OrdinalTree> ot, __attribute__((unused)) bool isCrossEntry = false) > { > pm.updateInsertHistogram(ot, root->timespan().out); > } > > unit<TreeWalk::Frame> > selectWalkFrame(uint32_t level) > { > if (level < episode.rebind.stack.base) > return nullptr; > else > return stack.at(level - episode.rebind.stack.levelOffset); > } > > unit<TreeVertex> > stackPeek(uint32_t level) > { > if (level < episode.rebind.stack.base) > return nullptr; > > uint32_t frameIndex = (level - episode.rebind.stack.levelOffset); > ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > frameIndex < stack.size() ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 266) << ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "frameIndex < stack.size()" ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Stack overflow: " << frameIndex << " >= " << stack.size() << ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 266 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > > unit<TreeWalk::Frame> f = stack.at(frameIndex); > if (clock.isClock(f)) > return clock.peek(f); > else > return ordinal.peek(f); > } > > void > detachSubtree(unit<TreeVertex> v) > { > unit<TreeVertex> stump = v->tree(); > > if (v->tree()->mode() == TreeVertex::Mode::ordinal) > ordinal.detachSubtree(v); > else > clock.detachSubtree(v); > > if (stump->links->treeEdgeCount() == 0) > pm.prune(stump); > } > > void > moveVertex(unit<TreeVertex> v, unit<OrdinalTree> depart, unit<OrdinalTree> arrive) > { > pm.moveVertex(v, depart, arrive); > > if ((depart != nullptr) && (v == depart->root())) > ordinal.releaseOrdinalTree(depart); > } > > void > deltaClose(unit<TreeVertex> v) > { > ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > !v->isFlag(TreeVertex::EpochFlags::isDeltaClosed) ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 301) << ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "!v->isFlag(TreeVertex::EpochFlags::isDeltaClosed)" ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 301 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > v->setFlag(TreeVertex::EpochFlags::isDeltaClosed); > > if (episode.clock.revert.isActive && !episode.clock.revert.isInOriginalDelta) > return; > > pluginDispatch<plugin::VertexCommit>(v); > } > > handle<IVertexGate> > openGate(EdgeStreamEndpoint head) { return _gate.open(factories.vertex.vertexMap.find(head.id())); } > > void > closeEpisode(unit<TreeVertex> tail, unit<TreeVertex> head) > { > tail->links->requireViewIntegrity(); > head->links->requireViewIntegrity(); > > clock.closeEpisode(); > ordinal.closeEpisode(); > } > > > template<typename Functor, typename ... Args> > void > pluginDispatch(Args&& ... args) > { > Functor f; > pluginSet.dispatch(f, std::forward<Args>(args) ...); > } > > template<typename Functor, typename ... Args> > void > pluginDispatch(Functor& f, Args&& ... args) { pluginSet.dispatch(f, std::forward<Args>(args) ...); } > > template<template<typename> class Functor, typename ... Args> > static void > mux(Args&& ... args) { PluginSetType::template mux<Functor>(std::forward<Args>(args) ...); } > > template<typename PluginType> > inline void > setPlugin(PluginType plugin) { pluginSet.setComponent(std::move(plugin)); } > > private: > struct InflatedEdge { > StreamEdge edge; > > struct Endpoint { > bool isNew; > bool isEmpty; > unit<TreeVertex> v; > > void > initialize(unit<TreeVertex> vertex) > { > v = vertex; > isEmpty = (v == nullptr); > isNew = (isEmpty || v->links->referenceCount() == 0); > } > } > tail, head; > > InflatedEdge(StreamEdge edge) : > edge(edge) > {} > }; > > struct NullIntegration { > void > congruent() {} > > void > retrograde() {} > }; > > struct ExpansionWalk { > typename Types::TreeIntegration& x; > > bool isReflexive; > unit<TreeVertex> origin; > unit<TreeVertex> expansion; > > void > congruent() > { > x.pm.push(expansion); > if (expansion->mode() == TreeVertex::Mode::clock) > x.clock.expand(expansion); > else > x.ordinal.expand(expansion); > } > > > void > retrograde() { reflex(); } > > void > reflex() > { > if (isReflexive) { > if (expansion->mode() == TreeVertex::Mode::clock) > x.clock.integrateEdge(expansion, origin, TreeRelation::loopback); > else > x.ordinal.integrateEdge(expansion, origin, TreeRelation::loopback); > } > } > }; > > inline unit<TreeVertex> > configureRoot() > { > unit<TreeVertex> root = factories.vertex.emplaceMeta(TreeVertex::rootId.index(), TreeVertex::Mode::clock).first; > root->setLevel(0); > root->setTimeIn(0); > root->setTimeOut(1); > return root; > } > > InflatedEdge > inflateTail(StreamEdge edge) > { > InflatedEdge i(edge); > i.tail.initialize(factories.vertex.vertexMap.find(i.edge.tail.id())); > if (i.tail.isNew) { > if (i.tail.isEmpty) > i.tail.v = factories.vertex.emplace(i.edge.tail, TreeVertex::Mode::clock).first; > clock.addClockVertex(root, i.tail.v); > clock.integrateEdge(root, i.tail.v, TreeRelation::tree); > } > return i; > } > > template<typename EventIntegration = NullIntegration> > void > integrateEdge(InflatedEdge i, EventIntegration eventIntegration = NullIntegration()) > { > xs.transcribe(xs.schema.interface.edge.input.event, i.edge); > > if (!i.head.isNew) > ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > !i.tail.v->links->containsEdge(i.head.v) ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 440) << ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "!i.tail.v->links->containsEdge(i.head.v)" ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Duplicate edge (" << i.tail.v->token() << " -> " << i.head.v->token() << ")" << ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 440 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > > episode.advance(); > loan<EdgeEvent> event = episode.update.event; > > pluginDispatch<plugin::BeginUpdate>(); > xs.transcribe(xs.schema.interface.edge.delegation.event, event, i.head.v, i.tail.v); > > if (event->isRetrograde) { > clock.beginEpoch(); > ordinal.beginEpoch(); > event->tail->advanceEpoch(episode.rebind.epoch); > event->tail->setFlag(TreeVertex::EpochFlags::isRebindPoint); > xs.transcribe(xs.schema.interface.edge.epoch.event, i.edge); > > event->head->advanceEpoch(episode.rebind.epoch); > event->head->setFlag(TreeVertex::EpochFlags::isRebindTarget); > > episode.ordinal.rebind.vertexStep = episode.ordinal.rebind.treeStep = 1; > episode.rebind.stack.base = stack.size(); > > uint32_t demotionDeterminantLevel = 0; > if ((event->head->mode() == TreeVertex::Mode::ordinal) && (event->root->mode() == TreeVertex::Mode::ordinal)) > demotionDeterminantLevel = event->root->ordinalTreeLevel(); > episode.ordinal.rebind.captureDemotionDeterminant(demotionDeterminantLevel); > > episode.rebind.entryTime = event->tail->links->findSiblingWalkPosition(); > episode.clock.escalation.span = { event->tail->clockProxy()->timespan().out, root->timespan().out }; > if (event->head->mode() == TreeVertex::Mode::ordinal) > pm.debitSiblingScan(event->head->ordinalTree(), event->tail, episode.rebind.entryTime.clockSuccessor); > > > if (event->tail->mode() == TreeVertex::Mode::clock) { > > episode.clock.scope.lambda = { event->tail->timespan().out, event->root->timespan().out }; > > if (event->head->mode() == TreeVertex::Mode::clock) { > episode.clock.scope.delta = event->head->timespan(); > } else { > prepareOrdinalRebind(event->head->ordinalTree(), true); > episode.clock.scope.delta = { event->head->clockProxy()->timespan().out, event->head->clockProxy()->timespan().out }; > } > } else { > if (event->head->mode() == TreeVertex::Mode::clock) { > episode.clock.scope.lambda = { event->tail->clockProxy()->timespan().out, event->root->timespan().out }; > episode.clock.scope.delta = event->head->timespan(); > } else { > episode.clock.scope.lambda = { event->tail->clockProxy()->timespan().out, event->tail->clockProxy()->timespan().out }; > episode.clock.scope.delta = episode.clock.scope.lambda; > } > > prepareOrdinalRebind(event->tail->ordinalTree(), true); > } > > eventIntegration.retrograde(); > > > > > > if (event->tail->mode() == TreeVertex::Mode::clock) { > bool isDeltaOrdinal = false; > if (event->head->mode() == TreeVertex::Mode::clock) { > isDeltaOrdinal = clock.evaluateRenumberingCost(event->tail, event->head); > } else if (i.head.v == i.head.v->ordinalRoot()) { > > isDeltaOrdinal = ordinal.evaluateEffectiveness(i.head.v->ordinalTree()); > } > > if (isDeltaOrdinal) > ordinal.rebindOrdinalTree(); > else > clock.rebindSingleton(); > } else { > bool isDeltaOrdinal = ordinal.evaluateEffectiveness(i.tail.v->ordinalTree()); > > if (isDeltaOrdinal) > ordinal.rebindSingleton(); > else > clock.integrateOrdinalTree(); > } > } else { > eventIntegration.congruent(); > > if (!i.tail.isNew) > pm.push(i.tail.v); > if (!i.head.isNew) > pm.push(i.head.v); > > xs.transcribe(xs.schema.interface.edge.epoch.event, i.edge); > > episode.update.integrate(); > if (i.tail.v->mode() == TreeVertex::Mode::clock) > clock.addEventEdge(); > else > ordinal.addEventEdge(); > if (i.head.isNew && (i.head.v->mode() == TreeVertex::Mode::ordinal)) > pm.creditVertexInsert(i.head.v, root->timespan().out); > > > pm.pop(); > pm.pop(); > } > > closeEpisode(i.tail.v, i.head.v); > > if (event->isRetrograde) { > pluginDispatch<plugin::CommitRebind>(); > > ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > stack.size() == episode.rebind.stack.base ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 549) << ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "stack.size() == episode.rebind.stack.base" ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 549 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" > ># 550 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << "Stack has " << stack.size() << " dangling frames after update " > << episode.update.epoch << ", which started at stack frame " << episode.rebind.stack.base << ># 551 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 551 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > episode.ordinal.rebind.footprint.empty() ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 552) << ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "episode.ordinal.rebind.footprint.empty()" ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 552 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" > ># 553 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << episode.ordinal.rebind.footprint.size() << " dangling ordinal footprint members" << ># 553 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 553 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > } > ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ( ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > factories.edgeTriage.empty() ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp", 555) << ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠Condition [" << ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > "factories.edgeTriage.empty()" ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "] " << ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > std::endl ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > << "⢠" ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > << ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" 3 > facile::RequireException::require_sentinel ># 555 "../../subprojects/edfst/src/edfst/tree/TreeIntegration.hpp" > ; > > xs.transcribe(xs.schema.interface.edge.conclusion.event, i.tail.v, i.head.v); > } > > IncrementalGate _gate; > > > owner<TreeWalk::StackContext> _stackContext; > >}; >} ># 7 "../../subprojects/edfst/src/edfst/tree/IncrementalTree.hpp" 2 > >namespace edfst >{ > >template<typename TreeComposition, template<typename> class TreePluginSetBase = EmptyPluginSet> >class IncrementalTreeBase >{ >using TreeVertex = typename TreeComposition::Vertex; >using OrdinalTree = typename TreeComposition::OrdinalTree; >using EdgeEvent = typename TreeComposition::EdgeEvent; >using ElementFactories = typename TreeComposition::ElementFactories; > >using TreeIntegration = TreeIntegrationBase<TreeComposition, TreePluginSetBase>; > >public: > using Composition = TreeComposition; > using PluginSetType = TreePluginSetBase<TreeIntegration>; > using EdgeStreamEndpoint = typename TreeComposition::EdgeStreamEndpoint; > using StreamEdge = EdgeStream::StreamEdgeBase<EdgeStreamEndpoint>; > using VertexExpansion = EdgeStream::VertexExpansionBase<EdgeStreamEndpoint>; > using VertexGate = typename TreeComposition::IVertexGate; > > IncrementalTreeBase(ElementFactories& elementFactories, PluginSetType& pluginSet) : > _profile(), > _x(_profile, elementFactories, pluginSet) > {} > > ~IncrementalTreeBase() { _x.factories.vertex.releaseAll(); } > > void > configure(loan<log::TranscriptScope<TreeComposition>> transcriptScope) { _x.xs.configure(transcriptScope); } > > unit<TreeVertex> > peekRoot() const { return _x.root; } > > EpochType > updateEpoch() const { return _x.episode.update.epoch; } > > EpochType > rebindEpoch() const { return _x.episode.rebind.epoch; } > > handle<const profile::TreeProfile> > profile() { return handle(_profile); } > > template<unsigned int index, typename PluginType = typename TreeIntegration::PluginSetType::AccessTypeAt<index>> > PluginType > pluginAt() { return _x.pluginSet.template componentAt<index>(); } > > template<typename Functor, typename ... Args> > void > pluginDispatch(Args&& ... args) > { > Functor f; > _x.template pluginDispatch(f, std::forward<Args>(args) ...); > } > > template<typename Functor, typename ... Args> > void > pluginDispatch(Functor& f, Args&& ... args) { _x.template pluginDispatch(f, std::forward<Args>(args) ...); } > > std::pair<unit<TreeVertex>, bool> > emplaceVertex(EdgeStreamEndpoint endpoint) { return _x.emplaceVertex(endpoint); } > > TreeRelation > addEdge(StreamEdge edge) { return _x.addEdge(edge); } > > TreeRelation > expandVertex(VertexExpansion expansion) { return _x.expandVertex(expansion); } > > handle<VertexGate> > gate(EdgeStreamEndpoint head) { return _x.openGate(head); } > >private: > profile::TreeProfile _profile; > > TreeIntegration _x; >}; >} ># 8 "../../src/PiiFramework.hpp" 2 ># 1 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/edfst/tree/TreeTablePrinter.hpp" 1 > > > > > > > >namespace edfst >{ >template<typename TreeComposition> >struct TreeTableCompositionBase { > using TreeVertex = typename TreeComposition::Vertex; > using TreeLinkSet = typename TreeComposition::LinkSet; > > struct TreeColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, unit<TreeVertex> v) > { > if (v->level() > 0) { > if (v->level() > 1) > s << std::string(v->level() - 1, ' ') << "â "; > else > s << "⢠"; > } > > s << v->token(); > } > }; > > struct PositionColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, unit<TreeVertex> v) > { > if (v->mode() == TreeVertex::Mode::ordinal) > s << "#" << v->ordinal(); > else > s << "[" << v->timespan().in << "," << v->timespan().out << "]"; > } > }; > > struct LevelColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, unit<TreeVertex> v) > { > if (v->mode() == TreeVertex::Mode::ordinal) > s << "L" << v->ordinalTreeLevel() << "/" << v->level(); > else > s << "L" << v->level(); > } > }; > > class TreeIterator { > public: > typedef TreeIterator self_type; > typedef unit<TreeVertex> value_type; > typedef unit<TreeVertex> reference; > typedef unit<TreeVertex> pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > > TreeIterator() : > _root(nullptr) > {} > > > TreeIterator(unit<TreeVertex> root) : > _root(root) > { > _stack.push_back(_root); > } > > self_type > operator ++() > { > while (true) { > Frame& f = _stack.back(); > if (f.isClosed()) { > _stack.pop_back(); > if (_stack.empty()) > break; > else > continue; > } > unit<TreeVertex> subtree = f.edge(); > > if (subtree->tree() != f.v) { > _stack.clear(); > return *this; > } > > f.advance(); > _stack.push_back(Frame(subtree)); > break; > } > > return *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > operator ++(); > return pre; > } > > reference > operator *() { return _stack.back().v; } > > pointer > operator ->() const { return _stack.back().v; } > > bool > operator ==(const self_type& other) const > { > if (_stack.size() != other._stack.size()) > return false; > > if (_stack.empty()) > return true; > > return (_stack.back().v == other._stack.back().v); > } > > bool > operator !=(const self_type& other) const { return !(operator ==(other)); } > > private: > struct Frame { > unit<TreeVertex> v; > > Frame(unit<TreeVertex> v) : > v(v), > _i(v->links->scanTreeEdges()) > {} > > bool > isClosed() { return _i.isClosed(); } > > unit<TreeVertex> > edge() { return _i->endpoint(); } > > void > advance() { _i++; } > > private: > typename TreeLinkSet::EdgeScan _i; > }; > > unit<TreeVertex> _root; > std::vector<Frame> _stack; > }; > > using BaseColumns = std::tuple<TreeColumn, PositionColumn, LevelColumn>; > > struct Columns : > public HollowCompositionTuples<BaseColumns, typename TreeComposition::TreeTableColumns> { > using RowElement = unit<TreeVertex>; > using RowIterable = iterable<TreeIterator>; > }; >}; > >template<typename TreeComposition> >class TreeTablePrinterBase >{ >using TreeVertex = typename TreeComposition::Vertex; >using TreeTableComposition = TreeTableCompositionBase<TreeComposition>; >using TreeIterator = typename TreeTableComposition::TreeIterator; >using TreeTablePrinter = TreeTablePrinterBase<TreeComposition>; >using Table = StreamTable::StreamTableBase<typename TreeTableComposition::Columns>; > >public: > TreeTablePrinterBase(unit<TreeVertex> root) : > _root(root) > { > _streamTable.setIndentation(4); > } > > void > printTreeTable(std::ostream& o) > { > using TreeIterable = iterable<TreeIterator>; > > _streamTable.print(o, TreeIterable(TreeIterator(_root), TreeIterator())); > } > >private: > unit<TreeVertex> _root; > > Table _streamTable; >}; >} ># 5 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 2 > >namespace edfst >{ >namespace log >{ >template<typename TreeTablePrinter> >class TreeTableLogBase >{ >using TreeTableLog = TreeTableLogBase<TreeTablePrinter>; > >public: > struct PrintToken { > ># 17 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 17 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > ; > > const TreeTableLog& outer; > > std::ostream& > print(std::ostream& o) const > { > outer._printer->printTreeTable(o); > return o; > } > }; > > TreeTableLogBase() : > _isActive(false) > {} > > bool > isActive() const { return _isActive; } > > template<typename TreeRoot> > void > bind(unit<TreeRoot> root) { _printer = owner<TreeTablePrinter>::make(root); } > > void > activate(loan<StreamLogDirectory> directory, const std::string& filename = "tree-table.log") > { > setActive(); > _treeFile = directory->openFile(filename); > } > > void > activate(owner<LogFileStream> treeFile) > { > setActive(); > _treeFile = std::move(treeFile); > } > > void > reset() > { > ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > ( ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > _isActive ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp", 57) << ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > std::endl ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "⢠Condition [" << ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > "_isActive" ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "] " << ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > std::endl ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "⢠" ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > << "Cannot reset an inactive tree table log" << ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > facile::RequireException::require_sentinel ># 57 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > ; > > _treeFile->reset(); > } > > void > close() > { > if (!_isActive) > return; > > _treeFile->close(); > > _treeFile.reset(nullptr); > > _isActive = false; > } > > std::ostream& > stream() > { > ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > ( ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > _isActive ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp", 78) << ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > std::endl ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "⢠Condition [" << ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > "_isActive" ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "] " << ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > std::endl ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "⢠" ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > << "Cannot access the stream of a closed tree log file" << ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > facile::RequireException::require_sentinel ># 78 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > ; > > return _treeFile->fstream(); > } > > PrintToken > token() const > { > ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > ( ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > _printer != nullptr ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp", 86) << ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > std::endl ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "⢠Condition [" << ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > "_printer != nullptr" ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "] " << ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > std::endl ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "⢠" ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > << "Cannot print a detached tree table" << ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > facile::RequireException::require_sentinel ># 86 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > ; > > return PrintToken{ *this }; > } > >private: > void > setActive() > { > ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > ( ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > !_isActive ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp", 95) << ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > std::endl ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "⢠Condition [" << ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > "!_isActive" ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "] " << ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > std::endl ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > << "⢠" ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > << "Cannot active an active tree table log" << ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" 3 > facile::RequireException::require_sentinel ># 95 "../../subprojects/edfst/src/edfst/log/TreeTableLog.hpp" > ; > > _isActive = true; > } > > bool _isActive; > > owner<LogFileStream> _treeFile; > owner<TreeTablePrinter> _printer; >}; >} >} ># 9 "../../src/PiiFramework.hpp" 2 ># 1 "../../subprojects/edfst/src/icd/forest/LoopForestFramework.hpp" 1 > > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp" 1 > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" 1 > > > > > >namespace point_util >{ >struct BitArrayDeleter { > void > operator ()(void *bits) { free(bits); } >}; > >template<typename Unit = uint64_t, typename Unsigned = typename std::enable_if_t<std::is_unsigned<Unit>::value, Unit>> >class BitArrayBase : > public std::unique_ptr<Unit, BitArrayDeleter> >{ >using BitArray = BitArrayBase<Unit>; >using super = std::unique_ptr<Unit, BitArrayDeleter>; > >protected: struct use_the_make_method {}; > >public: > struct Types { > using ArrayElement = Unit; > }; > > BitArrayBase() : > BitArrayBase(nullptr) > {} > > BitArrayBase(nullptr_t null) : > super(null), > _unitCount(0) > {} > > BitArrayBase(__attribute__((unused)) use_the_make_method *please, uint32_t unitCount = 1) : > super(static_cast<Unit *>(malloc(UnitBytes * unitCount))), > _unitCount(unitCount) > { > clear(); > } > > BitArrayBase(BitArray& b) = delete; > > BitArrayBase(BitArray&& b) : > super(std::move(b)) > { _unitCount = b._unitCount; } > > BitArray > copy() > { > BitArray b(_unitCount); > transferBits(b.bits(), *this, _unitCount); > return b; > } > > BitArray& > operator =(BitArray&& b) > { > _unitCount = b._unitCount; > super::reset(b.release()); > return *this; > } > > uint32_t > unitCount() const { return _unitCount; } > > uint32_t > capacity() const { return UnitBits * _unitCount; } > > void > resize(uint32_t unitCount, bool retainBits = true) > { > if (unitCount == _unitCount) > return; > > Unit *resized; > if (unitCount == 0) { > resized = nullptr; > } else { > resized = static_cast<Unit *>(malloc(UnitBytes * unitCount)); > > if ((_unitCount > 0) && retainBits) { > uint32_t copyCount = unitCount; > if (_unitCount < copyCount) { > copyCount = _unitCount; > memset(resized + _unitCount , 0, UnitBytes * (unitCount - _unitCount)); > } > > transferBits(resized, *this, copyCount); > } else { > memset(resized, 0, UnitBytes * unitCount); > } > } > > _unitCount = unitCount; > super::reset(resized); > } > > bool > expandToFit(uint32_t index) > { > if (index < capacity()) > return false; > > uint32_t unitCount = _unitCount; > do { > unitCount *= 2; > } while (index >= (unitCount * UnitBits)); > > resize(unitCount); > return true; > } > > void > free() > { > _unitCount = 0; > super::reset(nullptr); > } > > bool > isNull() { return bits() == nullptr; } > > bool > operator ==(nullptr_t null) { return bits() == null; } > > bool > operator !=(nullptr_t null) { return bits() != null; } > > bool > operator ==(const BitArray& b) > { > uint32_t compareCount = _unitCount; > if (_unitCount > b._unitCount) { > for (Unit *u = bits() + b._unitCount, *end = (u + _unitCount); u < end; u++) { > if (*u != static_cast<Unit>(0)) > return false; > } > compareCount = b._unitCount; > } else if (_unitCount < b._unitCount) { > for (Unit *bu = b.bits() + _unitCount, *bend = (bu + b._unitCount); bu < bend; bu++) { > if (*bu != static_cast<Unit>(0)) > return false; > } > } > for (Unit *bu = b.bits(), *u = bits(), *bend = (bu + compareCount); bu < bend; bu++, u++) { > if (*u != *bu) > return false; > } > > return true; > } > > bool > operator !=(const BitArray& b) { return !(operator ==(b)); } > > BitArray& > operator |=(const BitArray& b) > { > if (b._unitCount > _unitCount) > resize(b._unitCount); > > for (Unit *bu = b.bits(), *u = bits(), *bend = (bu + b._unitCount); bu < bend; bu++, u++) > *u |= *bu; > > return *this; > } > > bool > is(uint32_t index) const > { > const uint32_t capacity = (UnitBits * _unitCount); > if (index >= capacity) > ># 175 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" 3 > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp", 175) ># 175 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" > << "Cannot get bit " << index << " from a BitArray of capacity " << capacity; > > Unit *u = bits() + (index / UnitBits); > Unit mask = (1ULL << (index % UnitBits)); > return (*u & mask) > 0ULL; > } > > void > set(uint32_t index, bool on = true) > { > const uint32_t capacity = (UnitBits * _unitCount); > if (index >= capacity) > ># 187 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" 3 > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp", 187) ># 187 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" > << "Cannot set bit " << index << " in a BitArray of capacity " << capacity; > > Unit *u = bits() + (index / UnitBits); > Unit mask = (1ULL << (index % UnitBits)); > if (on) { > *u |= mask; > } else { > *u &= ~mask; > } > } > > void > clear() { memset(bits(), 0, UnitBytes * _unitCount); } > > static BitArray > make(uint32_t unitCount = 1) > { > static use_the_make_method *hidden_key = nullptr; > > if (unitCount == 0) > ># 207 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" 3 > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp", 207) ># 207 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" > << "Cannot make a BitArray of size zero"; > > return BitArray(hidden_key, unitCount); > } > > static BitArray > makeToFit(uint32_t index) > { > static use_the_make_method *hidden_key = nullptr; > > uint32_t unitCount = point_util::quantifyByIndex(index / UnitBits); > if (unitCount == 0) > ># 219 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" 3 > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp", 219) ># 219 "../../subprojects/edfst/subprojects/point-util/src/bit/BitArray.hpp" > << "Cannot make a BitArray of size zero"; > > return BitArray(hidden_key, unitCount); > } > >protected: > inline Unit * > bits() const { return super::get(); } > > > static void > transferBits(Unit *bu, BitArray& src, uint32_t count) > { > for (Unit *u = src.bits(), *end = (u + count); u < end; u++, bu++) > *bu = *u; > } > > static constexpr uint32_t UnitBytes = sizeof(Unit); > static constexpr uint32_t UnitBits = (UnitBytes * 8); > static constexpr Unit EmptyMaskOff = (static_cast<Unit>(0) - static_cast<Unit>(1)); > > > uint32_t _unitCount; >}; > >using BitArray = BitArrayBase<>; >using BitArray64 = BitArrayBase<>; >using BitArray32 = BitArrayBase<uint32_t>; >using BitArray16 = BitArrayBase<uint16_t>; >using BitArray8 = BitArrayBase<uint8_t>; >} ># 4 "../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp" 2 > >namespace point_util >{ >template<uint64_t EmptyValue> >class BitStackBase : > public BitArrayBase<uint64_t> { >using super = BitArrayBase<uint64_t>; >using Unit = typename super::Types::ArrayElement; >using BitStack = BitStackBase<EmptyValue>; > >public: > BitStackBase() : > BitStackBase(nullptr) > {} > > BitStackBase(nullptr_t null) : > super(null), > _tailPosition(0) > {} > > BitStackBase(BitArrayBase<uint64_t>::use_the_make_method *please, uint32_t unitCount = 1) : > super(please, unitCount), > _tailPosition(0) > {} > > BitStackBase(BitStack& b) = delete; > > BitStackBase(BitStack&& b) : > super(std::move(b)) > { _tailPosition = b._tailPosition; } > > BitStack& > operator =(BitStack&& b) > { > _tailPosition = b._tailPosition; > super::operator =(std::move(b)); > return *this; > } > > BitStack& > operator |=(const BitStack& b) > { > super::operator |=(b); > _tailPosition = std::max(_tailPosition, b._tailPosition); > > return *this; > } > > bool > empty() { return _tailPosition == EmptyValue; } > > uint32_t > length() { return (empty() ? 0 : _tailPosition); } > > void > mark(uint32_t position) > { > if (position >= (UnitBits * _unitCount)) > super::resize((position / UnitBits) + 1); > > super::set(position); > _tailPosition = std::max(_tailPosition, position); > } > > > uint32_t > pop() > { > cell<Unit> walk = cell_wrap(bits(), _tailPosition / UnitBits); > > walk.write(walk.read() & ~tailPositionMask()); > > while (walk.read() == 0ULL) { > if (walk == bits()) > return ((_tailPosition = EmptyValue)); > else > walk--; > } > > _tailPosition = (((walk - bits()) << 6) + (63 - __builtin_clzll(walk.read()))); > > if (!is(_tailPosition)) > ># 86 "../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp" 3 > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp", 86) ># 86 "../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp" > << "BitStack tail position " << _tailPosition << " refers to an unset bit"; > > return _tailPosition; > } > > void > emplace(uint32_t unitCount = 1) > { > static use_the_make_method *hidden_key = nullptr; > > if (unitCount == 0) > ># 97 "../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp" 3 > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp", 97) ># 97 "../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp" > << "Cannot make a BitStack of size zero"; > > new(this) BitStack(hidden_key, unitCount); > } > > void > remake(uint32_t unitCount = 1) > { > if (unitCount > _unitCount) > super::resize(unitCount, false); > > super::clear(); > _tailPosition = 0; > } > > static BitStack > make(uint32_t unitCount = 1) > { > static use_the_make_method *hidden_key = nullptr; > > if (unitCount == 0) > ># 118 "../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp" 3 > throw PointUtilException("../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp", 118) ># 118 "../../subprojects/edfst/subprojects/point-util/src/bit/BitStack.hpp" > << "Cannot make a BitArray of size zero"; > > return BitStack(hidden_key, unitCount); > } > >private: > inline Unit > tailPositionMask() { return (1ULL << (_tailPosition & 0x3f)); } > > uint32_t _tailPosition; >}; >} ># 6 "../../subprojects/edfst/src/icd/forest/LoopForestFramework.hpp" 2 > > > > >namespace icd {} > >using namespace icd; ># 10 "../../src/PiiFramework.hpp" 2 ># 1 "../../3pty/DynamoRIOFramework.hpp" 1 > > > > ># 1 "../../3pty/dynamorio/include/dr_api.h" 1 ># 43 "../../3pty/dynamorio/include/dr_api.h" >extern "C" { > > > ># 1 "../../3pty/dynamorio/include/dr_defines.h" 1 ># 56 "../../3pty/dynamorio/include/dr_defines.h" ># 1 "/usr/include/c++/13/stdlib.h" 1 3 ># 57 "../../3pty/dynamorio/include/dr_defines.h" 2 ># 199 "../../3pty/dynamorio/include/dr_defines.h" >typedef unsigned int uint; > > >typedef unsigned short ushort; > > >typedef unsigned char byte; > > >typedef signed char sbyte; > >typedef byte *app_pc; > >typedef void (*generic_func_t)(); ># 263 "../../3pty/dynamorio/include/dr_defines.h" >typedef long int int64; > > >typedef unsigned long int uint64; > > > > >typedef uint64 reg_t; > > > > >typedef reg_t ptr_uint_t; > >typedef int64 ptr_int_t; ># 288 "../../3pty/dynamorio/include/dr_defines.h" >typedef size_t app_rva_t; ># 301 "../../3pty/dynamorio/include/dr_defines.h" >typedef pid_t thread_id_t; >typedef pid_t process_id_t; ># 330 "../../3pty/dynamorio/include/dr_defines.h" >typedef int file_t; > > > >extern file_t our_stdout; > >extern file_t our_stderr; > >extern file_t our_stdin; ># 357 "../../3pty/dynamorio/include/dr_defines.h" >typedef uint client_id_t; > > > > > > >typedef struct { > > uint black_box_uint; > uint64 black_box_uint64; > > > >} opnd_t; > > > > > > >typedef struct { > > uint black_box_uint[26]; > > > >} instr_t; ># 615 "../../3pty/dynamorio/include/dr_defines.h" >typedef union _dr_xmm_t { > > uint64 u64[2]; > > uint u32[4]; > byte u8[16]; > reg_t reg[2]; >} dr_xmm_t; > > >typedef union _dr_ymm_t { ># 639 "../../3pty/dynamorio/include/dr_defines.h" > uint64 u64[4]; > > > uint u32[8]; > byte u8[32]; > reg_t reg[4]; >} dr_ymm_t; > > >typedef union _dr_zmm_t { > > > uint64 u64[8]; > > > uint u32[16]; > byte u8[64]; > reg_t reg[8]; >} dr_zmm_t; > > > > > >typedef uint64 dr_opmask_t; ># 770 "../../3pty/dynamorio/include/dr_defines.h" >typedef enum { > > > > > > > DR_MC_INTEGER = 0x01, ># 788 "../../3pty/dynamorio/include/dr_defines.h" > DR_MC_CONTROL = 0x02, > > > > > > > DR_MC_MULTIMEDIA = 0x04, > > DR_MC_ALL = (DR_MC_INTEGER | DR_MC_CONTROL | DR_MC_MULTIMEDIA), >} dr_mcontext_flags_t; > > > > >typedef struct _dr_mcontext_t { > > > > > size_t size; ># 817 "../../3pty/dynamorio/include/dr_defines.h" > dr_mcontext_flags_t flags; > > > ># 1 "../../3pty/dynamorio/include/dr_mcxtx.h" 1 ># 150 "../../3pty/dynamorio/include/dr_mcxtx.h" > union { > reg_t xdi; > reg_t rdi; > > }; > union { > reg_t xsi; > reg_t rsi; > > }; > union { > reg_t xbp; > reg_t rbp; > > }; > union { > reg_t xsp; > reg_t rsp; > > }; > union { > reg_t xbx; > reg_t rbx; > > }; > union { > reg_t xdx; > reg_t rdx; > > }; > union { > reg_t xcx; > reg_t rcx; > > }; > union { > reg_t xax; > reg_t rax; > > }; > > reg_t r8; > reg_t r9; > reg_t r10; > reg_t r11; > reg_t r12; > reg_t r13; > reg_t r14; > reg_t r15; > > union { > reg_t xflags; > > reg_t rflags; > > }; > > > > > > union { > byte *xip; > byte *pc; > byte *rip; > > }; > byte padding[48]; > > > > > union { ># 266 "../../3pty/dynamorio/include/dr_mcxtx.h" > dr_zmm_t simd[32]; > > > > > dr_zmm_t ymm[32]; > }; > > dr_opmask_t opmask[8]; ># 822 "../../3pty/dynamorio/include/dr_defines.h" 2 > >} dr_mcontext_t; > > >typedef struct _instrlist_t instrlist_t; > >typedef struct _module_data_t module_data_t; ># 841 "../../3pty/dynamorio/include/dr_defines.h" >enum { > > > > > DR_NOTE_ANNOTATION = 0xfffffffffffffff0ULL + 1, > DR_NOTE_RSEQ, > DR_NOTE_LDEX, > > > DR_NOTE_CLEAN_CALL_END, >}; > > > > >typedef struct { > uint year; > uint month; > uint day_of_week; > uint day; > uint hour; > uint minute; > uint second; > uint milliseconds; >} dr_time_t; > > > > >typedef struct _dr_stats_t { > > size_t size; > > > > > uint64 basic_block_count; > > uint64 peak_num_threads; > > uint64 num_threads_created; > > > > > uint64 synchs_not_at_safe_spot; > > uint64 peak_vmm_blocks_unreach_heap; > > uint64 peak_vmm_blocks_unreach_stack; > > uint64 peak_vmm_blocks_unreach_special_heap; > > uint64 peak_vmm_blocks_unreach_special_mmap; > > uint64 peak_vmm_blocks_reach_heap; > > uint64 peak_vmm_blocks_reach_cache; > > uint64 peak_vmm_blocks_reach_special_heap; > > uint64 peak_vmm_blocks_reach_special_mmap; > > uint64 num_native_signals; > > uint64 num_cache_exits; >} dr_stats_t; > > > > >typedef enum { > > > > DR_ERROR_INVALID_PARAMETER = 1, > > > > DR_ERROR_INSUFFICIENT_SPACE = 2, > > > > DR_ERROR_UNKNOWN_ENCODING = 3, > > > > DR_ERROR_NOT_IMPLEMENTED = 4, >} dr_error_code_t; > > > > > >typedef enum { > DR_WHERE_APP = 0, > DR_WHERE_INTERP, > DR_WHERE_DISPATCH, > DR_WHERE_MONITOR, > DR_WHERE_SYSCALL_HANDLER, > DR_WHERE_SIGNAL_HANDLER, > DR_WHERE_TRAMPOLINE, > DR_WHERE_CONTEXT_SWITCH, > DR_WHERE_IBL, > DR_WHERE_FCACHE, > DR_WHERE_CLEAN_CALLEE, > DR_WHERE_UNKNOWN, > > > > DR_WHERE_LAST >} dr_where_am_i_t; > > > > > > >typedef enum { > > > > > > > DR_CLEANCALL_SAVE_FLOAT = 0x0001, > > > > > > > DR_CLEANCALL_NOSAVE_FLAGS = 0x0002, > > DR_CLEANCALL_NOSAVE_XMM = 0x0004, > > DR_CLEANCALL_NOSAVE_XMM_NONPARAM = 0x0008, > > DR_CLEANCALL_NOSAVE_XMM_NONRET = 0x0010, > > > > > > DR_CLEANCALL_INDIRECT = 0x0020, > > DR_CLEANCALL_RETURNS_TO_NATIVE = 0x0040, > > > > > > > DR_CLEANCALL_ALWAYS_OUT_OF_LINE = 0x0080, ># 1007 "../../3pty/dynamorio/include/dr_defines.h" > DR_CLEANCALL_READS_APP_CONTEXT = 0x0100, ># 1016 "../../3pty/dynamorio/include/dr_defines.h" > DR_CLEANCALL_WRITES_APP_CONTEXT = 0x0200, ># 1034 "../../3pty/dynamorio/include/dr_defines.h" > DR_CLEANCALL_MULTIPATH = 0x0400, >} dr_cleancall_save_t; ># 48 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_events.h" 1 ># 41 "../../3pty/dynamorio/include/dr_events.h" ># 1 "../../3pty/dynamorio/include/dr_config.h" 1 ># 51 "../../3pty/dynamorio/include/dr_config.h" >extern "C" { > > > > > > >typedef enum { > > > > > > DR_MODE_NONE = 0, > > > > > > DR_MODE_CODE_MANIPULATION = 1, > > > > > > DR_MODE_PROBE = 2, > > > > > > DR_MODE_MEMORY_FIREWALL = 3, > > > > > > > DR_MODE_DO_NOT_RUN = 4, > >} dr_operation_mode_t; > > >typedef enum { > > DR_SUCCESS, > > > DR_PROC_REG_EXISTS, > > > DR_PROC_REG_INVALID, > > > DR_PRIORITY_INVALID, > > > DR_ID_CONFLICTING, > > > DR_ID_INVALID, > > > DR_FAILURE, > > > DR_NUDGE_PID_NOT_INJECTED, > > > DR_NUDGE_TIMEOUT, > > > DR_CONFIG_STRING_TOO_LONG, > > > DR_CONFIG_FILE_WRITE_FAILED, > > > DR_NUDGE_PID_NOT_FOUND, > > > DR_CONFIG_OPTIONS_INVALID, > > > > > > DR_CONFIG_DIR_NOT_FOUND, > > > > > DR_CONFIG_INVALID_PARAMETER, > > > > > > DR_CONFIG_CLIENT_NOT_FOUND, > >} dr_config_status_t; > > >typedef enum { > DR_PLATFORM_DEFAULT, > DR_PLATFORM_32BIT, > DR_PLATFORM_64BIT, > DR_PLATFORM_NONE, >} dr_platform_t; > > > > >typedef struct _dr_config_client_t { > > > > > size_t struct_size; > > > > > > > client_id_t id; ># 186 "../../3pty/dynamorio/include/dr_config.h" > size_t priority; ># 197 "../../3pty/dynamorio/include/dr_config.h" > char *path; ># 209 "../../3pty/dynamorio/include/dr_config.h" > char *options; ># 223 "../../3pty/dynamorio/include/dr_config.h" > bool is_alt_bitwidth; >} dr_config_client_t; ># 237 "../../3pty/dynamorio/include/dr_config.h" >static inline const char * >dr_config_status_code_to_string(dr_config_status_t code) >{ > const char *msg; > > > > > switch (code) { > case DR_SUCCESS: msg = "success"; break; > case DR_PROC_REG_EXISTS: msg = "registration already exists"; break; > case DR_PROC_REG_INVALID: msg = "target process is not registered"; break; > case DR_PRIORITY_INVALID: msg = "invalid priority value"; break; > case DR_ID_CONFLICTING: msg = "conflicting ID"; break; > case DR_ID_INVALID: msg = "invalid client ID"; break; > case DR_NUDGE_PID_NOT_INJECTED: msg = "target process is not under DynamoRIO"; break; > case DR_NUDGE_TIMEOUT: msg = "timed out"; break; > case DR_CONFIG_STRING_TOO_LONG: msg = "config option string too long"; break; > case DR_CONFIG_FILE_WRITE_FAILED: msg = "failed to write to the config file"; break; > case DR_NUDGE_PID_NOT_FOUND: msg = "target process id does not exist"; break; > case DR_CONFIG_DIR_NOT_FOUND: > msg = "failed to locate a valid config directory"; > break; > case DR_FAILURE: msg = "unknown failure"; break; > default: msg = "invalid dr_config_status_t code"; break; > } > return msg; >} > > ># 340 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_register_process(const char *process_name, process_id_t pid, bool global, > const char *dr_root_dir, dr_operation_mode_t dr_mode, bool debug, > dr_platform_t dr_platform, const char *dr_options); > > ># 379 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_unregister_process(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform); > > ># 439 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_register_inject_paths(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform, const char *dr_lib_path, > const char *dr_alt_lib_path); ># 521 "../../3pty/dynamorio/include/dr_config.h" > ># 574 "../../3pty/dynamorio/include/dr_config.h" >bool >dr_process_is_registered(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform, char *dr_root_dir , > dr_operation_mode_t *dr_mode , bool *debug , > char *dr_options ); ># 681 "../../3pty/dynamorio/include/dr_config.h" > ># 747 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_register_client(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform, client_id_t client_id, size_t client_pri, > const char *client_path, const char *client_options); > > ># 793 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_register_client_ex(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform, dr_config_client_t *client); > > ># 832 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_unregister_client(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform, client_id_t client_id); > > ># 870 "../../3pty/dynamorio/include/dr_config.h" >size_t >dr_num_registered_clients(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform); > > ># 923 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_get_client_info(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform, client_id_t client_id, > size_t *client_pri, > char *client_path, > char *client_options ); > > ># 973 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_get_client_info_ex(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform, dr_config_client_t *client ); > >typedef struct _dr_client_iterator_t dr_client_iterator_t; > > ># 1014 "../../3pty/dynamorio/include/dr_config.h" >dr_client_iterator_t * >dr_client_iterator_start(const char *process_name, process_id_t pid, bool global, > dr_platform_t dr_platform); > > > > > > > >bool >dr_client_iterator_hasnext(dr_client_iterator_t *iter); > > ># 1047 "../../3pty/dynamorio/include/dr_config.h" >void >dr_client_iterator_next(dr_client_iterator_t *iter, client_id_t *client_id, > size_t *client_pri, > char *client_path, > char *client_options ); > > ># 1066 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_client_iterator_next_ex(dr_client_iterator_t *iter, dr_config_client_t *client > ); > > > > > > > >void >dr_client_iterator_stop(dr_client_iterator_t *iter); ># 1131 "../../3pty/dynamorio/include/dr_config.h" > ># 1167 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_nudge_pid(process_id_t process_id, client_id_t client_id, uint64 arg, uint timeout_ms); ># 1214 "../../3pty/dynamorio/include/dr_config.h" > ># 1246 "../../3pty/dynamorio/include/dr_config.h" >dr_config_status_t >dr_get_config_dir(bool global, bool alternative_local, char *config_dir , > size_t config_dir_sz); > > >} ># 42 "../../3pty/dynamorio/include/dr_events.h" 2 ># 52 "../../3pty/dynamorio/include/dr_events.h" > ># 64 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_exit_event(void (*func)(void)); > > > > > > > >bool >dr_unregister_exit_event(void (*func)(void)); > > ># 92 "../../3pty/dynamorio/include/dr_events.h" >bool >dr_register_post_attach_event(void (*func)(void)); > > > > > > > >bool >dr_unregister_post_attach_event(void (*func)(void)); > > ># 120 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_pre_detach_event(void (*func)(void)); > > > > > > > >bool >dr_unregister_pre_detach_event(void (*func)(void)); > > > > > > > >typedef enum { > > DR_EMIT_DEFAULT = 0, ># 152 "../../3pty/dynamorio/include/dr_events.h" > DR_EMIT_STORE_TRANSLATIONS = 0x01, ># 162 "../../3pty/dynamorio/include/dr_events.h" > DR_EMIT_PERSISTABLE = 0x02, ># 172 "../../3pty/dynamorio/include/dr_events.h" > DR_EMIT_MUST_END_TRACE = 0x04, ># 184 "../../3pty/dynamorio/include/dr_events.h" > DR_EMIT_GO_NATIVE = 0x08, >} dr_emit_flags_t; > > ># 398 "../../3pty/dynamorio/include/dr_events.h" >void dr_register_bb_event(dr_emit_flags_t (*func)(void *drcontext, void *tag, > instrlist_t *bb, bool for_trace, > bool translating)); > > ># 417 "../../3pty/dynamorio/include/dr_events.h" >bool dr_unregister_bb_event(dr_emit_flags_t (*func)(void *drcontext, void *tag, > instrlist_t *bb, bool for_trace, > bool translating)); > > ># 506 "../../3pty/dynamorio/include/dr_events.h" >void dr_register_trace_event(dr_emit_flags_t (*func)(void *drcontext, void *tag, > instrlist_t *trace, > bool translating)); > > ># 521 "../../3pty/dynamorio/include/dr_events.h" >bool dr_unregister_trace_event(dr_emit_flags_t (*func)(void *drcontext, void *tag, > instrlist_t *trace, > bool translating)); ># 536 "../../3pty/dynamorio/include/dr_events.h" >typedef enum { > CUSTOM_TRACE_DR_DECIDES, > CUSTOM_TRACE_END_NOW, > CUSTOM_TRACE_CONTINUE >} dr_custom_trace_action_t; > > > > > > > >void dr_register_end_trace_event(dr_custom_trace_action_t (*func)(void *drcontext, > void *tag, > void *next_tag)); > > > > > > > >bool dr_unregister_end_trace_event(dr_custom_trace_action_t (*func)(void *drcontext, > void *tag, > void *next_tag)); ># 572 "../../3pty/dynamorio/include/dr_events.h" > ># 588 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_delete_event(void (*func)(void *drcontext, void *tag)); > > > > > > > >bool >dr_unregister_delete_event(void (*func)(void *drcontext, void *tag)); > > ># 652 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_restore_state_event(void (*func)(void *drcontext, void *tag, > dr_mcontext_t *mcontext, bool restore_memory, > bool app_code_consistent)); > > > > > > > >bool >dr_unregister_restore_state_event(void (*func)(void *drcontext, void *tag, > dr_mcontext_t *mcontext, > bool restore_memory, > bool app_code_consistent)); > > > > > > > >typedef struct _dr_fault_fragment_info_t { > > > > > > void *tag; > > > > > > > > byte *cache_start_pc; > > bool is_trace; > > > > > > > > bool app_code_consistent; ># 711 "../../3pty/dynamorio/include/dr_events.h" > instrlist_t *ilist; >} dr_fault_fragment_info_t; > > > > > > > >typedef struct _dr_restore_state_info_t { > > > > > > > dr_mcontext_t *mcontext; > > bool raw_mcontext_valid; > > > > > > > > dr_mcontext_t *raw_mcontext; > > > > > dr_fault_fragment_info_t fragment_info; >} dr_restore_state_info_t; > > ># 785 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_restore_state_ex_event(bool (*func)(void *drcontext, bool restore_memory, > dr_restore_state_info_t *info)); > > > > > > > > >bool >dr_unregister_restore_state_ex_event(bool (*func)(void *drcontext, bool restore_memory, > dr_restore_state_info_t *info)); > > > > > > >void >dr_register_thread_init_event(void (*func)(void *drcontext)); > > > > > > > >bool >dr_unregister_thread_init_event(void (*func)(void *drcontext)); > > ># 846 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_thread_exit_event(void (*func)(void *drcontext)); > > > > > > > >bool >dr_unregister_thread_exit_event(void (*func)(void *drcontext)); > > > > > >typedef enum { ># 871 "../../3pty/dynamorio/include/dr_events.h" > DR_EXIT_MULTI_THREAD = 0x01, ># 880 "../../3pty/dynamorio/include/dr_events.h" > DR_EXIT_SKIP_THREAD_EXIT = 0x02, >} dr_exit_flags_t; > > ># 894 "../../3pty/dynamorio/include/dr_events.h" >void >dr_set_process_exit_behavior(dr_exit_flags_t flags); > > > > > > > > >void >dr_allow_unsafe_static_behavior(void); > > > > > > > > >void >dr_register_fork_init_event(void (*func)(void *drcontext)); > > > > > > > >bool >dr_unregister_fork_init_event(void (*func)(void *drcontext)); > > > ># 945 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_module_load_event(void (*func)(void *drcontext, const module_data_t *info, > bool loaded)); > > ># 958 "../../3pty/dynamorio/include/dr_events.h" >bool >dr_unregister_module_load_event(void (*func)(void *drcontext, const module_data_t *info, > bool loaded)); > > ># 971 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_module_unload_event(void (*func)(void *drcontext, const module_data_t *info)); > > > > > > > >bool >dr_unregister_module_unload_event(void (*func)(void *drcontext, > const module_data_t *info)); > > >typedef enum { > DR_XFER_SIGNAL_DELIVERY, > DR_XFER_SIGNAL_RETURN, > DR_XFER_APC_DISPATCHER, > DR_XFER_EXCEPTION_DISPATCHER, > DR_XFER_RAISE_DISPATCHER, > DR_XFER_CALLBACK_DISPATCHER, > DR_XFER_CALLBACK_RETURN, > DR_XFER_CONTINUE, > DR_XFER_SET_CONTEXT_THREAD, > DR_XFER_CLIENT_REDIRECT, > DR_XFER_RSEQ_ABORT, >} dr_kernel_xfer_type_t; > > >typedef struct _dr_kernel_xfer_info_t { > > dr_kernel_xfer_type_t type; ># 1012 "../../3pty/dynamorio/include/dr_events.h" > const dr_mcontext_t *source_mcontext; > > > > > > app_pc target_pc; > > > > > > reg_t target_xsp; > > int sig; >} dr_kernel_xfer_info_t; > > ># 1072 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_kernel_xfer_event(void (*func)(void *drcontext, > const dr_kernel_xfer_info_t *info)); > > > > > > > >bool >dr_unregister_kernel_xfer_event(void (*func)(void *drcontext, > const dr_kernel_xfer_info_t *info)); ># 1167 "../../3pty/dynamorio/include/dr_events.h" > ># 1187 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_filter_syscall_event(bool (*func)(void *drcontext, int sysnum)); > > > > > > > >bool >dr_unregister_filter_syscall_event(bool (*func)(void *drcontext, int sysnum)); > > ># 1233 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_pre_syscall_event(bool (*func)(void *drcontext, int sysnum)); > > > > > > > >bool >dr_unregister_pre_syscall_event(bool (*func)(void *drcontext, int sysnum)); > > ># 1281 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_post_syscall_event(void (*func)(void *drcontext, int sysnum)); > > > > > > > >bool >dr_unregister_post_syscall_event(void (*func)(void *drcontext, int sysnum)); ># 1308 "../../3pty/dynamorio/include/dr_events.h" >typedef struct _dr_siginfo_t { > > int sig; > > void *drcontext; > > > > > > dr_mcontext_t *mcontext; ># 1327 "../../3pty/dynamorio/include/dr_events.h" > dr_mcontext_t *raw_mcontext; > > bool raw_mcontext_valid; > > > > > byte *access_address; > > > > > > > bool blocked; > > > > > dr_fault_fragment_info_t fault_fragment_info; >} dr_siginfo_t; > > > > > >typedef enum { > > DR_SIGNAL_DELIVER, > > DR_SIGNAL_SUPPRESS, > > > > > DR_SIGNAL_BYPASS, > > > > > > > > DR_SIGNAL_REDIRECT, >} dr_signal_action_t; > > ># 1444 "../../3pty/dynamorio/include/dr_events.h" >void dr_register_signal_event(dr_signal_action_t (*func)(void *drcontext, > dr_siginfo_t *siginfo)); > > > > > > > >bool dr_unregister_signal_event(dr_signal_action_t (*func)(void *drcontext, > dr_siginfo_t *siginfo)); > > > > > > > >void >dr_register_low_on_memory_event(void (*func)()); > > > > > > > >bool >dr_unregister_low_on_memory_event(void (*func)()); > > ># 1484 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_clean_call_insertion_event(void (*func)(void *drcontext, instrlist_t *ilist, > instr_t *where, > dr_cleancall_save_t call_flags)); > > > > > > >bool >dr_unregister_clean_call_insertion_event(void (*func)(void *drcontext, instrlist_t *ilist, > instr_t *where, > dr_cleancall_save_t call_flags)); ># 1600 "../../3pty/dynamorio/include/dr_events.h" > ># 1614 "../../3pty/dynamorio/include/dr_events.h" >void >dr_register_nudge_event(void (*func)(void *drcontext, uint64 argument), client_id_t id); > > > > > > > >bool >dr_unregister_nudge_event(void (*func)(void *drcontext, uint64 argument), client_id_t id); > > ># 1636 "../../3pty/dynamorio/include/dr_events.h" >bool >dr_nudge_client(client_id_t id, uint64 argument); > > ># 1668 "../../3pty/dynamorio/include/dr_events.h" >dr_config_status_t >dr_nudge_client_ex(process_id_t process_id, client_id_t client_id, uint64 argument, > uint timeout_ms); ># 1688 "../../3pty/dynamorio/include/dr_events.h" > > > > > > >app_pc >dr_persist_start(void *perscxt); > > > > > > >size_t >dr_persist_size(void *perscxt); > > > > > > > > > >bool >dr_fragment_persistable(void *drcontext, void *perscxt, void *tag); > > ># 1766 "../../3pty/dynamorio/include/dr_events.h" >bool >dr_register_persist_ro(size_t (*func_size)(void *drcontext, void *perscxt, > size_t file_offs, void **user_data ), > bool (*func_persist)(void *drcontext, void *perscxt, file_t fd, > void *user_data), > bool (*func_resurrect)(void *drcontext, void *perscxt, > byte **map )); > > > > > > > >bool >dr_unregister_persist_ro(size_t (*func_size)(void *drcontext, void *perscxt, > size_t file_offs, void **user_data ), > bool (*func_persist)(void *drcontext, void *perscxt, file_t fd, > void *user_data), > bool (*func_resurrect)(void *drcontext, void *perscxt, > byte **map )); > > ># 1840 "../../3pty/dynamorio/include/dr_events.h" >bool >dr_register_persist_rx(size_t (*func_size)(void *drcontext, void *perscxt, > size_t file_offs, void **user_data ), > bool (*func_persist)(void *drcontext, void *perscxt, file_t fd, > void *user_data), > bool (*func_resurrect)(void *drcontext, void *perscxt, > byte **map )); > > > > > > > >bool >dr_unregister_persist_rx(size_t (*func_size)(void *drcontext, void *perscxt, > size_t file_offs, void **user_data ), > bool (*func_persist)(void *drcontext, void *perscxt, file_t fd, > void *user_data), > bool (*func_resurrect)(void *drcontext, void *perscxt, > byte **map )); > > ># 1912 "../../3pty/dynamorio/include/dr_events.h" >bool >dr_register_persist_rw(size_t (*func_size)(void *drcontext, void *perscxt, > size_t file_offs, void **user_data ), > bool (*func_persist)(void *drcontext, void *perscxt, file_t fd, > void *user_data), > bool (*func_resurrect)(void *drcontext, void *perscxt, > byte **map )); > > > > > > > >bool >dr_unregister_persist_rw(size_t (*func_size)(void *drcontext, void *perscxt, > size_t file_offs, void **user_data ), > bool (*func_persist)(void *drcontext, void *perscxt, file_t fd, > void *user_data), > bool (*func_resurrect)(void *drcontext, void *perscxt, > byte **map )); > > ># 1959 "../../3pty/dynamorio/include/dr_events.h" >bool >dr_register_persist_patch(bool (*func_patch)(void *drcontext, void *perscxt, > byte *bb_start, size_t bb_size, > void *user_data)); > > > > > > > >bool >dr_unregister_persist_patch(bool (*func_patch)(void *drcontext, void *perscxt, > byte *bb_start, size_t bb_size, > void *user_data)); > > > > > > > >bool >dr_is_detaching(void); ># 51 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_app.h" 1 ># 65 "../../3pty/dynamorio/include/dr_app.h" > int >dr_app_setup(void); ># 76 "../../3pty/dynamorio/include/dr_app.h" > int >dr_app_cleanup(void); ># 89 "../../3pty/dynamorio/include/dr_app.h" > void >dr_app_start(void); > > > > > > > void >dr_app_stop(void); > > > > > > > void >dr_app_take_over(void); > > > > > > > > int >dr_app_setup_and_start(void); ># 126 "../../3pty/dynamorio/include/dr_app.h" > void >dr_app_stop_and_cleanup(void); ># 136 "../../3pty/dynamorio/include/dr_app.h" > void >dr_app_stop_and_cleanup_with_stats(dr_stats_t *drstats); ># 147 "../../3pty/dynamorio/include/dr_app.h" > bool >dr_app_running_under_dynamorio(void); ># 162 "../../3pty/dynamorio/include/dr_app.h" > void * >dr_app_handle_mbr_target(void *target); ># 54 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_opnd.h" 1 ># 69 "../../3pty/dynamorio/include/dr_ir_opnd.h" >enum { ># 78 "../../3pty/dynamorio/include/dr_ir_opnd.h" > OPSZ_NA = 0, > OPSZ_FIRST = OPSZ_NA, > OPSZ_0, > > > OPSZ_1, > OPSZ_2, > OPSZ_4, > OPSZ_6, > OPSZ_8, > OPSZ_10, > > OPSZ_16, > OPSZ_14, > OPSZ_28, > OPSZ_94, > OPSZ_108, > OPSZ_512, ># 108 "../../3pty/dynamorio/include/dr_ir_opnd.h" > OPSZ_2_short1, > > > > OPSZ_4_short2, > OPSZ_4_rex8_short2, > OPSZ_4_rex8, > OPSZ_6_irex10_short4, > > > OPSZ_8_short2, > OPSZ_8_short4, > OPSZ_28_short14, > OPSZ_108_short94, > > OPSZ_4x8, > > OPSZ_6x10, > > > > > OPSZ_4x8_short2, > > > > > > > OPSZ_4x8_short2xi8, > > OPSZ_4_short2xi4, > > > > > > OPSZ_1_reg4, > OPSZ_2_reg4, > OPSZ_4_reg16, > > > OPSZ_xsave, > > OPSZ_12, > OPSZ_32, > > OPSZ_40, > OPSZ_32_short16, > OPSZ_8_rex16, > OPSZ_8_rex16_short4, > OPSZ_12_rex40_short6, > OPSZ_16_vex32, > OPSZ_15, > > > OPSZ_3, > > > > OPSZ_1b, > OPSZ_2b, > OPSZ_3b, > OPSZ_4b, > OPSZ_5b, > OPSZ_6b, > OPSZ_7b, > OPSZ_9b, > OPSZ_10b, > OPSZ_11b, > OPSZ_12b, > OPSZ_20b, > OPSZ_25b, > > > > > OPSZ_VAR_REGLIST, > OPSZ_20, > OPSZ_24, > OPSZ_36, > OPSZ_44, > OPSZ_48, > OPSZ_52, > OPSZ_56, > OPSZ_60, > OPSZ_64, > > OPSZ_68, > OPSZ_72, > OPSZ_76, > OPSZ_80, > OPSZ_84, > OPSZ_88, > OPSZ_92, > OPSZ_96, > OPSZ_100, > OPSZ_104, > > OPSZ_112, > OPSZ_116, > OPSZ_120, > OPSZ_124, > OPSZ_128, > OPSZ_SCALABLE, > OPSZ_SCALABLE_PRED, > OPSZ_16_vex32_evex64, > OPSZ_vex32_evex64, > OPSZ_16_of_32_evex64, > > > OPSZ_32_of_64, > OPSZ_4_of_32_evex64, > OPSZ_8_of_32_evex64, > OPSZ_8x16, > > > > > > OPSZ_LAST, >}; ># 290 "../../3pty/dynamorio/include/dr_ir_opnd.h" >enum { > > > > > > > DR_REG_NULL, > > > DR_REG_RAX, > DR_REG_RCX, > DR_REG_RDX, > DR_REG_RBX, > DR_REG_RSP, > DR_REG_RBP, > DR_REG_RSI, > DR_REG_RDI, > DR_REG_R8, > DR_REG_R9, > DR_REG_R10, > DR_REG_R11, > DR_REG_R12, > DR_REG_R13, > DR_REG_R14, > DR_REG_R15, > > DR_REG_EAX, > DR_REG_ECX, > DR_REG_EDX, > DR_REG_EBX, > DR_REG_ESP, > DR_REG_EBP, > DR_REG_ESI, > DR_REG_EDI, > DR_REG_R8D, > DR_REG_R9D, > DR_REG_R10D, > DR_REG_R11D, > DR_REG_R12D, > DR_REG_R13D, > DR_REG_R14D, > DR_REG_R15D, > > DR_REG_AX, > DR_REG_CX, > DR_REG_DX, > DR_REG_BX, > DR_REG_SP, > DR_REG_BP, > DR_REG_SI, > DR_REG_DI, > DR_REG_R8W, > DR_REG_R9W, > DR_REG_R10W, > DR_REG_R11W, > DR_REG_R12W, > DR_REG_R13W, > DR_REG_R14W, > DR_REG_R15W, > > DR_REG_AL, > DR_REG_CL, > DR_REG_DL, > DR_REG_BL, > DR_REG_AH, > DR_REG_CH, > DR_REG_DH, > DR_REG_BH, > DR_REG_R8L, > DR_REG_R9L, > DR_REG_R10L, > DR_REG_R11L, > DR_REG_R12L, > DR_REG_R13L, > DR_REG_R14L, > DR_REG_R15L, > DR_REG_SPL, > DR_REG_BPL, > DR_REG_SIL, > DR_REG_DIL, > > DR_REG_MM0, > DR_REG_MM1, > DR_REG_MM2, > DR_REG_MM3, > DR_REG_MM4, > DR_REG_MM5, > DR_REG_MM6, > DR_REG_MM7, > > DR_REG_XMM0, > DR_REG_XMM1, > DR_REG_XMM2, > DR_REG_XMM3, > DR_REG_XMM4, > DR_REG_XMM5, > DR_REG_XMM6, > DR_REG_XMM7, > DR_REG_XMM8, > DR_REG_XMM9, > DR_REG_XMM10, > DR_REG_XMM11, > DR_REG_XMM12, > DR_REG_XMM13, > DR_REG_XMM14, > DR_REG_XMM15, > DR_REG_XMM16, > DR_REG_XMM17, > DR_REG_XMM18, > DR_REG_XMM19, > DR_REG_XMM20, > DR_REG_XMM21, > DR_REG_XMM22, > DR_REG_XMM23, > DR_REG_XMM24, > DR_REG_XMM25, > DR_REG_XMM26, > DR_REG_XMM27, > DR_REG_XMM28, > DR_REG_XMM29, > DR_REG_XMM30, > DR_REG_XMM31, > > RESERVED_XMM = DR_REG_XMM31 + 32, > > DR_REG_ST0, > DR_REG_ST1, > DR_REG_ST2, > DR_REG_ST3, > DR_REG_ST4, > DR_REG_ST5, > DR_REG_ST6, > DR_REG_ST7, > > DR_SEG_ES, > DR_SEG_CS, > DR_SEG_SS, > DR_SEG_DS, > DR_SEG_FS, > DR_SEG_GS, > > > DR_REG_DR0, > DR_REG_DR1, > DR_REG_DR2, > DR_REG_DR3, > DR_REG_DR4, > DR_REG_DR5, > DR_REG_DR6, > DR_REG_DR7, > DR_REG_DR8, > DR_REG_DR9, > DR_REG_DR10, > DR_REG_DR11, > DR_REG_DR12, > DR_REG_DR13, > DR_REG_DR14, > DR_REG_DR15, > > DR_REG_CR0, > DR_REG_CR1, > DR_REG_CR2, > DR_REG_CR3, > DR_REG_CR4, > DR_REG_CR5, > DR_REG_CR6, > DR_REG_CR7, > DR_REG_CR8, > DR_REG_CR9, > DR_REG_CR10, > DR_REG_CR11, > DR_REG_CR12, > DR_REG_CR13, > DR_REG_CR14, > DR_REG_CR15, > > > > > DR_REG_MAX_AS_OPSZ = DR_REG_CR15, > DR_REG_INVALID, > > DR_REG_YMM0, > DR_REG_YMM1, > DR_REG_YMM2, > DR_REG_YMM3, > DR_REG_YMM4, > DR_REG_YMM5, > DR_REG_YMM6, > DR_REG_YMM7, > DR_REG_YMM8, > DR_REG_YMM9, > DR_REG_YMM10, > DR_REG_YMM11, > DR_REG_YMM12, > DR_REG_YMM13, > DR_REG_YMM14, > DR_REG_YMM15, > DR_REG_YMM16, > DR_REG_YMM17, > DR_REG_YMM18, > DR_REG_YMM19, > DR_REG_YMM20, > DR_REG_YMM21, > DR_REG_YMM22, > DR_REG_YMM23, > DR_REG_YMM24, > DR_REG_YMM25, > DR_REG_YMM26, > DR_REG_YMM27, > DR_REG_YMM28, > DR_REG_YMM29, > DR_REG_YMM30, > DR_REG_YMM31, > > RESERVED_YMM = DR_REG_YMM31 + 32, > > DR_REG_ZMM0, > DR_REG_ZMM1, > DR_REG_ZMM2, > DR_REG_ZMM3, > DR_REG_ZMM4, > DR_REG_ZMM5, > DR_REG_ZMM6, > DR_REG_ZMM7, > DR_REG_ZMM8, > DR_REG_ZMM9, > DR_REG_ZMM10, > DR_REG_ZMM11, > DR_REG_ZMM12, > DR_REG_ZMM13, > DR_REG_ZMM14, > DR_REG_ZMM15, > DR_REG_ZMM16, > DR_REG_ZMM17, > DR_REG_ZMM18, > DR_REG_ZMM19, > DR_REG_ZMM20, > DR_REG_ZMM21, > DR_REG_ZMM22, > DR_REG_ZMM23, > DR_REG_ZMM24, > DR_REG_ZMM25, > DR_REG_ZMM26, > DR_REG_ZMM27, > DR_REG_ZMM28, > DR_REG_ZMM29, > DR_REG_ZMM30, > DR_REG_ZMM31, > > RESERVED_ZMM = DR_REG_ZMM31 + 32, > > DR_REG_K0, > DR_REG_K1, > DR_REG_K2, > DR_REG_K3, > DR_REG_K4, > DR_REG_K5, > DR_REG_K6, > DR_REG_K7, > > RESERVED_OPMASK = DR_REG_K7 + 8, > > DR_REG_BND0, > DR_REG_BND1, > DR_REG_BND2, > DR_REG_BND3, ># 1289 "../../3pty/dynamorio/include/dr_ir_opnd.h" >}; > > >typedef ushort reg_id_t; > > > >typedef byte opnd_size_t; ># 1621 "../../3pty/dynamorio/include/dr_ir_opnd.h" >typedef enum _dr_shift_type_t { > DR_SHIFT_LSL, > DR_SHIFT_LSR, > DR_SHIFT_ASR, > DR_SHIFT_ROR, ># 1634 "../../3pty/dynamorio/include/dr_ir_opnd.h" > DR_SHIFT_RRX, > > > > > DR_SHIFT_NONE, >} dr_shift_type_t; > > > > > > > >typedef enum _dr_extend_type_t { > DR_EXTEND_UXTB = 0, > DR_EXTEND_UXTH, > DR_EXTEND_UXTW, > DR_EXTEND_UXTX, > DR_EXTEND_SXTB, > DR_EXTEND_SXTH, > DR_EXTEND_SXTW, > DR_EXTEND_SXTX, >} dr_extend_type_t; > > > > > > > >typedef enum _dr_opnd_flags_t { > > DR_OPND_NEGATED = 0x01, ># 1677 "../../3pty/dynamorio/include/dr_ir_opnd.h" > DR_OPND_SHIFTED = 0x02, > > > > > > > DR_OPND_MULTI_PART = 0x04, > > > > DR_OPND_IS_SHIFT = 0x08, > > DR_OPND_IN_LIST = 0x10, ># 1700 "../../3pty/dynamorio/include/dr_ir_opnd.h" > DR_OPND_EXTENDED = 0x20, > > DR_OPND_IS_EXTEND = 0x40, > > DR_OPND_IS_CONDITION = 0x80, >} dr_opnd_flags_t; ># 1846 "../../3pty/dynamorio/include/dr_ir_opnd.h" > > > >opnd_t >opnd_create_null(void); > > > > >opnd_t >opnd_create_reg(reg_id_t r); > > > ># 1868 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_reg_partial(reg_id_t r, opnd_size_t subsize); > > > > > > > > >opnd_t >opnd_create_reg_ex(reg_id_t r, opnd_size_t subsize, dr_opnd_flags_t flags); > > > > > > >opnd_t >opnd_create_immed_int(ptr_int_t i, opnd_size_t data_size); > > > > > > >opnd_t >opnd_create_immed_uint(ptr_uint_t i, opnd_size_t data_size); > > ># 1906 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_immed_int64(int64 i, opnd_size_t data_size); > > > > > > > >opnd_t >opnd_create_immed_float(float f); > > > > > > > > > > > > >opnd_t >opnd_create_immed_double(double d); > > > > > >opnd_t >opnd_create_pc(app_pc pc); > > > > > > >opnd_t >opnd_create_far_pc(ushort seg_selector, app_pc pc); > > > > > > > >opnd_t >opnd_create_instr(instr_t *instr); > > > > > > > > > >opnd_t >opnd_create_instr_ex(instr_t *instr, opnd_size_t size, ushort shift); > > > > > > >opnd_t >opnd_create_far_instr(ushort seg_selector, instr_t *instr); > > ># 1988 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_mem_instr(instr_t *instr, short disp, opnd_size_t data_size); > > ># 2011 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_base_disp(reg_id_t base_reg, reg_id_t index_reg, int scale, int disp, > opnd_size_t data_size); > > ># 2041 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_base_disp_ex(reg_id_t base_reg, reg_id_t index_reg, int scale, int disp, > opnd_size_t size, bool encode_zero_disp, bool force_full_disp, > bool disp_short_addr); > > ># 2062 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_far_base_disp(reg_id_t seg, reg_id_t base_reg, reg_id_t index_reg, int scale, > int disp, opnd_size_t data_size); > > ># 2093 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_far_base_disp_ex(reg_id_t seg, reg_id_t base_reg, reg_id_t index_reg, > int scale, int disp, opnd_size_t size, bool encode_zero_disp, > bool force_full_disp, bool disp_short_addr); ># 2150 "../../3pty/dynamorio/include/dr_ir_opnd.h" > ># 2167 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_abs_addr(void *addr, opnd_size_t data_size); > > ># 2188 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_far_abs_addr(reg_id_t seg, void *addr, opnd_size_t data_size); > > > ># 2233 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_rel_addr(void *addr, opnd_size_t data_size); > > ># 2270 "../../3pty/dynamorio/include/dr_ir_opnd.h" >opnd_t >opnd_create_far_rel_addr(reg_id_t seg, void *addr, opnd_size_t data_size); > > > > >bool >opnd_is_null(opnd_t opnd); > > > >bool >opnd_is_reg(opnd_t opnd); > > > >bool >opnd_is_reg_partial(opnd_t opnd); > > > > >bool >opnd_is_immed(opnd_t opnd); > > > >bool >opnd_is_immed_int(opnd_t opnd); > > > > > > >bool >opnd_is_immed_int64(opnd_t opnd); > > > >bool >opnd_is_immed_float(opnd_t opnd); > > > > >bool >opnd_is_pc(opnd_t opnd); > > > >bool >opnd_is_near_pc(opnd_t opnd); > > > >bool >opnd_is_far_pc(opnd_t opnd); > > > > >bool >opnd_is_instr(opnd_t opnd); > > > >bool >opnd_is_near_instr(opnd_t opnd); > > > >bool >opnd_is_far_instr(opnd_t opnd); > > > >bool >opnd_is_mem_instr(opnd_t opnd); > > > >bool >opnd_is_base_disp(opnd_t opnd); > > > > > > > >bool >opnd_is_near_base_disp(opnd_t opnd); > > > > >bool >opnd_is_far_base_disp(opnd_t opnd); > > > > > > >bool >opnd_is_vsib(opnd_t opnd); > > > > > > > >bool >opnd_is_abs_addr(opnd_t opnd); > > > > > > > >bool >opnd_is_near_abs_addr(opnd_t opnd); > > > > > > > >bool >opnd_is_far_abs_addr(opnd_t opnd); > > > > > > > >bool >opnd_is_rel_addr(opnd_t opnd); > > > > > > > > > >bool >opnd_is_near_rel_addr(opnd_t opnd); > > > > > > > > >bool >opnd_is_far_rel_addr(opnd_t opnd); > > > ># 2448 "../../3pty/dynamorio/include/dr_ir_opnd.h" >bool >opnd_is_memory_reference(opnd_t opnd); > > > > > > >bool >opnd_is_far_memory_reference(opnd_t opnd); > > > > > > >bool >opnd_is_near_memory_reference(opnd_t opnd); > > > > > > > > > > >opnd_size_t >opnd_get_size(opnd_t opnd); > > > > > > > >void >opnd_set_size(opnd_t *opnd, opnd_size_t newsize); > > > > > > >reg_id_t >opnd_get_reg(opnd_t opnd); > > > > > > > > > >dr_opnd_flags_t >opnd_get_flags(opnd_t opnd); > > > > > > > >void >opnd_set_flags(opnd_t *opnd, dr_opnd_flags_t flags); > > > > > > > > > >opnd_t >opnd_add_flags(opnd_t opnd, dr_opnd_flags_t flags); > > > >ptr_int_t >opnd_get_immed_int(opnd_t opnd); > > > > > > > >int64 >opnd_get_immed_int64(opnd_t opnd); > > > > > > > >float >opnd_get_immed_float(opnd_t opnd); > > > > > > > > > > > > >double >opnd_get_immed_double(opnd_t opnd); > > > > >app_pc >opnd_get_pc(opnd_t opnd); > > > > > > >ushort >opnd_get_segment_selector(opnd_t opnd); > > > >instr_t * >opnd_get_instr(opnd_t opnd); > > > >ushort >opnd_get_shift(opnd_t opnd); > > > > > >short >opnd_get_mem_instr_disp(opnd_t opnd); > > > > > > >reg_id_t >opnd_get_base(opnd_t opnd); > > > > > > > > > >int >opnd_get_disp(opnd_t opnd); > > > > > > >bool >opnd_is_disp_encode_zero(opnd_t opnd); > > > > > > >bool >opnd_is_disp_force_full(opnd_t opnd); > > > > > > >bool >opnd_is_disp_short_addr(opnd_t opnd); > > > > > > >reg_id_t >opnd_get_index(opnd_t opnd); > > > > > > >int >opnd_get_scale(opnd_t opnd); > > > > > > > >reg_id_t >opnd_get_segment(opnd_t opnd); ># 2713 "../../3pty/dynamorio/include/dr_ir_opnd.h" > > > > > > > >void * >opnd_get_addr(opnd_t opnd); > > > > > > >int >opnd_num_regs_used(opnd_t opnd); > > > > > > > >reg_id_t >opnd_get_reg_used(opnd_t opnd, int index); > > > > > > > > >const char * >get_register_name(reg_id_t reg); > > > > > > > >reg_id_t >reg_32_to_16(reg_id_t reg); > > ># 2768 "../../3pty/dynamorio/include/dr_ir_opnd.h" >reg_id_t >reg_32_to_8(reg_id_t reg); > > > > > > > > > >reg_id_t >reg_32_to_64(reg_id_t reg); > > > > > > > > >reg_id_t >reg_64_to_32(reg_id_t reg); > > > > > > > > > >bool >reg_is_extended(reg_id_t reg); > > > > > > > > >bool >reg_is_avx512_extended(reg_id_t reg); > > > ># 2825 "../../3pty/dynamorio/include/dr_ir_opnd.h" >reg_id_t >reg_32_to_opsz(reg_id_t reg, opnd_size_t sz); > > ># 2845 "../../3pty/dynamorio/include/dr_ir_opnd.h" >reg_id_t >reg_resize_to_opsz(reg_id_t reg, opnd_size_t sz); > > > > > > > >int >reg_parameter_num(reg_id_t reg); > > > > > > > >bool >reg_is_gpr(reg_id_t reg); > > > > > > > >bool >reg_is_segment(reg_id_t reg); > > > > > > > >bool >reg_is_simd(reg_id_t reg); > > ># 2894 "../../3pty/dynamorio/include/dr_ir_opnd.h" >bool >reg_is_vector_simd(reg_id_t reg); > > > > > > > > >bool >reg_is_xmm(reg_id_t reg); > > > > > > >bool >reg_is_strictly_xmm(reg_id_t reg); > > > > > > > >bool >reg_is_ymm(reg_id_t reg); > > > > > > >bool >reg_is_strictly_ymm(reg_id_t reg); > > > > > > >bool >reg_is_strictly_zmm(reg_id_t reg); > > > > > > >bool >reg_is_opmask(reg_id_t reg); > > > > > > >bool >reg_is_bnd(reg_id_t reg); > > > > > > >bool >reg_is_mmx(reg_id_t reg); > > > > > > >bool >reg_is_fp(reg_id_t reg); > > > > > > >bool >reg_is_32bit(reg_id_t reg); > > > > > > >bool >opnd_is_reg_32bit(opnd_t opnd); > > > > > > >bool >reg_is_64bit(reg_id_t reg); > > > > > > >bool >opnd_is_reg_64bit(opnd_t opnd); > > > > > > >bool >reg_is_pointer_sized(reg_id_t reg); > > > > > > >reg_id_t >reg_to_pointer_sized(reg_id_t reg); > > > > > > >bool >opnd_is_reg_pointer_sized(opnd_t opnd); > > > > > > > >bool >reg_overlap(reg_id_t r1, reg_id_t r2); > > > > > > > >byte >reg_get_bits(reg_id_t reg); > > > > > > > >opnd_size_t >reg_get_size(reg_id_t reg); > > > > > > > >bool >opnd_uses_reg(opnd_t opnd, reg_id_t reg); > > > > > > > >void >opnd_set_disp(opnd_t *opnd, int disp); > > > ># 3086 "../../3pty/dynamorio/include/dr_ir_opnd.h" >void >opnd_set_disp_ex(opnd_t *opnd, int disp, bool encode_zero_disp, bool force_full_disp, > bool disp_short_addr); > > > > > > > > > > >bool >opnd_replace_reg(opnd_t *opnd, reg_id_t old_reg, reg_id_t new_reg); > > > > > > > >bool >opnd_replace_reg_resize(opnd_t *opnd, reg_id_t old_reg, reg_id_t new_reg); > > >bool >opnd_same_sizes_ok(opnd_size_t s1, opnd_size_t s2, bool is_reg); > > > > > >bool >opnd_same(opnd_t op1, opnd_t op2); > > > > > > >bool >opnd_same_address(opnd_t op1, opnd_t op2); > > > > > > >bool >opnd_share_reg(opnd_t op1, opnd_t op2); > > > > > > > > >bool >opnd_defines_use(opnd_t def, opnd_t use); > > ># 3157 "../../3pty/dynamorio/include/dr_ir_opnd.h" >uint >opnd_size_in_bytes(opnd_size_t size); > > ># 3169 "../../3pty/dynamorio/include/dr_ir_opnd.h" >uint >opnd_size_in_bits(opnd_size_t size); > > > > > > > > > >opnd_size_t >opnd_size_from_bytes(uint bytes); > > > > > > > >opnd_t >opnd_shrink_to_16_bits(opnd_t opnd); > > > > > > > > > > >opnd_t >opnd_shrink_to_32_bits(opnd_t opnd); > > > > > > > > >reg_t >reg_get_value(reg_id_t reg, dr_mcontext_t *mc); > > ># 3229 "../../3pty/dynamorio/include/dr_ir_opnd.h" >bool >reg_get_value_ex(reg_id_t reg, dr_mcontext_t *mc, byte *val); > > > > > > > > > >void >reg_set_value(reg_id_t reg, dr_mcontext_t *mc, reg_t value); > > ># 3258 "../../3pty/dynamorio/include/dr_ir_opnd.h" >bool >reg_set_value_ex(reg_id_t reg, dr_mcontext_t *mc, byte *val_buf); > > ># 3275 "../../3pty/dynamorio/include/dr_ir_opnd.h" >app_pc >opnd_compute_address(opnd_t opnd, dr_mcontext_t *mc); > > ># 3289 "../../3pty/dynamorio/include/dr_ir_opnd.h" >bool >reg_is_stolen(reg_id_t reg); ># 57 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_modules.h" 1 ># 55 "../../3pty/dynamorio/include/dr_modules.h" >struct _module_handle_t; >typedef struct _module_handle_t *module_handle_t; ># 90 "../../3pty/dynamorio/include/dr_modules.h" >typedef struct _module_names_t { > const char *module_name; > > > > const char *file_name; ># 105 "../../3pty/dynamorio/include/dr_modules.h" > uint64 inode; > >} module_names_t; > > >typedef void *dr_module_iterator_t; > > > >typedef struct _module_segment_data_t { > app_pc start; > app_pc end; > uint prot; > uint64 offset; >} module_segment_data_t; ># 136 "../../3pty/dynamorio/include/dr_modules.h" >struct _module_data_t { > union { > app_pc start; > module_handle_t handle; > }; ># 150 "../../3pty/dynamorio/include/dr_modules.h" > app_pc end; > > app_pc entry_point; > > uint flags; > > module_names_t names; > > > > char *full_path; ># 170 "../../3pty/dynamorio/include/dr_modules.h" > bool contiguous; > uint num_segments; > > > > > module_segment_data_t *segments; > uint timestamp; > > > > > > > app_pc preferred_base; > >}; > > > > > > ># 202 "../../3pty/dynamorio/include/dr_modules.h" >module_data_t * >dr_lookup_module(byte *pc); > > > > > > > > > >module_data_t * >dr_lookup_module_by_name(const char *name); > > > > > > >module_data_t * >dr_get_main_module(void); > > ># 233 "../../3pty/dynamorio/include/dr_modules.h" >dr_module_iterator_t * >dr_module_iterator_start(void); > > > > > >bool >dr_module_iterator_hasnext(dr_module_iterator_t *mi); > > > > > > > >module_data_t * >dr_module_iterator_next(dr_module_iterator_t *mi); > > > > > >void >dr_module_iterator_stop(dr_module_iterator_t *mi); > > > > > > > >module_data_t * >dr_copy_module_data(const module_data_t *data); > > > > > > > >void >dr_free_module_data(module_data_t *data); > > > > > > >const char * >dr_module_preferred_name(const module_data_t *data); > > > > > > > >bool >dr_module_contains_addr(const module_data_t *data, app_pc addr); ># 303 "../../3pty/dynamorio/include/dr_modules.h" >struct _dr_module_import_iterator_t; >typedef struct _dr_module_import_iterator_t dr_module_import_iterator_t; > > > > >struct _dr_module_import_desc_t; >typedef struct _dr_module_import_desc_t dr_module_import_desc_t; ># 322 "../../3pty/dynamorio/include/dr_modules.h" >typedef struct _dr_module_import_t { > > > > const char *modname; > > > > > > dr_module_import_desc_t *module_import_desc; >} dr_module_import_t; > > > > > > > > >dr_module_import_iterator_t * >dr_module_import_iterator_start(module_handle_t handle); > > > > > > > >bool >dr_module_import_iterator_hasnext(dr_module_import_iterator_t *iter); > > > > > > > > > >dr_module_import_t * >dr_module_import_iterator_next(dr_module_import_iterator_t *iter); > > > > > > > >void >dr_module_import_iterator_stop(dr_module_import_iterator_t *iter); > > > > > > >struct _dr_symbol_import_iterator_t; >typedef struct _dr_symbol_import_iterator_t dr_symbol_import_iterator_t; ># 389 "../../3pty/dynamorio/include/dr_modules.h" >typedef struct _dr_symbol_import_t { > const char *name; > const char *modname; > bool delay_load; > bool by_ordinal; > ptr_uint_t ordinal; > > > >} dr_symbol_import_t; > > ># 415 "../../3pty/dynamorio/include/dr_modules.h" >dr_symbol_import_iterator_t * >dr_symbol_import_iterator_start(module_handle_t handle, > dr_module_import_desc_t *from_module); > > > > > >bool >dr_symbol_import_iterator_hasnext(dr_symbol_import_iterator_t *iter); > > > > > > > >dr_symbol_import_t * >dr_symbol_import_iterator_next(dr_symbol_import_iterator_t *iter); > > > > > >void >dr_symbol_import_iterator_stop(dr_symbol_import_iterator_t *iter); > > > > > > > >struct _dr_symbol_export_iterator_t; >typedef struct _dr_symbol_export_iterator_t dr_symbol_export_iterator_t; ># 462 "../../3pty/dynamorio/include/dr_modules.h" >typedef struct _dr_symbol_export_t { > const char *name; > app_pc addr; > const char *forward; > ptr_uint_t ordinal; > > > > bool is_indirect_code; > bool is_code; > > > >} dr_symbol_export_t; > > ># 486 "../../3pty/dynamorio/include/dr_modules.h" >dr_symbol_export_iterator_t * >dr_symbol_export_iterator_start(module_handle_t handle); > > > > > >bool >dr_symbol_export_iterator_hasnext(dr_symbol_export_iterator_t *iter); > > > > > > > >dr_symbol_export_t * >dr_symbol_export_iterator_next(dr_symbol_export_iterator_t *iter); > > > > > >void >dr_symbol_export_iterator_stop(dr_symbol_export_iterator_t *iter); ># 524 "../../3pty/dynamorio/include/dr_modules.h" > ># 536 "../../3pty/dynamorio/include/dr_modules.h" >bool >dr_module_set_should_instrument(module_handle_t handle, bool should_instrument); > > > > > > >bool >dr_module_should_instrument(module_handle_t handle); > > ># 566 "../../3pty/dynamorio/include/dr_modules.h" >generic_func_t >dr_get_proc_address(module_handle_t lib, const char *name); > > > > > >typedef struct _dr_export_info_t { > > > > > > generic_func_t address; ># 588 "../../3pty/dynamorio/include/dr_modules.h" > bool is_indirect_code; >} dr_export_info_t; > > ># 601 "../../3pty/dynamorio/include/dr_modules.h" >bool >dr_get_proc_address_ex(module_handle_t lib, const char *name, dr_export_info_t *info , > size_t info_len); ># 60 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_os_utils.h" 1 ># 50 "../../3pty/dynamorio/include/dr_os_utils.h" >typedef enum { ># 62 "../../3pty/dynamorio/include/dr_os_utils.h" > DR_STATE_DR_TLS = 0x0001, > DR_STATE_ALL = (~0) & (~DR_STATE_DR_TLS), > DR_STATE_GO_NATIVE = ~0, > >} dr_state_flags_t; > > ># 81 "../../3pty/dynamorio/include/dr_os_utils.h" >bool >dr_using_app_state(void *drcontext); > > > >void >dr_switch_to_app_state(void *drcontext); > > ># 104 "../../3pty/dynamorio/include/dr_os_utils.h" >void >dr_switch_to_app_state_ex(void *drcontext, dr_state_flags_t flags); > > > >void >dr_switch_to_dr_state(void *drcontext); > > ># 139 "../../3pty/dynamorio/include/dr_os_utils.h" >void >dr_switch_to_dr_state_ex(void *drcontext, dr_state_flags_t flags); ># 149 "../../3pty/dynamorio/include/dr_os_utils.h" >typedef enum { > > > > DR_APP_ARG_CSTR_COMPAT, > > > > DR_APP_ARG_UTF_16, >} dr_app_arg_encoding_t; > > > > >typedef struct _dr_app_arg_t { > > > > void *start; > > > > size_t size; > > > > dr_app_arg_encoding_t encoding; >} dr_app_arg_t; > > ># 195 "../../3pty/dynamorio/include/dr_os_utils.h" >int >dr_get_app_args( dr_app_arg_t *args_array, int args_count); > > ># 207 "../../3pty/dynamorio/include/dr_os_utils.h" >int >dr_num_app_args(void); > > ># 226 "../../3pty/dynamorio/include/dr_os_utils.h" >const char * >dr_app_arg_as_cstring( dr_app_arg_t *app_arg, char *buf, int buf_size); > > > >const char * >dr_get_application_name(void); > > > >process_id_t >dr_get_process_id(void); > > > > > > > >process_id_t >dr_get_process_id_from_drcontext(void *drcontext); > > > > > > > >process_id_t >dr_get_parent_id(void); ># 385 "../../3pty/dynamorio/include/dr_os_utils.h" >typedef void *dr_auxlib_handle_t; > >typedef void (*dr_auxlib_routine_ptr_t)(); ># 398 "../../3pty/dynamorio/include/dr_os_utils.h" > ># 411 "../../3pty/dynamorio/include/dr_os_utils.h" >dr_auxlib_handle_t >dr_load_aux_library(const char *name, byte **lib_start , > byte **lib_end ); > > > > > > > >dr_auxlib_routine_ptr_t >dr_lookup_aux_library_routine(dr_auxlib_handle_t lib, const char *name); > > > > > > >bool >dr_unload_aux_library(dr_auxlib_handle_t lib); ># 564 "../../3pty/dynamorio/include/dr_os_utils.h" >typedef enum { > DR_MEMTYPE_FREE, > DR_MEMTYPE_IMAGE, > DR_MEMTYPE_DATA, > DR_MEMTYPE_RESERVED, > DR_MEMTYPE_ERROR, > > > > > DR_MEMTYPE_ERROR_WINKERNEL, >} dr_mem_type_t; > > > > >typedef struct _dr_mem_info_t { > > byte *base_pc; > > size_t size; > > uint prot; > > dr_mem_type_t type; >} dr_mem_info_t; ># 608 "../../3pty/dynamorio/include/dr_os_utils.h" > > >size_t >dr_page_size(void); > > ># 624 "../../3pty/dynamorio/include/dr_os_utils.h" >bool >dr_memory_is_readable(const byte *pc, size_t size); > > > > > > ># 648 "../../3pty/dynamorio/include/dr_os_utils.h" >bool >dr_query_memory(const byte *pc, byte **base_pc, size_t *size, uint *prot); > > ># 671 "../../3pty/dynamorio/include/dr_os_utils.h" >bool >dr_query_memory_ex(const byte *pc, dr_mem_info_t *info); ># 691 "../../3pty/dynamorio/include/dr_os_utils.h" > ># 700 "../../3pty/dynamorio/include/dr_os_utils.h" >bool >dr_safe_read(const void *base, size_t size, void *out_buf, size_t *bytes_read); > > ># 712 "../../3pty/dynamorio/include/dr_os_utils.h" >bool >dr_safe_write(void *base, size_t size, const void *in_buf, size_t *bytes_written); > > > >void >dr_try_setup(void *drcontext, void **try_cxt); > > > >int >dr_try_start(void *buf); > > > >void >dr_try_stop(void *drcontext, void *try_cxt); ># 763 "../../3pty/dynamorio/include/dr_os_utils.h" > ># 772 "../../3pty/dynamorio/include/dr_os_utils.h" >bool >dr_memory_protect(void *base, size_t size, uint new_prot); > > > > > > > >bool >dr_memory_is_dr_internal(const byte *pc); > > > > > > > >bool >dr_memory_is_in_client(const byte *pc); ># 63 "../../3pty/dynamorio/include/dr_api.h" 2 > > > > > ># 1 "../../3pty/dynamorio/include/dr_tools.h" 1 ># 45 "../../3pty/dynamorio/include/dr_tools.h" > ># 54 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_standalone_init(void); > > > > > > >void >dr_standalone_exit(void); ># 101 "../../3pty/dynamorio/include/dr_tools.h" > > >bool >dr_using_all_private_caches(void); > > > >void >dr_request_synchronized_exit(void); > > ># 123 "../../3pty/dynamorio/include/dr_tools.h" >const char * >dr_get_options(client_id_t client_id); > > > > > > > > >bool >dr_get_option_array(client_id_t client_id, int *argc , const char ***argv ); > > ># 145 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_get_string_option(const char *option_name, char *buf , size_t len); > > ># 158 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_get_integer_option(const char *option_name, uint64 *val ); > > > > > > > > >const char * >dr_get_client_path(client_id_t client_id); > > > > > > >byte * >dr_get_client_base(client_id_t client_id); > > ># 188 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_set_client_name(const char *name, const char *report_URL); > > > > > > > >bool >dr_set_client_version_string(const char *version); > > ># 209 "../../3pty/dynamorio/include/dr_tools.h" >dr_error_code_t >dr_get_error_code(void *drcontext); > > > >void >dr_get_time(dr_time_t *time); > > ># 226 "../../3pty/dynamorio/include/dr_tools.h" >uint64 >dr_get_milliseconds(void); > > ># 238 "../../3pty/dynamorio/include/dr_tools.h" >uint64 >dr_get_microseconds(void); > > > > > > > >uint >dr_get_random_value(uint max); > > > > > > >void >dr_set_random_seed(uint seed); > > > >uint >dr_get_random_seed(void); > > > > > > >void >dr_abort(void); > > ># 281 "../../3pty/dynamorio/include/dr_tools.h" >void >dr_abort_with_code(int exit_code); > > ># 301 "../../3pty/dynamorio/include/dr_tools.h" >void >dr_exit_process(int exit_code); > > >typedef enum { ># 317 "../../3pty/dynamorio/include/dr_tools.h" > DR_MEMORY_DUMP_LDMP = 0x0001, >} dr_memory_dump_flags_t; > > >typedef struct _dr_memory_dump_spec_t { > > size_t size; > > dr_memory_dump_flags_t flags; > > > > > const char *label; > > > > > char *ldmp_path; > > > > > size_t ldmp_path_size; >} dr_memory_dump_spec_t; > > ># 352 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_create_memory_dump(dr_memory_dump_spec_t *spec); > > > > > > >typedef enum { ># 370 "../../3pty/dynamorio/include/dr_tools.h" > DR_ALLOC_NON_HEAP = 0x0001, ># 379 "../../3pty/dynamorio/include/dr_tools.h" > DR_ALLOC_THREAD_PRIVATE = 0x0002, ># 391 "../../3pty/dynamorio/include/dr_tools.h" > DR_ALLOC_CACHE_REACHABLE = 0x0004, ># 400 "../../3pty/dynamorio/include/dr_tools.h" > DR_ALLOC_FIXED_LOCATION = 0x0008, ># 409 "../../3pty/dynamorio/include/dr_tools.h" > DR_ALLOC_LOW_2GB = 0x0010, ># 419 "../../3pty/dynamorio/include/dr_tools.h" > DR_ALLOC_NON_DR = 0x0020, ># 443 "../../3pty/dynamorio/include/dr_tools.h" >} dr_alloc_flags_t; > > > > > > > > > >void * >dr_thread_alloc(void *drcontext, size_t size); > > > > > > >void >dr_thread_free(void *drcontext, void *mem, size_t size); > > > > > > > > >void * >dr_global_alloc(size_t size); > > > > > > >void >dr_global_free(void *mem, size_t size); > > ># 499 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_custom_alloc(void *drcontext, dr_alloc_flags_t flags, size_t size, uint prot, > void *addr); > > > > > > >bool >dr_custom_free(void *drcontext, dr_alloc_flags_t flags, void *addr, size_t size); > > ># 520 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_nonheap_alloc(size_t size, uint prot); > > > > > > >void >dr_nonheap_free(void *mem, size_t size); > > ># 552 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_raw_mem_alloc(size_t size, uint prot, void *addr); > > > > > > > >bool >dr_raw_mem_free(void *addr, size_t size); > > > > > > > > > >void * >dr_raw_mremap(void *old_address, size_t old_size, size_t new_size, int flags, > void *new_address); > > > > > > > > > >void * >dr_raw_brk(void *new_address); > > > ># 600 "../../3pty/dynamorio/include/dr_tools.h" >void * >__wrap_malloc(size_t size); > > ># 612 "../../3pty/dynamorio/include/dr_tools.h" >void * >__wrap_realloc(void *mem, size_t size); > > ># 624 "../../3pty/dynamorio/include/dr_tools.h" >void * >__wrap_calloc(size_t nmemb, size_t size); > > > > > > > > >void >__wrap_free(void *mem); > > ># 647 "../../3pty/dynamorio/include/dr_tools.h" >char * >__wrap_strdup(const char *str); > > > > > > ># 666 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_mutex_create(void); > > > >void >dr_mutex_destroy(void *mutex); > > > >void >dr_mutex_lock(void *mutex); > > > > > > >void >dr_mutex_unlock(void *mutex); > > > >bool >dr_mutex_trylock(void *mutex); > > > > > > > >bool >dr_mutex_self_owns(void *mutex); > > ># 717 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_mutex_mark_as_app(void *mutex); > > > > > > > >void * >dr_rwlock_create(void); > > > >void >dr_rwlock_destroy(void *rwlock); > > > >void >dr_rwlock_read_lock(void *rwlock); > > > >void >dr_rwlock_read_unlock(void *rwlock); > > > >void >dr_rwlock_write_lock(void *rwlock); > > > >void >dr_rwlock_write_unlock(void *rwlock); > > > >bool >dr_rwlock_write_trylock(void *rwlock); > > > >bool >dr_rwlock_self_owns_write_lock(void *rwlock); > > ># 776 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_rwlock_mark_as_app(void *rwlock); > > > > > > > >void * >dr_recurlock_create(void); > > > >void >dr_recurlock_destroy(void *reclock); > > > >void >dr_recurlock_lock(void *reclock); > > ># 815 "../../3pty/dynamorio/include/dr_tools.h" >void >dr_app_recurlock_lock(void *reclock, dr_mcontext_t *mc); > > > >void >dr_recurlock_unlock(void *reclock); > > > >bool >dr_recurlock_trylock(void *reclock); > > > >bool >dr_recurlock_self_owns(void *reclock); > > ># 845 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_recurlock_mark_as_app(void *reclock); > > > >void * >dr_event_create(void); > > > >bool >dr_event_destroy(void *event); > > > >bool >dr_event_wait(void *event); > > > >bool >dr_event_signal(void *event); > > > >bool >dr_event_reset(void *event); > > ># 893 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_mark_safe_to_suspend(void *drcontext, bool enter); > > > > > > >int >dr_atomic_add32_return_sum(volatile int *dest, int val); > > > > > > > > >int64 >dr_atomic_add64_return_sum(volatile int64 *dest, int64 val); > > > > >int >dr_atomic_load32(volatile int *src); > > > >void >dr_atomic_store32(volatile int *dest, int val); > > > > > > > >int64 >dr_atomic_load64(volatile int64 *src); > > > > > > >void >dr_atomic_store64(volatile int64 *dest, int64 val); > > > >typedef enum { > > > > > > DR_MAPEXE_SKIP_WRITABLE = 0x0002, >} dr_map_executable_flags_t; > > ># 964 "../../3pty/dynamorio/include/dr_tools.h" >byte * >dr_map_executable_file(const char *filename, dr_map_executable_flags_t flags, > size_t *size ); > > > > > >bool >dr_unmap_executable_file(byte *base, size_t size); ># 983 "../../3pty/dynamorio/include/dr_tools.h" >typedef struct _dr_syscall_result_info_t { > > size_t size; ># 1008 "../../3pty/dynamorio/include/dr_tools.h" > bool succeeded; > > > > > reg_t value; ># 1024 "../../3pty/dynamorio/include/dr_tools.h" > reg_t high; ># 1033 "../../3pty/dynamorio/include/dr_tools.h" > bool use_high; > > > > > > > bool use_errno; ># 1055 "../../3pty/dynamorio/include/dr_tools.h" > uint errno_value; >} dr_syscall_result_info_t; > > ># 1074 "../../3pty/dynamorio/include/dr_tools.h" >reg_t >dr_syscall_get_param(void *drcontext, int param_num); > > ># 1095 "../../3pty/dynamorio/include/dr_tools.h" >void >dr_syscall_set_param(void *drcontext, int param_num, reg_t new_value); > > ># 1113 "../../3pty/dynamorio/include/dr_tools.h" >reg_t >dr_syscall_get_result(void *drcontext); > > ># 1126 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_syscall_get_result_ex(void *drcontext, dr_syscall_result_info_t *info ); > > ># 1141 "../../3pty/dynamorio/include/dr_tools.h" >void >dr_syscall_set_result(void *drcontext, reg_t value); > > ># 1154 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_syscall_set_result_ex(void *drcontext, dr_syscall_result_info_t *info); > > > > > > > > >void >dr_syscall_set_sysnum(void *drcontext, int new_num); > > ># 1189 "../../3pty/dynamorio/include/dr_tools.h" >void >dr_syscall_invoke_another(void *drcontext); ># 1224 "../../3pty/dynamorio/include/dr_tools.h" > > > > > > >bool >dr_create_dir(const char *fname); > > > > > > >bool >dr_delete_dir(const char *fname); > > > > > > > > >bool >dr_get_current_directory(char *buf, size_t bufsz); > > > > > > >bool >dr_directory_exists(const char *fname); > > > > > > >bool >dr_file_exists(const char *fname); ># 1296 "../../3pty/dynamorio/include/dr_tools.h" > ># 1322 "../../3pty/dynamorio/include/dr_tools.h" >file_t >dr_open_file(const char *fname, uint mode_flags); > > > >void >dr_close_file(file_t f); > > > > > > > > >bool >dr_rename_file(const char *src, const char *dst, bool replace); > > ># 1350 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_delete_file(const char *filename); > > > >void >dr_flush_file(file_t f); > > > > > > >ssize_t >dr_write_file(file_t f, const void *buf, size_t count); > > > > > > >ssize_t >dr_read_file(file_t f, void *buf, size_t count); ># 1382 "../../3pty/dynamorio/include/dr_tools.h" > > > > > > >bool >dr_file_seek(file_t f, int64 offset, int origin); > > > > > > >int64 >dr_file_tell(file_t f); > > > > > > >file_t >dr_dup_file_handle(file_t f); > > > > > > > >bool >dr_file_size(file_t fd, uint64 *size); > > >enum { > > > > > > > DR_MAP_PRIVATE = 0x0001, > > > > > > > > DR_MAP_FIXED = 0x0002, ># 1446 "../../3pty/dynamorio/include/dr_tools.h" > DR_MAP_CACHE_REACHABLE = 0x0008, >}; > > ># 1468 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_map_file(file_t f, size_t *size, uint64 offs, app_pc addr, uint prot, > uint flags); > > ># 1484 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_unmap_file(void *map, size_t size); ># 1496 "../../3pty/dynamorio/include/dr_tools.h" > > > > > > > > >void >dr_log(void *drcontext, uint mask, uint level, const char *fmt, ...); ># 1574 "../../3pty/dynamorio/include/dr_tools.h" > > > > > >file_t >dr_get_logfile(void *drcontext); > > > > > > >bool >dr_is_notify_on(void); > > > >file_t >dr_get_stdout_file(void); > > > >file_t >dr_get_stderr_file(void); > > > >file_t >dr_get_stdin_file(void); ># 1634 "../../3pty/dynamorio/include/dr_tools.h" > ># 1658 "../../3pty/dynamorio/include/dr_tools.h" >void >dr_printf(const char *fmt, ...); > > ># 1689 "../../3pty/dynamorio/include/dr_tools.h" >ssize_t >dr_fprintf(file_t f, const char *fmt, ...); > > > > > >ssize_t >dr_vfprintf(file_t f, const char *fmt, va_list ap); ># 1757 "../../3pty/dynamorio/include/dr_tools.h" > ># 1776 "../../3pty/dynamorio/include/dr_tools.h" >int >dr_snprintf(char *buf, size_t max, const char *fmt, ...); > > ># 1788 "../../3pty/dynamorio/include/dr_tools.h" >int >dr_snwprintf(wchar_t *buf, size_t max, const wchar_t *fmt, ...); > > > > > >int >dr_vsnprintf(char *buf, size_t max, const char *fmt, va_list ap); > > > > > >int >dr_vsnwprintf(wchar_t *buf, size_t max, const wchar_t *fmt, va_list ap); > > ># 1849 "../../3pty/dynamorio/include/dr_tools.h" >int >dr_sscanf(const char *str, const char *fmt, ...); > > ># 1873 "../../3pty/dynamorio/include/dr_tools.h" >const char * >dr_get_token(const char *str, char *buf, size_t buflen); > > > >void >dr_print_instr(void *drcontext, file_t f, instr_t *instr, const char *msg); > > > >void >dr_print_opnd(void *drcontext, file_t f, opnd_t opnd, const char *msg); > > > > > > > > > >void * >dr_get_current_drcontext(void); > > > >thread_id_t >dr_get_thread_id(void *drcontext); ># 1918 "../../3pty/dynamorio/include/dr_tools.h" > > > > > > >void * >dr_get_tls_field(void *drcontext); > > > > > > > >void >dr_set_tls_field(void *drcontext, void *value); > > ># 1946 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_get_dr_segment_base( reg_id_t tls_register); > > ># 1980 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_raw_tls_calloc( reg_id_t *tls_register, uint *offset, uint num_slots, > uint alignment); > > > > > > > >bool >dr_raw_tls_cfree(uint offset, uint num_slots); > > > > > > >opnd_t >dr_raw_tls_opnd(void *drcontext, reg_id_t tls_register, uint tls_offs); > > > > > > > >void >dr_insert_read_raw_tls(void *drcontext, instrlist_t *ilist, instr_t *where, > reg_id_t tls_register, uint tls_offs, reg_id_t reg); > > > > > > > >void >dr_insert_write_raw_tls(void *drcontext, instrlist_t *ilist, instr_t *where, > reg_id_t tls_register, uint tls_offs, reg_id_t reg); ># 2034 "../../3pty/dynamorio/include/dr_tools.h" > ># 2079 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_create_client_thread(void (*func)(void *param), void *arg); > > ># 2097 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_client_thread_set_suspendable(bool suspendable); > > > >void >dr_sleep(int time_ms); > > > >void >dr_thread_yield(void); > > >typedef enum { > > > > > > > DR_SUSPEND_NATIVE = 0x0001, >} dr_suspend_flags_t; > > > > ># 2160 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_suspend_all_other_threads_ex( void ***drcontexts, uint *num_suspended, > uint *num_unsuspended, dr_suspend_flags_t flags); > > > >bool >dr_suspend_all_other_threads( void ***drcontexts, uint *num_suspended, > uint *num_unsuspended); > > ># 2180 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_resume_all_other_threads( void **drcontexts, uint num_suspended); > > > > > > > >bool >dr_is_thread_native(void *drcontext); > > > > > > > > > >bool >dr_retakeover_suspended_native_thread(void *drcontext); > > > > > > > > ># 2250 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_set_itimer(int which, uint millisec, > void (*func)(void *drcontext, dr_mcontext_t *mcontext)); > > ># 2263 "../../3pty/dynamorio/include/dr_tools.h" >uint >dr_get_itimer(int which); > > > > > > > > > >void >dr_track_where_am_i(void); > > > > > > >bool >dr_is_tracking_where_am_i(void); > > ># 2294 "../../3pty/dynamorio/include/dr_tools.h" >dr_where_am_i_t >dr_where_am_i(void *drcontext, app_pc pc, void **tag); ># 2308 "../../3pty/dynamorio/include/dr_tools.h" > ># 2329 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_replace_fragment(void *drcontext, void *tag, instrlist_t *ilist); > > ># 2353 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_delete_fragment(void *drcontext, void *tag); > > > > ># 2396 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_flush_region_ex(app_pc start, size_t size, > void (*flush_completion_callback)(void *user_data), void *user_data); > > > >bool >dr_flush_region(app_pc start, size_t size); ># 2414 "../../3pty/dynamorio/include/dr_tools.h" > ># 2437 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_unlink_flush_region(app_pc start, size_t size); > > > > > > > ># 2463 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_delay_flush_region(app_pc start, size_t size, uint flush_id, > void (*flush_completion_callback)(int flush_id)); > > > >bool >dr_fragment_exists_at(void *drcontext, void *tag); > > > > > >bool >dr_bb_exists_at(void *drcontext, void *tag); > > > > > > > >uint >dr_fragment_size(void *drcontext, void *tag); > > > >app_pc >dr_fragment_app_pc(void *tag); > > ># 2509 "../../3pty/dynamorio/include/dr_tools.h" >app_pc >dr_app_pc_for_decoding(app_pc pc); > > > > > > > > > >app_pc >dr_app_pc_from_cache_pc(byte *cache_pc); > > ># 2534 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_prepopulate_cache(app_pc *tags, size_t tags_count); > > > > >typedef enum { > DR_INDIRECT_RETURN, > DR_INDIRECT_CALL, > DR_INDIRECT_JUMP, >} dr_indirect_branch_type_t; > > ># 2561 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_prepopulate_indirect_targets(dr_indirect_branch_type_t branch_type, app_pc *tags, > size_t tags_count); > > > > > > > > > >bool >dr_get_stats(dr_stats_t *drstats); > > > > > > ># 2607 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_mark_trace_head(void *drcontext, void *tag); > > > > > > >bool >dr_trace_head_at(void *drcontext, void *tag); > > > >bool >dr_trace_exists_at(void *drcontext, void *tag); > > > > > > ># 2645 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_hashtable_create(void *drcontext, uint bits, uint load_factor_percent, bool synch, > void (*free_payload_func)(void * , void *)); > > > > > > > > >void >dr_hashtable_destroy(void *drcontext, void *htable); > > > > > > > > >void >dr_hashtable_clear(void *drcontext, void *htable); > > ># 2680 "../../3pty/dynamorio/include/dr_tools.h" >void * >dr_hashtable_lookup(void *drcontext, void *htable, ptr_uint_t key); > > ># 2692 "../../3pty/dynamorio/include/dr_tools.h" >void >dr_hashtable_add(void *drcontext, void *htable, ptr_uint_t key, void *payload); > > ># 2705 "../../3pty/dynamorio/include/dr_tools.h" >bool >dr_hashtable_remove(void *drcontext, void *htable, ptr_uint_t key); ># 69 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_proc.h" 1 ># 74 "../../3pty/dynamorio/include/dr_proc.h" >enum { > VENDOR_INTEL, > VENDOR_AMD, > VENDOR_ARM, > VENDOR_UNKNOWN, >}; ># 160 "../../3pty/dynamorio/include/dr_proc.h" >typedef struct { > uint flags_edx; > uint flags_ecx; > uint ext_flags_edx; > uint ext_flags_ecx; > uint sext_flags_ebx; >} features_t; ># 209 "../../3pty/dynamorio/include/dr_proc.h" >typedef enum { > > FEATURE_FPU = 0, > FEATURE_VME = 1, > FEATURE_DE = 2, > FEATURE_PSE = 3, > FEATURE_TSC = 4, > FEATURE_MSR = 5, > FEATURE_PAE = 6, > FEATURE_MCE = 7, > FEATURE_CX8 = 8, > FEATURE_APIC = 9, > FEATURE_SEP = 11, > FEATURE_MTRR = 12, > FEATURE_PGE = 13, > FEATURE_MCA = 14, > FEATURE_CMOV = 15, > FEATURE_PAT = 16, > FEATURE_PSE_36 = 17, > FEATURE_PSN = 18, > FEATURE_CLFSH = 19, > FEATURE_DS = 21, > FEATURE_ACPI = 22, > FEATURE_MMX = 23, > FEATURE_FXSR = 24, > FEATURE_SSE = 25, > FEATURE_SSE2 = 26, > FEATURE_SS = 27, > FEATURE_HTT = 28, > FEATURE_TM = 29, > FEATURE_IA64 = 30, > FEATURE_PBE = 31, > > FEATURE_SSE3 = 0 + 32, > FEATURE_PCLMULQDQ = 1 + 32, > FEATURE_DTES64 = 2 + 32, > FEATURE_MONITOR = 3 + 32, > FEATURE_DS_CPL = 4 + 32, > FEATURE_VMX = 5 + 32, > FEATURE_SMX = 6 + 32, > FEATURE_EST = 7 + 32, > FEATURE_TM2 = 8 + 32, > FEATURE_SSSE3 = 9 + 32, > FEATURE_CID = 10 + 32, > FEATURE_FMA = 12 + 32, > FEATURE_CX16 = 13 + 32, > FEATURE_xTPR = 14 + 32, > FEATURE_PDCM = 15 + 32, > FEATURE_PCID = 17 + 32, > FEATURE_DCA = 18 + 32, > FEATURE_SSE41 = 19 + 32, > FEATURE_SSE42 = 20 + 32, > FEATURE_x2APIC = 21 + 32, > FEATURE_MOVBE = 22 + 32, > FEATURE_POPCNT = 23 + 32, > FEATURE_AES = 25 + 32, > FEATURE_XSAVE = 26 + 32, > FEATURE_OSXSAVE = 27 + 32, > FEATURE_AVX = 28 + 32, > FEATURE_F16C = 29 + 32, > FEATURE_RDRAND = 30 + 32, > > FEATURE_SYSCALL = 11 + 64, > FEATURE_XD_Bit = 20 + 64, > FEATURE_MMX_EXT = 22 + 64, > FEATURE_PDPE1GB = 26 + 64, > FEATURE_RDTSCP = 27 + 64, > FEATURE_EM64T = 29 + 64, > FEATURE_3DNOW_EXT = 30 + 64, > FEATURE_3DNOW = 31 + 64, > > FEATURE_LAHF = 0 + 96, > FEATURE_SVM = 2 + 96, > FEATURE_LZCNT = 5 + 96, > FEATURE_SSE4A = 6 + 96, > FEATURE_PRFCHW = 8 + 96, > FEATURE_XOP = 11 + 96, > FEATURE_SKINIT = 12 + 96, > FEATURE_FMA4 = 16 + 96, > FEATURE_TBM = 21 + 96, > > FEATURE_FSGSBASE = 0 + 128, > FEATURE_BMI1 = 3 + 128, > FEATURE_HLE = 4 + 128, > FEATURE_AVX2 = 5 + 128, > FEATURE_BMI2 = 8 + 128, > FEATURE_ERMSB = 9 + 128, > FEATURE_INVPCID = 10 + 128, > FEATURE_RTM = 11 + 128, > FEATURE_AVX512F = 16 + 128, > FEATURE_AVX512BW = 30 + 128, >} feature_bit_t; ># 370 "../../3pty/dynamorio/include/dr_proc.h" >typedef enum { > CACHE_SIZE_8_KB, > CACHE_SIZE_16_KB, > CACHE_SIZE_32_KB, > CACHE_SIZE_64_KB, > CACHE_SIZE_128_KB, > CACHE_SIZE_256_KB, > CACHE_SIZE_512_KB, > CACHE_SIZE_1_MB, > CACHE_SIZE_2_MB, > CACHE_SIZE_UNKNOWN >} cache_size_t; > > > >size_t >proc_get_cache_line_size(void); > > > >bool >proc_is_cache_aligned(void *addr); > > > >ptr_uint_t >proc_bump_to_end_of_cache_line(ptr_uint_t sz); > > > >void * >proc_get_containing_page(void *addr); > > > >uint >proc_get_vendor(void); > > ># 417 "../../3pty/dynamorio/include/dr_proc.h" >int >proc_set_vendor(uint new_vendor); > > > > > > > >uint >proc_get_family(void); > > > >uint >proc_get_type(void); > > > > > > > >uint >proc_get_model(void); > > > >uint >proc_get_stepping(void); > > > >bool >proc_has_feature(feature_bit_t feature); > > > > > > > >features_t * >proc_get_all_feature_bits(void); > > > >char * >proc_get_brand_string(void); > > > >cache_size_t >proc_get_L1_icache_size(void); > > > >cache_size_t >proc_get_L1_dcache_size(void); > > > >cache_size_t >proc_get_L2_cache_size(void); > > > >const char * >proc_get_cache_size_str(cache_size_t size); > > > > > >size_t >proc_fpstate_save_size(void); > > ># 521 "../../3pty/dynamorio/include/dr_proc.h" >int >proc_num_simd_saved(void); > > > > > > > > >int >proc_num_simd_registers(void); > > > > > > > >int >proc_num_opmask_registers(void); > > ># 571 "../../3pty/dynamorio/include/dr_proc.h" >size_t >proc_save_fpstate(byte *buf); > > ># 589 "../../3pty/dynamorio/include/dr_proc.h" >void >proc_restore_fpstate(byte *buf); > > > > > > > >bool >proc_avx_enabled(void); > > > > > > > >bool >proc_avx512_enabled(void); ># 72 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_encode.h" 1 ># 46 "../../3pty/dynamorio/include/dr_ir_encode.h" >typedef enum _dr_isa_mode_t { > DR_ISA_IA32, > DR_ISA_X86 = DR_ISA_IA32, > DR_ISA_AMD64, > DR_ISA_ARM_A32, > DR_ISA_ARM_THUMB, > DR_ISA_ARM_A64, > DR_ISA_RV64IMAFDC, >} dr_isa_mode_t; > > > > > > > > > >bool >dr_set_isa_mode(void *drcontext, dr_isa_mode_t new_mode, dr_isa_mode_t *old_mode ); > > > > > > > >dr_isa_mode_t >dr_get_isa_mode(void *drcontext); > >enum { > > MAX_INSTR_LENGTH = 17, > MAX_SRC_OPNDS = 8, > MAX_DST_OPNDS = 8, ># 101 "../../3pty/dynamorio/include/dr_ir_encode.h" >}; > > ># 112 "../../3pty/dynamorio/include/dr_ir_encode.h" >bool >instr_is_encoding_possible(instr_t *instr); > > ># 130 "../../3pty/dynamorio/include/dr_ir_encode.h" >byte * >instr_encode(void *drcontext, instr_t *instr, byte *pc); > > ># 152 "../../3pty/dynamorio/include/dr_ir_encode.h" >byte * >instr_encode_to_copy(void *drcontext, instr_t *instr, byte *copy_pc, byte *final_pc); > > ># 169 "../../3pty/dynamorio/include/dr_ir_encode.h" >byte * >instrlist_encode(void *drcontext, instrlist_t *ilist, byte *pc, > bool has_instr_jmp_targets); > > ># 199 "../../3pty/dynamorio/include/dr_ir_encode.h" >byte * >instrlist_encode_to_copy(void *drcontext, instrlist_t *ilist, byte *copy_pc, > byte *final_pc, byte *max_pc, bool has_instr_jmp_targets); ># 75 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_instr.h" 1 ># 86 "../../3pty/dynamorio/include/dr_ir_instr.h" >typedef enum _dr_pred_type_t { > DR_PRED_NONE, > > DR_PRED_O, > DR_PRED_NO, > DR_PRED_B, > DR_PRED_NB, > DR_PRED_Z, > DR_PRED_NZ, > DR_PRED_BE, > DR_PRED_NBE, > DR_PRED_S, > DR_PRED_NS, > DR_PRED_P, > DR_PRED_NP, > DR_PRED_L, > DR_PRED_NL, > DR_PRED_LE, > DR_PRED_NLE, > > > > > > > > DR_PRED_COMPLEX, > > DR_PRED_EQ = DR_PRED_Z, > DR_PRED_NE = DR_PRED_NZ, > DR_PRED_LT = DR_PRED_L, > > DR_PRED_GT = DR_PRED_NLE, > DR_PRED_GE = DR_PRED_NL, ># 160 "../../3pty/dynamorio/include/dr_ir_instr.h" >} dr_pred_type_t; > > > > > > >typedef enum _dr_encoding_hint_type_t { > DR_ENCODING_HINT_NONE = 0x0, > > DR_ENCODING_HINT_X86_EVEX = 0x1, > >} dr_encoding_hint_type_t; > > > > > > >typedef struct _dr_instr_label_data_t { > ptr_uint_t data[4]; >} dr_instr_label_data_t; > > > > > > >typedef void (*instr_label_callback_t)(void *drcontext, instr_t *instr); ># 198 "../../3pty/dynamorio/include/dr_ir_instr.h" >typedef enum _dr_opnd_query_flags_t { ># 209 "../../3pty/dynamorio/include/dr_ir_instr.h" > DR_QUERY_INCLUDE_COND_DSTS = 0x01, ># 220 "../../3pty/dynamorio/include/dr_ir_instr.h" > DR_QUERY_INCLUDE_COND_SRCS = 0x02, > > DR_QUERY_DEFAULT = DR_QUERY_INCLUDE_COND_SRCS, > > DR_QUERY_INCLUDE_ALL = (DR_QUERY_INCLUDE_COND_DSTS | DR_QUERY_INCLUDE_COND_SRCS), >} dr_opnd_query_flags_t; ># 334 "../../3pty/dynamorio/include/dr_ir_instr.h" >typedef struct instr_noalloc_t { > instr_t instr; > opnd_t srcs[MAX_SRC_OPNDS - 1]; > opnd_t dsts[MAX_DST_OPNDS]; > byte encode_buf[MAX_INSTR_LENGTH]; >} instr_noalloc_t; > > ># 352 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_create(void *drcontext); > > > > > > > > >void >instr_init(void *drcontext, instr_t *instr); > > > > > > >void >instr_noalloc_init(void *drcontext, instr_noalloc_t *instr); > > > > > > > > >instr_t * >instr_from_noalloc(instr_noalloc_t *noalloc); > > > > > > > > > >void >instr_free(void *drcontext, instr_t *instr); > > > > > > >void >instr_reset(void *drcontext, instr_t *instr); > > > > > > > > > >void >instr_reuse(void *drcontext, instr_t *instr); > > > > > > >void >instr_destroy(void *drcontext, instr_t *instr); > > > > > > > > > > >instr_t * >instr_get_next(instr_t *instr); > > > ># 449 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_get_next_app(instr_t *instr); > > > > >instr_t * >instr_get_prev(instr_t *instr); > > > ># 474 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_get_prev_app(instr_t *instr); > > > > >void >instr_set_next(instr_t *instr, instr_t *next); > > > > >void >instr_set_prev(instr_t *instr, instr_t *prev); > > > > > > > > > > >void * >instr_get_note(instr_t *instr); > > > > >void >instr_set_note(instr_t *instr, void *value); > > > >app_pc >instr_get_branch_target_pc(instr_t *cti_instr); > > > >void >instr_set_branch_target_pc(instr_t *cti_instr, app_pc pc); > > ># 527 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_is_exit_cti(instr_t *instr); > > > >bool >instr_is_interrupt(instr_t *instr); > > > > > > > >bool >instr_is_app(instr_t *instr); > > ># 553 "../../3pty/dynamorio/include/dr_ir_instr.h" >void >instr_set_app(instr_t *instr); > > > > > > > >bool >instr_is_meta(instr_t *instr); > > ># 575 "../../3pty/dynamorio/include/dr_ir_instr.h" >void >instr_set_meta(instr_t *instr); > > > > > > > > > >bool >instr_ok_to_mangle(instr_t *instr); > > > > > > > > >void >instr_set_ok_to_mangle(instr_t *instr, bool val); > > > > > > > >void >instr_set_meta_no_translation(instr_t *instr); > > > > > >bool >instr_ok_to_emit(instr_t *instr); > > > > > > > > >void >instr_set_ok_to_emit(instr_t *instr, bool val); > > > > > > > > > >int >instr_length(void *drcontext, instr_t *instr); > > > >int >instr_mem_usage(instr_t *instr); > > > > > > > > >instr_t * >instr_clone(void *drcontext, instr_t *orig); > > ># 660 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_build(void *drcontext, int opcode, int num_dsts, int num_srcs); > > ># 672 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_build_bits(void *drcontext, int opcode, uint num_bytes); > > ># 684 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_valid(instr_t *instr); > > > >app_pc >instr_get_app_pc(instr_t *instr); > > > >int >instr_get_opcode(instr_t *instr); > > > >void >instr_set_opcode(instr_t *instr, int opcode); > > > > > > > > > > >int >instr_num_srcs(instr_t *instr); > > > > > > >int >instr_num_dsts(instr_t *instr); > > > > > > > >void >instr_set_num_opnds(void *drcontext, instr_t *instr, int num_dsts, int num_srcs); > > > > > >opnd_t >instr_get_src(instr_t *instr, uint pos); > > > > > >opnd_t >instr_get_dst(instr_t *instr, uint pos); > > > > > > > >void >instr_set_src(instr_t *instr, uint pos, opnd_t opnd); > > > > > > > >void >instr_set_dst(instr_t *instr, uint pos, opnd_t opnd); > > > > > > > > > >void >instr_remove_srcs(void *drcontext, instr_t *instr, uint start, uint end); > > > > > > > > > >void >instr_remove_dsts(void *drcontext, instr_t *instr, uint start, uint end); > > > > > > >opnd_t >instr_get_target(instr_t *cti_instr); > > > > > > > > >void >instr_set_target(instr_t *cti_instr, opnd_t target); > > > > >bool >instr_operands_valid(instr_t *instr); > > > >void >instr_set_operands_valid(instr_t *instr, bool valid); > > > > > > > > >bool >instr_opcode_valid(instr_t *instr); > > > > > > > > >uint >instr_get_eflags(instr_t *instr, dr_opnd_query_flags_t flags); > > ># 843 "../../3pty/dynamorio/include/dr_ir_instr.h" >uint >instr_get_opcode_eflags(int opcode); > > ># 856 "../../3pty/dynamorio/include/dr_ir_instr.h" >uint >instr_get_arith_flags(instr_t *instr, dr_opnd_query_flags_t flags); > > > > > > > >void >instr_set_raw_bits(instr_t *instr, byte *addr, uint length); > > > >void >instr_set_raw_bits_valid(instr_t *instr, bool valid); > > > > >bool >instr_raw_bits_valid(instr_t *instr); > > > > >bool >instr_has_allocated_bits(instr_t *instr); > > > > >bool >instr_needs_encoding(instr_t *instr); > > ># 900 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_is_meta_may_fault(instr_t *instr); > > > > > > > >void >instr_set_meta_may_fault(instr_t *instr, bool val); > > > > > > > > >void >instr_allocate_raw_bits(void *drcontext, instr_t *instr, uint num_bytes); > > ># 935 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_set_translation(instr_t *instr, app_pc addr); > > ># 948 "../../3pty/dynamorio/include/dr_ir_instr.h" >void >instr_make_persistent(void *drcontext, instr_t *instr); > > ># 962 "../../3pty/dynamorio/include/dr_ir_instr.h" >byte * >instr_get_raw_bits(instr_t *instr); > > > >void >instr_free_raw_bits(void *drcontext, instr_t *instr); > > > > > > >byte >instr_get_raw_byte(instr_t *instr, uint pos); > > > > > > > >void >instr_set_raw_byte(instr_t *instr, uint pos, byte byte); > > > > > > > >void >instr_set_raw_bytes(instr_t *instr, byte *start, uint num_bytes); > > > > > > > >void >instr_set_raw_word(instr_t *instr, uint pos, uint word); > > > > > > >uint >instr_get_raw_word(instr_t *instr, uint pos); > > > > > > > >instr_t * >instr_set_prefix_flag(instr_t *instr, uint prefix); > > > > > > >bool >instr_get_prefix_flag(instr_t *instr, uint prefix); > > > > > > >void >instr_set_prefixes(instr_t *instr, uint prefixes); > > > > > >uint >instr_get_prefixes(instr_t *instr); > > > > > > >bool >instr_is_predicated(instr_t *instr); > > > > > > >dr_pred_type_t >instr_get_predicate(instr_t *instr); ># 1130 "../../3pty/dynamorio/include/dr_ir_instr.h" > > > > > >bool >instr_is_exclusive_load(instr_t *instr); > > > > > > >bool >instr_is_exclusive_store(instr_t *instr); > > > > > >bool >instr_is_scatter(instr_t *instr); > > > > > >bool >instr_is_gather(instr_t *instr); > > > > > > > > >bool >instr_predicate_is_cond(dr_pred_type_t pred); > > > > > > >instr_t * >instr_set_predicate(instr_t *instr, dr_pred_type_t pred); > > >typedef enum _dr_pred_trigger_t { > > DR_PRED_TRIGGER_NOPRED, > > DR_PRED_TRIGGER_MATCH, > > DR_PRED_TRIGGER_MISMATCH, > > DR_PRED_TRIGGER_UNKNOWN, > > DR_PRED_TRIGGER_INVALID, >} dr_pred_trigger_t; > > ># 1205 "../../3pty/dynamorio/include/dr_ir_instr.h" >dr_pred_trigger_t >instr_predicate_triggered(instr_t *instr, dr_mcontext_t *mc); > > > ># 1218 "../../3pty/dynamorio/include/dr_ir_instr.h" >void >instr_set_x86_mode(instr_t *instr, bool x86); > > ># 1230 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_get_x86_mode(instr_t *instr); > > > > > > > >bool >instr_set_isa_mode(instr_t *instr, dr_isa_mode_t mode); > > > > > > >dr_isa_mode_t >instr_get_isa_mode(instr_t *instr); > > > > > > > > >instr_t * >instr_set_encoding_hint(instr_t *instr, dr_encoding_hint_type_t hint); > > > > > > > > >bool >instr_has_encoding_hint(instr_t *instr, dr_encoding_hint_type_t hint); > > > > > > > > > > > >void >instr_shrink_to_16_bits(instr_t *instr); > > > > > > > > > >void >instr_shrink_to_32_bits(instr_t *instr); > > > > > > > > > > >bool >instr_uses_reg(instr_t *instr, reg_id_t reg); > > > > > > >bool >instr_uses_fp_reg(instr_t *instr); > > ># 1324 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_reg_in_src(instr_t *instr, reg_id_t reg); > > > > > > >bool >instr_reg_in_dst(instr_t *instr, reg_id_t reg); > > > > > > > > > >bool >instr_writes_to_reg(instr_t *instr, reg_id_t reg, dr_opnd_query_flags_t flags); > > ># 1361 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_reads_from_reg(instr_t *instr, reg_id_t reg, dr_opnd_query_flags_t flags); > > > > > > > > > >bool >instr_writes_to_exact_reg(instr_t *instr, reg_id_t reg, dr_opnd_query_flags_t flags); > > ># 1390 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_reads_from_exact_reg(instr_t *instr, reg_id_t reg, dr_opnd_query_flags_t flags); > > > > > > > >bool >instr_replace_src_opnd(instr_t *instr, opnd_t old_opnd, opnd_t new_opnd); > > > > > > > >bool >instr_replace_reg_resize(instr_t *instr, reg_id_t old_reg, reg_id_t new_reg); > > > > > > >bool >instr_same(instr_t *instr1, instr_t *instr2); > > ># 1432 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_reads_memory(instr_t *instr); > > > > > > > >bool >instr_writes_memory(instr_t *instr); > > > > > > > > > >bool >instr_zeroes_ymmh(instr_t *instr); > > > > > > > > >bool >instr_zeroes_zmmh(instr_t *instr); > > > > > >bool >instr_is_xsave(instr_t *instr); > > > ># 1482 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_get_rel_data_or_instr_target(instr_t *instr, app_pc *target); > > > > > > > > >bool >instr_has_rel_addr_reference(instr_t *instr); > > > > > > > > >bool >instr_get_rel_addr_target(instr_t *instr, app_pc *target); > > > > > > > > > >int >instr_get_rel_addr_dst_idx(instr_t *instr); > > > > > > > > > >int >instr_get_rel_addr_src_idx(instr_t *instr); > > > ># 1542 "../../3pty/dynamorio/include/dr_ir_instr.h" >app_pc >instr_compute_address(instr_t *instr, dr_mcontext_t *mc); > > ># 1564 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_compute_address_ex(instr_t *instr, dr_mcontext_t *mc, uint index, app_pc *addr, > bool *write); > > ># 1580 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_compute_address_ex_pos(instr_t *instr, dr_mcontext_t *mc, uint index, > app_pc *addr, bool *is_write, uint *pos); > > > > > > > > > >uint >instr_memory_reference_size(instr_t *instr); > > > > > > > > >dr_instr_label_data_t * >instr_get_label_data_area(instr_t *instr); > > > > > > > > > >void >instr_set_label_callback(instr_t *instr, instr_label_callback_t func); > > > >void >instr_clear_label_callback(instr_t *instr); > > > > > > >bool >instr_is_mov(instr_t *instr); > > > > > > >bool >instr_is_call(instr_t *instr); > > > >bool >instr_is_call_direct(instr_t *instr); > > > >bool >instr_is_near_call_direct(instr_t *instr); > > > > > > >bool >instr_is_call_indirect(instr_t *instr); > > > > > > >bool >instr_is_return(instr_t *instr); > > > > > > >bool >instr_is_cti(instr_t *instr); > > ># 1682 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_is_cti_short(instr_t *instr); > > > >bool >instr_is_cti_loop(instr_t *instr); > > ># 1706 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_is_cti_short_rewrite(instr_t *instr, byte *pc); > > > > > > > >bool >instr_is_cbr(instr_t *instr); > > > > > > > > >bool >instr_is_mbr(instr_t *instr); > >bool >instr_is_jump_mem(instr_t *instr); > > > > > > >bool >instr_is_ubr(instr_t *instr); > > > > > > >bool >instr_is_near_ubr(instr_t *instr); > > > > > > >bool >instr_is_far_cti(instr_t *instr); > > > >bool >instr_is_far_abs_cti(instr_t *instr); > > > > > > > >bool >instr_is_syscall(instr_t *instr); ># 1784 "../../3pty/dynamorio/include/dr_ir_instr.h" > > > > >bool >instr_is_prefetch(instr_t *instr); > > ># 1800 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_is_mov_constant(instr_t *instr, ptr_int_t *value); > > > >bool >instr_is_floating(instr_t *instr); > > > >bool >instr_is_string_op(instr_t *instr); > > > >bool >instr_is_rep_string_op(instr_t *instr); > > > > >typedef enum { > DR_FP_STATE, > DR_FP_MOVE, > DR_FP_CONVERT, > DR_FP_MATH, >} dr_fp_type_t; > > > > > > > > >bool >instr_is_floating_ex(instr_t *instr, dr_fp_type_t *type); > > > >bool >instr_is_mmx(instr_t *instr); > > > >bool >instr_is_opmask(instr_t *instr); > > > >bool >instr_is_sse(instr_t *instr); > > > >bool >instr_is_sse2(instr_t *instr); > > > > > > >bool >instr_is_sse_or_sse2(instr_t *instr); > > > >bool >instr_is_3DNow(instr_t *instr); > > > >bool >instr_is_sse3(instr_t *instr); > > > >bool >instr_is_ssse3(instr_t *instr); > > > >bool >instr_is_sse41(instr_t *instr); > > > >bool >instr_is_sse42(instr_t *instr); > > > >bool >instr_is_sse4A(instr_t *instr); > > > >bool >instr_is_mov_imm_to_tos(instr_t *instr); > > > >bool >instr_is_label(instr_t *instr); > > > >bool >instr_is_undefined(instr_t *instr); > > > > > > > > >int >instr_get_interrupt_number(instr_t *instr); > > > > > > > > >void >instr_invert_cbr(instr_t *instr); > > > ># 1945 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_convert_short_meta_jmp_to_long(void *drcontext, instrlist_t *ilist, instr_t *instr); > > > > > > >bool >instr_jcc_taken(instr_t *instr, reg_t eflags); > > > > > > >int >instr_cmovcc_to_jcc(int cmovcc_opcode); > > > > > > > >bool >instr_cmovcc_triggered(instr_t *instr, reg_t eflags); > > ># 1983 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_is_nop(instr_t *instr); > > > > > > >instr_t * >instr_create_0dst_0src(void *drcontext, int opcode); > > > > > > >instr_t * >instr_create_0dst_1src(void *drcontext, int opcode, opnd_t src); > > > > > > >instr_t * >instr_create_0dst_2src(void *drcontext, int opcode, opnd_t src1, opnd_t src2); > > > > > > > >instr_t * >instr_create_0dst_3src(void *drcontext, int opcode, opnd_t src1, opnd_t src2, > opnd_t src3); > > > > > > > >instr_t * >instr_create_0dst_4src(void *drcontext, int opcode, opnd_t src1, opnd_t src2, opnd_t src3, > opnd_t src4); > > > > > > >instr_t * >instr_create_1dst_0src(void *drcontext, int opcode, opnd_t dst); > > > > > > > >instr_t * >instr_create_1dst_1src(void *drcontext, int opcode, opnd_t dst, opnd_t src); > > > > > > > >instr_t * >instr_create_1dst_2src(void *drcontext, int opcode, opnd_t dst, opnd_t src1, opnd_t src2); > > > > > > > >instr_t * >instr_create_1dst_3src(void *drcontext, int opcode, opnd_t dst, opnd_t src1, opnd_t src2, > opnd_t src3); > > > > > > > >instr_t * >instr_create_1dst_4src(void *drcontext, int opcode, opnd_t dst, opnd_t src1, opnd_t src2, > opnd_t src3, opnd_t src4); > > > > > > > >instr_t * >instr_create_1dst_5src(void *drcontext, int opcode, opnd_t dst, opnd_t src1, opnd_t src2, > opnd_t src3, opnd_t src4, opnd_t src5); > > > > > > > >instr_t * >instr_create_2dst_0src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2); > > > > > > > >instr_t * >instr_create_2dst_1src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t src); > > > > > > > >instr_t * >instr_create_2dst_2src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t src1, > opnd_t src2); > > > > > > > >instr_t * >instr_create_2dst_3src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t src1, > opnd_t src2, opnd_t src3); > > > > > > > >instr_t * >instr_create_2dst_4src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t src1, > opnd_t src2, opnd_t src3, opnd_t src4); > > > > > > > >instr_t * >instr_create_2dst_5src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t src1, > opnd_t src2, opnd_t src3, opnd_t src4, opnd_t src5); > > > > > > > >instr_t * >instr_create_3dst_0src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, > opnd_t dst3); > > > > > > > > >instr_t * >instr_create_3dst_1src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t src1); > > > > > > > > >instr_t * >instr_create_3dst_2src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t src1, opnd_t src2); > > > > > > > > >instr_t * >instr_create_3dst_3src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t src1, opnd_t src2, opnd_t src3); > > > > > > > > >instr_t * >instr_create_3dst_4src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t src1, opnd_t src2, opnd_t src3, opnd_t src4); > > > > > > > > >instr_t * >instr_create_3dst_5src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t src1, opnd_t src2, opnd_t src3, opnd_t src4, opnd_t src5); > > > > > > > > >instr_t * >instr_create_3dst_6src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t src1, opnd_t src2, opnd_t src3, opnd_t src4, opnd_t src5, > opnd_t src6); > > > > > > > >instr_t * >instr_create_4dst_1src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t src); > > > > > > > >instr_t * >instr_create_4dst_2src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t src1, opnd_t src2); > > > > > > > > >instr_t * >instr_create_4dst_3src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t src1, opnd_t src2, opnd_t src3); > > > > > > > > >instr_t * >instr_create_4dst_4src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t src1, opnd_t src2, opnd_t src3, opnd_t src4); > > > > > > > > >instr_t * >instr_create_4dst_5src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t src1, opnd_t src2, opnd_t src3, opnd_t src4, > opnd_t src5); > > > > > > > > >instr_t * >instr_create_4dst_6src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t src1, opnd_t src2, opnd_t src3, opnd_t src4, > opnd_t src5, opnd_t src6); > > > > > > > > >instr_t * >instr_create_4dst_7src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t src1, opnd_t src2, opnd_t src3, opnd_t src4, > opnd_t src5, opnd_t src6, opnd_t src7); > > > > > > > > >instr_t * >instr_create_5dst_3src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t dst5, opnd_t src1, opnd_t src2, opnd_t src3); > > > > > > > > >instr_t * >instr_create_5dst_4src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t dst5, opnd_t src1, opnd_t src2, opnd_t src3, > opnd_t src4); > > > > > > > > >instr_t * >instr_create_5dst_5src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t dst5, opnd_t src1, opnd_t src2, opnd_t src3, > opnd_t src4, opnd_t src5); > > > > > > > > >instr_t * >instr_create_5dst_8src(void *drcontext, int opcode, opnd_t dst1, opnd_t dst2, opnd_t dst3, > opnd_t dst4, opnd_t dst5, opnd_t src1, opnd_t src2, opnd_t src3, > opnd_t src4, opnd_t src5, opnd_t src6, opnd_t src7, opnd_t src8); > > ># 2357 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_create_Ndst_Msrc_varsrc(void *drcontext, int opcode, uint fixed_dsts, > uint fixed_srcs, uint var_srcs, uint var_ord, ...); > > ># 2372 "../../3pty/dynamorio/include/dr_ir_instr.h" >instr_t * >instr_create_Ndst_Msrc_vardst(void *drcontext, int opcode, uint fixed_dsts, > uint fixed_srcs, uint var_dsts, uint var_ord, ...); > > > >instr_t * >instr_create_popa(void *drcontext); > > > >instr_t * >instr_create_pusha(void *drcontext); > > ># 2396 "../../3pty/dynamorio/include/dr_ir_instr.h" >bool >instr_is_reg_spill_or_restore(void *drcontext, instr_t *instr, bool *tls , > bool *spill , reg_id_t *reg , uint *offs ); ># 2457 "../../3pty/dynamorio/include/dr_ir_instr.h" >enum { > EFLAGS_CF = 0x00000001, > EFLAGS_PF = 0x00000004, > EFLAGS_AF = 0x00000010, > EFLAGS_ZF = 0x00000040, > EFLAGS_SF = 0x00000080, > EFLAGS_DF = 0x00000400, > EFLAGS_OF = 0x00000800, > > EFLAGS_ARITH = EFLAGS_CF | EFLAGS_PF | EFLAGS_AF | EFLAGS_ZF | EFLAGS_SF | EFLAGS_OF, >}; ># 78 "../../3pty/dynamorio/include/dr_api.h" 2 ># 1 "../../3pty/dynamorio/include/dr_ir_instr_inline.h" 1 ># 79 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_decode.h" 1 ># 45 "../../3pty/dynamorio/include/dr_ir_decode.h" > ># 57 "../../3pty/dynamorio/include/dr_ir_decode.h" >byte * >decode_eflags_usage(void *drcontext, byte *pc, uint *usage, dr_opnd_query_flags_t flags); > > ># 76 "../../3pty/dynamorio/include/dr_ir_decode.h" >byte * >decode(void *drcontext, byte *pc, instr_t *instr); > > ># 100 "../../3pty/dynamorio/include/dr_ir_decode.h" >byte * >decode_from_copy(void *drcontext, byte *copy_pc, byte *orig_pc, instr_t *instr); > > > > > > > > > > > > >instrlist_t * >decode_as_bb(void *drcontext, byte *start_pc); > > ># 130 "../../3pty/dynamorio/include/dr_ir_decode.h" >instrlist_t * >decode_trace(void *drcontext, void *tag); > > > > > > >byte >decode_first_opcode_byte(int opcode); > > > >const char * >decode_opcode_name(int opcode); > > > ># 159 "../../3pty/dynamorio/include/dr_ir_decode.h" >bool >set_x86_mode(void *drcontext, bool x86); > > ># 172 "../../3pty/dynamorio/include/dr_ir_decode.h" >bool >get_x86_mode(void *drcontext); > > > > > > > > > >app_pc >dr_app_pc_as_jump_target(dr_isa_mode_t isa_mode, app_pc pc); > > > > > > > > > >app_pc >dr_app_pc_as_load_target(dr_isa_mode_t isa_mode, app_pc pc); > > ># 206 "../../3pty/dynamorio/include/dr_ir_decode.h" >app_pc >decode_memory_reference_size(void *drcontext, app_pc pc, uint *size_in_bytes); > > ># 223 "../../3pty/dynamorio/include/dr_ir_decode.h" >int >decode_sizeof(void *drcontext, byte *pc, int *num_prefixes , uint *rip_rel_pos); > > > ># 240 "../../3pty/dynamorio/include/dr_ir_decode.h" >int >decode_sizeof_ex(void *drcontext, byte *pc, int *num_prefixes, uint *rip_rel_pos); > > > ># 254 "../../3pty/dynamorio/include/dr_ir_decode.h" >byte * >decode_next_pc(void *drcontext, byte *pc); > > ># 285 "../../3pty/dynamorio/include/dr_ir_decode.h" >byte * >decode_cti(void *drcontext, byte *pc, instr_t *instr); ># 82 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_disassemble.h" 1 ># 48 "../../3pty/dynamorio/include/dr_ir_disassemble.h" >typedef enum { > > > > > > DR_DISASM_DR = 0x0, > > > > > > DR_DISASM_INTEL = 0x1, > > > > > > DR_DISASM_ATT = 0x2, ># 75 "../../3pty/dynamorio/include/dr_ir_disassemble.h" > DR_DISASM_STRICT_INVALID = 0x4, > > > > > > > DR_DISASM_NO_OPND_SIZE = 0x8, > > > > > > DR_DISASM_ARM = 0x10, >} dr_disasm_flags_t; > > > > > > > > > >void >disassemble_set_syntax(dr_disasm_flags_t flags); > > > > > > > > >byte * >disassemble(void *drcontext, byte *pc, file_t outfile); > > ># 121 "../../3pty/dynamorio/include/dr_ir_disassemble.h" >byte * >disassemble_with_info(void *drcontext, byte *pc, file_t outfile, bool show_pc, > bool show_bytes); > > ># 136 "../../3pty/dynamorio/include/dr_ir_disassemble.h" >byte * >disassemble_from_copy(void *drcontext, byte *copy_pc, byte *orig_pc, file_t outfile, > bool show_pc, bool show_bytes); > > ># 156 "../../3pty/dynamorio/include/dr_ir_disassemble.h" >byte * >disassemble_to_buffer(void *drcontext, byte *pc, byte *orig_pc, bool show_pc, > bool show_bytes, char *buf, size_t bufsz, int *printed ); > > ># 169 "../../3pty/dynamorio/include/dr_ir_disassemble.h" >void >instr_disassemble(void *drcontext, instr_t *instr, file_t outfile); > > ># 185 "../../3pty/dynamorio/include/dr_ir_disassemble.h" >size_t >instr_disassemble_to_buffer(void *drcontext, instr_t *instr, char *buf, size_t bufsz); > > > > > > >void >opnd_disassemble(void *drcontext, opnd_t opnd, file_t outfile); > > > > > > > > > >size_t >opnd_disassemble_to_buffer(void *drcontext, opnd_t opnd, char *buf, size_t bufsz); > > >void >reg_disassemble(char *buf, size_t bufsz, size_t *sofar , reg_id_t reg, > dr_opnd_flags_t flags, const char *prefix, const char *suffix); > > ># 257 "../../3pty/dynamorio/include/dr_ir_disassemble.h" >void >instrlist_disassemble(void *drcontext, app_pc tag, instrlist_t *ilist, file_t outfile); ># 85 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_utils.h" 1 ># 66 "../../3pty/dynamorio/include/dr_ir_utils.h" >typedef enum { > SPILL_SLOT_1 = 0, > SPILL_SLOT_2 = 1, > SPILL_SLOT_3 = 2, > SPILL_SLOT_4 = 3, > SPILL_SLOT_5 = 4, > SPILL_SLOT_6 = 5, > SPILL_SLOT_7 = 6, > SPILL_SLOT_8 = 7, > SPILL_SLOT_9 = 8, > > SPILL_SLOT_10 = 9, > > SPILL_SLOT_11 = 10, > > SPILL_SLOT_12 = 11, > > SPILL_SLOT_13 = 12, > > SPILL_SLOT_14 = 13, > > SPILL_SLOT_15 = 14, > > SPILL_SLOT_16 = 15, > > SPILL_SLOT_17 = 16, > > SPILL_SLOT_MAX = SPILL_SLOT_17 > > > > > >} dr_spill_slot_t; > > ># 112 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_save_reg(void *drcontext, instrlist_t *ilist, instr_t *where, reg_id_t reg, > dr_spill_slot_t slot); > > > > > > > >void >dr_restore_reg(void *drcontext, instrlist_t *ilist, instr_t *where, reg_id_t reg, > dr_spill_slot_t slot); > > > > > > >dr_spill_slot_t >dr_max_opnd_accessible_spill_slot(void); > > > > > > > >opnd_t >dr_reg_spill_slot_opnd(void *drcontext, dr_spill_slot_t slot); > > >opnd_t >reg_spill_slot_opnd(void *drcontext, dr_spill_slot_t slot); > > > > > > > >reg_t >dr_read_saved_reg(void *drcontext, dr_spill_slot_t slot); > > ># 166 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_write_saved_reg(void *drcontext, dr_spill_slot_t slot, reg_t value); > > ># 186 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_save_arith_flags(void *drcontext, instrlist_t *ilist, instr_t *where, > dr_spill_slot_t slot); > > ># 201 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_restore_arith_flags(void *drcontext, instrlist_t *ilist, instr_t *where, > dr_spill_slot_t slot); > > ># 220 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_save_arith_flags_to_xax(void *drcontext, instrlist_t *ilist, instr_t *where); > > ># 232 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_restore_arith_flags_from_xax(void *drcontext, instrlist_t *ilist, instr_t *where); > > ># 250 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_save_arith_flags_to_reg(void *drcontext, instrlist_t *ilist, instr_t *where, > reg_id_t reg); > > ># 263 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_restore_arith_flags_from_reg(void *drcontext, instrlist_t *ilist, instr_t *where, > reg_id_t reg); > > > > > > > > >reg_t >dr_merge_arith_flags(reg_t cur_xflags, reg_t saved_xflag); > > > > > > > > > > > > > >void >dr_insert_read_tls_field(void *drcontext, instrlist_t *ilist, instr_t *where, > reg_id_t reg); > > > > > > > >void >dr_insert_write_tls_field(void *drcontext, instrlist_t *ilist, instr_t *where, > reg_id_t reg); > > > >void >instrlist_meta_preinsert(instrlist_t *ilist, instr_t *where, instr_t *instr); > > > >void >instrlist_meta_postinsert(instrlist_t *ilist, instr_t *where, instr_t *instr); > > > >void >instrlist_meta_append(instrlist_t *ilist, instr_t *instr); > > > > > > > > >void >instrlist_meta_fault_preinsert(instrlist_t *ilist, instr_t *where, instr_t *instr); > > > > > > > > >void >instrlist_meta_fault_postinsert(instrlist_t *ilist, instr_t *where, instr_t *instr); > > > > > > > > >void >instrlist_meta_fault_append(instrlist_t *ilist, instr_t *instr); > > > > > > > > ># 439 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_clean_call(void *drcontext, instrlist_t *ilist, instr_t *where, void *callee, > bool save_fpstate, uint num_args, ...); > > ># 452 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_clean_call_ex(void *drcontext, instrlist_t *ilist, instr_t *where, void *callee, > dr_cleancall_save_t save_flags, uint num_args, ...); ># 469 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_clean_call_ex_varg(void *drcontext, instrlist_t *ilist, instr_t *where, > void *callee, dr_cleancall_save_t save_flags, uint num_args, > opnd_t *args); > > ># 532 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_call(void *drcontext, instrlist_t *ilist, instr_t *where, void *callee, > uint num_args, ...); > > ># 546 "../../3pty/dynamorio/include/dr_ir_utils.h" >bool >dr_insert_call_ex(void *drcontext, instrlist_t *ilist, instr_t *where, byte *encode_pc, > void *callee, uint num_args, ...); > > >void >dr_insert_call_noreturn(void *drcontext, instrlist_t *ilist, instr_t *where, void *callee, > uint num_args, ...); > > ># 577 "../../3pty/dynamorio/include/dr_ir_utils.h" >uint >dr_prepare_for_call(void *drcontext, instrlist_t *ilist, instr_t *instr); > > > > > > >void >dr_cleanup_after_call(void *drcontext, instrlist_t *ilist, instr_t *where, > uint sizeof_param_area); > > ># 598 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_swap_to_clean_stack(void *drcontext, instrlist_t *ilist, instr_t *where); > > > > > > >void >dr_restore_app_stack(void *drcontext, instrlist_t *ilist, instr_t *where); > > ># 621 "../../3pty/dynamorio/include/dr_ir_utils.h" >void * >dr_call_on_clean_stack(void *drcontext, void *(*func)(void), void *arg1, void *arg2, > void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, > void *arg8); > > > ># 638 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_call_instrumentation(void *drcontext, instrlist_t *ilist, instr_t *instr, > void *callee); > > ># 659 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_mbr_instrumentation(void *drcontext, instrlist_t *ilist, instr_t *instr, > void *callee, dr_spill_slot_t scratch_slot); > > ># 675 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_cbr_instrumentation(void *drcontext, instrlist_t *ilist, instr_t *instr, > void *callee); > > ># 694 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_cbr_instrumentation_ex(void *drcontext, instrlist_t *ilist, instr_t *instr, > void *callee, opnd_t user_data); > > > ># 713 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_ubr_instrumentation(void *drcontext, instrlist_t *ilist, instr_t *instr, > void *callee); > > ># 737 "../../3pty/dynamorio/include/dr_ir_utils.h" >bool >dr_clobber_retaddr_after_read(void *drcontext, instrlist_t *ilist, instr_t *instr, > ptr_uint_t value); > > > > > > > > > >bool >dr_mcontext_xmm_fields_valid(void); > > ># 761 "../../3pty/dynamorio/include/dr_ir_utils.h" >bool >dr_mcontext_zmm_fields_valid(void); > > > > ># 832 "../../3pty/dynamorio/include/dr_ir_utils.h" >bool >dr_get_mcontext(void *drcontext, dr_mcontext_t *context); > > ># 882 "../../3pty/dynamorio/include/dr_ir_utils.h" >bool >dr_set_mcontext(void *drcontext, dr_mcontext_t *context); > > > > > ># 931 "../../3pty/dynamorio/include/dr_ir_utils.h" >bool >dr_redirect_execution(dr_mcontext_t *context); > > > > > ># 966 "../../3pty/dynamorio/include/dr_ir_utils.h" >byte * >dr_redirect_native_target(void *drcontext); ># 994 "../../3pty/dynamorio/include/dr_ir_utils.h" > ># 1004 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >instrlist_insert_mov_immed_ptrsz(void *drcontext, ptr_int_t val, opnd_t dst, > instrlist_t *ilist, instr_t *where, instr_t **first , > instr_t **last ); > > > > > > > > > >void >instrlist_insert_push_immed_ptrsz(void *drcontext, ptr_int_t val, instrlist_t *ilist, > instr_t *where, instr_t **first , > instr_t **last ); > > ># 1038 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >instrlist_insert_mov_instr_addr(void *drcontext, instr_t *src_inst, byte *encode_estimate, > opnd_t dst, instrlist_t *ilist, instr_t *where, > instr_t **first , instr_t **last ); > > ># 1057 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >instrlist_insert_push_instr_addr(void *drcontext, instr_t *src_inst, > byte *encode_estimate, instrlist_t *ilist, > instr_t *where, instr_t **first , instr_t **last ); > > > > > > >reg_id_t >dr_get_stolen_reg(void); > > ># 1080 "../../3pty/dynamorio/include/dr_ir_utils.h" >bool >dr_insert_get_stolen_reg_value(void *drcontext, instrlist_t *ilist, instr_t *instr, > reg_id_t reg); > > ># 1094 "../../3pty/dynamorio/include/dr_ir_utils.h" >bool >dr_insert_set_stolen_reg_value(void *drcontext, instrlist_t *ilist, instr_t *instr, > reg_id_t reg); > > ># 1114 "../../3pty/dynamorio/include/dr_ir_utils.h" >int >dr_remove_it_instrs(void *drcontext, instrlist_t *ilist); > > ># 1129 "../../3pty/dynamorio/include/dr_ir_utils.h" >int >dr_insert_it_instrs(void *drcontext, instrlist_t *ilist); > > ># 1149 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_save_fpstate(void *drcontext, instrlist_t *ilist, instr_t *where, opnd_t buf); > > ># 1166 "../../3pty/dynamorio/include/dr_ir_utils.h" >void >dr_insert_restore_fpstate(void *drcontext, instrlist_t *ilist, instr_t *where, > opnd_t buf); > > > > > > > > > >bool >dr_insert_get_seg_base(void *drcontext, instrlist_t *ilist, instr_t *instr, reg_id_t seg, > reg_id_t reg); ># 88 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_instrlist.h" 1 ># 45 "../../3pty/dynamorio/include/dr_ir_instrlist.h" > > >instrlist_t * >instrlist_create(void *drcontext); > > > >void >instrlist_init(instrlist_t *ilist); > > > >void >instrlist_destroy(void *drcontext, instrlist_t *ilist); > > > >void >instrlist_clear(void *drcontext, instrlist_t *ilist); > > > >void >instrlist_clear_and_destroy(void *drcontext, instrlist_t *ilist); > > ># 79 "../../3pty/dynamorio/include/dr_ir_instrlist.h" >void >instrlist_set_translation_target(instrlist_t *ilist, app_pc pc); > > > >app_pc >instrlist_get_translation_target(instrlist_t *ilist); > > >void >instrlist_set_our_mangling(instrlist_t *ilist, bool ours); > > ># 104 "../../3pty/dynamorio/include/dr_ir_instrlist.h" >void >instrlist_set_auto_predicate(instrlist_t *ilist, dr_pred_type_t pred); > > > >dr_pred_type_t >instrlist_get_auto_predicate(instrlist_t *ilist); > > > >instr_t * >instrlist_first(instrlist_t *ilist); > > ># 131 "../../3pty/dynamorio/include/dr_ir_instrlist.h" >instr_t * >instrlist_first_app(instrlist_t *ilist); > > > > > > >instr_t * >instrlist_first_nonlabel(instrlist_t *ilist); > > > >instr_t * >instrlist_last(instrlist_t *ilist); > > ># 161 "../../3pty/dynamorio/include/dr_ir_instrlist.h" >instr_t * >instrlist_last_app(instrlist_t *ilist); > > > >void >instrlist_cut(instrlist_t *ilist, instr_t *instr); > > > >void >instrlist_append(instrlist_t *ilist, instr_t *instr); > > > >void >instrlist_prepend(instrlist_t *ilist, instr_t *instr); > > ># 188 "../../3pty/dynamorio/include/dr_ir_instrlist.h" >instrlist_t * >instrlist_clone(void *drcontext, instrlist_t *old); > > > >void >instrlist_preinsert(instrlist_t *ilist, instr_t *where, instr_t *instr); > > > >void >instrlist_postinsert(instrlist_t *ilist, instr_t *where, instr_t *instr); > > > >instr_t * >instrlist_replace(instrlist_t *ilist, instr_t *oldinst, instr_t *newinst); > > > >void >instrlist_remove(instrlist_t *ilist, instr_t *instr); > > > > > > > > > >bool >instrlist_set_fall_through_target(instrlist_t *bb, app_pc tgt); > > > > > > > > > >bool >instrlist_set_return_target(instrlist_t *bb, app_pc tgt); ># 91 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_opcodes.h" 1 ># 38 "../../3pty/dynamorio/include/dr_ir_opcodes.h" ># 1 "../../3pty/dynamorio/include/dr_ir_opcodes_x86.h" 1 ># 64 "../../3pty/dynamorio/include/dr_ir_opcodes_x86.h" >enum { > OP_INVALID, > > OP_UNDECODED, > > OP_CONTD, > > OP_LABEL, > > > OP_add, > OP_or, > OP_adc, > OP_sbb, > OP_and, > OP_daa, > OP_sub, > OP_das, > OP_xor, > OP_aaa, > OP_cmp, > OP_aas, > OP_inc, > OP_dec, > OP_push, > OP_push_imm, > OP_pop, > OP_pusha, > OP_popa, > OP_bound, > OP_arpl, > OP_imul, > > OP_jo_short, > OP_jno_short, > OP_jb_short, > OP_jnb_short, > OP_jz_short, > OP_jnz_short, > OP_jbe_short, > OP_jnbe_short, > OP_js_short, > OP_jns_short, > OP_jp_short, > OP_jnp_short, > OP_jl_short, > OP_jnl_short, > OP_jle_short, > OP_jnle_short, > > OP_call, > OP_call_ind, > OP_call_far, > OP_call_far_ind, > OP_jmp, > OP_jmp_short, > OP_jmp_ind, > OP_jmp_far, > OP_jmp_far_ind, > > OP_loopne, > OP_loope, > OP_loop, > OP_jecxz, > > > > OP_mov_ld, > OP_mov_st, > > > OP_mov_imm, > OP_mov_seg, > OP_mov_priv, > > OP_test, > OP_lea, > OP_xchg, > OP_cwde, > OP_cdq, > OP_fwait, > OP_pushf, > OP_popf, > OP_sahf, > OP_lahf, > > OP_ret, > OP_ret_far, > > OP_les, > OP_lds, > OP_enter, > OP_leave, > OP_int3, > OP_int, > OP_into, > OP_iret, > OP_aam, > OP_aad, > OP_xlat, > OP_in, > OP_out, > OP_hlt, > OP_cmc, > OP_clc, > OP_stc, > OP_cli, > OP_sti, > OP_cld, > OP_std, > > OP_lar, > OP_lsl, > OP_syscall, > OP_clts, > OP_sysret, > OP_invd, > OP_wbinvd, > OP_ud2a, > OP_nop_modrm, > OP_movntps, > OP_movntpd, > OP_wrmsr, > OP_rdtsc, > OP_rdmsr, > OP_rdpmc, > OP_sysenter, > OP_sysexit, > > OP_cmovo, > OP_cmovno, > OP_cmovb, > OP_cmovnb, > OP_cmovz, > OP_cmovnz, > OP_cmovbe, > OP_cmovnbe, > OP_cmovs, > OP_cmovns, > OP_cmovp, > OP_cmovnp, > OP_cmovl, > OP_cmovnl, > OP_cmovle, > OP_cmovnle, > > OP_punpcklbw, > OP_punpcklwd, > OP_punpckldq, > OP_packsswb, > OP_pcmpgtb, > OP_pcmpgtw, > OP_pcmpgtd, > OP_packuswb, > OP_punpckhbw, > OP_punpckhwd, > OP_punpckhdq, > OP_packssdw, > OP_punpcklqdq, > OP_punpckhqdq, > OP_movd, > OP_movq, > OP_movdqu, > OP_movdqa, > OP_pshufw, > OP_pshufd, > OP_pshufhw, > OP_pshuflw, > OP_pcmpeqb, > OP_pcmpeqw, > OP_pcmpeqd, > OP_emms, > > OP_jo, > OP_jno, > OP_jb, > OP_jnb, > OP_jz, > OP_jnz, > OP_jbe, > OP_jnbe, > OP_js, > OP_jns, > OP_jp, > OP_jnp, > OP_jl, > OP_jnl, > OP_jle, > OP_jnle, > > OP_seto, > OP_setno, > OP_setb, > OP_setnb, > OP_setz, > OP_setnz, > OP_setbe, > OP_setnbe, > OP_sets, > OP_setns, > OP_setp, > OP_setnp, > OP_setl, > OP_setnl, > OP_setle, > OP_setnle, > > OP_cpuid, > OP_bt, > OP_shld, > OP_rsm, > OP_bts, > OP_shrd, > OP_cmpxchg, > OP_lss, > OP_btr, > OP_lfs, > OP_lgs, > OP_movzx, > OP_ud2b, > OP_btc, > OP_bsf, > OP_bsr, > OP_movsx, > OP_xadd, > OP_movnti, > OP_pinsrw, > OP_pextrw, > OP_bswap, > OP_psrlw, > OP_psrld, > OP_psrlq, > OP_paddq, > OP_pmullw, > OP_pmovmskb, > OP_psubusb, > OP_psubusw, > OP_pminub, > OP_pand, > OP_paddusb, > OP_paddusw, > OP_pmaxub, > OP_pandn, > OP_pavgb, > OP_psraw, > OP_psrad, > OP_pavgw, > OP_pmulhuw, > OP_pmulhw, > OP_movntq, > OP_movntdq, > OP_psubsb, > OP_psubsw, > OP_pminsw, > OP_por, > OP_paddsb, > OP_paddsw, > OP_pmaxsw, > OP_pxor, > OP_psllw, > OP_pslld, > OP_psllq, > OP_pmuludq, > OP_pmaddwd, > OP_psadbw, > OP_maskmovq, > OP_maskmovdqu, > OP_psubb, > OP_psubw, > OP_psubd, > OP_psubq, > OP_paddb, > OP_paddw, > OP_paddd, > OP_psrldq, > OP_pslldq, > > OP_rol, > OP_ror, > OP_rcl, > OP_rcr, > OP_shl, > OP_shr, > OP_sar, > OP_not, > OP_neg, > OP_mul, > OP_div, > OP_idiv, > OP_sldt, > OP_str, > OP_lldt, > OP_ltr, > OP_verr, > OP_verw, > OP_sgdt, > OP_sidt, > OP_lgdt, > OP_lidt, > OP_smsw, > OP_lmsw, > OP_invlpg, > OP_cmpxchg8b, > OP_fxsave32, > OP_fxrstor32, > OP_ldmxcsr, > OP_stmxcsr, > OP_lfence, > OP_mfence, > OP_clflush, > OP_sfence, > OP_prefetchnta, > OP_prefetcht0, > OP_prefetcht1, > OP_prefetcht2, > OP_prefetch, > OP_prefetchw, > > OP_movups, > OP_movss, > OP_movupd, > OP_movsd, > OP_movlps, > OP_movlpd, > OP_unpcklps, > OP_unpcklpd, > OP_unpckhps, > OP_unpckhpd, > OP_movhps, > OP_movhpd, > OP_movaps, > OP_movapd, > OP_cvtpi2ps, > OP_cvtsi2ss, > OP_cvtpi2pd, > OP_cvtsi2sd, > OP_cvttps2pi, > OP_cvttss2si, > OP_cvttpd2pi, > OP_cvttsd2si, > OP_cvtps2pi, > OP_cvtss2si, > OP_cvtpd2pi, > OP_cvtsd2si, > OP_ucomiss, > OP_ucomisd, > OP_comiss, > OP_comisd, > OP_movmskps, > OP_movmskpd, > OP_sqrtps, > OP_sqrtss, > OP_sqrtpd, > OP_sqrtsd, > OP_rsqrtps, > OP_rsqrtss, > OP_rcpps, > OP_rcpss, > OP_andps, > OP_andpd, > OP_andnps, > OP_andnpd, > OP_orps, > OP_orpd, > OP_xorps, > OP_xorpd, > OP_addps, > OP_addss, > OP_addpd, > OP_addsd, > OP_mulps, > OP_mulss, > OP_mulpd, > OP_mulsd, > OP_cvtps2pd, > OP_cvtss2sd, > OP_cvtpd2ps, > OP_cvtsd2ss, > OP_cvtdq2ps, > OP_cvttps2dq, > OP_cvtps2dq, > OP_subps, > OP_subss, > OP_subpd, > OP_subsd, > OP_minps, > OP_minss, > OP_minpd, > OP_minsd, > OP_divps, > OP_divss, > OP_divpd, > OP_divsd, > OP_maxps, > OP_maxss, > OP_maxpd, > OP_maxsd, > OP_cmpps, > OP_cmpss, > OP_cmppd, > OP_cmpsd, > OP_shufps, > OP_shufpd, > OP_cvtdq2pd, > OP_cvttpd2dq, > OP_cvtpd2dq, > OP_nop, > OP_pause, > > OP_ins, > OP_rep_ins, > OP_outs, > OP_rep_outs, > OP_movs, > OP_rep_movs, > OP_stos, > OP_rep_stos, > OP_lods, > OP_rep_lods, > OP_cmps, > OP_rep_cmps, > OP_repne_cmps, > OP_scas, > OP_rep_scas, > OP_repne_scas, > > OP_fadd, > OP_fmul, > OP_fcom, > OP_fcomp, > OP_fsub, > OP_fsubr, > OP_fdiv, > OP_fdivr, > OP_fld, > OP_fst, > OP_fstp, > OP_fldenv, > OP_fldcw, > OP_fnstenv, > OP_fnstcw, > OP_fiadd, > OP_fimul, > OP_ficom, > OP_ficomp, > OP_fisub, > OP_fisubr, > OP_fidiv, > OP_fidivr, > OP_fild, > OP_fist, > OP_fistp, > OP_frstor, > OP_fnsave, > OP_fnstsw, > > OP_fbld, > OP_fbstp, > > OP_fxch, > OP_fnop, > OP_fchs, > OP_fabs, > OP_ftst, > OP_fxam, > OP_fld1, > OP_fldl2t, > OP_fldl2e, > OP_fldpi, > OP_fldlg2, > OP_fldln2, > OP_fldz, > OP_f2xm1, > OP_fyl2x, > OP_fptan, > OP_fpatan, > OP_fxtract, > OP_fprem1, > OP_fdecstp, > OP_fincstp, > OP_fprem, > OP_fyl2xp1, > OP_fsqrt, > OP_fsincos, > OP_frndint, > OP_fscale, > OP_fsin, > OP_fcos, > OP_fcmovb, > OP_fcmove, > OP_fcmovbe, > OP_fcmovu, > OP_fucompp, > OP_fcmovnb, > OP_fcmovne, > OP_fcmovnbe, > OP_fcmovnu, > OP_fnclex, > OP_fninit, > OP_fucomi, > OP_fcomi, > OP_ffree, > OP_fucom, > OP_fucomp, > OP_faddp, > OP_fmulp, > OP_fcompp, > OP_fsubrp, > OP_fsubp, > OP_fdivrp, > OP_fdivp, > OP_fucomip, > OP_fcomip, > > > OP_fisttp, > OP_haddpd, > OP_haddps, > OP_hsubpd, > OP_hsubps, > OP_addsubpd, > OP_addsubps, > OP_lddqu, > OP_monitor, > OP_mwait, > OP_movsldup, > OP_movshdup, > OP_movddup, > > > OP_femms, > OP_unknown_3dnow, > OP_pavgusb, > OP_pfadd, > OP_pfacc, > OP_pfcmpge, > OP_pfcmpgt, > OP_pfcmpeq, > OP_pfmin, > OP_pfmax, > OP_pfmul, > OP_pfrcp, > OP_pfrcpit1, > OP_pfrcpit2, > OP_pfrsqrt, > OP_pfrsqit1, > OP_pmulhrw, > OP_pfsub, > OP_pfsubr, > OP_pi2fd, > OP_pf2id, > OP_pi2fw, > OP_pf2iw, > OP_pfnacc, > OP_pfpnacc, > OP_pswapd, > > > OP_pshufb, > OP_phaddw, > OP_phaddd, > OP_phaddsw, > OP_pmaddubsw, > OP_phsubw, > OP_phsubd, > OP_phsubsw, > OP_psignb, > OP_psignw, > OP_psignd, > OP_pmulhrsw, > OP_pabsb, > OP_pabsw, > OP_pabsd, > OP_palignr, > > > OP_popcnt, > OP_movntss, > OP_movntsd, > OP_extrq, > OP_insertq, > OP_lzcnt, > OP_pblendvb, > OP_blendvps, > OP_blendvpd, > OP_ptest, > OP_pmovsxbw, > OP_pmovsxbd, > OP_pmovsxbq, > OP_pmovsxwd, > OP_pmovsxwq, > OP_pmovsxdq, > OP_pmuldq, > OP_pcmpeqq, > OP_movntdqa, > OP_packusdw, > OP_pmovzxbw, > OP_pmovzxbd, > OP_pmovzxbq, > OP_pmovzxwd, > OP_pmovzxwq, > OP_pmovzxdq, > OP_pcmpgtq, > OP_pminsb, > OP_pminsd, > OP_pminuw, > OP_pminud, > OP_pmaxsb, > OP_pmaxsd, > OP_pmaxuw, > OP_pmaxud, > OP_pmulld, > OP_phminposuw, > OP_crc32, > OP_pextrb, > OP_pextrd, > OP_extractps, > OP_roundps, > OP_roundpd, > OP_roundss, > OP_roundsd, > OP_blendps, > OP_blendpd, > OP_pblendw, > OP_pinsrb, > OP_insertps, > OP_pinsrd, > OP_dpps, > OP_dppd, > OP_mpsadbw, > OP_pcmpestrm, > OP_pcmpestri, > OP_pcmpistrm, > OP_pcmpistri, > > > OP_movsxd, > OP_swapgs, > > > OP_vmcall, > OP_vmlaunch, > OP_vmresume, > OP_vmxoff, > OP_vmptrst, > OP_vmptrld, > OP_vmxon, > OP_vmclear, > OP_vmread, > OP_vmwrite, > > > OP_int1, > OP_salc, > OP_ffreep, > > > OP_vmrun, > OP_vmmcall, > OP_vmload, > OP_vmsave, > OP_stgi, > OP_clgi, > OP_skinit, > OP_invlpga, > > OP_rdtscp, > > > OP_invept, > OP_invvpid, > > > OP_pclmulqdq, > OP_aesimc, > OP_aesenc, > OP_aesenclast, > OP_aesdec, > OP_aesdeclast, > OP_aeskeygenassist, > > > OP_movbe, > > > OP_xgetbv, > OP_xsetbv, > OP_xsave32, > OP_xrstor32, > OP_xsaveopt32, > > > OP_vmovss, > OP_vmovsd, > OP_vmovups, > OP_vmovupd, > OP_vmovlps, > OP_vmovsldup, > OP_vmovlpd, > OP_vmovddup, > OP_vunpcklps, > OP_vunpcklpd, > OP_vunpckhps, > OP_vunpckhpd, > OP_vmovhps, > OP_vmovshdup, > OP_vmovhpd, > OP_vmovaps, > OP_vmovapd, > OP_vcvtsi2ss, > OP_vcvtsi2sd, > OP_vmovntps, > OP_vmovntpd, > OP_vcvttss2si, > OP_vcvttsd2si, > OP_vcvtss2si, > OP_vcvtsd2si, > OP_vucomiss, > OP_vucomisd, > OP_vcomiss, > OP_vcomisd, > OP_vmovmskps, > OP_vmovmskpd, > OP_vsqrtps, > OP_vsqrtss, > OP_vsqrtpd, > OP_vsqrtsd, > OP_vrsqrtps, > OP_vrsqrtss, > OP_vrcpps, > OP_vrcpss, > OP_vandps, > OP_vandpd, > OP_vandnps, > OP_vandnpd, > OP_vorps, > OP_vorpd, > OP_vxorps, > OP_vxorpd, > OP_vaddps, > OP_vaddss, > OP_vaddpd, > OP_vaddsd, > OP_vmulps, > OP_vmulss, > OP_vmulpd, > OP_vmulsd, > OP_vcvtps2pd, > OP_vcvtss2sd, > OP_vcvtpd2ps, > OP_vcvtsd2ss, > OP_vcvtdq2ps, > OP_vcvttps2dq, > OP_vcvtps2dq, > OP_vsubps, > OP_vsubss, > OP_vsubpd, > OP_vsubsd, > OP_vminps, > OP_vminss, > OP_vminpd, > OP_vminsd, > OP_vdivps, > OP_vdivss, > OP_vdivpd, > OP_vdivsd, > OP_vmaxps, > OP_vmaxss, > OP_vmaxpd, > OP_vmaxsd, > OP_vpunpcklbw, > OP_vpunpcklwd, > OP_vpunpckldq, > OP_vpacksswb, > OP_vpcmpgtb, > OP_vpcmpgtw, > OP_vpcmpgtd, > OP_vpackuswb, > OP_vpunpckhbw, > OP_vpunpckhwd, > OP_vpunpckhdq, > OP_vpackssdw, > OP_vpunpcklqdq, > OP_vpunpckhqdq, > OP_vmovd, > OP_vpshufhw, > OP_vpshufd, > OP_vpshuflw, > OP_vpcmpeqb, > OP_vpcmpeqw, > OP_vpcmpeqd, > OP_vmovq, > OP_vcmpps, > OP_vcmpss, > OP_vcmppd, > OP_vcmpsd, > OP_vpinsrw, > OP_vpextrw, > OP_vshufps, > OP_vshufpd, > OP_vpsrlw, > OP_vpsrld, > OP_vpsrlq, > OP_vpaddq, > OP_vpmullw, > OP_vpmovmskb, > OP_vpsubusb, > OP_vpsubusw, > OP_vpminub, > OP_vpand, > OP_vpaddusb, > OP_vpaddusw, > OP_vpmaxub, > OP_vpandn, > OP_vpavgb, > OP_vpsraw, > OP_vpsrad, > OP_vpavgw, > OP_vpmulhuw, > OP_vpmulhw, > OP_vcvtdq2pd, > OP_vcvttpd2dq, > OP_vcvtpd2dq, > OP_vmovntdq, > OP_vpsubsb, > OP_vpsubsw, > OP_vpminsw, > OP_vpor, > OP_vpaddsb, > OP_vpaddsw, > OP_vpmaxsw, > OP_vpxor, > OP_vpsllw, > OP_vpslld, > OP_vpsllq, > OP_vpmuludq, > OP_vpmaddwd, > OP_vpsadbw, > OP_vmaskmovdqu, > OP_vpsubb, > OP_vpsubw, > OP_vpsubd, > OP_vpsubq, > OP_vpaddb, > OP_vpaddw, > OP_vpaddd, > OP_vpsrldq, > OP_vpslldq, > OP_vmovdqu, > OP_vmovdqa, > OP_vhaddpd, > OP_vhaddps, > OP_vhsubpd, > OP_vhsubps, > OP_vaddsubpd, > OP_vaddsubps, > OP_vlddqu, > OP_vpshufb, > OP_vphaddw, > OP_vphaddd, > OP_vphaddsw, > OP_vpmaddubsw, > OP_vphsubw, > OP_vphsubd, > OP_vphsubsw, > OP_vpsignb, > OP_vpsignw, > OP_vpsignd, > OP_vpmulhrsw, > OP_vpabsb, > OP_vpabsw, > OP_vpabsd, > OP_vpalignr, > OP_vpblendvb, > OP_vblendvps, > OP_vblendvpd, > OP_vptest, > OP_vpmovsxbw, > OP_vpmovsxbd, > OP_vpmovsxbq, > OP_vpmovsxwd, > OP_vpmovsxwq, > OP_vpmovsxdq, > OP_vpmuldq, > OP_vpcmpeqq, > OP_vmovntdqa, > OP_vpackusdw, > OP_vpmovzxbw, > OP_vpmovzxbd, > OP_vpmovzxbq, > OP_vpmovzxwd, > OP_vpmovzxwq, > OP_vpmovzxdq, > OP_vpcmpgtq, > OP_vpminsb, > OP_vpminsd, > OP_vpminuw, > OP_vpminud, > OP_vpmaxsb, > OP_vpmaxsd, > OP_vpmaxuw, > OP_vpmaxud, > OP_vpmulld, > OP_vphminposuw, > OP_vaesimc, > OP_vaesenc, > OP_vaesenclast, > OP_vaesdec, > OP_vaesdeclast, > OP_vpextrb, > OP_vpextrd, > OP_vextractps, > OP_vroundps, > OP_vroundpd, > OP_vroundss, > OP_vroundsd, > OP_vblendps, > OP_vblendpd, > OP_vpblendw, > OP_vpinsrb, > OP_vinsertps, > OP_vpinsrd, > OP_vdpps, > OP_vdppd, > OP_vmpsadbw, > OP_vpcmpestrm, > OP_vpcmpestri, > OP_vpcmpistrm, > OP_vpcmpistri, > OP_vpclmulqdq, > OP_vaeskeygenassist, > OP_vtestps, > OP_vtestpd, > OP_vzeroupper, > OP_vzeroall, > OP_vldmxcsr, > OP_vstmxcsr, > OP_vbroadcastss, > OP_vbroadcastsd, > OP_vbroadcastf128, > OP_vmaskmovps, > OP_vmaskmovpd, > OP_vpermilps, > OP_vpermilpd, > OP_vperm2f128, > OP_vinsertf128, > OP_vextractf128, > > > OP_vcvtph2ps, > OP_vcvtps2ph, > > > OP_vfmadd132ps, > OP_vfmadd132pd, > OP_vfmadd213ps, > OP_vfmadd213pd, > OP_vfmadd231ps, > OP_vfmadd231pd, > OP_vfmadd132ss, > OP_vfmadd132sd, > OP_vfmadd213ss, > OP_vfmadd213sd, > OP_vfmadd231ss, > OP_vfmadd231sd, > OP_vfmaddsub132ps, > OP_vfmaddsub132pd, > OP_vfmaddsub213ps, > OP_vfmaddsub213pd, > OP_vfmaddsub231ps, > OP_vfmaddsub231pd, > OP_vfmsubadd132ps, > OP_vfmsubadd132pd, > OP_vfmsubadd213ps, > OP_vfmsubadd213pd, > OP_vfmsubadd231ps, > OP_vfmsubadd231pd, > OP_vfmsub132ps, > OP_vfmsub132pd, > OP_vfmsub213ps, > OP_vfmsub213pd, > OP_vfmsub231ps, > OP_vfmsub231pd, > OP_vfmsub132ss, > OP_vfmsub132sd, > OP_vfmsub213ss, > OP_vfmsub213sd, > OP_vfmsub231ss, > OP_vfmsub231sd, > OP_vfnmadd132ps, > OP_vfnmadd132pd, > OP_vfnmadd213ps, > OP_vfnmadd213pd, > OP_vfnmadd231ps, > OP_vfnmadd231pd, > OP_vfnmadd132ss, > OP_vfnmadd132sd, > OP_vfnmadd213ss, > OP_vfnmadd213sd, > OP_vfnmadd231ss, > OP_vfnmadd231sd, > OP_vfnmsub132ps, > OP_vfnmsub132pd, > OP_vfnmsub213ps, > OP_vfnmsub213pd, > OP_vfnmsub231ps, > OP_vfnmsub231pd, > OP_vfnmsub132ss, > OP_vfnmsub132sd, > OP_vfnmsub213ss, > OP_vfnmsub213sd, > OP_vfnmsub231ss, > OP_vfnmsub231sd, > > OP_movq2dq, > OP_movdq2q, > > OP_fxsave64, > OP_fxrstor64, > OP_xsave64, > OP_xrstor64, > OP_xsaveopt64, > > > OP_rdrand, > OP_rdfsbase, > OP_rdgsbase, > OP_wrfsbase, > OP_wrgsbase, > > > OP_rdseed, > > > OP_vfmaddsubps, > OP_vfmaddsubpd, > OP_vfmsubaddps, > OP_vfmsubaddpd, > OP_vfmaddps, > OP_vfmaddpd, > OP_vfmaddss, > OP_vfmaddsd, > OP_vfmsubps, > OP_vfmsubpd, > OP_vfmsubss, > OP_vfmsubsd, > OP_vfnmaddps, > OP_vfnmaddpd, > OP_vfnmaddss, > OP_vfnmaddsd, > OP_vfnmsubps, > OP_vfnmsubpd, > OP_vfnmsubss, > OP_vfnmsubsd, > > > OP_vfrczps, > OP_vfrczpd, > OP_vfrczss, > OP_vfrczsd, > OP_vpcmov, > OP_vpcomb, > OP_vpcomw, > OP_vpcomd, > OP_vpcomq, > OP_vpcomub, > OP_vpcomuw, > OP_vpcomud, > OP_vpcomuq, > OP_vpermil2pd, > OP_vpermil2ps, > OP_vphaddbw, > OP_vphaddbd, > OP_vphaddbq, > OP_vphaddwd, > OP_vphaddwq, > OP_vphadddq, > OP_vphaddubw, > OP_vphaddubd, > OP_vphaddubq, > OP_vphadduwd, > OP_vphadduwq, > OP_vphaddudq, > OP_vphsubbw, > OP_vphsubwd, > OP_vphsubdq, > OP_vpmacssww, > OP_vpmacsswd, > OP_vpmacssdql, > OP_vpmacssdd, > OP_vpmacssdqh, > OP_vpmacsww, > OP_vpmacswd, > OP_vpmacsdql, > OP_vpmacsdd, > OP_vpmacsdqh, > OP_vpmadcsswd, > OP_vpmadcswd, > OP_vpperm, > OP_vprotb, > OP_vprotw, > OP_vprotd, > OP_vprotq, > OP_vpshlb, > OP_vpshlw, > OP_vpshld, > OP_vpshlq, > OP_vpshab, > OP_vpshaw, > OP_vpshad, > OP_vpshaq, > > > OP_bextr, > OP_blcfill, > OP_blci, > OP_blcic, > OP_blcmsk, > OP_blcs, > OP_blsfill, > OP_blsic, > OP_t1mskc, > OP_tzmsk, > > > OP_llwpcb, > OP_slwpcb, > OP_lwpins, > OP_lwpval, > > > > OP_andn, > OP_blsr, > OP_blsmsk, > OP_blsi, > OP_tzcnt, > > > OP_bzhi, > OP_pext, > OP_pdep, > OP_sarx, > OP_shlx, > OP_shrx, > OP_rorx, > OP_mulx, > > > OP_getsec, > > > OP_vmfunc, > OP_invpcid, > > > OP_xabort, > OP_xbegin, > OP_xend, > OP_xtest, > > > OP_vpgatherdd, > OP_vpgatherdq, > OP_vpgatherqd, > OP_vpgatherqq, > OP_vgatherdps, > OP_vgatherdpd, > OP_vgatherqps, > OP_vgatherqpd, > OP_vbroadcasti128, > OP_vinserti128, > OP_vextracti128, > OP_vpmaskmovd, > OP_vpmaskmovq, > OP_vperm2i128, > OP_vpermd, > OP_vpermps, > OP_vpermq, > OP_vpermpd, > OP_vpblendd, > OP_vpsllvd, > OP_vpsllvq, > OP_vpsravd, > OP_vpsrlvd, > OP_vpsrlvq, > OP_vpbroadcastb, > OP_vpbroadcastw, > OP_vpbroadcastd, > OP_vpbroadcastq, > > > OP_xsavec32, > OP_xsavec64, > > > OP_adox, > OP_adcx, > > > OP_kmovw, > OP_kmovb, > OP_kmovq, > OP_kmovd, > OP_kandw, > OP_kandb, > OP_kandq, > OP_kandd, > OP_kandnw, > OP_kandnb, > OP_kandnq, > OP_kandnd, > OP_kunpckbw, > OP_kunpckwd, > OP_kunpckdq, > OP_knotw, > OP_knotb, > OP_knotq, > OP_knotd, > OP_korw, > OP_korb, > OP_korq, > OP_kord, > OP_kxnorw, > OP_kxnorb, > OP_kxnorq, > OP_kxnord, > OP_kxorw, > OP_kxorb, > OP_kxorq, > OP_kxord, > OP_kaddw, > OP_kaddb, > OP_kaddq, > OP_kaddd, > OP_kortestw, > OP_kortestb, > OP_kortestq, > OP_kortestd, > OP_kshiftlw, > OP_kshiftlb, > OP_kshiftlq, > OP_kshiftld, > OP_kshiftrw, > OP_kshiftrb, > OP_kshiftrq, > OP_kshiftrd, > OP_ktestw, > OP_ktestb, > OP_ktestq, > OP_ktestd, > > > > > > > OP_valignd, > OP_valignq, > OP_vblendmpd, > OP_vblendmps, > OP_vbroadcastf32x2, > OP_vbroadcastf32x4, > OP_vbroadcastf32x8, > OP_vbroadcastf64x2, > OP_vbroadcastf64x4, > OP_vbroadcasti32x2, > OP_vbroadcasti32x4, > OP_vbroadcasti32x8, > OP_vbroadcasti64x2, > OP_vbroadcasti64x4, > OP_vcompresspd, > OP_vcompressps, > OP_vcvtpd2qq, > OP_vcvtpd2udq, > OP_vcvtpd2uqq, > OP_vcvtps2qq, > OP_vcvtps2udq, > OP_vcvtps2uqq, > OP_vcvtqq2pd, > OP_vcvtqq2ps, > OP_vcvtsd2usi, > OP_vcvtss2usi, > OP_vcvttpd2qq, > OP_vcvttpd2udq, > OP_vcvttpd2uqq, > OP_vcvttps2qq, > OP_vcvttps2udq, > OP_vcvttps2uqq, > OP_vcvttsd2usi, > OP_vcvttss2usi, > OP_vcvtudq2pd, > OP_vcvtudq2ps, > OP_vcvtuqq2pd, > OP_vcvtuqq2ps, > OP_vcvtusi2sd, > OP_vcvtusi2ss, > OP_vdbpsadbw, > OP_vexp2pd, > OP_vexp2ps, > OP_vexpandpd, > OP_vexpandps, > OP_vextractf32x4, > OP_vextractf32x8, > OP_vextractf64x2, > OP_vextractf64x4, > OP_vextracti32x4, > OP_vextracti32x8, > OP_vextracti64x2, > OP_vextracti64x4, > OP_vfixupimmpd, > OP_vfixupimmps, > OP_vfixupimmsd, > OP_vfixupimmss, > OP_vfpclasspd, > OP_vfpclassps, > OP_vfpclasssd, > OP_vfpclassss, > OP_vgatherpf0dpd, > OP_vgatherpf0dps, > OP_vgatherpf0qpd, > OP_vgatherpf0qps, > OP_vgatherpf1dpd, > OP_vgatherpf1dps, > OP_vgatherpf1qpd, > OP_vgatherpf1qps, > OP_vgetexppd, > OP_vgetexpps, > OP_vgetexpsd, > OP_vgetexpss, > OP_vgetmantpd, > OP_vgetmantps, > OP_vgetmantsd, > OP_vgetmantss, > OP_vinsertf32x4, > OP_vinsertf32x8, > OP_vinsertf64x2, > OP_vinsertf64x4, > OP_vinserti32x4, > OP_vinserti32x8, > OP_vinserti64x2, > OP_vinserti64x4, > OP_vmovdqa32, > OP_vmovdqa64, > OP_vmovdqu16, > OP_vmovdqu32, > OP_vmovdqu64, > OP_vmovdqu8, > OP_vpabsq, > OP_vpandd, > OP_vpandnd, > OP_vpandnq, > OP_vpandq, > OP_vpblendmb, > OP_vpblendmd, > OP_vpblendmq, > OP_vpblendmw, > OP_vpbroadcastmb2q, > OP_vpbroadcastmw2d, > OP_vpcmpb, > OP_vpcmpd, > OP_vpcmpq, > OP_vpcmpub, > OP_vpcmpud, > OP_vpcmpuq, > OP_vpcmpuw, > OP_vpcmpw, > OP_vpcompressd, > OP_vpcompressq, > OP_vpconflictd, > OP_vpconflictq, > OP_vpermb, > OP_vpermi2b, > OP_vpermi2d, > OP_vpermi2pd, > OP_vpermi2ps, > OP_vpermi2q, > OP_vpermi2w, > OP_vpermt2b, > OP_vpermt2d, > OP_vpermt2pd, > OP_vpermt2ps, > OP_vpermt2q, > OP_vpermt2w, > OP_vpermw, > OP_vpexpandd, > OP_vpexpandq, > OP_vpextrq, > OP_vpinsrq, > OP_vplzcntd, > OP_vplzcntq, > OP_vpmadd52huq, > OP_vpmadd52luq, > OP_vpmaxsq, > OP_vpmaxuq, > OP_vpminsq, > OP_vpminuq, > OP_vpmovb2m, > OP_vpmovd2m, > OP_vpmovdb, > OP_vpmovdw, > OP_vpmovm2b, > OP_vpmovm2d, > OP_vpmovm2q, > OP_vpmovm2w, > OP_vpmovq2m, > OP_vpmovqb, > OP_vpmovqd, > OP_vpmovqw, > OP_vpmovsdb, > OP_vpmovsdw, > OP_vpmovsqb, > OP_vpmovsqd, > OP_vpmovsqw, > OP_vpmovswb, > OP_vpmovusdb, > OP_vpmovusdw, > OP_vpmovusqb, > OP_vpmovusqd, > OP_vpmovusqw, > OP_vpmovuswb, > OP_vpmovw2m, > OP_vpmovwb, > OP_vpmullq, > OP_vpord, > OP_vporq, > OP_vprold, > OP_vprolq, > OP_vprolvd, > OP_vprolvq, > OP_vprord, > OP_vprorq, > OP_vprorvd, > OP_vprorvq, > OP_vpscatterdd, > OP_vpscatterdq, > OP_vpscatterqd, > OP_vpscatterqq, > OP_vpsllvw, > OP_vpsraq, > OP_vpsravq, > OP_vpsravw, > OP_vpsrlvw, > OP_vpternlogd, > OP_vpternlogq, > OP_vptestmb, > OP_vptestmd, > OP_vptestmq, > OP_vptestmw, > OP_vptestnmb, > OP_vptestnmd, > OP_vptestnmq, > OP_vptestnmw, > OP_vpxord, > OP_vpxorq, > OP_vrangepd, > OP_vrangeps, > OP_vrangesd, > OP_vrangess, > OP_vrcp14pd, > OP_vrcp14ps, > OP_vrcp14sd, > OP_vrcp14ss, > OP_vrcp28pd, > OP_vrcp28ps, > OP_vrcp28sd, > OP_vrcp28ss, > OP_vreducepd, > OP_vreduceps, > OP_vreducesd, > OP_vreducess, > OP_vrndscalepd, > OP_vrndscaleps, > OP_vrndscalesd, > OP_vrndscaless, > OP_vrsqrt14pd, > OP_vrsqrt14ps, > OP_vrsqrt14sd, > OP_vrsqrt14ss, > OP_vrsqrt28pd, > OP_vrsqrt28ps, > OP_vrsqrt28sd, > OP_vrsqrt28ss, > OP_vscalefpd, > OP_vscalefps, > OP_vscalefsd, > OP_vscalefss, > OP_vscatterdpd, > OP_vscatterdps, > OP_vscatterqpd, > OP_vscatterqps, > OP_vscatterpf0dpd, > OP_vscatterpf0dps, > OP_vscatterpf0qpd, > OP_vscatterpf0qps, > OP_vscatterpf1dpd, > OP_vscatterpf1dps, > OP_vscatterpf1qpd, > OP_vscatterpf1qps, > OP_vshuff32x4, > OP_vshuff64x2, > OP_vshufi32x4, > OP_vshufi64x2, > > > OP_sha1msg1, > OP_sha1msg2, > OP_sha1nexte, > OP_sha1rnds4, > OP_sha256msg1, > OP_sha256msg2, > OP_sha256rnds2, > > > OP_bndcl, > OP_bndcn, > OP_bndcu, > OP_bndldx, > OP_bndmk, > OP_bndmov, > OP_bndstx, > > > OP_ptwrite, > > > OP_monitorx, > OP_mwaitx, > > > OP_rdpkru, > OP_wrpkru, > > > OP_encls, > OP_enclu, > OP_enclv, > > > OP_vpdpbusd, > OP_vpdpbusds, > OP_vpdpwssd, > OP_vpdpwssds, > > > OP_vcvtne2ps2bf16, > OP_vcvtneps2bf16, > OP_vdpbf16ps, > > OP_AFTER_LAST, > OP_FIRST = OP_add, > OP_LAST = OP_AFTER_LAST - 1, >}; ># 39 "../../3pty/dynamorio/include/dr_ir_opcodes.h" 2 ># 94 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_ir_macros.h" 1 ># 47 "../../3pty/dynamorio/include/dr_ir_macros.h" ># 1 "../../3pty/dynamorio/include/dr_ir_macros_x86.h" 1 ># 53 "../../3pty/dynamorio/include/dr_ir_macros_x86.h" ># 1 "/usr/include/c++/13/math.h" 1 3 ># 36 "/usr/include/c++/13/math.h" 3 ># 1 "/usr/include/c++/13/cmath" 1 3 ># 39 "/usr/include/c++/13/cmath" 3 > ># 40 "/usr/include/c++/13/cmath" 3 ># 37 "/usr/include/c++/13/math.h" 2 3 > > ># 38 "/usr/include/c++/13/math.h" 3 >using std::abs; >using std::acos; >using std::asin; >using std::atan; >using std::atan2; >using std::cos; >using std::sin; >using std::tan; >using std::cosh; >using std::sinh; >using std::tanh; >using std::exp; >using std::frexp; >using std::ldexp; >using std::log; >using std::log10; >using std::modf; >using std::pow; >using std::sqrt; >using std::ceil; >using std::fabs; >using std::floor; >using std::fmod; > > >using std::fpclassify; >using std::isfinite; >using std::isinf; >using std::isnan; >using std::isnormal; >using std::signbit; >using std::isgreater; >using std::isgreaterequal; >using std::isless; >using std::islessequal; >using std::islessgreater; >using std::isunordered; > > > >using std::acosh; >using std::asinh; >using std::atanh; >using std::cbrt; >using std::copysign; >using std::erf; >using std::erfc; >using std::exp2; >using std::expm1; >using std::fdim; >using std::fma; >using std::fmax; >using std::fmin; >using std::hypot; >using std::ilogb; >using std::lgamma; >using std::llrint; >using std::llround; >using std::log1p; >using std::log2; >using std::logb; >using std::lrint; >using std::lround; >using std::nearbyint; >using std::nextafter; >using std::nexttoward; >using std::remainder; >using std::remquo; >using std::rint; >using std::round; >using std::scalbln; >using std::scalbn; >using std::tgamma; >using std::trunc; ># 54 "../../3pty/dynamorio/include/dr_ir_macros_x86.h" 2 ># 5189 "../../3pty/dynamorio/include/dr_ir_macros_x86.h" > ># 5189 "../../3pty/dynamorio/include/dr_ir_macros_x86.h" >static inline instr_t * >INSTR_CREATE_nop2byte_reg(void *drcontext, reg_id_t reg) >{ > > if (!get_x86_mode(drcontext)) { > > > instr_t *in = instr_build_bits(drcontext, OP_nop, 2); > > > > > instr_set_raw_byte(in, 0, 0x66); > instr_set_raw_byte(in, 1, 0x90); > instr_set_operands_valid(in, true); > return in; > } else { > > return instr_create_1dst_1src((drcontext), OP_mov_st, (opnd_create_reg(reg)), (opnd_create_reg(reg))); > > > > > > > > } > >} > > > >static inline instr_t * >INSTR_CREATE_nop3byte_reg(void *drcontext, reg_id_t reg) >{ > > if (!get_x86_mode(drcontext)) { > return instr_create_1dst_1src((drcontext), OP_lea, (opnd_create_reg(reg)), (opnd_create_base_disp(reg, DR_REG_NULL, 0, 0, OPSZ_0))) > ; > } else { > > return instr_create_1dst_1src((drcontext), OP_lea, (opnd_create_reg(reg)), (opnd_create_base_disp_ex(reg, DR_REG_NULL, 0, 0, OPSZ_0, true , false, false))) > > > ; > > > } > >} ># 48 "../../3pty/dynamorio/include/dr_ir_macros.h" 2 ># 59 "../../3pty/dynamorio/include/dr_ir_macros.h" ># 1 "/usr/lib/gcc/x86_64-redhat-linux/13/include/limits.h" 1 3 4 ># 60 "../../3pty/dynamorio/include/dr_ir_macros.h" 2 ># 97 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_tracedump.h" 1 ># 74 "../../3pty/dynamorio/include/dr_tracedump.h" >typedef struct _tracedump_file_header_t { > int version; > bool x64; > int linkcount_size; >} tracedump_file_header_t; > > >typedef struct _tracedump_trace_header_t { > int frag_id; > app_pc tag; > app_pc cache_start_pc; > int entry_offs; > int num_exits; > int code_size; > uint num_bbs; > bool x64; >} tracedump_trace_header_t; ># 99 "../../3pty/dynamorio/include/dr_tracedump.h" >typedef struct _tracedump_stub_data { > int cti_offs; > > app_pc stub_pc; > app_pc target; > bool linked; > int stub_size; > > union { > uint count32; > uint64 count64; > } count; > > > > > > > byte stub_code[1 ]; >} tracedump_stub_data_t; ># 100 "../../3pty/dynamorio/include/dr_api.h" 2 > > ># 1 "../../3pty/dynamorio/include/dr_annotation.h" 1 ># 55 "../../3pty/dynamorio/include/dr_annotation.h" >static inline void >dr_annotation_set_return_value(reg_t value) >{ > dr_mcontext_t mcontext; > void *dcontext = dr_get_current_drcontext(); > mcontext.size = sizeof(dr_mcontext_t); > mcontext.flags = DR_MC_INTEGER; > dr_get_mcontext(dcontext, &mcontext); > mcontext.xax = value; > dr_set_mcontext(dcontext, &mcontext); >} > > > > >typedef enum _dr_valgrind_request_id_t { > > > > DR_VG_ID__RUNNING_ON_VALGRIND, > > > > > DR_VG_ID__DO_LEAK_CHECK, > > > > > DR_VG_ID__MAKE_MEM_DEFINED_IF_ADDRESSABLE, > > > > > > > DR_VG_ID__DISCARD_TRANSLATIONS, > > > > DR_VG_ID__LAST >} dr_valgrind_request_id_t; > >enum { > > > > > > DR_VG_NUM_ARGS = 5, >}; ># 114 "../../3pty/dynamorio/include/dr_annotation.h" >typedef struct _dr_vg_client_request_t { > ptr_uint_t request; > ptr_uint_t args[DR_VG_NUM_ARGS]; > ptr_uint_t default_result; >} dr_vg_client_request_t; > > > > > >typedef enum _dr_annotation_calling_convention_t { > DR_ANNOTATION_CALL_TYPE_FASTCALL, > > > > > DR_ANNOTATION_CALL_TYPE_VARARG = DR_ANNOTATION_CALL_TYPE_FASTCALL, > > > > > > > > DR_ANNOTATION_CALL_TYPE_LAST >} dr_annotation_calling_convention_t; > > ># 158 "../../3pty/dynamorio/include/dr_annotation.h" >bool >dr_annotation_register_call(const char *annotation_name, void *callee, bool save_fpstate, > uint num_args, dr_annotation_calling_convention_t call_type); > > ># 172 "../../3pty/dynamorio/include/dr_annotation.h" >bool >dr_annotation_register_valgrind( > dr_valgrind_request_id_t request_id, > ptr_uint_t (*annotation_callback)(dr_vg_client_request_t *request)); > > ># 187 "../../3pty/dynamorio/include/dr_annotation.h" >bool >dr_annotation_register_return(const char *annotation_name, void *return_value); > > ># 200 "../../3pty/dynamorio/include/dr_annotation.h" >bool >dr_annotation_pass_pc(const char *annotation_name); > > ># 215 "../../3pty/dynamorio/include/dr_annotation.h" >bool >dr_annotation_unregister_call(const char *annotation_name, void *callee); > > ># 230 "../../3pty/dynamorio/include/dr_annotation.h" >bool >dr_annotation_unregister_return(const char *annotation_name); > > ># 245 "../../3pty/dynamorio/include/dr_annotation.h" >bool >dr_annotation_unregister_valgrind( > dr_valgrind_request_id_t request_id, > ptr_uint_t (*annotation_callback)(dr_vg_client_request_t *request)); ># 103 "../../3pty/dynamorio/include/dr_api.h" 2 ># 122 "../../3pty/dynamorio/include/dr_api.h" > void >dr_client_main(client_id_t id, int argc, const char *argv[]); > > > > > > void >dr_init(client_id_t id); > > > > > __attribute__((weak)) int _USES_DR_VERSION_ = 900; ># 152 "../../3pty/dynamorio/include/dr_api.h" > __attribute__((weak)) bool _DR_CLIENT_AVX512_CODE_IN_USE_ = false; ># 173 "../../3pty/dynamorio/include/dr_api.h" >} ># 6 "../../3pty/DynamoRIOFramework.hpp" 2 > > > >namespace pii >{ >static inline void >dynamorioGlobalInit() >{ > dr_standalone_init(); > dr_set_isa_mode(((void *)-1), DR_ISA_AMD64, ># 15 "../../3pty/DynamoRIOFramework.hpp" 3 4 > __null ># 15 "../../3pty/DynamoRIOFramework.hpp" > ); > disassemble_set_syntax(static_cast<dr_disasm_flags_t>(DR_DISASM_ATT | DR_DISASM_STRICT_INVALID)); >} >} > ># 1 "../../src/dynamorio/InstructionModel.hpp" 1 > > > > > > >namespace pii >{ >using namespace facile; >using namespace point_util; > >struct InstructionModel { > virtual ~InstructionModel() {} > > int > opcode() const { return instr_get_opcode(raw()); } > > uint32_t > length() const > { > int length = instr_length(((void *)-1), raw()); > ># 22 "../../src/dynamorio/InstructionModel.hpp" 3 > ( ># 22 "../../src/dynamorio/InstructionModel.hpp" > length >= 0 ># 22 "../../src/dynamorio/InstructionModel.hpp" 3 > ) || facile::RequireException("../../src/dynamorio/InstructionModel.hpp", 22) << ># 22 "../../src/dynamorio/InstructionModel.hpp" > std::endl ># 22 "../../src/dynamorio/InstructionModel.hpp" 3 > << "⢠Condition [" << ># 22 "../../src/dynamorio/InstructionModel.hpp" > "length >= 0" ># 22 "../../src/dynamorio/InstructionModel.hpp" 3 > << "] " << ># 22 "../../src/dynamorio/InstructionModel.hpp" > std::endl ># 22 "../../src/dynamorio/InstructionModel.hpp" 3 > << "⢠" ># 22 "../../src/dynamorio/InstructionModel.hpp" > << "DR error: instr_length() returned negative" << ># 22 "../../src/dynamorio/InstructionModel.hpp" 3 > facile::RequireException::require_sentinel ># 22 "../../src/dynamorio/InstructionModel.hpp" > ; > return static_cast<uint32_t>(length); > } > > bool > isBranch() const { return instr_is_cti(raw()); } > > bool > isConditionalBranch() const { return instr_is_cbr(raw()); } > > > bool > isConditional() const { return instr_is_predicated(raw()); } > > > bool > isVariableSelector() const > { > int opcode = instr_get_opcode(raw()); > if ((opcode >= OP_cmovo) && (opcode <= OP_cmovnle)) { > ># 42 "../../src/dynamorio/InstructionModel.hpp" 3 > ( ># 42 "../../src/dynamorio/InstructionModel.hpp" > instr_is_predicated(raw()) ># 42 "../../src/dynamorio/InstructionModel.hpp" 3 > ) || facile::RequireException("../../src/dynamorio/InstructionModel.hpp", 42) << ># 42 "../../src/dynamorio/InstructionModel.hpp" > std::endl ># 42 "../../src/dynamorio/InstructionModel.hpp" 3 > << "⢠Condition [" << ># 42 "../../src/dynamorio/InstructionModel.hpp" > "instr_is_predicated(raw())" ># 42 "../../src/dynamorio/InstructionModel.hpp" 3 > << "] " << ># 42 "../../src/dynamorio/InstructionModel.hpp" > std::endl ># 42 "../../src/dynamorio/InstructionModel.hpp" 3 > << "⢠" ># 42 "../../src/dynamorio/InstructionModel.hpp" > << "DynamoRIO API change: opcode " << opcode << " is no longer predicated" << ># 42 "../../src/dynamorio/InstructionModel.hpp" 3 > facile::RequireException::require_sentinel ># 42 "../../src/dynamorio/InstructionModel.hpp" > ; > > return true; > } else { > return false; > } > } > > > bool > isByteSelector() const > { > int opcode = instr_get_opcode(raw()); > return (opcode >= OP_seto && opcode <= OP_setnle); > } > > > bool > isSelector() const { return isVariableSelector() || isByteSelector(); } > > bool > isSinkTee() const > { > switch (opcode()) > { > case OP_mul: > case OP_imul: > case OP_mulx: > case OP_div: > case OP_idiv: > return instr_num_dsts(raw()) == 2; > } > return false; > } > > bool > isMultipleBranch() const { return instr_is_mbr(raw()); } > > bool > isCall() const { return instr_is_call(raw()); } > > bool > isDirectCall() const { return instr_is_call(raw()) && !instr_is_mbr(raw()); } > > bool > isSyscall() const { return instr_is_syscall(raw()); } > > bool > isReturn() const { return instr_is_return(raw()); } > > bool > isInterrupt() const { return instr_is_interrupt(raw()); } > > bool > isUndefined() const { return instr_is_undefined(raw()); } > > loc_t > branchTarget() const { return instr_get_branch_target_pc(raw()); } > > loc_t > relativeTarget() const > { > if (instr_is_mbr(raw())) { > opnd_t target = instr_get_src(raw(), 0); > if (opnd_is_rel_addr(target)) > return opnd_get_addr(target); > } > return 0ULL; > } > > bool > mayFallThrough() const { return !isBranch() || isConditionalBranch() || isCall() || isSyscall() || isInterrupt(); } > > bool > isMove() const { return instr_is_mov(raw()); } > > bool > isNop() const { return instr_is_nop(raw()); } > > bool > isSymbol() const { return instr_get_opcode(raw()) == OP_LABEL; } > > loc_t > location() const { return instr_get_raw_bits(raw()); } > > loc_t > nextLocation() const { return location() + length(); } > > dr_pred_type_t > predicate() const > { > if (isByteSelector()) { > switch (instr_get_opcode(raw())) > { > case OP_seto: > return DR_PRED_O; > > case OP_setno: > return DR_PRED_NO; > > case OP_setb: > return DR_PRED_B; > > case OP_setnb: > return DR_PRED_NB; > > case OP_setz: > return DR_PRED_Z; > > case OP_setnz: > return DR_PRED_NZ; > > case OP_setbe: > return DR_PRED_BE; > > case OP_setnbe: > return DR_PRED_NBE; > > case OP_sets: > return DR_PRED_S; > > case OP_setns: > return DR_PRED_NS; > > case OP_setp: > return DR_PRED_P; > > case OP_setnp: > return DR_PRED_NP; > > case OP_setl: > return DR_PRED_L; > > case OP_setnl: > return DR_PRED_NL; > > case OP_setle: > return DR_PRED_LE; > > case OP_setnle: > return DR_PRED_NLE; > } > } > > return instr_get_predicate(raw()); > } > > > bool > isExclusiveOr() const > { > switch (instr_get_opcode(raw())) > { > case OP_xor: > case OP_pxor: > case OP_xorpd: > case OP_xorps: > return true; > } > > return false; > } > > > bool > isSourceZero() const { return (isExclusiveOr() && opnd_same(instr_get_src(raw(), 0), instr_get_src(raw(), 1))); } > > bool > > isFreeOperand(uint32_t operandPosition) const > { > switch (opcode()) > { > case OP_and: > case OP_add: > case OP_addss: > case OP_addsd: > case OP_sub: > case OP_subss: > case OP_subsd: > case OP_imul: > case OP_mulss: > case OP_mulsd: > case OP_divss: > case OP_divsd: > case OP_xor: > case OP_pxor: > case OP_xorpd: > case OP_xorps: > return operandPosition == 0; > } > ># 233 "../../src/dynamorio/InstructionModel.hpp" 3 > throw facile::RequireException("../../src/dynamorio/InstructionModel.hpp", 233) ># 233 "../../src/dynamorio/InstructionModel.hpp" > << "Instruction with opcode " << hex(opcode()) << " has no free operand" << ># 233 "../../src/dynamorio/InstructionModel.hpp" 3 > facile::RequireException::require_sentinel ># 233 "../../src/dynamorio/InstructionModel.hpp" > ; > } > > bool > isBoundOperand(uint32_t operandPosition) const > { > if (isByteSelector()) > return true; > > switch (opcode()) > { > case OP_and: > case OP_add: > case OP_addss: > case OP_addsd: > case OP_sub: > case OP_subss: > case OP_subsd: > case OP_imul: > case OP_mulss: > case OP_mulsd: > case OP_divss: > case OP_divsd: > case OP_xor: > case OP_pxor: > return operandPosition == 1; > > default: > ; > } > ># 263 "../../src/dynamorio/InstructionModel.hpp" 3 > throw facile::RequireException("../../src/dynamorio/InstructionModel.hpp", 263) ># 263 "../../src/dynamorio/InstructionModel.hpp" > << "Instruction with opcode " << hex(opcode()) << " has no sink-bound operand" << ># 263 "../../src/dynamorio/InstructionModel.hpp" 3 > facile::RequireException::require_sentinel ># 263 "../../src/dynamorio/InstructionModel.hpp" > ; > } > > uint16_t > getRipRelBytePosition() > { > uint16_t position = 0, ipOffset = 4U; > > if ((instr_get_rel_addr_src_idx(raw()) >= 0) || (instr_get_rel_addr_dst_idx(raw()) >= 0)) { > position = length() - 4; > for (int i = 0; i < instr_num_srcs(raw()); i++) { > opnd_t src = instr_get_src(raw(), i); > if (opnd_is_immed(src)) { > size_t operandSize = opnd_size_in_bytes(opnd_get_size(src)); > position -= operandSize; > ipOffset += operandSize; > } > } > for (int i = 0; i < instr_num_dsts(raw()); i++) { > opnd_t dst = instr_get_dst(raw(), i); > if (opnd_is_immed(dst)) { > size_t operandSize = opnd_size_in_bytes(opnd_get_size(dst)); > position -= operandSize; > ipOffset += operandSize; > } > } > } > > if ((position > 0) && instr_raw_bits_valid(raw())) { > loc_t thisOffset = instr_get_raw_bits(raw()); > int32_t targetOffset = *(int32_t *) (thisOffset + position); > uint16_t ip = position + ipOffset; > int32_t targetViaOffset = targetOffset + ip; > > app_pc target; > instr_get_rel_addr_target(raw(), &target); > uint64_t base; > if (instr_get_app_pc(raw()) == ># 300 "../../src/dynamorio/InstructionModel.hpp" 3 4 > __null ># 300 "../../src/dynamorio/InstructionModel.hpp" > ) > base = thisOffset; > else > base = (uint64_t) instr_get_app_pc(raw()); > int64_t targetViaAPI = ((int64_t) target - base); > > ># 306 "../../src/dynamorio/InstructionModel.hpp" 3 > ( ># 306 "../../src/dynamorio/InstructionModel.hpp" > targetViaOffset == targetViaAPI ># 306 "../../src/dynamorio/InstructionModel.hpp" 3 > ) || facile::RequireException("../../src/dynamorio/InstructionModel.hpp", 306) << ># 306 "../../src/dynamorio/InstructionModel.hpp" > std::endl ># 306 "../../src/dynamorio/InstructionModel.hpp" 3 > << "⢠Condition [" << ># 306 "../../src/dynamorio/InstructionModel.hpp" > "targetViaOffset == targetViaAPI" ># 306 "../../src/dynamorio/InstructionModel.hpp" 3 > << "] " << ># 306 "../../src/dynamorio/InstructionModel.hpp" > std::endl ># 306 "../../src/dynamorio/InstructionModel.hpp" 3 > << "⢠" > ># 307 "../../src/dynamorio/InstructionModel.hpp" > << "Failed to locate the rip-relative operand. Offset " << hex(position) > << " points to " << hex(targetViaOffset) << ", but DR reports target address " << hex(targetViaAPI) << ># 308 "../../src/dynamorio/InstructionModel.hpp" 3 > facile::RequireException::require_sentinel ># 308 "../../src/dynamorio/InstructionModel.hpp" > ; > } > > return position; > } > > struct OpcodeTag { > OpcodeTag(int opcode) : > _opcode(opcode) > {} > > friend std::ostream& > operator <<(std::ostream& o, const OpcodeTag& t) > { > if (t._opcode == OP_LABEL) > return o << "<meta>"; > else > return o << decode_opcode_name(t._opcode); > } > > private: > int _opcode; > }; > > protected: > virtual instr_t * > raw() const = 0; >}; >} ># 21 "../../3pty/DynamoRIOFramework.hpp" 2 ># 11 "../../src/PiiFramework.hpp" 2 ># 1 "../../src/model/IntegerDomain.hpp" 1 > > ># 1 "/usr/include/c++/13/variant" 1 3 ># 32 "/usr/include/c++/13/variant" 3 > ># 33 "/usr/include/c++/13/variant" 3 ># 58 "/usr/include/c++/13/variant" 3 > ># 58 "/usr/include/c++/13/variant" 3 >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> > > decltype(auto) > __variant_cast(_Tp&& __rhs) > { > if constexpr (is_lvalue_reference_v<_Tp>) > { > if constexpr (is_const_v<remove_reference_t<_Tp>>) > return static_cast<const variant<_Types...>&>(__rhs); > else > return static_cast<variant<_Types...>&>(__rhs); > } > else > return static_cast<variant<_Types...>&&>(__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) > { > std::__do_visit<__variant_cookie>(std::forward<_Visitor>(__visitor), > std::forward<_Variants>(__variants)...); > } > > > template<typename _Visitor, typename... _Variants> > constexpr void > __raw_idx_visit(_Visitor&& __visitor, _Variants&&... __variants) > { > std::__do_visit<__variant_idx_cookie>(std::forward<_Visitor>(__visitor), > std::forward<_Variants>(__variants)...); > } > > > > template<typename... _Types> > constexpr std::variant<_Types...>& > __as(std::variant<_Types...>& __v) noexcept > { return __v; } > > template<typename... _Types> > constexpr const std::variant<_Types...>& > __as(const std::variant<_Types...>& __v) noexcept > { return __v; } > > template<typename... _Types> > constexpr std::variant<_Types...>&& > __as(std::variant<_Types...>&& __v) noexcept > { return std::move(__v); } > > template<typename... _Types> > constexpr const std::variant<_Types...>&& > __as(const std::variant<_Types...>&& __v) noexcept > { return std::move(__v); } > > > > > > > > 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) > : _M_storage(std::forward<_Args>(__args)...) > { } > > constexpr const _Type& _M_get() const & noexcept > { return _M_storage; } > > constexpr _Type& _M_get() & noexcept > { return _M_storage; } > > constexpr const _Type&& _M_get() const && noexcept > { return std::move(_M_storage); } > > constexpr _Type&& _M_get() && noexcept > { return std::move(_M_storage); } > > _Type _M_storage; > }; > > template<typename _Type> > struct _Uninitialized<_Type, false> > { ># 278 "/usr/include/c++/13/variant" 3 > template<typename... _Args> > constexpr > _Uninitialized(in_place_index_t<0>, _Args&&... __args) > { > ::new ((void*)std::addressof(_M_storage)) > _Type(std::forward<_Args>(__args)...); > } > > const _Type& _M_get() const & noexcept > { return *_M_storage._M_ptr(); } > > _Type& _M_get() & noexcept > { return *_M_storage._M_ptr(); } > > const _Type&& _M_get() const && noexcept > { return std::move(*_M_storage._M_ptr()); } > > _Type&& _M_get() && noexcept > { return std::move(*_M_storage._M_ptr()); } > > __gnu_cxx::__aligned_membuf<_Type> _M_storage; > > }; > > template<size_t _Np, typename _Union> > constexpr decltype(auto) > __get_n(_Union&& __u) noexcept > { > if constexpr (_Np == 0) > return std::forward<_Union>(__u)._M_first._M_get(); > else if constexpr (_Np == 1) > return std::forward<_Union>(__u)._M_rest._M_first._M_get(); > else if constexpr (_Np == 2) > return std::forward<_Union>(__u)._M_rest._M_rest._M_first._M_get(); > else > return __variant::__get_n<_Np - 3>( > std::forward<_Union>(__u)._M_rest._M_rest._M_rest); > } > > > template<size_t _Np, typename _Variant> > constexpr decltype(auto) > __get(_Variant&& __v) noexcept > { return __variant::__get_n<_Np>(std::forward<_Variant>(__v)._M_u); } > > 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() : _M_rest() { } > > template<typename... _Args> > constexpr > _Variadic_union(in_place_index_t<0>, _Args&&... __args) > : _M_first(in_place_index<0>, std::forward<_Args>(__args)...) > { } > > template<size_t _Np, typename... _Args> > constexpr > _Variadic_union(in_place_index_t<_Np>, _Args&&... __args) > : _M_rest(in_place_index<_Np-1>, std::forward<_Args>(__args)...) > { } ># 407 "/usr/include/c++/13/variant" 3 > _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>> > { }; ># 431 "/usr/include/c++/13/variant" 3 > template <typename... _Types> > constexpr bool __never_valueless() > { > return _Traits<_Types...>::_S_move_assign > && (_Never_valueless_alt<_Types>::value && ...); > } > > > 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() > : _M_index(static_cast<__index_type>(variant_npos)) > { } > > template<size_t _Np, typename... _Args> > constexpr > _Variant_storage(in_place_index_t<_Np>, _Args&&... __args) > : _M_u(in_place_index<_Np>, std::forward<_Args>(__args)...), > _M_index{_Np} > { } > > constexpr void > _M_reset() > { > if (!_M_valid()) [[unlikely]] > return; > > std::__do_visit<void>([](auto&& __this_mem) mutable > { > std::_Destroy(std::__addressof(__this_mem)); > }, __variant_cast<_Types...>(*this)); > > _M_index = static_cast<__index_type>(variant_npos); > } > > > ~_Variant_storage() > { _M_reset(); } > > constexpr bool > _M_valid() const noexcept > { > if constexpr (__variant::__never_valueless<_Types...>()) > return true; > return this->_M_index != __index_type(variant_npos); > } > > _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() > : _M_index(static_cast<__index_type>(variant_npos)) > { } > > template<size_t _Np, typename... _Args> > constexpr > _Variant_storage(in_place_index_t<_Np>, _Args&&... __args) > : _M_u(in_place_index<_Np>, std::forward<_Args>(__args)...), > _M_index{_Np} > { } > > constexpr void > _M_reset() noexcept > { _M_index = static_cast<__index_type>(variant_npos); } > > constexpr bool > _M_valid() const noexcept > { > if constexpr (__variant::__never_valueless<_Types...>()) > return true; > > > > > > > return this->_M_index != static_cast<__index_type>(variant_npos); > } > > _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> > > inline void > __emplace(_Variant_storage<_Triv, _Types...>& __v, _Args&&... __args) > { > __v._M_reset(); > auto* __addr = std::__addressof(__variant::__get_n<_Np>(__v._M_u)); > std::_Construct(__addr, std::forward<_Args>(__args)...); > > __v._M_index = _Np; > } > > 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; > > > _Copy_ctor_base(const _Copy_ctor_base& __rhs) > noexcept(_Traits<_Types...>::_S_nothrow_copy_ctor) > { > __variant::__raw_idx_visit( > [this](auto&& __rhs_mem, auto __rhs_index) mutable > { > constexpr size_t __j = __rhs_index; > if constexpr (__j != variant_npos) > std::_Construct(std::__addressof(this->_M_u), > in_place_index<__j>, __rhs_mem); > }, __variant_cast<_Types...>(__rhs)); > this->_M_index = __rhs._M_index; > } > > _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; > > > _Move_ctor_base(_Move_ctor_base&& __rhs) > noexcept(_Traits<_Types...>::_S_nothrow_move_ctor) > { > __variant::__raw_idx_visit( > [this](auto&& __rhs_mem, auto __rhs_index) mutable > { > constexpr size_t __j = __rhs_index; > if constexpr (__j != variant_npos) > std::_Construct(std::__addressof(this->_M_u), > in_place_index<__j>, > std::forward<decltype(__rhs_mem)>(__rhs_mem)); > }, __variant_cast<_Types...>(std::move(__rhs))); > this->_M_index = __rhs._M_index; > } > > _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; > > > _Copy_assign_base& > operator=(const _Copy_assign_base& __rhs) > noexcept(_Traits<_Types...>::_S_nothrow_copy_assign) > { > __variant::__raw_idx_visit( > [this](auto&& __rhs_mem, auto __rhs_index) mutable > { > constexpr size_t __j = __rhs_index; > if constexpr (__j == variant_npos) > this->_M_reset(); > else if (this->_M_index == __j) > __variant::__get<__j>(*this) = __rhs_mem; > else > { > using _Tj = typename _Nth_type<__j, _Types...>::type; > if constexpr (is_nothrow_copy_constructible_v<_Tj> > || !is_nothrow_move_constructible_v<_Tj>) > __variant::__emplace<__j>(*this, __rhs_mem); > else > { > using _Variant = variant<_Types...>; > _Variant& __self = __variant_cast<_Types...>(*this); > __self = _Variant(in_place_index<__j>, __rhs_mem); > } > } > }, __variant_cast<_Types...>(__rhs)); > return *this; > } > > _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; > > > _Move_assign_base& > operator=(_Move_assign_base&& __rhs) > noexcept(_Traits<_Types...>::_S_nothrow_move_assign) > { > __variant::__raw_idx_visit( > [this](auto&& __rhs_mem, auto __rhs_index) mutable > { > constexpr size_t __j = __rhs_index; > if constexpr (__j != variant_npos) > { > if (this->_M_index == __j) > __variant::__get<__j>(*this) = std::move(__rhs_mem); > else > { > using _Tj = typename _Nth_type<__j, _Types...>::type; > if constexpr (is_nothrow_move_constructible_v<_Tj>) > __variant::__emplace<__j>(*this, std::move(__rhs_mem)); > else > { > using _Variant = variant<_Types...>; > _Variant& __self = __variant_cast<_Types...>(*this); > __self.template emplace<__j>(std::move(__rhs_mem)); > } > } > } > else > this->_M_reset(); > }, __variant_cast<_Types...>(__rhs)); > return *this; > } > > _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) > : _Variant_base(in_place_index<0>) { } > > template<size_t _Np, typename... _Args> > constexpr explicit > _Variant_base(in_place_index_t<_Np> __i, _Args&&... __args) > : _Base(__i, std::forward<_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 > { return _M_data; } > > 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 > { > return _M_arr[__first_index + __do_cookie] > ._M_access(__rest_indices...); > } > > _Multi_array<_Tp, __rest...> _M_arr[__first + __do_cookie]; > }; ># 921 "/usr/include/c++/13/variant" 3 > template<typename _Array_type, typename _Index_seq> > struct __gen_vtable_impl; ># 931 "/usr/include/c++/13/variant" 3 > 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() > { > _Array_type __vtable{}; > _S_apply_all_alts( > __vtable, make_index_sequence<variant_size_v<_Next>>()); > return __vtable; > } > > template<size_t... __var_indices> > static constexpr void > _S_apply_all_alts(_Array_type& __vtable, > std::index_sequence<__var_indices...>) > { > if constexpr (__extra_visit_slot_needed<_Result_type, _Next>) > (_S_apply_single_alt<true, __var_indices>( > __vtable._M_arr[__var_indices + 1], > &(__vtable._M_arr[0])), ...); > else > (_S_apply_single_alt<false, __var_indices>( > __vtable._M_arr[__var_indices]), ...); > } > > template<bool __do_cookie, size_t __index, typename _Tp> > static constexpr void > _S_apply_single_alt(_Tp& __element, _Tp* __cookie_element = nullptr) > { > if constexpr (__do_cookie) > { > __element = __gen_vtable_impl< > _Tp, > std::index_sequence<__indices..., __index>>::_S_apply(); > *__cookie_element = __gen_vtable_impl< > _Tp, > std::index_sequence<__indices..., variant_npos>>::_S_apply(); > } > else > { > auto __tmp_element = __gen_vtable_impl< > remove_reference_t<decltype(__element)>, > std::index_sequence<__indices..., __index>>::_S_apply(); > static_assert(is_same_v<_Tp, decltype(__tmp_element)>, > "std::visit requires the visitor to have the same " > "return type for all alternatives of a variant"); > __element = __tmp_element; > } > } > }; > > > > > 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 > { > if constexpr (__index != variant_npos) > return __variant::__get<__index>(std::forward<_Variant>(__var)); > else > return __variant_cookie{}; > } > > static constexpr decltype(auto) > __visit_invoke(_Visitor&& __visitor, _Variants... __vars) > { > if constexpr (is_same_v<_Result_type, __variant_idx_cookie>) > > > std::__invoke(std::forward<_Visitor>(__visitor), > __element_by_index_or_cookie<__indices>( > std::forward<_Variants>(__vars))..., > integral_constant<size_t, __indices>()...); > else if constexpr (is_same_v<_Result_type, __variant_cookie>) > > std::__invoke(std::forward<_Visitor>(__visitor), > __element_by_index_or_cookie<__indices>( > std::forward<_Variants>(__vars))...); > else if constexpr (_Array_type::__result_is_deduced::value) > > return std::__invoke(std::forward<_Visitor>(__visitor), > __element_by_index_or_cookie<__indices>( > std::forward<_Variants>(__vars))...); > else > return std::__invoke_r<_Result_type>( > std::forward<_Visitor>(__visitor), > __variant::__get<__indices>(std::forward<_Variants>(__vars))...); > } > > static constexpr auto > _S_apply() > { > if constexpr (_Array_type::__result_is_deduced::value) > { > constexpr bool __visit_ret_type_mismatch = > !is_same_v<typename _Result_type::type, > decltype(__visit_invoke(std::declval<_Visitor>(), > std::declval<_Variants>()...))>; > if constexpr (__visit_ret_type_mismatch) > { > struct __cannot_match {}; > return __cannot_match{}; > } > else > return _Array_type{&__visit_invoke}; > } > else > return _Array_type{&__visit_invoke}; > } > }; > > 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...>) > { > return __same_types< > invoke_result_t<_Visitor, __get_t<_Idxs, _Variant>>... > >; > } > >} >} > > template<typename _Tp, typename... _Types> > constexpr bool > holds_alternative(const variant<_Types...>& __v) noexcept > { > static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, > "T must occur exactly once in alternatives"); > return __v.index() == std::__find_uniq_type_in_pack<_Tp, _Types...>(); > } > > template<typename _Tp, typename... _Types> > constexpr _Tp& > get(variant<_Types...>& __v) > { > static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, > "T must occur exactly once in alternatives"); > static_assert(!is_void_v<_Tp>, "_Tp must not be void"); > constexpr size_t __n = std::__find_uniq_type_in_pack<_Tp, _Types...>(); > return std::get<__n>(__v); > } > > template<typename _Tp, typename... _Types> > constexpr _Tp&& > get(variant<_Types...>&& __v) > { > static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, > "T must occur exactly once in alternatives"); > static_assert(!is_void_v<_Tp>, "_Tp must not be void"); > constexpr size_t __n = std::__find_uniq_type_in_pack<_Tp, _Types...>(); > return std::get<__n>(std::move(__v)); > } > > template<typename _Tp, typename... _Types> > constexpr const _Tp& > get(const variant<_Types...>& __v) > { > static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, > "T must occur exactly once in alternatives"); > static_assert(!is_void_v<_Tp>, "_Tp must not be void"); > constexpr size_t __n = std::__find_uniq_type_in_pack<_Tp, _Types...>(); > return std::get<__n>(__v); > } > > template<typename _Tp, typename... _Types> > constexpr const _Tp&& > get(const variant<_Types...>&& __v) > { > static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, > "T must occur exactly once in alternatives"); > static_assert(!is_void_v<_Tp>, "_Tp must not be void"); > constexpr size_t __n = std::__find_uniq_type_in_pack<_Tp, _Types...>(); > return std::get<__n>(std::move(__v)); > } > > template<size_t _Np, typename... _Types> > constexpr add_pointer_t<variant_alternative_t<_Np, variant<_Types...>>> > get_if(variant<_Types...>* __ptr) noexcept > { > using _Alternative_type = variant_alternative_t<_Np, variant<_Types...>>; > static_assert(_Np < sizeof...(_Types), > "The index must be in [0, number of alternatives)"); > static_assert(!is_void_v<_Alternative_type>, "_Tp must not be void"); > if (__ptr && __ptr->index() == _Np) > return std::addressof(__detail::__variant::__get<_Np>(*__ptr)); > return nullptr; > } > > template<size_t _Np, typename... _Types> > constexpr > add_pointer_t<const variant_alternative_t<_Np, variant<_Types...>>> > get_if(const variant<_Types...>* __ptr) noexcept > { > using _Alternative_type = variant_alternative_t<_Np, variant<_Types...>>; > static_assert(_Np < sizeof...(_Types), > "The index must be in [0, number of alternatives)"); > static_assert(!is_void_v<_Alternative_type>, "_Tp must not be void"); > if (__ptr && __ptr->index() == _Np) > return std::addressof(__detail::__variant::__get<_Np>(*__ptr)); > return nullptr; > } > > template<typename _Tp, typename... _Types> > constexpr add_pointer_t<_Tp> > get_if(variant<_Types...>* __ptr) noexcept > { > static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, > "T must occur exactly once in alternatives"); > static_assert(!is_void_v<_Tp>, "_Tp must not be void"); > constexpr size_t __n = std::__find_uniq_type_in_pack<_Tp, _Types...>(); > return std::get_if<__n>(__ptr); > } > > template<typename _Tp, typename... _Types> > constexpr add_pointer_t<const _Tp> > get_if(const variant<_Types...>* __ptr) noexcept > { > static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, > "T must occur exactly once in alternatives"); > static_assert(!is_void_v<_Tp>, "_Tp must not be void"); > constexpr size_t __n = std::__find_uniq_type_in_pack<_Tp, _Types...>(); > return std::get_if<__n>(__ptr); > } > > struct monostate { }; ># 1240 "/usr/include/c++/13/variant" 3 > template<typename... _Types> constexpr bool operator <(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) { bool __ret = true; __detail::__variant::__raw_idx_visit( [&__ret, &__lhs] (auto&& __rhs_mem, auto __rhs_index) mutable { if constexpr (__rhs_index != variant_npos) { if (__lhs.index() == __rhs_index) { auto& __this_mem = std::get<__rhs_index>(__lhs); __ret = __this_mem < __rhs_mem; } else __ret = (__lhs.index() + 1) < (__rhs_index + 1); } else __ret = (__lhs.index() + 1) < (__rhs_index + 1); }, __rhs); return __ret; } > template<typename... _Types> constexpr bool operator <=(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) { bool __ret = true; __detail::__variant::__raw_idx_visit( [&__ret, &__lhs] (auto&& __rhs_mem, auto __rhs_index) mutable { if constexpr (__rhs_index != variant_npos) { if (__lhs.index() == __rhs_index) { auto& __this_mem = std::get<__rhs_index>(__lhs); __ret = __this_mem <= __rhs_mem; } else __ret = (__lhs.index() + 1) <= (__rhs_index + 1); } else __ret = (__lhs.index() + 1) <= (__rhs_index + 1); }, __rhs); return __ret; } > template<typename... _Types> constexpr bool operator ==(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) { bool __ret = true; __detail::__variant::__raw_idx_visit( [&__ret, &__lhs] (auto&& __rhs_mem, auto __rhs_index) mutable { if constexpr (__rhs_index != variant_npos) { if (__lhs.index() == __rhs_index) { auto& __this_mem = std::get<__rhs_index>(__lhs); __ret = __this_mem == __rhs_mem; } else __ret = (__lhs.index() + 1) == (__rhs_index + 1); } else __ret = (__lhs.index() + 1) == (__rhs_index + 1); }, __rhs); return __ret; } > template<typename... _Types> constexpr bool operator !=(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) { bool __ret = true; __detail::__variant::__raw_idx_visit( [&__ret, &__lhs] (auto&& __rhs_mem, auto __rhs_index) mutable { if constexpr (__rhs_index != variant_npos) { if (__lhs.index() == __rhs_index) { auto& __this_mem = std::get<__rhs_index>(__lhs); __ret = __this_mem != __rhs_mem; } else __ret = (__lhs.index() + 1) != (__rhs_index + 1); } else __ret = (__lhs.index() + 1) != (__rhs_index + 1); }, __rhs); return __ret; } > template<typename... _Types> constexpr bool operator >=(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) { bool __ret = true; __detail::__variant::__raw_idx_visit( [&__ret, &__lhs] (auto&& __rhs_mem, auto __rhs_index) mutable { if constexpr (__rhs_index != variant_npos) { if (__lhs.index() == __rhs_index) { auto& __this_mem = std::get<__rhs_index>(__lhs); __ret = __this_mem >= __rhs_mem; } else __ret = (__lhs.index() + 1) >= (__rhs_index + 1); } else __ret = (__lhs.index() + 1) >= (__rhs_index + 1); }, __rhs); return __ret; } > template<typename... _Types> constexpr bool operator >(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) { bool __ret = true; __detail::__variant::__raw_idx_visit( [&__ret, &__lhs] (auto&& __rhs_mem, auto __rhs_index) mutable { if constexpr (__rhs_index != variant_npos) { if (__lhs.index() == __rhs_index) { auto& __this_mem = std::get<__rhs_index>(__lhs); __ret = __this_mem > __rhs_mem; } else __ret = (__lhs.index() + 1) > (__rhs_index + 1); } else __ret = (__lhs.index() + 1) > (__rhs_index + 1); }, __rhs); return __ret; } > > > > constexpr bool operator==(monostate, monostate) noexcept { return true; } ># 1281 "/usr/include/c++/13/variant" 3 > constexpr bool operator!=(monostate, monostate) noexcept { return false; } > constexpr bool operator<(monostate, monostate) noexcept { return false; } > constexpr bool operator>(monostate, monostate) noexcept { return false; } > constexpr bool operator<=(monostate, monostate) noexcept { return true; } > constexpr bool operator>=(monostate, monostate) noexcept { return true; } > > > template<typename _Visitor, typename... _Variants> > constexpr __detail::__variant::__visit_result_t<_Visitor, _Variants...> > visit(_Visitor&&, _Variants&&...); > > template<typename... _Types> > > inline enable_if_t<(is_move_constructible_v<_Types> && ...) > && (is_swappable_v<_Types> && ...)> > swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs) > noexcept(noexcept(__lhs.swap(__rhs))) > { __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 > { return _M_reason; } > > private: > bad_variant_access(const char* __reason) noexcept : _M_reason(__reason) { } > > > const char* _M_reason = "bad variant access"; > > friend void __throw_bad_variant_access(const char* __what); > }; > > > inline void > __throw_bad_variant_access(const char* __what) > { (throw (bad_variant_access(__what))); } > > inline void > __throw_bad_variant_access(bool __valueless) > { > if (__valueless) [[__unlikely__]] > __throw_bad_variant_access("std::get: variant is valueless"); > else > __throw_bad_variant_access("std::get: wrong index for variant"); > } > > 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 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; > ~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>) > : variant(in_place_index<__accepted_index<_Tp>>, > std::forward<_Tp>(__t)) > { } > > 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) > : variant(in_place_index<__index_of<_Tp>>, > std::forward<_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) > : variant(in_place_index<__index_of<_Tp>>, __il, > std::forward<_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) > : _Base(in_place_index<_Np>, std::forward<_Args>(__args)...), > _Default_ctor_enabler(_Enable_default_constructor_tag{}) > { } > > 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) > : _Base(in_place_index<_Np>, __il, std::forward<_Args>(__args)...), > _Default_ctor_enabler(_Enable_default_constructor_tag{}) > { } > > template<typename _Tp> > > 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>) > { > constexpr auto __index = __accepted_index<_Tp>; > if (index() == __index) > std::get<__index>(*this) = std::forward<_Tp>(__rhs); > else > { > using _Tj = __accepted_type<_Tp&&>; > if constexpr (is_nothrow_constructible_v<_Tj, _Tp> > || !is_nothrow_move_constructible_v<_Tj>) > this->emplace<__index>(std::forward<_Tp>(__rhs)); > else > > > this->emplace<__index>(_Tj(std::forward<_Tp>(__rhs))); > } > return *this; > } > > template<typename _Tp, typename... _Args> > > enable_if_t<is_constructible_v<_Tp, _Args...> && __exactly_once<_Tp>, > _Tp&> > emplace(_Args&&... __args) > { > constexpr size_t __index = __index_of<_Tp>; > return this->emplace<__index>(std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename _Up, typename... _Args> > > enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...> > && __exactly_once<_Tp>, > _Tp&> > emplace(initializer_list<_Up> __il, _Args&&... __args) > { > constexpr size_t __index = __index_of<_Tp>; > return this->emplace<__index>(__il, std::forward<_Args>(__args)...); > } > > template<size_t _Np, typename... _Args> > > enable_if_t<is_constructible_v<__to_type<_Np>, _Args...>, > __to_type<_Np>&> > emplace(_Args&&... __args) > { > namespace __variant = std::__detail::__variant; > using type = typename _Nth_type<_Np, _Types...>::type; > > > if constexpr (is_nothrow_constructible_v<type, _Args...>) > { > __variant::__emplace<_Np>(*this, std::forward<_Args>(__args)...); > } > else if constexpr (is_scalar_v<type>) > { > > const type __tmp(std::forward<_Args>(__args)...); > > __variant::__emplace<_Np>(*this, __tmp); > } > else if constexpr (__variant::_Never_valueless_alt<type>() > && _Traits::_S_move_assign) > { > > variant __tmp(in_place_index<_Np>, > std::forward<_Args>(__args)...); > > *this = std::move(__tmp); > } > else > { > > > __variant::__emplace<_Np>(*this, std::forward<_Args>(__args)...); > } > return std::get<_Np>(*this); > } > > template<size_t _Np, typename _Up, typename... _Args> > > enable_if_t<is_constructible_v<__to_type<_Np>, > initializer_list<_Up>&, _Args...>, > __to_type<_Np>&> > emplace(initializer_list<_Up> __il, _Args&&... __args) > { > namespace __variant = std::__detail::__variant; > using type = typename _Nth_type<_Np, _Types...>::type; > > > if constexpr (is_nothrow_constructible_v<type, > initializer_list<_Up>&, > _Args...>) > { > __variant::__emplace<_Np>(*this, __il, > std::forward<_Args>(__args)...); > } > else if constexpr (__variant::_Never_valueless_alt<type>() > && _Traits::_S_move_assign) > { > > variant __tmp(in_place_index<_Np>, __il, > std::forward<_Args>(__args)...); > > *this = std::move(__tmp); > } > else > { > > > __variant::__emplace<_Np>(*this, __il, > std::forward<_Args>(__args)...); > } > return std::get<_Np>(*this); > } > > 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 > { return !this->_M_valid(); } > > constexpr size_t index() const noexcept > { > using __index_type = typename _Base::__index_type; > if constexpr (__detail::__variant::__never_valueless<_Types...>()) > return this->_M_index; > else if constexpr (sizeof...(_Types) <= __index_type(-1) / 2) > return make_signed_t<__index_type>(this->_M_index); > else > return size_t(__index_type(this->_M_index + 1)) - 1; > } > > > void > swap(variant& __rhs) > noexcept((__is_nothrow_swappable<_Types>::value && ...) > && is_nothrow_move_constructible_v<variant>) > { > static_assert((is_move_constructible_v<_Types> && ...)); > > > if (__rhs.valueless_by_exception()) [[__unlikely__]] > { > if (!this->valueless_by_exception()) [[__likely__]] > __rhs.swap(*this); > return; > } > > namespace __variant = __detail::__variant; > > __variant::__raw_idx_visit( > [this, &__rhs](auto&& __rhs_mem, auto __rhs_index) mutable > { > constexpr size_t __j = __rhs_index; > if constexpr (__j != variant_npos) > { > if (this->index() == __j) > { > using std::swap; > swap(std::get<__j>(*this), __rhs_mem); > } > else > { > auto __tmp(std::move(__rhs_mem)); > > if constexpr (_Traits::_S_trivial_move_assign) > __rhs = std::move(*this); > else > __variant::__raw_idx_visit( > [&__rhs](auto&& __this_mem, auto __this_index) mutable > { > constexpr size_t __k = __this_index; > if constexpr (__k != variant_npos) > __variant::__emplace<__k>(__rhs, > std::move(__this_mem)); > }, *this); > > __variant::__emplace<__j>(*this, std::move(__tmp)); > } > } > }, __rhs); > } > > > > > > > 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) > { > static_assert(_Np < sizeof...(_Types), > "The index must be in [0, number of alternatives)"); > if (__v.index() != _Np) > __throw_bad_variant_access(__v.valueless_by_exception()); > return __detail::__variant::__get<_Np>(__v); > } > > template<size_t _Np, typename... _Types> > constexpr variant_alternative_t<_Np, variant<_Types...>>&& > get(variant<_Types...>&& __v) > { > static_assert(_Np < sizeof...(_Types), > "The index must be in [0, number of alternatives)"); > if (__v.index() != _Np) > __throw_bad_variant_access(__v.valueless_by_exception()); > return __detail::__variant::__get<_Np>(std::move(__v)); > } > > template<size_t _Np, typename... _Types> > constexpr const variant_alternative_t<_Np, variant<_Types...>>& > get(const variant<_Types...>& __v) > { > static_assert(_Np < sizeof...(_Types), > "The index must be in [0, number of alternatives)"); > if (__v.index() != _Np) > __throw_bad_variant_access(__v.valueless_by_exception()); > return __detail::__variant::__get<_Np>(__v); > } > > template<size_t _Np, typename... _Types> > constexpr const variant_alternative_t<_Np, variant<_Types...>>&& > get(const variant<_Types...>&& __v) > { > static_assert(_Np < sizeof...(_Types), > "The index must be in [0, number of alternatives)"); > if (__v.index() != _Np) > __throw_bad_variant_access(__v.valueless_by_exception()); > return __detail::__variant::__get<_Np>(std::move(__v)); > } > > > template<typename _Result_type, typename _Visitor, typename... _Variants> > constexpr decltype(auto) > __do_visit(_Visitor&& __visitor, _Variants&&... __variants) > { > > if constexpr (sizeof...(_Variants) == 0) > { > if constexpr (is_void_v<_Result_type>) > return (void) std::forward<_Visitor>(__visitor)(); > else > return std::forward<_Visitor>(__visitor)(); > } > else > { > constexpr size_t __max = 11; > > > using _V0 = typename _Nth_type<0, _Variants...>::type; > > constexpr auto __n = variant_size_v<remove_reference_t<_V0>>; > > if constexpr (sizeof...(_Variants) > 1 || __n > __max) > { > > constexpr auto& __vtable = __detail::__variant::__gen_vtable< > _Result_type, _Visitor&&, _Variants&&...>::_S_vtable; > > auto __func_ptr = __vtable._M_access(__variants.index()...); > return (*__func_ptr)(std::forward<_Visitor>(__visitor), > std::forward<_Variants>(__variants)...); > } > else > { > > _V0& __v0 > = [](_V0& __v, ...) -> _V0& { return __v; }(__variants...); > > using __detail::__variant::_Multi_array; > using __detail::__variant::__gen_vtable_impl; > using _Ma = _Multi_array<_Result_type (*)(_Visitor&&, _V0&&)>; ># 1789 "/usr/include/c++/13/variant" 3 > switch (__v0.index()) > { > case 0: { if constexpr (0 < __n) { return __gen_vtable_impl<_Ma, index_sequence<0>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 1: { if constexpr (1 < __n) { return __gen_vtable_impl<_Ma, index_sequence<1>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 2: { if constexpr (2 < __n) { return __gen_vtable_impl<_Ma, index_sequence<2>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 3: { if constexpr (3 < __n) { return __gen_vtable_impl<_Ma, index_sequence<3>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 4: { if constexpr (4 < __n) { return __gen_vtable_impl<_Ma, index_sequence<4>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 5: { if constexpr (5 < __n) { return __gen_vtable_impl<_Ma, index_sequence<5>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 6: { if constexpr (6 < __n) { return __gen_vtable_impl<_Ma, index_sequence<6>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 7: { if constexpr (7 < __n) { return __gen_vtable_impl<_Ma, index_sequence<7>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 8: { if constexpr (8 < __n) { return __gen_vtable_impl<_Ma, index_sequence<8>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 9: { if constexpr (9 < __n) { return __gen_vtable_impl<_Ma, index_sequence<9>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case 10: { if constexpr (10 < __n) { return __gen_vtable_impl<_Ma, index_sequence<10>>:: __visit_invoke(std::forward<_Visitor>(__visitor), std::forward<_V0>(__v0)); } else __builtin_unreachable(); } > case variant_npos: > using __detail::__variant::__variant_idx_cookie; > using __detail::__variant::__variant_cookie; > if constexpr (is_same_v<_Result_type, __variant_idx_cookie> > || is_same_v<_Result_type, __variant_cookie>) > { > using _Npos = index_sequence<variant_npos>; > return __gen_vtable_impl<_Ma, _Npos>:: > __visit_invoke(std::forward<_Visitor>(__visitor), > std::forward<_V0>(__v0)); > } > else > __builtin_unreachable(); > default: > __builtin_unreachable(); > } > > > } > } > } > > > template<typename _Visitor, typename... _Variants> > constexpr __detail::__variant::__visit_result_t<_Visitor, _Variants...> > visit(_Visitor&& __visitor, _Variants&&... __variants) > { > namespace __variant = std::__detail::__variant; > > if ((__variant::__as(__variants).valueless_by_exception() || ...)) > __throw_bad_variant_access("std::visit: variant is valueless"); > > using _Result_type > = __detail::__variant::__visit_result_t<_Visitor, _Variants...>; > > using _Tag = __detail::__variant::__deduce_visit_result<_Result_type>; > > if constexpr (sizeof...(_Variants) == 1) > { > using _Vp = decltype(__variant::__as(std::declval<_Variants>()...)); > > constexpr bool __visit_rettypes_match = __detail::__variant:: > __check_visitor_results<_Visitor, _Vp>( > make_index_sequence<variant_size_v<remove_reference_t<_Vp>>>()); > if constexpr (!__visit_rettypes_match) > { > static_assert(__visit_rettypes_match, > "std::visit requires the visitor to have the same " > "return type for all alternatives of a variant"); > return; > } > else > return std::__do_visit<_Tag>( > std::forward<_Visitor>(__visitor), > static_cast<_Vp>(__variants)...); > } > else > return std::__do_visit<_Tag>( > std::forward<_Visitor>(__visitor), > __variant::__as(std::forward<_Variants>(__variants))...); > } ># 1880 "/usr/include/c++/13/variant" 3 > 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> && ...)) > { > size_t __ret; > __detail::__variant::__raw_visit( > [&__t, &__ret](auto&& __t_mem) mutable > { > using _Type = __remove_cvref_t<decltype(__t_mem)>; > if constexpr (!is_same_v<_Type, > __detail::__variant::__variant_cookie>) > __ret = std::hash<size_t>{}(__t.index()) > + std::hash<_Type>{}(__t_mem); > else > __ret = std::hash<size_t>{}(__t.index()); > }, __t); > return __ret; > } > }; > > 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 > { > constexpr size_t __magic_monostate_hash = -7777; > return __magic_monostate_hash; > } > }; > > template<typename... _Types> > struct __is_fast_hash<hash<variant<_Types...>>> > : bool_constant<(__is_fast_hash<_Types>::value && ...)> > { }; > > >} ># 4 "../../src/model/IntegerDomain.hpp" 2 > > ># 1 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" 1 > > > > > ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/walk.hpp" 1 > > > > > > ># 6 "../../subprojects/edfst/subprojects/point-util/src/point/walk.hpp" >namespace point_util >{ > >template<typename T, typename Tag = typename std::enable_if_t<std::is_base_of<std::forward_iterator_tag, typename T::iterator_category>::value, void>> >class walk >{ >public: > > > > > > > > using cell = typename T::value_type; > > walk() : > _value(nullptr) > {} > > walk(T *t) : > _value(t) > {} > > walk(const walk<T>& t) : > _value(t._value) > {} > > > > > > walk(nullptr_t null) : > _value(null) > {} > > operator T *() = delete; > > T& > operator ->() const { return *_value; } > > T > copy() const { return *_value; } > > cell > read() const { return **_value; } > > void > write(const T& t) const > { > *_value = t; > } > > void > write(const walk<T>& s) const > { > *_value = *s._value; > } > > std::size_t > pointerHash() const > { > static std::hash<T *> hasher; > > return hasher(_value); > } > > bool > operator ==(const T& other) const { return *_value == other; } > > bool > operator !=(const T& other) const { return *_value != other; } > > bool > operator ==(const walk<T> other) const { return *_value == *other._value; } > > bool > operator !=(const walk<T> other) const { return *_value != *other._value; } > > bool > operator ==(nullptr_t null) { return _value == null; } > > bool > operator !=(nullptr_t null) { return _value != null; } > > walk<T>& > operator =(T *t) { return _value = t, *this; } > > walk<T>& > operator =(walk<T> t) { return _value = t._value, *this; } > > walk<T>& > operator ++() { return ++(*_value), *this; } > > T > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > T copy = *_value; > (*_value)++; > return copy; > } > >private: > T *_value; >}; > >template<typename T> >struct walk_hash { > std::size_t > operator ()(const walk<T>& t) const noexcept > { > return t.pointerHash(); > } >}; >} ># 7 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" 2 > > > >namespace facile >{ >template<typename T, typename U = typename std::make_unsigned<T>::type> >class SpanBase { >using S = typename std::make_signed<T>::type; >using Span = SpanBase<T, U>; > >template<typename Integer> >using Bounds = Arithmetic::Bounds<Integer>; > >using Is = Arithmetic::Is<size_t>; > >public: > using Atom = T; > using Signed = S; > using Unsigned = U; > > struct less { > bool > operator ()(const Span& a, const Span& b) const { return a._last < b._first; } > }; > > class Set : > public std::set<Span, less> { > using super = std::set<Span, less>; > > public: > using iterator = typename super::iterator; > > struct Token { > const Set& s; > > friend std::ostream& > operator <<(std::ostream& o, const Token& t) > { > for (const Span& span : t.s) > o << ". " << span << std::endl; > return o; > } > }; > > bool > overlap(const Span& test) const > { > iterator i = super::lower_bound(test); > if (i == super::end()) > return false; > else > return test.overlap(*i); > } > > void > merge(const Span& s) > { > T first = Arithmetic::decrement(s._first); > iterator walk = super::lower_bound(Span(first, s._last)); > if (walk == super::end()) { > super::emplace(s); > return; > } > > if (Arithmetic::increment(s._last) < walk->_first) { > super::emplace(s); > return; > } > > iterator expand = walk++; > Span merge(std::min(expand->_first, s._first), expand->_last), tail = merge; > while (walk != super::end() && s.contiguous(*walk)) { > tail = *walk; > super::erase(walk++); > if (tail._last >= s._last) { > if ((walk != super::end()) && (walk->first() == Arithmetic::increment(s._last))) > tail = *walk; > break; > } > } > merge._last = std::max(tail._last, s._last); > replace(expand, merge); > } > > void > merge( handle<const Set> other) { merge(other->begin(), other->end()); } > > template<typename Source, typename = typename std::enable_if_t<is_iterable<Source>::value, void>> > void > merge(Source source) { merge(source.begin(), source.end()); } > > void > merge(iterator b, iterator end) > { > iterator a = super::begin(); > > Chase chase { *this, true, false, 0, &a, &b, a }; > > while (a != super::end() && b != end) { > while (Arithmetic::increment(a->_last) < b->_first) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 107, facile::StreamLogLevel::Detail) << "⢠a steps from " << *a << std::endl; > > if (++a == super::end()) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 110, facile::StreamLogLevel::Detail) << "â· fill b from " << *b << std::endl; > > do { > super::emplace(*b); > } while (++b != end); > return; > } > } > while (Arithmetic::increment(b->_last) < a->_first) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 119, facile::StreamLogLevel::Detail) << "â· insert b " << *b << " and step" << std::endl; > > super::emplace(*b); > > if (++b == end) > return; > } > if (a->contiguous(*b)) { > chase.align(a, b); > > facile::StreamLog::log(__PRETTY_FUNCTION__, 129, facile::StreamLogLevel::Detail) << "⢠fusion starts at " << chase.token() << std::endl; > > > while (true) { > if (++chase.left == (chase.aWalks ? super::end() : end)) { > chase.fuse(); > break; > } > > if (chase.left->_first > Arithmetic::increment(chase.right->_last)) { > chase.fuse(); > break; > } > > facile::StreamLog::log(__PRETTY_FUNCTION__, 143, facile::StreamLogLevel::Detail) << "⢠fusion steps to " << chase.token() << std::endl; > > chase.erase(); > > if (chase.left->_last > chase.right->_last) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 148, facile::StreamLogLevel::Detail) << "⢠fusion alternates" << std::endl; > > if (chase.left->_first > Arithmetic::increment(chase.right->_last)) { > chase.fuse(); > break; > } else { > chase.flip(); > } > } > } > facile::StreamLog::log(__PRETTY_FUNCTION__, 158, facile::StreamLogLevel::Detail) << "⢠fusion ends at " << chase.token() << std::endl; > } > } > > while (b != end) > super::emplace(*b++); > } > > iterator > replace(iterator i, Span replacement) > { > super::erase(i); > return super::emplace(replacement).first; > } > > void > intersect( handle<const Set> other) { intersect(other->begin(), other->end()); } > > template<typename Source, typename = typename std::enable_if_t<is_iterable<Source>::value, void>> > void > intersect(Source source) { intersect(source.begin(), source.end()); } > > template<typename SourceStep> > void > intersect(SourceStep b, SourceStep end) > { > iterator a = super::begin(); > if (a == super::end()) > return; > > if (b == end) { > super::clear(); > return; > } > > while (true) { > while (a->_last < b->_first) { > super::erase(a++); > if (a == super::end()) > return; > } > if (a->_first <= b->_last) { > a = replace(a, Span(std::max(a->_first, b->_first), a->_last)); > if (a->_last <= b->_last) { > while (true) { > if (++a == super::end()) > return; > > if ((a->_first <= b->_last) && (a->_last > b->_last)) { > a = replace(a, Span(std::max(a->_first, b->_first), b->_last)); > if (++b == end) { > clear(++a); > return; > } > } else { > break; > } > } > } > } > while (b->_last < a->_first) { > if (++b == end) { > clear(a); > return; > } > } > if (b->_first < a->_last) { > Span x = *a; > if (b->_first > x._first) > x._first = b->_first; > if (b->_last < x._last) { > T tail = x._last; > x._last = b->_last; > a = ++replace(a, x); > if (++b == end) { > clear(a); > return; > } > while (b->_last <= tail) { > super::emplace(*b); > if (++b == end) { > clear(a); > return; > } > } > if (b->_first < tail) { > super::emplace(Span(b->_first, tail)); > if (++b == end) { > clear(a); > return; > } > } > } else { > a = ++replace(a, x); > } > if (a == super::end()) > return; > } > } > } > > void > exclude(const Span& x) > { > iterator walk = super::lower_bound(x); > if ((walk == super::end()) || (x._last < walk->_first)) > return; > > Span y = *walk; > super::erase(walk++); > > Span i = x.intersect(y); > if (i._first > y._first) > super::emplace(y._first, Arithmetic::decrement(i._first)); > > while ((walk != super::end()) && (x._last >= walk->_first)) { > y = *walk; > super::erase(walk++); > } > > i = x.intersect(y); > if (i._last < y._last) > super::emplace(Arithmetic::increment(i._last), y._last); > } > > void > invert() > { > if (super::empty()) { > super::emplace(Bounds<T>::min, Bounds<T>::max); > return; > } > > T first, left = super::begin()->_first; > iterator walk = super::begin(); > while (true) { > first = walk->_last; > super::erase(walk++); > if (walk == super::end()) > break; > super::emplace(Arithmetic::increment(first), Arithmetic::decrement(walk->_first)); > } > > if (Bounds<T>::min < left) > super::emplace(Bounds<T>::min, left - 1); > if (first < Bounds<T>::max) > super::emplace(first + 1, Bounds<T>::max); > } > > template<typename Source> > void > invert(Source s, Source end) > { > super::clear(); > > > } > > > > U > footprint() const > { > Meter<U> total(0, Bounds<U>::max); > for (const Span& span : *this) > total += span.footprint(); > > return total.read(); > } > > bool > exceeds(U limit) const > { > Meter<U> m(limit); > for (const Span& span : *this) { > m -= Arithmetic::ascendingDistance(span._first, span._last); > m -= 1; > if (m.isAtLimit()) > return true; > } > return false; > } > > bool > isFull() const > { > return (super::size() > 1) || (super::begin()->_first > Bounds<T>::min) || (super::begin()->_last < Bounds<T>::max); > } > > void > fill() > { > if (super::empty()) { > super::emplace(Bounds<T>::min, Bounds<T>::max); > } else if (!isFull()) { > super::clear(); > super::emplace(Bounds<T>::min, Bounds<T>::max); > } > } > > handle<Set> > clear() { return super::clear(), *this; } > > Token > token() const { return Token{ *this }; } > > private: > struct Chase { > struct Token { > const Chase& chase; > > friend std::ostream& > operator <<(std::ostream& o, const Token& t) > { > char leftTag = (t.chase.aWalks ? 'a' : 'b'); > char rightTag = (t.chase.aWalks ? 'b' : 'a'); > return o << "{" << leftTag << " walks: (" << leftTag << " " << t.chase.left.read() << ", " << rightTag << " " << t.chase.right.read() << ")}"; > } > }; > > super& set; > bool aWalks; > bool isFusionPending; > T start; > walk<iterator> left; > walk<iterator> right; > iterator erasure; > > void > flip() > { > walk<iterator> swap = left; > left = right; > right = swap; > aWalks = !aWalks; > > if (aWalks) > erasure = left.copy(); > > isFusionPending = true; > } > > void > align(iterator& a, iterator& b) > { > erasure = a; > > start = std::min(a->_first, b->_first); > > if ((a->_last <= b->_last) != aWalks) > flip(); > > isFusionPending = (aWalks || (b->_first < a->_first)); > } > > void > fuse() > { > if (!isFusionPending) > return; > > Span fusion(start, right->_last); > right++; > > facile::StreamLog::log(__PRETTY_FUNCTION__, 422, facile::StreamLogLevel::Detail) << "â· erase " << *erasure << std::endl; > set.erase(erasure); > > facile::StreamLog::log(__PRETTY_FUNCTION__, 425, facile::StreamLogLevel::Detail) << "â· fuse " << fusion << std::endl; > > set.emplace(fusion); > } > > void > erase() > { > if (aWalks) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 434, facile::StreamLogLevel::Detail) << "â· erase " << *erasure << std::endl; > > set.erase(erasure); > erasure = left.copy(); > } > } > > Token > token() const { return Token{ *this }; } > }; > > void > clear(iterator i) > { > while (i != super::end()) > super::erase(i++); > } > }; > > struct EndTag {}; > > class iterator > { > public: > typedef iterator self_type; > typedef T value_type; > typedef void reference; > typedef void pointer; > typedef std::forward_iterator_tag iterator_category; > typedef int difference_type; > > iterator(__attribute__((unused)) nullptr_t null = nullptr) : > _i(0), > _s(nullptr) > {} > > iterator(handle<const Span> s) : > _i(s->_first), > _s(s) > { > ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" 3 > ( ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" > s->_last < Bounds<T>::max ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/math/Span.hpp", 474) << ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" > std::endl ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" 3 > << "⢠Condition [" << ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" > "s->_last < Bounds<T>::max" ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" 3 > << "] " << ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" > std::endl ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" 3 > << "⢠" ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" > << "Cannot iterate a span that reaches the maximum value" << ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" 3 > facile::RequireException::require_sentinel ># 474 "../../subprojects/edfst/subprojects/facile/src/math/Span.hpp" > ; > } > > iterator(handle<const Span> s, __attribute__((unused)) EndTag *disambiguator) : > _i(s->_last + 1), > _s(s) > {} > > self_type > operator ++() { return _i++, *this; } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > return _i++, pre; > } > > template<typename Integer> > self_type > operator +(Integer amount) const { return iterator(_s, _i + amount); } > > template<typename Integer> > self_type > operator +=(Integer amount) { return _i += amount, *this; } > > difference_type > operator -(const self_type& other) const { return _i - other._i; } > > template<typename Integer> > self_type > operator -(Integer amount) const { return iterator(_s, _i - amount); } > > template<typename Integer> > self_type > operator -=(Integer amount) { return _i -= amount, *this; } > > T > operator *() { return _i; } > > T > operator ->() const { return _i; } > > bool > operator ==(const self_type& other) const { return _s == other._s && _i == other._i; } > > bool > operator !=(const self_type& other) const { return _s != other._s || _i != other._i; } > > private: > iterator(handle<const Span> s, T i) : > _s(s), > _i(i) > {} > > T _i; > handle<const Span> _s; > }; > > SpanBase() : > _first(0), > _last(0) > {} > > SpanBase(T i) : > _first(i), > _last(i) > {} > > SpanBase(T first, T last) : > _first(first), > _last(last) > {} > > SpanBase(const Span& src) : > _first(src._first), > _last(src._last) > {} > > template<typename I, > typename = typename std::enable_if_t<std::is_integral<I>::value && > Is::less(sizeof(I), sizeof(T)) && > (std::is_signed<I>::value == std::is_signed<T>::value), void>> > SpanBase(I first, I last) : > _first(first), > _last(last) > {} > > template<typename I, > typename = typename std::enable_if_t<std::is_integral<I>::value && > Is::less(sizeof(I), sizeof(T)) && > (std::is_signed<I>::value == std::is_signed<T>::value), void>> > SpanBase(const SpanBase<I>& src) : > _first(src.first()), > _last(src.last()) > {} > > bool > isZero() const { return _first == 0 && _last == 0; } > > T > first() const { return _first; } > > T > last() const { return _last; } > > bool > contains(T point) const { return (point >= _first && point <= _last); } > > bool > overlap(const Span& s) const { return (_first <= s._last && _last >= s._first); } > > bool > contiguous(const Span& s) const { return (_first <= Arithmetic::increment(s._last) && Arithmetic::increment(_last) >= s._first); } > > Span > intersect(const Span& s) const > { > if (!overlap(s)) > return Span(); > else > return Span(std::max(_first, s._first), std::min(_last, s._last)); > } > > Span > hull(const Span& s) const { return Span(std::min(_first, s._first), std::max(_last, s._last)); } > > template<typename Sink, typename = typename std::enable_if_t<std::is_integral<Sink>::value>> > std::pair<SpanBase<Sink>, bool> > truncate() const > { > bool exists = true; > Sink first = 0, last = 0; > > if constexpr ((std::is_signed<Sink>::value && (sizeof(Sink) <= sizeof(T))) || (!std::is_signed<Sink>::value && (sizeof(Sink) < sizeof(T)))) { > static constexpr Sink ceiling = Bounds<Sink>::max; > > if (_first > widen<T>(ceiling)) > exists = false; > else if (_last > widen<T>(ceiling)) > last = ceiling; > else > last = narrow<Sink>(_last); > } else { > last = _last; > } > > if constexpr (std::is_signed<Sink>::value) { > if constexpr (std::is_signed<T>::value && (sizeof(T) > sizeof(Sink))) { > if (_last < Bounds<Sink>::min) > exists = false; > else if (_first < Bounds<Sink>::min) > first = Bounds<Sink>::min; > else > first = narrow<Sink>(_first); > } else { > first = _first; > } > } else if constexpr (std::is_signed<T>::value) { > if (_last < 0) > exists = false; > else if (_first > 0) > first = _first; > } else { > first = _first; > } > > return std::make_pair(SpanBase<Sink>(first, last), exists); > } > > SpanBase<S, U> > sign() const > { > if constexpr (std::is_signed<T>()) > return *this; > > S first = static_cast<S>(_first), last = static_cast<S>(_last); > return ((first <= last) ? SpanBase<S, U>(first, last) : SpanBase<S, U>(last, first)); > } > > SpanBase<U, U> > unsign() const > { > if constexpr (!std::is_signed<T>()) > return *this; > > U first = static_cast<U>(_first), last = static_cast<U>(_last); > return ((first <= last) ? SpanBase<U, U>(first, last) : SpanBase<U, U>(last, first)); > } > > U > footprint() const > { > U exclusive = Arithmetic::ascendingDistance(_first, _last); > if (exclusive < Bounds<U>::max) > return point_util::quantifyByIndex(exclusive); > else > return exclusive; > } > > bool > exceeds(U limit) const > { > Meter<U> m(limit); > m -= Arithmetic::ascendingDistance(_first, _last); > m -= 1; > return m.isAtLimit(); > } > > iterator > begin() const { return iterator(*this); } > > iterator > end() const { return iterator(*this, hidden_tag<EndTag>()); } > > template<typename I, typename Source = SpanBase<I>, > typename = typename std::enable_if_t<std::is_integral<I>::value && > Is::less(sizeof(I), sizeof(T)) && > (std::is_signed<I>::value == std::is_signed<T>::value), void>> > Span& > operator =(const Source& src) { return _first = src._first, _last = src._last, *this; } > > template<typename I, typename Wider = SpanBase<I>, > typename = typename std::enable_if_t<std::is_integral<I>::value && > Is::less(sizeof(T), sizeof(I)) && > (std::is_signed<I>::value == std::is_signed<T>::value), void>> > operator Wider() { return Wider(_first, _last); } > > Span& > operator =(const Span& src) { return _first = src._first, _last = src._last, *this; } > > > Span > operator +(const Span& addend) const > { > return Span(Arithmetic::slide(_first, addend._first), Arithmetic::slide(_last, addend._last)); > } > > Span > operator -(const Span& subtrahend) const > { > return Span(Arithmetic::slide(_first, Arithmetic::negate(subtrahend._last)), > Arithmetic::slide(_last, Arithmetic::negate(subtrahend._first))); > } > > bool > operator ==(const Span& other) const { return (_first == other._first && _last == other._last); } > > bool > operator !=(const Span& other) const { return (_first != other._first || _last != other._last); } > > friend std::ostream& > operator <<(std::ostream& o, const Span& span) { return o << "[" << span._first << ".." << span._last << "]"; } > >private: > T _first; > T _last; >}; >} ># 7 "../../src/model/IntegerDomain.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/point-util/src/point/writeback.hpp" 1 > > > > >namespace point_util >{ >template<typename T> >class writeback >{ >public: > writeback() : > _t(nullptr) > {} > > writeback(T& t) : > _t(&t) > {} > > writeback(const writeback<T>& src) : > _t(src._t) > {} > > inline T& > read() const { return *_t; } > > inline void > write(const T& t) { *_t = t; } > > writeback<T>& > operator =(const writeback<T>& src) { return _t = src._t, *this; } > >private: > T *_t; >}; >} ># 8 "../../src/model/IntegerDomain.hpp" 2 ># 1 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" 1 > > > > >namespace facile >{ >template<typename Iterator, typename Transform, typename In = typename Iterator::value_type, typename Out = typename Transform::value_type> >class injection >{ >using outer = injection<Iterator, Transform, In, Out>; > >public: > class traversal > { > public: > typedef traversal self_type; > typedef Out value_type; > typedef Out& reference; > typedef Out * pointer; > typedef std::forward_iterator_tag iterator_category; > > traversal() : > _outer(nullptr) > {} > > traversal(point_util::handle<outer> outer) : > _outer(outer), > _i(_outer->_begin) > {} > > self_type > start() { return advance(), *this; } > > self_type > operator ++() { return advance(), *this; } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > advance(); > return pre; > } > > reference > operator *() { return _cursor; } > > pointer > operator ->() { return &_cursor; } > > bool > operator ==(const self_type& other) const > { > if (_outer == nullptr) > return other._outer == nullptr; > else > return _i == other._i; > } > > bool > operator !=(const self_type& other) const { return !operator ==(other); } > > private: > void > advance() > { > ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" 3 > ( ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" > _outer != nullptr ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp", 67) << ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" > std::endl ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" 3 > << "⢠Condition [" << ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" > "_outer != nullptr" ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" 3 > << "] " << ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" > std::endl ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" 3 > << "⢠" ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" > << "Cannot advance a terminated injection::traversal" << ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" 3 > facile::RequireException::require_sentinel ># 67 "../../subprojects/edfst/subprojects/facile/src/iterator/injection.hpp" > ; > > while (_i != _outer->_end) { > if (_outer->_x.transform(*_i++, _cursor)) > return; > } > > _outer.reset(); > } > > point_util::handle<outer> _outer; > Iterator _i; > Out _cursor; > }; > > template<typename Source, typename = typename std::enable_if_t<std::is_same<Iterator, iterator_t<Source>>::value, void>> > injection(handle<Source> source, Transform x = Transform()) : > injection(source->begin(), source->end(), x) > {} > > template<typename Source, typename = typename std::enable_if_t<std::is_same<Iterator, iterator_t<Source>>::value, void>> > injection(Source source, Transform x = Transform()) : > injection(source.begin(), source.end(), x) > {} > > injection(Iterator begin, Iterator end, Transform x = Transform()) : > _begin(begin), > _end(end), > _x(x) > {} > > traversal > begin() { return traversal(*this).start(); } > > traversal > end() { return traversal(); } > >private: > Iterator _begin; > Iterator _end; > Transform _x; >}; >} ># 9 "../../src/model/IntegerDomain.hpp" 2 > >using namespace facile; > >namespace pii >{ >class IntegerDomain >{ >public: > struct Range { > enum class Width : uint16_t { > undefined = 0, > byte1 = 1, > byte2 = 2, > byte4 = 4, > byte8 = 8 > }; > > using Index = typename std::underlying_type<Width>::type; > > friend std::ostream& > operator <<(std::ostream& o, Width width) > { > switch (width) > { > case Width::undefined: > return o << "<undefined-width>"; > case Width::byte1: > return o << "byte1"; > case Width::byte2: > return o << "byte2"; > case Width::byte4: > return o << "byte4"; > case Width::byte8: > return o << "byte8"; > } > ># 44 "../../src/model/IntegerDomain.hpp" 3 > throw facile::RequireException("../../src/model/IntegerDomain.hpp", 44) ># 44 "../../src/model/IntegerDomain.hpp" > << "unreachable" << ># 44 "../../src/model/IntegerDomain.hpp" 3 > facile::RequireException::require_sentinel ># 44 "../../src/model/IntegerDomain.hpp" > ; > } > > static Width > widthOf(opnd_size_t size) > { > switch (size) > { > case OPSZ_1: > return Width::byte1; > > case OPSZ_2: > return Width::byte2; > > case OPSZ_4: > return Width::byte4; > > case OPSZ_8: > return Width::byte8; > > default: > ># 65 "../../src/model/IntegerDomain.hpp" 3 > throw facile::RequireException("../../src/model/IntegerDomain.hpp", 65) ># 65 "../../src/model/IntegerDomain.hpp" > << "No known IntegerDomain::Range::Width for operand size " << size << ># 65 "../../src/model/IntegerDomain.hpp" 3 > facile::RequireException::require_sentinel ># 65 "../../src/model/IntegerDomain.hpp" > ; > } > > ># 68 "../../src/model/IntegerDomain.hpp" 3 > throw facile::RequireException("../../src/model/IntegerDomain.hpp", 68) ># 68 "../../src/model/IntegerDomain.hpp" > << "unreachable" << ># 68 "../../src/model/IntegerDomain.hpp" 3 > facile::RequireException::require_sentinel ># 68 "../../src/model/IntegerDomain.hpp" > ; > } > > static constexpr uint32_t > byteCount(Width width) { return static_cast<uint32_t>(width); } > > friend constexpr bool > operator <(Width a, Width b) { return static_cast<Index>(a) < static_cast<Index>(b); } > > friend constexpr Width > operator +(Width width, Index amount) > { > Index index = static_cast<Index>(width); > Width wider = static_cast<Width>(index << amount); > > > > > return wider; > } > > friend constexpr Width > operator -(Width width, Index amount) > { > Index index = static_cast<Index>(width); > index >>= amount; > > > > return static_cast<Width>(index); > } > > enum class Signedness : uint16_t { > with, > without, > agnostic > }; > > friend std::ostream& > operator <<(std::ostream& o, Signedness s) > { > switch (s) > { > case Signedness::with: > return o << "<signed>"; > case Signedness::without: > return o << "<unsigned>"; > case Signedness::agnostic: > return o << "<agnostic>"; > } > ># 118 "../../src/model/IntegerDomain.hpp" 3 > throw facile::RequireException("../../src/model/IntegerDomain.hpp", 118) ># 118 "../../src/model/IntegerDomain.hpp" > << "unreachable" << ># 118 "../../src/model/IntegerDomain.hpp" 3 > facile::RequireException::require_sentinel ># 118 "../../src/model/IntegerDomain.hpp" > ; > } > > struct Id { > const Width width; > bool isSigned; > > Id(const Width width, bool isSigned = false) : > width(width), > isSigned(isSigned) > {} > > bool > operator ==(const Id& other) { return width == other.width && isSigned == other.isSigned; } > > template<typename Integer> > static constexpr Id > forType() { return Id{ static_cast<Width>(sizeof(Integer)), std::is_signed<Integer>::value }; } > }; > > friend std::ostream& > operator <<(std::ostream& o, const Id& id) { return o << (id.isSigned ? "S" : "U") << "." << id.width; } > > template<typename Integer> > struct SetComposition { > using Atom = Integer; > using Unsigned = typename std::make_unsigned<Atom>::type; > using Signed = typename std::make_signed<Atom>::type; > using AsUnsigned = SetComposition<Unsigned>; > using AsSigned = SetComposition<Signed>; > > using Type = SpanBase<Atom>; > using Span = SpanBase<Atom>; > using Set = typename Type::Set; > using Iterator = typename Set::iterator; > using Bounds = Arithmetic::Bounds<Atom>; > > > > static constexpr Width width = static_cast<Width>(sizeof(Integer)); > static constexpr bool isSigned = std::is_signed<Integer>::value; > static constexpr uint8_t bytes = static_cast<Atom>(width); > static constexpr uint8_t bits = (bytes << 3); > static constexpr bool isSubRegister = (width < Width::byte8); > static constexpr bool isMerged = (width < Width::byte4); > > > template<template<typename> class P, typename Domain = IntegerDomain> > static handle<Set> > set(P<Domain> domain) { return domain->template set<Set>(); } > > template<template<typename> class P, typename Domain = IntegerDomain> > static handle<const Set> > set(P<const Domain> d) { return d->template set<const Set>(); } > }; > > struct U { > using Span1 = SetComposition<uint8_t>; > using Span2 = SetComposition<uint16_t>; > using Span4 = SetComposition<uint32_t>; > using Span8 = SetComposition<uint64_t>; > > template<Width width> > using Selector = typename std::conditional< > width == Width::byte1, Span1, typename std::conditional< > width == Width::byte2, Span2, typename std::conditional< > width == Width::byte4, Span4, typename std::conditional< > width == Width::byte8, Span8, nullptr_t>::type>::type>::type>::type; > }; > > struct S { > using Span1 = SetComposition<int8_t>; > using Span2 = SetComposition<int16_t>; > using Span4 = SetComposition<int32_t>; > using Span8 = SetComposition<int64_t>; > > template<Width width> > using Selector = typename std::conditional< > width == Width::byte1, Span1, typename std::conditional< > width == Width::byte2, Span2, typename std::conditional< > width == Width::byte4, Span4, typename std::conditional< > width == Width::byte8, Span8, nullptr_t>::type>::type>::type>::type; > }; > > template<typename Composition, Width width> > using Selector = typename std::conditional<Composition::isSigned, S::Selector<width>, U::Selector<width>>::type; > > template<typename Functor> > struct BinaryMux { > Functor f; > > bool > isSigned() const { return f.isRootSigned(); } > > IntegerDomain::Range::Width > range() { return f.rootRange(); } > > template<typename RootRange> > void > apply() { IntegerDomain::Range::Mux::unary(Leaf<RootRange>{ f }); } > > template<typename RootRange> > struct Leaf { > Functor f; > > bool > isSigned() const { return f.isLeafSigned(); } > > IntegerDomain::Range::Width > range() { return f.leafRange(); } > > template<typename LeafRange> > void > apply() { f.template apply<RootRange, LeafRange>(); } > }; > }; > > struct ITernary { > virtual ~ITernary() {} > > virtual bool > isRootSigned() const = 0; > > virtual bool > isLeftSigned() const = 0; > > virtual bool > isRightSigned() const = 0; > > virtual IntegerDomain::Range::Width > rootRange() const = 0; > > virtual IntegerDomain::Range::Width > leftRange() const = 0; > > virtual IntegerDomain::Range::Width > rightRange() const = 0; > > > > > > > }; > > template<typename Functor> > struct TernaryMux { > Functor f; > > bool > isSigned() const { return f.isRootSigned(); } > > IntegerDomain::Range::Width > range() { return f.rootRange(); } > > template<typename RootRange> > void > apply() { IntegerDomain::Range::Mux::unary(Left<RootRange>{ f }); } > > template<typename RootRange> > struct Left { > Functor f; > > bool > isSigned() const { return f.isLeftSigned(); } > > IntegerDomain::Range::Width > range() { return f.leftRange(); } > > template<typename LeftRange> > void > apply() { IntegerDomain::Range::Mux::unary(Right<LeftRange>{ f }); } > > template<typename LeftRange> > struct Right { > Functor f; > > bool > isSigned() const { return f.isRightSigned(); } > > IntegerDomain::Range::Width > range() { return f.rightRange(); } > > template<typename RightRange> > void > apply() { f.template apply<RootRange, LeftRange, RightRange>(); } > }; > }; > }; > > struct Mux { > template<typename Functor> > static void > unary(Functor f) > { > if (f.isSigned()) { > switch (f.range()) > { > case Width::byte1: > f.template apply<typename S::Span1>(); > break; > > case Width::byte2: > f.template apply<typename S::Span2>(); > break; > > case Width::byte4: > f.template apply<typename S::Span4>(); > break; > > case Width::byte8: > f.template apply<typename S::Span8>(); > break; > > case Width::undefined: > ># 333 "../../src/model/IntegerDomain.hpp" 3 > throw facile::RequireException("../../src/model/IntegerDomain.hpp", 333) ># 333 "../../src/model/IntegerDomain.hpp" > << "Cannot mux an undefined range" << ># 333 "../../src/model/IntegerDomain.hpp" 3 > facile::RequireException::require_sentinel ># 333 "../../src/model/IntegerDomain.hpp" > ; > } > } else { > switch (f.range()) > { > case Width::byte1: > f.template apply<typename U::Span1>(); > break; > > case Width::byte2: > f.template apply<typename U::Span2>(); > break; > > case Width::byte4: > f.template apply<typename U::Span4>(); > break; > > case Width::byte8: > f.template apply<typename U::Span8>(); > break; > > case Width::undefined: > ># 355 "../../src/model/IntegerDomain.hpp" 3 > throw facile::RequireException("../../src/model/IntegerDomain.hpp", 355) ># 355 "../../src/model/IntegerDomain.hpp" > << "Cannot mux an undefined range" << ># 355 "../../src/model/IntegerDomain.hpp" 3 > facile::RequireException::require_sentinel ># 355 "../../src/model/IntegerDomain.hpp" > ; > } > } > } > > template<typename Functor> > static void > binary(Functor f) { unary(BinaryMux<Functor>{ f }); } > > template<typename Functor> > static void > ternary(Functor f) { unary(TernaryMux<Functor>{ f }); } > }; > > struct Query { > template<typename Return, typename Functor> > static Return > unary(Functor f) > { > Return value; > f.bind(value); > Mux::unary(f); > return value; > } > }; > > > > > > template<typename Source, typename Sink> > class ConvertWalk > { > using Is = Arithmetic::Is<size_t>; > > enum class Conversion { > reduce, > recenter, > expand > }; > > static constexpr Conversion > inferConversion() > { > if constexpr (Source::bytes > Sink::bytes) > return Conversion::reduce; > else if constexpr (Source::isSigned != Sink::isSigned) > return Conversion::recenter; > else > return Conversion::expand; > } > > public: > using SourceAtom = typename Source::Atom; > using SourceSpan = typename Source::Span; > using SourceSet = typename Source::Set; > using SourceIterator = typename Source::Iterator; > using SinkAtom = typename Sink::Atom; > using SinkSpan = typename Sink::Span; > > static constexpr Conversion conversion = inferConversion(); > > static constexpr bool > isTruncation() { return conversion == Conversion::reduce; } > > class iterator > { > public: > typedef iterator self_type; > typedef SinkSpan value_type; > typedef SinkSpan * pointer; > typedef std::forward_iterator_tag iterator_category; > > iterator(SourceIterator source) : > _source(source), > _full(false), > _split(false), > _tail(false) > { > split(); > } > > self_type > operator ++() > { > return advance(), *this; > } > > self_type > operator ++(__attribute__((unused)) int postfixDisambiguator) > { > self_type pre = *this; > return advance(), pre; > } > > value_type > operator *() { return read(); } > > pointer > operator ->() { return read(); } > > bool > operator ==(const self_type& other) const { return _source == other._source && _tail == other._tail; } > > bool > operator !=(const self_type& other) const { return !operator ==(other); } > > private: > value_type > read() > { > SourceSpan source = *_source; > if (_full) { > return SinkSpan(Sink::Bounds::min, Sink::Bounds::max); > } else { > if (_split) { > if (_tail) > return SinkSpan(source.template truncate<SinkAtom>().first.first(), Sink::Bounds::max); > else > return SinkSpan(Sink::Bounds::min, source.template truncate<SinkAtom>().first.last()); > } > } > return source.template truncate<SinkAtom>().first; > } > > void > advance() > { > if (_full) { > _full = false; > } else { > if (_split) { > if (_tail) { > _split = _tail = false; > } else { > _tail = true; > return; > } > } > } > _source++; > split(); > } > > void > split() > { > SourceSpan upper(_source->first() >> Sink::bits, _source->last() >> Sink::bits); > SourceAtom delta = Arithmetic::ascendingDistance(upper.first(), upper.last()); > if (delta == 1) > _split = true; > else if (delta > 1) > _full = true; > } > > SourceIterator _source; > bool _full; > bool _split; > bool _tail; > }; > > ConvertWalk(loan<IntegerDomain> sourceDomain) : > _set(Source::set(sourceDomain)) > {} > > ConvertWalk(handle<SourceSet> set) : > _set(set) > {} > > > struct SignednessAdapter { > using value_type = SinkSpan; > > bool > transform(SourceSpan source, writeback<value_type> output) > { > std::pair<value_type, bool> x = source.template truncate<SinkAtom>(); > if (x.second) > return output.write(x.first), true; > else > return false; > } > }; > > using Recenter = injection<SourceIterator, SignednessAdapter>; > > > template<typename C = ConvertWalk<Source, Sink>> > std::enable_if_t<C::conversion == Conversion::reduce, iterator> > begin() { return iterator(_set->begin()); } > > template<typename C = ConvertWalk<Source, Sink>> > std::enable_if_t<C::conversion == Conversion::reduce, iterator> > end() { return iterator(_set->end()); } > > > template<typename C = ConvertWalk<Source, Sink>> > std::enable_if_t<C::conversion == Conversion::recenter, typename Recenter::traversal> > begin(__attribute__((unused)) int disambiguator = 0) { return Recenter(_set).begin(); } > > template<typename C = ConvertWalk<Source, Sink>> > std::enable_if_t<C::conversion == Conversion::recenter, typename Recenter::traversal> > end(__attribute__((unused)) int disambiguator = 0) { return Recenter(_set).end(); } > > > template<typename C = ConvertWalk<Source, Sink>> > std::enable_if_t<C::conversion == Conversion::expand, SourceIterator> > begin(__attribute__((unused)) int disambiguator = 0, __attribute__((unused)) int disambiguator2 = 0) { return _set->begin(); } > > template<typename C = ConvertWalk<Source, Sink>> > std::enable_if_t<C::conversion == Conversion::expand, SourceIterator> > end(__attribute__((unused)) int disambiguator = 0, __attribute__((unused)) int disambiguator2 = 0) { return _set->end(); } > > private: > handle<SourceSet> _set; > }; > > template<typename Wide, typename Narrow, typename = typename std::enable_if_t<sizeof(Wide) == (2 * sizeof(Narrow)), void>> > struct Truncate { > static_assert(!std::is_signed<Narrow>::value, "Cannot truncate to signed"); > > using WideSpan = typename Wide::Span; > using WideSet = typename Wide::Set; > using NarrowAtom = typename Narrow::Atom; > using NarrowSpan = typename Narrow::Span; > > Truncate(handle<WideSet> s) : > _s(s) > {} > > template<typename Output> > void > walk(Output output) > { > for (WideSpan wide : _s) { > WideSpan upper(wide.first() >> Narrow::bits, wide.last() >> Narrow::bits); > if (upper.first() == upper.last()) { > if (!output(wide.template truncate<typename NarrowSpan::Atom>())) > return; > } else if ((upper.first() + 1) == upper.last()) { > NarrowSpan split(wide.template truncate<NarrowAtom>()); > if (!output(NarrowSpan(split.first(), Narrow::Bounds::max))) > return; > > if (!output(NarrowSpan(Narrow::Bounds::min, split.last()))) > return; > } else { > if (!output(NarrowSpan(Narrow::Bounds::min, Narrow::Bounds::max))) > return; > } > } > } > > private: > handle<WideSet> _s; > }; > > class Footprint { > public: > Footprint(handle<const IntegerDomain> domain) : > _domain(domain) > {} > > void > bind(writeback<uint64_t> output) { _output = output; } > > bool > isSigned() const { return _domain->isSigned(); } > > Range::Width > range() { return _domain->range(); } > > template<typename SetRange> > void > apply() { _output.write(SetRange::set(_domain)->footprint()); } > > private: > handle<const IntegerDomain> _domain; > writeback<uint64_t> _output; > }; > > class Intersect { > public: > Intersect(handle<const IntegerDomain> source, handle<IntegerDomain> sink) : > _source(source), > _sink(sink) > { > ># 642 "../../src/model/IntegerDomain.hpp" 3 > ( ># 642 "../../src/model/IntegerDomain.hpp" > source->id() == sink->id() ># 642 "../../src/model/IntegerDomain.hpp" 3 > ) || facile::RequireException("../../src/model/IntegerDomain.hpp", 642) << ># 642 "../../src/model/IntegerDomain.hpp" > std::endl ># 642 "../../src/model/IntegerDomain.hpp" 3 > << "⢠Condition [" << ># 642 "../../src/model/IntegerDomain.hpp" > "source->id() == sink->id()" ># 642 "../../src/model/IntegerDomain.hpp" 3 > << "] " << ># 642 "../../src/model/IntegerDomain.hpp" > std::endl ># 642 "../../src/model/IntegerDomain.hpp" 3 > << "⢠" ># 642 "../../src/model/IntegerDomain.hpp" > << "Cannot intersect domain " << source->id() << " with domain " << sink->id() << ># 642 "../../src/model/IntegerDomain.hpp" 3 > facile::RequireException::require_sentinel ># 642 "../../src/model/IntegerDomain.hpp" > ; > } > > bool > isSigned() const { return _sink->isSigned(); } > > Range::Width > range() { return _sink->range(); } > > template<typename SetRange> > void > apply() { SetRange::set(_sink)->intersect(SetRange::set(_source)); } > > private: > handle<const IntegerDomain> _source; > handle<IntegerDomain> _sink; > }; > }; > > template<typename SinkRange, typename Output> > struct SourceAdapter { > loan<IntegerDomain> source; > Output& output; > > bool > isSigned() const { return source->isSigned(); } > > Range::Width > range() { return source->range(); } > > template<typename SourceRange> > void > apply() > { > using Truncation = Range::Truncate<typename SourceRange::Span, typename SinkRange::Span>; > Truncation t(SourceRange::set(source)); > t.walk(output); > } > }; > > template<typename SinkRange, typename Output> > static void > convert(loan<IntegerDomain> source, Output output) > { > if (SinkRange::width == source->range()) { > for (typename SinkRange::Span span : SinkRange::set(source)) > output(span); > } else { > SourceAdapter<SinkRange, Output> adapter{ source, output }; > Range::Mux::unary(adapter); > } > } > > struct Token { > const IntegerDomain& d; > > friend std::ostream& > operator <<(std::ostream& o, const Token& t) > { > o << t.d.range() << "["; > if (t.d.isDefined()) > o << t.d.footprint(); > else > o << "undefined"; > return o << "]"; > } > }; > > template<typename Range, typename Set = typename Range::Set> > IntegerDomain(__attribute__((unused)) Range range) : > _defined(true), > _isSigned(Range::isSigned), > _range(Range::width), > _sets(Set()) > {} > > template<typename Range, typename Set = typename Range::Set> > IntegerDomain(handle<IntegerDomain> src) : > _defined(true), > _isSigned(Range::isSigned), > _range(Range::width), > _sets(Set(std::get<Set>(src->_sets))) > {} > > template<typename Range, typename Set = typename Range::Set> > IntegerDomain(__attribute__((unused)) Range range, handle<IntegerDomain> src) : > _defined(true), > _isSigned(Range::isSigned), > _range(Range::width), > _sets(Set(std::get<Set>(src->_sets))) > {} > > bool > isDefined() const { return _defined; } > > bool > isSigned() const { return _isSigned; } ># 747 "../../src/model/IntegerDomain.hpp" > Range::Id > id() const { return Range::Id(_range, _isSigned); } > > Range::Width > range() const { return _range; } > > uint64_t > footprint() const { return Range::Query::template unary<uint64_t>(typename Range::Footprint(handle(*this))); } > > void > intersect(handle<const IntegerDomain> source) { Range::Mux::unary(typename Range::Intersect(source, handle(*this))); } > > template<typename Range, typename Set = typename Range::Set> > handle<Set> > set() { return std::get<Set>(_sets); } > > template<typename Range, typename Set = typename Range::Set> > handle<const Set> > set() const { return std::get<Set>(_sets); } > > void > undefine() { _defined = false; } > > Token > token() { return Token{ *this }; } > >private: > using Sets = std::variant<Range::U::Span1::Set, Range::U::Span2::Set, Range::U::Span4::Set, Range::U::Span8::Set, > Range::S::Span1::Set, Range::S::Span2::Set, Range::S::Span4::Set, Range::S::Span8::Set>; > > bool _defined; > bool _isSigned; > Range::Width _range; > Sets _sets; >}; >} ># 12 "../../src/PiiFramework.hpp" 2 > >namespace pii >{ >} > >using ContextBounds = std::pair<loc_t, loc_t>; > > > >class PiiLog : > public ComponentLogStream::GlobalInstance<PiiLog> {}; ># 54 "../../src/PiiFramework.hpp" ># 1 "../../src/assembly/CodeletDefinitions.hpp" 1 > > > > >namespace pii >{ >using Tag = uint32_t; >using Offset = uint32_t; >using Offspan = facile::SpanBase<Offset>; > >using Offsets = std::unordered_set<Offset>; >using Indirections = std::unordered_map<Offset, Offset>; >using IndirectionEntry = std::pair<const Offset, Offset>; > >struct DecodeFrontier { > class PendingSuccessors > { > public: > uint32_t > query(Offset offset) const > { > typename Table::const_iterator q = _table.find(offset); > if (q == _table.end()) > return 0; > else > return q->second; > } > > void > increment(Offset offset) > { > typename Table::iterator i = _table.find(offset); > if (i == _table.end()) > _table.emplace(offset, 1); > else > i->second++; > } > > void > decrement(Offset offset) > { > typename Table::iterator i = _table.find(offset); > if (i != _table.end()) { > if (i->second-- == 0) > _table.erase(i); > } > } > > private: > using Table = std::unordered_map<Offset, uint32_t>; > > Table _table; > }; >}; > > >template<typename T> >struct HashSchemaBase { > struct OffsetIdentity { > size_t > operator ()(unit<T> b) const { return widen<size_t>(b->offset()); } > > bool > operator ()(unit<T> a, unit<T> b) const { return a->offset() == b->offset(); } > }; > > using Set = std::unordered_set<unit<T>, OffsetIdentity, OffsetIdentity>; > using Map = std::unordered_map<Offset, unit<T>>; > using MapEntry = std::pair<const Offset, unit<T>>; > > template<typename ValueType> > using ValueMap = std::unordered_map<unit<T>, ValueType, OffsetIdentity, OffsetIdentity>; > > template<typename ValueType> > using ValueMultimap = std::unordered_multimap<unit<T>, ValueType, OffsetIdentity, OffsetIdentity>; >}; >} ># 55 "../../src/PiiFramework.hpp" 2 ># 1 "../../src/io/Disassembly.hpp" 1 > > > > > > ># 1 "../../src/elf/ElfMetadata.hpp" 1 > ># 10 "../../src/elf/ElfMetadata.hpp" ># 1 "/usr/include/libgen.h" 1 3 4 ># 23 "/usr/include/libgen.h" 3 4 > ># 23 "/usr/include/libgen.h" 3 4 >extern "C" { > > >extern char *dirname (char *__path) noexcept (true); > > > > > > > >extern char *__xpg_basename (char *__path) noexcept (true); > > >} ># 11 "../../src/elf/ElfMetadata.hpp" 2 > > > > > > > ># 1 "/usr/include/gelf.h" 1 3 4 ># 32 "/usr/include/gelf.h" 3 4 ># 1 "/usr/include/libelf.h" 1 3 4 ># 36 "/usr/include/libelf.h" 3 4 ># 1 "/usr/include/elf.h" 1 3 4 ># 27 "/usr/include/elf.h" 3 4 >typedef uint16_t Elf32_Half; >typedef uint16_t Elf64_Half; > > >typedef uint32_t Elf32_Word; >typedef int32_t Elf32_Sword; >typedef uint32_t Elf64_Word; >typedef int32_t Elf64_Sword; > > >typedef uint64_t Elf32_Xword; >typedef int64_t Elf32_Sxword; >typedef uint64_t Elf64_Xword; >typedef int64_t Elf64_Sxword; > > >typedef uint32_t Elf32_Addr; >typedef uint64_t Elf64_Addr; > > >typedef uint32_t Elf32_Off; >typedef uint64_t Elf64_Off; > > >typedef uint16_t Elf32_Section; >typedef uint16_t Elf64_Section; > > >typedef Elf32_Half Elf32_Versym; >typedef Elf64_Half Elf64_Versym; > > > > > > >typedef struct >{ > unsigned char e_ident[(16)]; > Elf32_Half e_type; > Elf32_Half e_machine; > Elf32_Word e_version; > Elf32_Addr e_entry; > Elf32_Off e_phoff; > Elf32_Off e_shoff; > Elf32_Word e_flags; > Elf32_Half e_ehsize; > Elf32_Half e_phentsize; > Elf32_Half e_phnum; > Elf32_Half e_shentsize; > Elf32_Half e_shnum; > Elf32_Half e_shstrndx; >} Elf32_Ehdr; > >typedef struct >{ > unsigned char e_ident[(16)]; > Elf64_Half e_type; > Elf64_Half e_machine; > Elf64_Word e_version; > Elf64_Addr e_entry; > Elf64_Off e_phoff; > Elf64_Off e_shoff; > Elf64_Word e_flags; > Elf64_Half e_ehsize; > Elf64_Half e_phentsize; > Elf64_Half e_phnum; > Elf64_Half e_shentsize; > Elf64_Half e_shnum; > Elf64_Half e_shstrndx; >} Elf64_Ehdr; ># 383 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word sh_name; > Elf32_Word sh_type; > Elf32_Word sh_flags; > Elf32_Addr sh_addr; > Elf32_Off sh_offset; > Elf32_Word sh_size; > Elf32_Word sh_link; > Elf32_Word sh_info; > Elf32_Word sh_addralign; > Elf32_Word sh_entsize; >} Elf32_Shdr; > >typedef struct >{ > Elf64_Word sh_name; > Elf64_Word sh_type; > Elf64_Xword sh_flags; > Elf64_Addr sh_addr; > Elf64_Off sh_offset; > Elf64_Xword sh_size; > Elf64_Word sh_link; > Elf64_Word sh_info; > Elf64_Xword sh_addralign; > Elf64_Xword sh_entsize; >} Elf64_Shdr; ># 492 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word ch_type; > Elf32_Word ch_size; > Elf32_Word ch_addralign; >} Elf32_Chdr; > >typedef struct >{ > Elf64_Word ch_type; > Elf64_Word ch_reserved; > Elf64_Xword ch_size; > Elf64_Xword ch_addralign; >} Elf64_Chdr; ># 520 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word st_name; > Elf32_Addr st_value; > Elf32_Word st_size; > unsigned char st_info; > unsigned char st_other; > Elf32_Section st_shndx; >} Elf32_Sym; > >typedef struct >{ > Elf64_Word st_name; > unsigned char st_info; > unsigned char st_other; > Elf64_Section st_shndx; > Elf64_Addr st_value; > Elf64_Xword st_size; >} Elf64_Sym; > > > > >typedef struct >{ > Elf32_Half si_boundto; > Elf32_Half si_flags; >} Elf32_Syminfo; > >typedef struct >{ > Elf64_Half si_boundto; > Elf64_Half si_flags; >} Elf64_Syminfo; ># 635 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Addr r_offset; > Elf32_Word r_info; >} Elf32_Rel; > > > > > > >typedef struct >{ > Elf64_Addr r_offset; > Elf64_Xword r_info; >} Elf64_Rel; > > > >typedef struct >{ > Elf32_Addr r_offset; > Elf32_Word r_info; > Elf32_Sword r_addend; >} Elf32_Rela; > >typedef struct >{ > Elf64_Addr r_offset; > Elf64_Xword r_info; > Elf64_Sxword r_addend; >} Elf64_Rela; > > > >typedef Elf32_Word Elf32_Relr; >typedef Elf64_Xword Elf64_Relr; ># 685 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word p_type; > Elf32_Off p_offset; > Elf32_Addr p_vaddr; > Elf32_Addr p_paddr; > Elf32_Word p_filesz; > Elf32_Word p_memsz; > Elf32_Word p_flags; > Elf32_Word p_align; >} Elf32_Phdr; > >typedef struct >{ > Elf64_Word p_type; > Elf64_Word p_flags; > Elf64_Off p_offset; > Elf64_Addr p_vaddr; > Elf64_Addr p_paddr; > Elf64_Xword p_filesz; > Elf64_Xword p_memsz; > Elf64_Xword p_align; >} Elf64_Phdr; ># 851 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Sword d_tag; > union > { > Elf32_Word d_val; > Elf32_Addr d_ptr; > } d_un; >} Elf32_Dyn; > >typedef struct >{ > Elf64_Sxword d_tag; > union > { > Elf64_Xword d_val; > Elf64_Addr d_ptr; > } d_un; >} Elf64_Dyn; ># 1036 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Half vd_version; > Elf32_Half vd_flags; > Elf32_Half vd_ndx; > Elf32_Half vd_cnt; > Elf32_Word vd_hash; > Elf32_Word vd_aux; > Elf32_Word vd_next; > >} Elf32_Verdef; > >typedef struct >{ > Elf64_Half vd_version; > Elf64_Half vd_flags; > Elf64_Half vd_ndx; > Elf64_Half vd_cnt; > Elf64_Word vd_hash; > Elf64_Word vd_aux; > Elf64_Word vd_next; > >} Elf64_Verdef; ># 1079 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word vda_name; > Elf32_Word vda_next; > >} Elf32_Verdaux; > >typedef struct >{ > Elf64_Word vda_name; > Elf64_Word vda_next; > >} Elf64_Verdaux; > > > > >typedef struct >{ > Elf32_Half vn_version; > Elf32_Half vn_cnt; > Elf32_Word vn_file; > > Elf32_Word vn_aux; > Elf32_Word vn_next; > >} Elf32_Verneed; > >typedef struct >{ > Elf64_Half vn_version; > Elf64_Half vn_cnt; > Elf64_Word vn_file; > > Elf64_Word vn_aux; > Elf64_Word vn_next; > >} Elf64_Verneed; ># 1126 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word vna_hash; > Elf32_Half vna_flags; > Elf32_Half vna_other; > Elf32_Word vna_name; > Elf32_Word vna_next; > >} Elf32_Vernaux; > >typedef struct >{ > Elf64_Word vna_hash; > Elf64_Half vna_flags; > Elf64_Half vna_other; > Elf64_Word vna_name; > Elf64_Word vna_next; > >} Elf64_Vernaux; ># 1156 "/usr/include/elf.h" 3 4 >typedef struct >{ > uint32_t a_type; > union > { > uint32_t a_val; > > > > } a_un; >} Elf32_auxv_t; > >typedef struct >{ > uint64_t a_type; > union > { > uint64_t a_val; > > > > } a_un; >} Elf64_auxv_t; ># 1257 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word n_namesz; > Elf32_Word n_descsz; > Elf32_Word n_type; >} Elf32_Nhdr; > >typedef struct >{ > Elf64_Word n_namesz; > Elf64_Word n_descsz; > Elf64_Word n_type; >} Elf64_Nhdr; ># 1401 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Xword m_value; > Elf32_Word m_info; > Elf32_Word m_poffset; > Elf32_Half m_repeat; > Elf32_Half m_stride; >} Elf32_Move; > >typedef struct >{ > Elf64_Xword m_value; > Elf64_Xword m_info; > Elf64_Xword m_poffset; > Elf64_Half m_repeat; > Elf64_Half m_stride; >} Elf64_Move; ># 1791 "/usr/include/elf.h" 3 4 >typedef union >{ > struct > { > Elf32_Word gt_current_g_value; > Elf32_Word gt_unused; > } gt_header; > struct > { > Elf32_Word gt_g_value; > Elf32_Word gt_bytes; > } gt_entry; >} Elf32_gptab; > > > >typedef struct >{ > Elf32_Word ri_gprmask; > Elf32_Word ri_cprmask[4]; > Elf32_Sword ri_gp_value; >} Elf32_RegInfo; > > > >typedef struct >{ > unsigned char kind; > > unsigned char size; > Elf32_Section section; > > Elf32_Word info; >} Elf_Options; ># 1867 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word hwp_flags1; > Elf32_Word hwp_flags2; >} Elf_Options_Hw; ># 2035 "/usr/include/elf.h" 3 4 >typedef struct >{ > Elf32_Word l_name; > Elf32_Word l_time_stamp; > Elf32_Word l_checksum; > Elf32_Word l_version; > Elf32_Word l_flags; >} Elf32_Lib; > >typedef struct >{ > Elf64_Word l_name; > Elf64_Word l_time_stamp; > Elf64_Word l_checksum; > Elf64_Word l_version; > Elf64_Word l_flags; >} Elf64_Lib; ># 2066 "/usr/include/elf.h" 3 4 >typedef Elf32_Addr Elf32_Conflict; > >typedef struct >{ > > Elf32_Half version; > > unsigned char isa_level; > > unsigned char isa_rev; > > unsigned char gpr_size; > > unsigned char cpr1_size; > > unsigned char cpr2_size; > > unsigned char fp_abi; > > Elf32_Word isa_ext; > > Elf32_Word ases; > > Elf32_Word flags1; > Elf32_Word flags2; >} Elf_MIPS_ABIFlags_v0; ># 2142 "/usr/include/elf.h" 3 4 >enum >{ > > Val_GNU_MIPS_ABI_FP_ANY = 0, > > Val_GNU_MIPS_ABI_FP_DOUBLE = 1, > > Val_GNU_MIPS_ABI_FP_SINGLE = 2, > > Val_GNU_MIPS_ABI_FP_SOFT = 3, > > Val_GNU_MIPS_ABI_FP_OLD_64 = 4, > > Val_GNU_MIPS_ABI_FP_XX = 5, > > Val_GNU_MIPS_ABI_FP_64 = 6, > > Val_GNU_MIPS_ABI_FP_64A = 7, > > Val_GNU_MIPS_ABI_FP_MAX = 7 >}; ># 37 "/usr/include/libelf.h" 2 3 4 ># 97 "/usr/include/libelf.h" 3 4 >typedef enum >{ > ELF_T_BYTE, > ELF_T_ADDR, > ELF_T_DYN, > ELF_T_EHDR, > ELF_T_HALF, > ELF_T_OFF, > ELF_T_PHDR, > ELF_T_RELA, > ELF_T_REL, > ELF_T_SHDR, > ELF_T_SWORD, > ELF_T_SYM, > ELF_T_WORD, > ELF_T_XWORD, > ELF_T_SXWORD, > ELF_T_VDEF, > ELF_T_VDAUX, > ELF_T_VNEED, > ELF_T_VNAUX, > ELF_T_NHDR, > ELF_T_SYMINFO, > ELF_T_MOVE, > ELF_T_LIB, > ELF_T_GNUHASH, > ELF_T_AUXV, > ELF_T_CHDR, > ELF_T_NHDR8, > > > ELF_T_NUM >} Elf_Type; > > >typedef struct >{ > void *d_buf; > Elf_Type d_type; > unsigned int d_version; > size_t d_size; > int64_t d_off; > size_t d_align; >} Elf_Data; > > > >typedef enum >{ > ELF_C_NULL, > ELF_C_READ, > ELF_C_RDWR, > ELF_C_WRITE, > ELF_C_CLR, > ELF_C_SET, > ELF_C_FDDONE, > > ELF_C_FDREAD, > > > ELF_C_READ_MMAP, > ELF_C_RDWR_MMAP, > ELF_C_WRITE_MMAP, > ELF_C_READ_MMAP_PRIVATE, > > ELF_C_EMPTY, > > ELF_C_NUM >} Elf_Cmd; > > > >enum >{ > ELF_F_DIRTY = 0x1, > > ELF_F_LAYOUT = 0x4, > > ELF_F_PERMISSIVE = 0x8 > >}; > > >enum >{ > ELF_CHF_FORCE = 0x1 > >}; > > >typedef enum >{ > ELF_K_NONE, > ELF_K_AR, > ELF_K_COFF, > ELF_K_ELF, > > ELF_K_NUM >} Elf_Kind; > > > >typedef struct >{ > char *ar_name; > time_t ar_date; > uid_t ar_uid; > gid_t ar_gid; > mode_t ar_mode; > int64_t ar_size; > char *ar_rawname; >} Elf_Arhdr; > > > >typedef struct >{ > char *as_name; > size_t as_off; > unsigned long int as_hash; >} Elf_Arsym; > > > >typedef struct Elf Elf; > > >typedef struct Elf_Scn Elf_Scn; > > > >extern "C" { > > > >extern Elf *elf_begin (int __fildes, Elf_Cmd __cmd, Elf *__ref); > > > extern Elf *elf_clone (Elf *__elf, Elf_Cmd __cmd); > > >extern Elf *elf_memory (char *__image, size_t __size); > > >extern Elf_Cmd elf_next (Elf *__elf); > > >extern int elf_end (Elf *__elf); > > >extern int64_t elf_update (Elf *__elf, Elf_Cmd __cmd); > > >extern Elf_Kind elf_kind (Elf *__elf) __attribute__ ((__pure__)); > > >extern int64_t elf_getbase (Elf *__elf); > > > >extern char *elf_getident (Elf *__elf, size_t *__nbytes); > > >extern Elf32_Ehdr *elf32_getehdr (Elf *__elf); > >extern Elf64_Ehdr *elf64_getehdr (Elf *__elf); > > >extern Elf32_Ehdr *elf32_newehdr (Elf *__elf); > >extern Elf64_Ehdr *elf64_newehdr (Elf *__elf); > > > > > >extern int elf_getphdrnum (Elf *__elf, size_t *__dst); > > >extern Elf32_Phdr *elf32_getphdr (Elf *__elf); > >extern Elf64_Phdr *elf64_getphdr (Elf *__elf); > > >extern Elf32_Phdr *elf32_newphdr (Elf *__elf, size_t __cnt); > >extern Elf64_Phdr *elf64_newphdr (Elf *__elf, size_t __cnt); > > > >extern Elf_Scn *elf_getscn (Elf *__elf, size_t __index); > > >extern Elf_Scn *elf32_offscn (Elf *__elf, Elf32_Off __offset); > >extern Elf_Scn *elf64_offscn (Elf *__elf, Elf64_Off __offset); > > >extern size_t elf_ndxscn (Elf_Scn *__scn); > > >extern Elf_Scn *elf_nextscn (Elf *__elf, Elf_Scn *__scn); > > >extern Elf_Scn *elf_newscn (Elf *__elf); > > > >extern int elf_scnshndx (Elf_Scn *__scn); > > > > > >extern int elf_getshdrnum (Elf *__elf, size_t *__dst); > > > >extern int elf_getshnum (Elf *__elf, size_t *__dst) > __attribute__ ((__deprecated__)); > > > > > > >extern int elf_getshdrstrndx (Elf *__elf, size_t *__dst); > > > >extern int elf_getshstrndx (Elf *__elf, size_t *__dst) > __attribute__ ((__deprecated__)); > > > >extern Elf32_Shdr *elf32_getshdr (Elf_Scn *__scn); > >extern Elf64_Shdr *elf64_getshdr (Elf_Scn *__scn); > > > > >extern Elf32_Chdr *elf32_getchdr (Elf_Scn *__scn); >extern Elf64_Chdr *elf64_getchdr (Elf_Scn *__scn); ># 395 "/usr/include/libelf.h" 3 4 >extern int elf_compress (Elf_Scn *scn, int type, unsigned int flags); >extern int elf_compress_gnu (Elf_Scn *scn, int compress, unsigned int flags); > > >extern unsigned int elf_flagelf (Elf *__elf, Elf_Cmd __cmd, > unsigned int __flags); > >extern unsigned int elf_flagehdr (Elf *__elf, Elf_Cmd __cmd, > unsigned int __flags); > >extern unsigned int elf_flagphdr (Elf *__elf, Elf_Cmd __cmd, > unsigned int __flags); > >extern unsigned int elf_flagscn (Elf_Scn *__scn, Elf_Cmd __cmd, > unsigned int __flags); > >extern unsigned int elf_flagdata (Elf_Data *__data, Elf_Cmd __cmd, > unsigned int __flags); > >extern unsigned int elf_flagshdr (Elf_Scn *__scn, Elf_Cmd __cmd, > unsigned int __flags); > > > > > > > >extern Elf_Data *elf_getdata (Elf_Scn *__scn, Elf_Data *__data); > > >extern Elf_Data *elf_rawdata (Elf_Scn *__scn, Elf_Data *__data); > > >extern Elf_Data *elf_newdata (Elf_Scn *__scn); > > > > >extern Elf_Data *elf_getdata_rawchunk (Elf *__elf, > int64_t __offset, size_t __size, > Elf_Type __type); > > > >extern char *elf_strptr (Elf *__elf, size_t __index, size_t __offset); > > > >extern Elf_Arhdr *elf_getarhdr (Elf *__elf); > > >extern int64_t elf_getaroff (Elf *__elf); > > >extern size_t elf_rand (Elf *__elf, size_t __offset); > > >extern Elf_Arsym *elf_getarsym (Elf *__elf, size_t *__narsyms); > > > >extern int elf_cntl (Elf *__elf, Elf_Cmd __cmd); > > >extern char *elf_rawfile (Elf *__elf, size_t *__nbytes); > > > > > >extern size_t elf32_fsize (Elf_Type __type, size_t __count, > unsigned int __version) > __attribute__ ((__const__)); > >extern size_t elf64_fsize (Elf_Type __type, size_t __count, > unsigned int __version) > __attribute__ ((__const__)); > > > > >extern Elf_Data *elf32_xlatetom (Elf_Data *__dest, const Elf_Data *__src, > unsigned int __encode); > >extern Elf_Data *elf64_xlatetom (Elf_Data *__dest, const Elf_Data *__src, > unsigned int __encode); > > > >extern Elf_Data *elf32_xlatetof (Elf_Data *__dest, const Elf_Data *__src, > unsigned int __encode); > >extern Elf_Data *elf64_xlatetof (Elf_Data *__dest, const Elf_Data *__src, > unsigned int __encode); > > > > >extern int elf_errno (void); > > > > > >extern const char *elf_errmsg (int __error); > > > >extern unsigned int elf_version (unsigned int __version); > > >extern void elf_fill (int __fill); > > >extern unsigned long int elf_hash (const char *__string) > __attribute__ ((__pure__)); > > >extern unsigned long int elf_gnu_hash (const char *__string) > __attribute__ ((__pure__)); > > > >extern long int elf32_checksum (Elf *__elf); > >extern long int elf64_checksum (Elf *__elf); > > >} ># 33 "/usr/include/gelf.h" 2 3 4 > > > >extern "C" { > > > > > > > >typedef Elf64_Half GElf_Half; > > >typedef Elf64_Word GElf_Word; >typedef Elf64_Sword GElf_Sword; > > >typedef Elf64_Xword GElf_Xword; >typedef Elf64_Sxword GElf_Sxword; > > >typedef Elf64_Addr GElf_Addr; > > >typedef Elf64_Off GElf_Off; > > > >typedef Elf64_Ehdr GElf_Ehdr; > > >typedef Elf64_Shdr GElf_Shdr; > > > > >typedef Elf64_Section GElf_Section; > > >typedef Elf64_Sym GElf_Sym; > > > >typedef Elf64_Syminfo GElf_Syminfo; > > >typedef Elf64_Rel GElf_Rel; > > >typedef Elf64_Rela GElf_Rela; > > >typedef Elf64_Phdr GElf_Phdr; > > >typedef Elf64_Chdr GElf_Chdr; > > >typedef Elf64_Dyn GElf_Dyn; > > > >typedef Elf64_Verdef GElf_Verdef; > > >typedef Elf64_Verdaux GElf_Verdaux; > > >typedef Elf64_Verneed GElf_Verneed; > > >typedef Elf64_Vernaux GElf_Vernaux; > > > >typedef Elf64_Versym GElf_Versym; > > > >typedef Elf64_auxv_t GElf_auxv_t; > > > >typedef Elf64_Nhdr GElf_Nhdr; > > > >typedef Elf64_Move GElf_Move; > > > >typedef Elf64_Lib GElf_Lib; ># 153 "/usr/include/gelf.h" 3 4 >extern int gelf_getclass (Elf *__elf); > > > > > >extern size_t gelf_fsize (Elf *__elf, Elf_Type __type, size_t __count, > unsigned int __version); > > >extern GElf_Ehdr *gelf_getehdr (Elf *__elf, GElf_Ehdr *__dest); > > >extern int gelf_update_ehdr (Elf *__elf, GElf_Ehdr *__src); > > > > >extern void *gelf_newehdr (Elf *__elf, int __class); > > >extern Elf_Scn *gelf_offscn (Elf *__elf, GElf_Off __offset); > > >extern GElf_Shdr *gelf_getshdr (Elf_Scn *__scn, GElf_Shdr *__dst); > > >extern int gelf_update_shdr (Elf_Scn *__scn, GElf_Shdr *__src); > > >extern GElf_Phdr *gelf_getphdr (Elf *__elf, int __ndx, GElf_Phdr *__dst); > > >extern int gelf_update_phdr (Elf *__elf, int __ndx, GElf_Phdr *__src); > > > > >extern void *gelf_newphdr (Elf *__elf, size_t __phnum); > > > >extern GElf_Chdr *gelf_getchdr (Elf_Scn *__scn, GElf_Chdr *__dst); > > > >extern Elf_Data *gelf_xlatetom (Elf *__elf, Elf_Data *__dest, > const Elf_Data *__src, unsigned int __encode); > > > >extern Elf_Data *gelf_xlatetof (Elf *__elf, Elf_Data *__dest, > const Elf_Data *__src, unsigned int __encode); > > > >extern GElf_Rel *gelf_getrel (Elf_Data *__data, int __ndx, GElf_Rel *__dst); > > >extern GElf_Rela *gelf_getrela (Elf_Data *__data, int __ndx, GElf_Rela *__dst); > > >extern int gelf_update_rel (Elf_Data *__dst, int __ndx, GElf_Rel *__src); > > >extern int gelf_update_rela (Elf_Data *__dst, int __ndx, GElf_Rela *__src); > > > >extern GElf_Sym *gelf_getsym (Elf_Data *__data, int __ndx, GElf_Sym *__dst); > > >extern int gelf_update_sym (Elf_Data *__data, int __ndx, GElf_Sym *__src); > > > > >extern GElf_Sym *gelf_getsymshndx (Elf_Data *__symdata, Elf_Data *__shndxdata, > int __ndx, GElf_Sym *__sym, > Elf32_Word *__xshndx); > > > >extern int gelf_update_symshndx (Elf_Data *__symdata, Elf_Data *__shndxdata, > int __ndx, GElf_Sym *__sym, > Elf32_Word __xshndx); > > > > >extern GElf_Syminfo *gelf_getsyminfo (Elf_Data *__data, int __ndx, > GElf_Syminfo *__dst); > > > >extern int gelf_update_syminfo (Elf_Data *__data, int __ndx, > GElf_Syminfo *__src); > > > >extern GElf_Dyn *gelf_getdyn (Elf_Data *__data, int __ndx, GElf_Dyn *__dst); > > >extern int gelf_update_dyn (Elf_Data *__dst, int __ndx, GElf_Dyn *__src); > > > >extern GElf_Move *gelf_getmove (Elf_Data *__data, int __ndx, GElf_Move *__dst); > > >extern int gelf_update_move (Elf_Data *__data, int __ndx, > GElf_Move *__src); > > > >extern GElf_Lib *gelf_getlib (Elf_Data *__data, int __ndx, GElf_Lib *__dst); > > >extern int gelf_update_lib (Elf_Data *__data, int __ndx, GElf_Lib *__src); > > > > >extern GElf_Versym *gelf_getversym (Elf_Data *__data, int __ndx, > GElf_Versym *__dst); > > >extern int gelf_update_versym (Elf_Data *__data, int __ndx, > GElf_Versym *__src); > > > >extern GElf_Verneed *gelf_getverneed (Elf_Data *__data, int __offset, > GElf_Verneed *__dst); > > >extern int gelf_update_verneed (Elf_Data *__data, int __offset, > GElf_Verneed *__src); > > >extern GElf_Vernaux *gelf_getvernaux (Elf_Data *__data, int __offset, > GElf_Vernaux *__dst); > > >extern int gelf_update_vernaux (Elf_Data *__data, int __offset, > GElf_Vernaux *__src); > > > >extern GElf_Verdef *gelf_getverdef (Elf_Data *__data, int __offset, > GElf_Verdef *__dst); > > >extern int gelf_update_verdef (Elf_Data *__data, int __offset, > GElf_Verdef *__src); > > > >extern GElf_Verdaux *gelf_getverdaux (Elf_Data *__data, int __offset, > GElf_Verdaux *__dst); > > >extern int gelf_update_verdaux (Elf_Data *__data, int __offset, > GElf_Verdaux *__src); > > > >extern GElf_auxv_t *gelf_getauxv (Elf_Data *__data, int __ndx, > GElf_auxv_t *__dst); > > >extern int gelf_update_auxv (Elf_Data *__data, int __ndx, GElf_auxv_t *__src); > > > > > >extern size_t gelf_getnote (Elf_Data *__data, size_t __offset, > GElf_Nhdr *__result, > size_t *__name_offset, size_t *__desc_offset); > > > >extern long int gelf_checksum (Elf *__elf); > > >} ># 19 "../../src/elf/ElfMetadata.hpp" 2 > > > ># 21 "../../src/elf/ElfMetadata.hpp" >namespace pii >{ >using namespace facile; >using namespace point_util; > >enum class ElfTypeId : uint8_t { > address, > offset, > section, > versym, > byte, > half, > sword, > word, > sxword, > xword, > free >}; > >template<typename Id> >static inline ElfTypeId >elfTypeId(Id id) >{ > if (id >= static_cast<Id>(ElfTypeId::free)) > return ElfTypeId::free; > else > return static_cast<ElfTypeId>(id); >} > >static const char * >elfRelocationTypeLabel(ElfTypeId typeId) >{ > switch (typeId) > { > case ElfTypeId::address: > return "address"; > > case ElfTypeId::offset: > return "offset"; > > case ElfTypeId::section: > return "section"; > > case ElfTypeId::versym: > return "versym"; > > case ElfTypeId::byte: > return "byte"; > > case ElfTypeId::half: > return "half"; > > case ElfTypeId::sword: > return "+word"; > > case ElfTypeId::word: > return "word"; > > case ElfTypeId::sxword: > return "+quad"; > > case ElfTypeId::xword: > return "quad"; > > case ElfTypeId::free: > return "free"; > } > > ># 89 "../../src/elf/ElfMetadata.hpp" 3 > throw facile::RequireException("../../src/elf/ElfMetadata.hpp", 89) ># 89 "../../src/elf/ElfMetadata.hpp" > << "unreachable" << ># 89 "../../src/elf/ElfMetadata.hpp" 3 > facile::RequireException::require_sentinel ># 89 "../../src/elf/ElfMetadata.hpp" > ; >} > >inline std::ostream& >operator <<(std::ostream& o, const GElf_Rela& rela) >{ > uint32_t symbolTableIndex = ># 95 "../../src/elf/ElfMetadata.hpp" 3 4 > (( ># 95 "../../src/elf/ElfMetadata.hpp" > rela.r_info ># 95 "../../src/elf/ElfMetadata.hpp" 3 4 > ) >> 32) ># 95 "../../src/elf/ElfMetadata.hpp" > ; > uint32_t typeData = static_cast<uint32_t>((rela.r_info >> 8) & 0xffffffULL); > ElfTypeId typeId = elfTypeId(rela.r_info & 0xff); > > return o << "[type: (id: " << elfRelocationTypeLabel(typeId) << ", data:" << hex(typeData) << "), symbol table: " << hex(symbolTableIndex) > << ", offset: " << hex(rela.r_offset) << ", addend: " << hex(rela.r_addend) << "]"; >} > >class ElfMetadata >{ >public: > struct PlatformFileTypeRange { > static constexpr uint32_t min = 0xff00; > static constexpr uint32_t max = 0xffff; > > static bool > contains(uint32_t typeId) { return typeId >= min && typeId <= max; } > }; > > enum class FileType { > none, > relocation, > executable, > shared, > core, > platform > }; > > friend std::ostream& > operator <<(std::ostream& o, FileType type) > { > switch (type) > { > case FileType::none: > return o << "none"; > > case FileType::relocation: > return o << "relocation"; > > case FileType::executable: > return o << "executable"; > > case FileType::shared: > return o << "shared"; > > case FileType::core: > return o << "core"; > > case FileType::platform: > return o << "platform"; > } > > ># 147 "../../src/elf/ElfMetadata.hpp" 3 > throw facile::RequireException("../../src/elf/ElfMetadata.hpp", 147) ># 147 "../../src/elf/ElfMetadata.hpp" > << "unreachable" << ># 147 "../../src/elf/ElfMetadata.hpp" 3 > facile::RequireException::require_sentinel ># 147 "../../src/elf/ElfMetadata.hpp" > ; > } > > enum class MetaSectionId { > plt, > plt_sec, > got, > got_plt, > rela_plt, > rela_dyn, > data_rel_ro, > rodata, > dynamic, > dynsym, > symtab, > init_array, > fini_array, > build_id, > free > }; > > static class MetaSectionElfIdMap > { > using ElfMap = std::unordered_map<std::string, MetaSectionId>; > using IdMap = EnumerationIndexArray<std::string, MetaSectionId, 15, EnumeratedContainerMetaProperties<std::string>>; > > public: > MetaSectionElfIdMap(); > > std::string > lookup(MetaSectionId id) { return _id.at(id); } > > MetaSectionId > lookup(const std::string& elfId) > { > ElfMap::iterator i = _elf.find(elfId); > if (i == _elf.end()) > return MetaSectionId::free; > else > return i->second; > } > > private: > ElfMap _elf; > IdMap _id; > } > elfIdMap; > > friend std::ostream& > operator <<(std::ostream& o, MetaSectionId id) { return o << elfIdMap.lookup(id); } > > > struct Section { > enum class Permissions { > BitwiseEnumTag, > write = 1, > read = 2, > execute = 4 > }; > > MetaSectionId id; > std::string elfId; > bool found; > > GElf_Shdr header; > Elf_Scn *section; > Elf_Data *data; > uint32_t entryCount; > > Section() : > found(false) > {} > > Section(const Section& src) : > id(src.id), > elfId(src.elfId), > found(src.found), > header(src.header), > section(src.section), > data(src.data), > entryCount(src.entryCount) > {} > > void > load(MetaSectionId id, const std::string& elfId, GElf_Shdr *dataRegion, Elf_Scn *section); > > static owner<Section> > inflate(const std::string& elfId, GElf_Shdr *dataRegion, Elf_Scn *section); > > void > empty(MetaSectionId id); > > bool > empty() const { return !found; } > > Permissions > permissions() const { return static_cast<Permissions>(header.sh_flags & 0x7); } > > bool > isCode() const { return elfId.rfind(".text", 0) == 0; } > > bool > isProcedure() const { return id == MetaSectionId::plt_sec; } > > bool > isGlobalOffset() const { return elfId.rfind(".got", 0) == 0; } > > bool > is(Permissions p) const { return testAll(permissions(), p); } > > bool > contains(Offset offset) const > { > return ((offset >= header.sh_addr) && (offset < (header.sh_addr + header.sh_size))); > } > > Offset > start() const { return header.sh_addr; } > > Offset > sentinel() const { return header.sh_addr + header.sh_size; } > }; > > class Sections { > public: > using MetaSectionTable = EnumerationIndexArray<Section, MetaSectionId, 15, EnumeratedContainerMetaProperties<Section>>; > using FreeSectionTable = std::unordered_map<std::string, owner<Section>>; > > Sections(owner<const MetaSectionTable> meta, owner<const FreeSectionTable> free) : > _meta(std::move(meta)), > _free(std::move(free)) > {} > > handle<const Section> > meta(MetaSectionId id) const { return _meta->at(id); } > > loan<const Section> > free(const std::string& elfId) const { return _free->at(elfId); } > > template<typename Functor> > void > forAll(Functor f) const > { > for (const Section& s : _meta->iterateConstElements()) > f(s); > > for (FreeSectionIterator e = _free->cbegin(); e != _free->cend(); e++) { > loan<const Section> s = e->second; > f(s); > } > } > > handle<const Section> > atImageOffset(Offset offset) const > { > for (const Section& s : _meta->iterateConstElements()) { > if ((offset >= s.header.sh_addr) && (offset < (s.header.sh_addr + s.header.sh_size))) > return s; > } > > for (FreeSectionIterator e = _free->cbegin(); e != _free->cend(); e++) { > loan<const Section> s = e->second; > if ((offset >= s->header.sh_addr) && (offset < (s->header.sh_addr + s->header.sh_size))) > return s; > } > > return nullptr; > } > > handle<const Section> > atFileOffset(Offset offset) const > { > for (const Section& s : _meta->iterateConstElements()) { > if ((offset >= s.header.sh_offset) && (offset < (s.header.sh_offset + s.header.sh_size))) > return s; > } > > for (FreeSectionIterator e = _free->cbegin(); e != _free->cend(); e++) { > loan<const Section> s = e->second; > if ((offset >= s->header.sh_offset) && (offset < (s->header.sh_offset + s->header.sh_size))) > return s; > } > > return nullptr; > } > > private: > using FreeSectionIterator = typename FreeSectionTable::const_iterator; > using FreeSectionEntry = std::pair<const std::string, loan<const Section>>; > > owner<const MetaSectionTable> _meta; > owner<const FreeSectionTable> _free; > }; > > class MemoryMap > { > public: > > class SectionEntry > { > public: > SectionEntry(handle<MemoryMap> map, handle<const Section> section) : > _map(map), > _section(section) > {} > > handle<MemoryMap> > map() const { return _map; } > > inline loc_t > mapBase() const { return _map->_image->base(); } > > inline Offset > base() const > { > return (_map->_elf->_fileType == FileType::executable && _section->isCode()) ? _section->header.sh_offset : _section->header.sh_addr; > } > > inline Offset > extent() const { return base() + size(); } > > inline bool > contains(Offset offset) const { return offset >= base() && offset < extent(); } > > inline Offset > size() const { return _section->header.sh_size; } > > inline loc_t > toMap(Offset offset) const { return mapBase() + offset; } > > inline Offset > offsetAt(loc_t cursor) const { return narrow<Offset>(cursor - mapBase()); } > > private: > handle<MemoryMap> _map; > handle<const Section> _section; > }; > > MemoryMap(handle<ElfMetadata> elf, owner<ModuleImage> image) : > _elf(elf), > _image(std::move(image)) > {} > > ~MemoryMap() { unmap(); } > > inline handle<const ElfMetadata> > elf() const { return _elf; } > > handle<const Section> > sectionAtImageOffset(Offset offset) const { return _elf->_sections->atImageOffset(offset); } > > handle<const Section> > sectionAtFileOffset(Offset offset) const { return _elf->_sections->atFileOffset(offset); } > > handle<const Section> > sectionAtFileLocation(loc_t location) const { return _elf->_sections->atFileOffset(narrow<Offset>(location - _image->base())); } > > handle<const Section> > sectionAtImageLocation(loc_t location) const { return _elf->_sections->atImageOffset(narrow<Offset>(location - _image->base())); } > > inline loc_t > toMap(Offset offset) const { return _image->base() + offset; } > > inline Offset > offsetAt(loc_t location) const { return narrow<Offset>(location - _image->base()); } > > loc_t > sectionBase(MetaSectionId id) { return _image->base() + _elf->_sections->meta(id)->header.sh_offset; } > > loc_t > sectionBase(const std::string& elfId) { return _image->base() + _elf->_sections->free(elfId)->header.sh_offset; } > > inline SectionEntry > entry(MetaSectionId id) { return SectionEntry(*this, _elf->_sections->meta(id)); } > > inline SectionEntry > entry(const std::string& elfId) { return SectionEntry(*this, _elf->_sections->free(elfId)); } > > inline SectionEntry > entry(handle<const Section> section) { return SectionEntry(*this, section); } > > inline loc_t > sentinel() const { return _image->sentinel(); } > > bool > isCode(loc_t l) const > { > handle<const Section> s = sectionAtFileLocation(l); > return (s != nullptr && s->isCode()); > } > > bool > isFileCode(Offset offset) const > { > handle<const Section> s = sectionAtFileOffset(offset); > return (s != nullptr && s->isCode()); > } > > bool > isImageCode(Offset offset) const > { > handle<const Section> s = sectionAtImageOffset(offset); > return (s != nullptr && s->isCode()); > } > > Offset > findExport(loc_t l) const > { > Exports::TableReader i = _elf->_exports.symbol.find(offsetAt(l)); > if (i == _elf->_exports.symbol.end()) > return 0; > else > return i->second; > } > > void > linkExport(Offset trampoline, Offset entryPoint) { _elf->_exports.link.emplace(trampoline, entryPoint); } > > Offset > resolveTarget(loc_t l) const > { > Offset offset = offsetAt(l); > handle<const Section> s = sectionAtFileOffset(offset); > if (s->isCode()) > return offset; > if (s->isProcedure()) { > Exports::TableReader i = _elf->_exports.link.find(offset); > if (i != _elf->_exports.link.end()) > return i->second; > } > return 0; > } > > void > unmap() { _image->release(); } > > private: > handle<ElfMetadata> _elf; > owner<ModuleImage> _image; > }; > > static owner<ElfMetadata> > load(const std::string& modulePath); > > static MetaSectionId > lookupMetaSectionId(const char *name); > > static FileType > lookupFileType(uint32_t typeId); > > ElfMetadata(const std::string& modulePath, FileType fileType, Offset entryPoint, loc_t absoluteLoadAddress, owner<Sections> sections, > owner<Offsets> terminatingFucntions) : > _modulePath(modulePath), > _fileType(fileType), > _entryPoint(entryPoint), > _absoluteLoadAddress(absoluteLoadAddress), > _sections(std::move(sections)), > _terminatingFunctions(std::move(terminatingFucntions)) > {} > > std::string > modulePath() const { return _modulePath; } > > owner<MemoryMap> > memoryMap(owner<ModuleImage> image) { return owner<MemoryMap>::make(*this, std::move(image)); } > > FileType > fileType() const { return _fileType; } > > Offset > entryPoint() const { return _entryPoint; } > > loc_t > absoluteLoadAddress() const { return _absoluteLoadAddress; } > > loan<const Sections> > sections() const { return _sections; } > > void > buildRelocationMap(); > > void > locateGlobalFunctions(); > > iterable<Offsets::const_iterator> > globalFunctionEntryPoints() const { return iterable<Offsets::const_iterator>(_globalFunctionEntryPoints); } > > iterable<Indirections::const_iterator> > globalFunctionHandles() const { return iterable<Indirections::const_iterator>(_globalFunctionHandles); } > > handle<const Offsets> > globalEntryPoints() const { return _globalFunctionEntryPoints; } > > handle<const Offsets> > terminatingFucntions() const { return handle<const Offsets>(*_terminatingFunctions); } > > Offset > globalFunctionOffsetInFile(Offset relocationOffsetInImage) const > { > Indirections::const_iterator i = _globalFunctionHandles.find(relocationOffsetInImage); > if (i == _globalFunctionHandles.end()) > return 0; > else > return i->second; > } > >private: ># 573 "../../src/elf/ElfMetadata.hpp" > struct Exports { > using Table = std::unordered_map<Offset, Offset>; > using TableReader = typename Table::const_iterator; > > Table symbol; > Table link; > }; > > const std::string _modulePath; > const FileType _fileType; > const Offset _entryPoint; > const loc_t _absoluteLoadAddress; > > owner<Sections> _sections; > > Offsets _globalFunctionEntryPoints; > Indirections _globalFunctionHandles; > owner<Offsets> _terminatingFunctions; > Exports _exports; >}; >} ># 8 "../../src/io/Disassembly.hpp" 2 > >namespace pii >{ >struct CodeSpanDisassembly { > CodeSpanDisassembly(loc_t location, uint32_t length) : > _location(location), > _length(length) > {} > > friend std::ostream& > operator <<(std::ostream& o, const CodeSpanDisassembly d) > { > loc_t ip = d._location, next_ip, end = d._location + d._length; > static const size_t buffer_size = 0x100; > char buffer[buffer_size]; > int chars_printed; > > while (ip < end) { > next_ip = disassemble_to_buffer(((void *)-1), (byte *) ip, (byte *) ip, true , > true , buffer, buffer_size, > &chars_printed); > o << buffer; > ># 30 "../../src/io/Disassembly.hpp" 3 > ( ># 30 "../../src/io/Disassembly.hpp" > next_ip != 0UL ># 30 "../../src/io/Disassembly.hpp" 3 > ) || facile::RequireException("../../src/io/Disassembly.hpp", 30) << ># 30 "../../src/io/Disassembly.hpp" > std::endl ># 30 "../../src/io/Disassembly.hpp" 3 > << "⢠Condition [" << ># 30 "../../src/io/Disassembly.hpp" > "next_ip != 0UL" ># 30 "../../src/io/Disassembly.hpp" 3 > << "] " << ># 30 "../../src/io/Disassembly.hpp" > std::endl ># 30 "../../src/io/Disassembly.hpp" 3 > << "⢠" ># 30 "../../src/io/Disassembly.hpp" > << "Failed to decode an instruction at " << hex(ip) > << " (offset " << hex(ip - d._location) << ")" << ># 31 "../../src/io/Disassembly.hpp" 3 > facile::RequireException::require_sentinel ># 31 "../../src/io/Disassembly.hpp" > ; > ip = next_ip; > } > > return o; > } > > private: > loc_t _location; > uint32_t _length; >}; > >struct OperandTypeLabel { > const opnd_t op; > > friend std::ostream& > operator <<(std::ostream& o, const OperandTypeLabel label) > { > if (opnd_is_reg(label.op)) > return o << "reg"; > > if (opnd_is_instr(label.op)) > return o << "instruction"; > > if (opnd_is_pc(label.op)) > return o << "static pc"; > > if (opnd_is_base_disp(label.op)) > return o << "base/disp"; > > > > > > > if (opnd_is_immed(label.op)) > return o << "static immediate"; > > if (opnd_is_abs_addr(label.op) || opnd_is_rel_addr(label.op)) > return o << "static address"; > > ># 72 "../../src/io/Disassembly.hpp" 3 > throw facile::RequireException("../../src/io/Disassembly.hpp", 72) ># 72 "../../src/io/Disassembly.hpp" > << "unreachable" << ># 72 "../../src/io/Disassembly.hpp" 3 > facile::RequireException::require_sentinel ># 72 "../../src/io/Disassembly.hpp" > ; > } >}; > >struct OperandDisassembly { > OperandDisassembly(opnd_t op) : > _op(op) > {} > > friend std::ostream& > operator <<(std::ostream& o, const OperandDisassembly& d) > { > static const size_t buffer_size = 0x20; > char buffer[buffer_size]; > > opnd_disassemble_to_buffer(((void *)-1), d._op, buffer, buffer_size); > return o << buffer; > } > > private: > opnd_t _op; >}; > >struct OperandContextDisassembly { > OperandContextDisassembly(opnd_t op, loan<ElfMetadata::MemoryMap> axis) : > _op(op), > _axis(axis) > {} > > friend std::ostream& > operator <<(std::ostream& o, const OperandContextDisassembly& d) > { > o << OperandDisassembly(d._op); > > if (opnd_is_pc(d._op)) { > loc_t pc = opnd_get_pc(d._op); > o << "(" << hex(d._axis->offsetAt(pc)) << ")"; > } > > return o; > } > > private: > opnd_t _op; > loan<ElfMetadata::MemoryMap> _axis; >}; > >struct RegisterDisassembly { > RegisterDisassembly(reg_id_t reg) : > _reg(reg) > {} > > friend std::ostream& > operator <<(std::ostream& o, const RegisterDisassembly& d) > { > static const size_t buffer_size = 0x20; > char buffer[buffer_size]; > size_t printed = 0; > > reg_disassemble(buffer, buffer_size, &printed, d._reg, static_cast<dr_opnd_flags_t>(0), "", ""); > return o << buffer; > } > > private: > reg_id_t _reg; >}; >} ># 56 "../../src/PiiFramework.hpp" 2 ># 1 "../../src/dynamorio/Conditionals.hpp" 1 > > > ># 1 "../../src/dynamorio/ProcessorStatus.hpp" 1 > > > > > >namespace pii >{ >namespace model >{ >using namespace pii; > >enum class StatusAtom : uint8_t { > carry, > parity, > adjust, > zero, > sign, > trap, > interrupt, > direction, > overflow, > privilege0, > privilege1, > privilege, > nested, > resume, > virtualMode, > alignmentCheck, > virtualInterrupt, > virtualInterruptPending, > cpuid, > none >}; > >enum class StatusFlags : uint32_t { > BitwiseEnumTag, > carry = 0x0001, > parity = 0x0004, > adjust = 0x0010, > zero = 0x0040, > sign = 0x0080, > trap = 0x0100, > interrupt = 0x0200, > direction = 0x0400, > overflow = 0x0800, > privilege0 = 0x1000, > privilege1 = 0x2000, > privilege = 0x3000, > nested = 0x4000, > resume = 0x00010000, > virtualMode = 0x00020000, > alignmentCheck = 0x00040000, > virtualInterrupt = 0x00080000, > virtualInterruptPending = 0x00100000, > cpuid = 0x00200000 >}; > >struct StatusAtomMap { > StatusAtom > operator ()(StatusFlags flag) const > { > switch (flag) > { > case StatusFlags::carry: > return StatusAtom::carry; > > case StatusFlags::parity: > return StatusAtom::parity; > > case StatusFlags::zero: > return StatusAtom::zero; > > case StatusFlags::sign: > return StatusAtom::sign; > > case StatusFlags::overflow: > return StatusAtom::overflow; > > default: > ; > } > > ># 83 "../../src/dynamorio/ProcessorStatus.hpp" 3 > throw facile::RequireException("../../src/dynamorio/ProcessorStatus.hpp", 83) ># 83 "../../src/dynamorio/ProcessorStatus.hpp" > << "unreachable" << ># 83 "../../src/dynamorio/ProcessorStatus.hpp" 3 > facile::RequireException::require_sentinel ># 83 "../../src/dynamorio/ProcessorStatus.hpp" > ; > } >}; > >static inline std::ostream& >operator <<(std::ostream& o, StatusAtom atom) >{ > switch (atom) > { > case StatusAtom::none: > return o << "<none>"; > > case StatusAtom::carry: > return o << "carry"; > > case StatusAtom::parity: > return o << "parity"; > > case StatusAtom::adjust: > return o << "adjust"; > > case StatusAtom::zero: > return o << "zero"; > > case StatusAtom::sign: > return o << "sign"; > > case StatusAtom::overflow: > return o << "overflow"; > > default: > return o << "TODO"; > } > > ># 117 "../../src/dynamorio/ProcessorStatus.hpp" 3 > throw facile::RequireException("../../src/dynamorio/ProcessorStatus.hpp", 117) ># 117 "../../src/dynamorio/ProcessorStatus.hpp" > << "unreachable" << ># 117 "../../src/dynamorio/ProcessorStatus.hpp" 3 > facile::RequireException::require_sentinel ># 117 "../../src/dynamorio/ProcessorStatus.hpp" > ; >} > >static inline const char * >mnemonic(StatusAtom atom) >{ > switch (atom) > { > case StatusAtom::none: > return "-"; > > case StatusAtom::carry: > return "CF"; > > case StatusAtom::parity: > return "PF"; > > case StatusAtom::adjust: > return "AF"; > > case StatusAtom::zero: > return "ZF"; > > case StatusAtom::sign: > return "SF"; > > case StatusAtom::overflow: > return "OF"; > > default: > return "TODO"; > } > > ># 150 "../../src/dynamorio/ProcessorStatus.hpp" 3 > throw facile::RequireException("../../src/dynamorio/ProcessorStatus.hpp", 150) ># 150 "../../src/dynamorio/ProcessorStatus.hpp" > << "unreachable" << ># 150 "../../src/dynamorio/ProcessorStatus.hpp" 3 > facile::RequireException::require_sentinel ># 150 "../../src/dynamorio/ProcessorStatus.hpp" > ; >} > >enum class ProcessorStatus : uint8_t { > flags, > control >}; > >static inline std::ostream& >operator <<(std::ostream& o, ProcessorStatus s) >{ > switch (s) > { > case ProcessorStatus::flags: > return o << "flags"; > > case ProcessorStatus::control: > return o << "mxcsr"; > } > > ># 170 "../../src/dynamorio/ProcessorStatus.hpp" 3 > throw facile::RequireException("../../src/dynamorio/ProcessorStatus.hpp", 170) ># 170 "../../src/dynamorio/ProcessorStatus.hpp" > << "unreachable" << ># 170 "../../src/dynamorio/ProcessorStatus.hpp" 3 > facile::RequireException::require_sentinel ># 170 "../../src/dynamorio/ProcessorStatus.hpp" > ; >} >} >} ># 5 "../../src/dynamorio/Conditionals.hpp" 2 > >namespace pii >{ >using model::StatusFlags; > >class ConditionalFlagMap >{ >public: > static bool > hasSourceConditionals(int opcode) { return testAny(instr_get_opcode_eflags(opcode), DR_READ_FLAG_DOMAIN); } > > static bool > hasSourceStatus(int opcode) > { > if (hasSourceConditionals(opcode)) { > switch (opcode) > { > case OP_adc: > case OP_sbb: > return false; > default: > return true; > } > } else { > return false; > } > } > > static bool > hasSinkConditionals(int opcode) { return testAny(instr_get_opcode_eflags(opcode), DR_WRITE_FLAG_DOMAIN); } > >private: > static constexpr uint32_t DR_READ_FLAG_DOMAIN = { 0x00000001 | 0x00000002 | 0x00000008 | 0x00000010 | 0x00000100 }; > static constexpr uint32_t DR_WRITE_FLAG_DOMAIN = { 0x00000800 | 0x00001000 | 0x00004000 | 0x00008000 | 0x00080000 }; >}; > >template<typename Id> >struct ConditionalBase { > Id id; > StatusFlags status; >}; > >template<typename Id, typename IdMap> >class ConditionalMapBase { >using ConditionalMap = ConditionalMapBase<Id, IdMap>; > >static constexpr uint32_t DR_READ_FLAGS[] = { 0x00000001, 0x00000002, 0x00000008, 0x00000010, 0x00000100 }; >static constexpr uint32_t DR_WRITE_FLAGS[] = { 0x00000800, 0x00001000, 0x00004000, 0x00008000, 0x00080000 }; >static constexpr uint32_t count = 5; > > > >public: > using Conditional = ConditionalBase<Id>; > > struct Selection { > struct Iterator { > Iterator(Selection& s, uint32_t i = 0) : > _s(s), > _i(i) > { > advance(); > } > > Iterator& > operator ++() { return ++_i, advance(), *this; } > > const Conditional& > operator *() { return _s._c.domain[_i]; } > > bool > operator !=(Iterator& other) { return _s.flags != other._s.flags || _s._flagDomain != other._s._flagDomain || _i != other._i; } > > private: > void > advance() > { > while ((_i < ConditionalMap::count) && !testAll(_s.flags, static_cast<StatusFlags>(_s._flagDomain[_i]))) > ++_i; > } > > Selection& _s; > uint32_t _i; > }; > > StatusFlags flags; > > Selection(const ConditionalMap& c, int opcode, const uint32_t *flagDomain) : > flags(static_cast<StatusFlags>(instr_get_opcode_eflags(opcode))), > _c(c), > _flagDomain(flagDomain) > {} > > Iterator > begin() { return Iterator(*this); } > > Iterator > end() { return Iterator(*this, ConditionalMap::count); } > > private: > const ConditionalMap& _c; > > const uint32_t *_flagDomain; > }; > > Conditional domain[count]; > > ConditionalMapBase() : > domain{map(StatusFlags::carry), map(StatusFlags::parity), map(StatusFlags::zero), map(StatusFlags::sign), map(StatusFlags::overflow)} > {} > > static handle<ConditionalMap> > get() > { > static ConditionalMap map; > > return map; > } > > Selection > sourceConditionals(int opcode) const { return Selection(*this, opcode, DR_READ_FLAGS); } > > Selection > sinkConditionals(int opcode) const { return Selection(*this, opcode, DR_WRITE_FLAGS); } > >private: > static Conditional > map(StatusFlags status) > { > static IdMap idMap; > > return Conditional{ idMap(status), status }; > } >}; >} ># 57 "../../src/PiiFramework.hpp" 2 > ># 1 "../../src/elf/LiveMemoryMap.hpp" 1 > > > > ># 1 "../../src/elf/LiveMemoryMapEntry.hpp" 1 > > > > >namespace pii >{ >using namespace facile; > >typedef enum MemoryMapPermission { > MAP_PERM_READ, > MAP_PERM_WRITE, > MAP_PERM_EXEC, > MAP_PERM_SHARED, > MAP_PERM_LAST >} MemoryMapPermission; > >typedef struct _device_id_t { > uint8_t major; > uint8_t minor; >} device_id_t; > >class LiveMemoryMapEntry { >struct slice_tag {}; >struct clone_tag {}; > >public: > > LiveMemoryMapEntry(std::string& mapsFileLine); > > LiveMemoryMapEntry(slice_tag *tag, const LiveMemoryMapEntry& src, loc_t sliceStart, loc_t sliceEnd); > > LiveMemoryMapEntry(clone_tag *tag, const LiveMemoryMapEntry& src); > > void > print(std::ostream& out); > > loc_t > start() { return _start; } > > loc_t > sentinel() { return _sentinel; } > > uint32_t > getOffset() { return _offset; } > > size_t > getSize(); > > const std::string& > getPath(); > > bool > isFromFilesystem() { return _inode != 0; } > > bool > isIdentical(loan<LiveMemoryMapEntry> other) const; > > bool > overlaps(owner<LiveMemoryMapEntry>& other); > > bool > contains(loc_t pc); > > bool > matchesName(const std::string& name); > > bool > matchesName(const std::regex& namePattern); > > bool > hasPermission(MemoryMapPermission p); > > owner<LiveMemoryMapEntry> > slice(loc_t start, loc_t end); > > bool > isUnloaded() { return _isUnloaded; } > > void > markUnloaded() { _isUnloaded = true; } > > owner<LiveMemoryMapEntry> > clone(); > >private: > loc_t _start; > loc_t _sentinel; > std::bitset<MAP_PERM_LAST> _permissions; > uint32_t _offset; > device_id_t _device; > uint32_t _inode; > std::string _path; > > bool _isUnloaded; > > class PermissionParser > { > public: > PermissionParser(std::string& flags, std::bitset<MAP_PERM_LAST>& permissions); > private: > std::string& _flags; > std::bitset<MAP_PERM_LAST>& _permissions; > > void > parsePermission(uint position, char enabled); > }; >}; >} ># 6 "../../src/elf/LiveMemoryMap.hpp" 2 > >namespace pii >{ >using namespace facile; > >class LiveMemoryMap >{ >public: > using EntryList = std::vector<owner<LiveMemoryMapEntry>>; > using EntryIterator = typename EntryList::const_iterator; > using Filter = std::function<bool (loan<LiveMemoryMapEntry>)>; > > LiveMemoryMap() : > _pid(0), > _targetCodeEntry( ># 20 "../../src/elf/LiveMemoryMap.hpp" 3 4 > __null ># 20 "../../src/elf/LiveMemoryMap.hpp" > ) {} > > void > loadMapFile(const std::string& targetExecutablePath = "<no-executable-defined>") { return loadMapFile(getpid(), targetExecutablePath); } > > void > loadMapFile(pid_t pid, const std::string& targetExecutablePath = "<no-executable-defined>"); > > bool > reloadMapFile(); > > EntryIterator > begin() const; > > EntryIterator > end() const; > > loc_t > start() const { return _entries.at(0)->start(); } > > loc_t > sentinel() const { return _entries.at(point_util::lastOfQuantity(_entries.size()))->sentinel(); } > > size_t > size() const { return sentinel() - start(); } > > loan<LiveMemoryMapEntry> > getTargetCodeEntry() { return _targetCodeEntry; } > > loan<LiveMemoryMapEntry> > getContainingMapEntry(loc_t addr) const; > > loan<LiveMemoryMapEntry> > findModule(const std::regex pattern); > > loan<LiveMemoryMapEntry> > findLibC(); > > bool > isIdentical(loan<LiveMemoryMap> other) const; > > owner<LiveMemoryMap> > clone(Filter filter = nullptr); > > void > print(std::ostream& o); > > static Filter > getFilterAcceptWritable(); > > static Filter > getFilterAcceptExecutable(); > > static owner<LiveMemoryMap> > self(const std::string& name) > { > owner<LiveMemoryMap> map = owner<LiveMemoryMap>::make(); > map->loadMapFile(name); > return map; > } > >private: > struct EntryFootprintOrder { > bool > operator ()(const owner<LiveMemoryMapEntry>& a, const owner<LiveMemoryMapEntry>& b) > { > return a->start() < b->start(); > } > } > _entryFootprintOrder; > > struct EntryContainmentEvaluator { > bool > operator ()(const owner<LiveMemoryMapEntry>& entry, loc_t tag) > { > return entry->sentinel() <= tag; > } > } > _entryContainmentEvaluator; > > std::string > constructMapsFilePath(); > > static bool > filterAcceptWritable(loan<LiveMemoryMapEntry> mapping) > { > return mapping->hasPermission(MAP_PERM_WRITE); > } > > static bool > filterAcceptExecutable(loan<LiveMemoryMapEntry> mapping) > { > return mapping->hasPermission(MAP_PERM_EXEC); > } > > pid_t _pid; > EntryList _entries; > loan<LiveMemoryMapEntry> _targetCodeEntry; >}; >} ># 59 "../../src/PiiFramework.hpp" 2 ># 1 "../../src/assembly/Instruct.hpp" 1 > > > > > > > > >namespace pii >{ >struct instantiation_tag {}; >struct acquired_allocation_tag {}; >struct construction_in_place_tag {}; >struct clone_tag {}; > > > > > >class Instruct : > public InstructionModel >{ >public: > template<typename Operands> > struct OperandsToken { > OperandsToken(Operands& operands) : > _operands(operands) > {} > > friend std::ostream& > operator <<(std::ostream& o, const OperandsToken& t) > { > Comma comma; > o << "["; > for (opnd_t op : t._operands) > o << comma << OperandDisassembly(op); > return o << "]"; > } > > private: > Operands& _operands; > }; > > struct DisassemblyToken { > Instruct& i; > loan<ElfMetadata::MemoryMap> axis; > > friend std::ostream& > operator <<(std::ostream& o, const DisassemblyToken& dt) > { > o << dt.i.opcodeTag() << " [" << dt.i.opcode() << "]: "; > > Comma comma; > for (opnd_t source : dt.i.sources()) > o << comma << OperandContextDisassembly(source, dt.axis); > > o << " -> "; > > comma.reset(); > for (opnd_t sink : dt.i.sinks()) > o << comma << OperandContextDisassembly(sink, dt.axis); > > return o; > } > }; > > class Sources { > public: > class Iterator { > public: > template<typename S, typename = typename std::enable_if_t<!std::is_rvalue_reference<S>::value>> > Iterator(const S& sources) : > Iterator(sources, 0) > {} > > template<typename S, typename = typename std::enable_if_t<!std::is_rvalue_reference<S>::value>> > Iterator(const S& sources, uint32_t index) : > _sources(sources), > _index(index) > {} > > Iterator& > operator ++() { return ++_index, *this; } > > opnd_t > operator *() { return _sources[_index]; } > > bool > operator !=(Iterator& other) { return _sources._i.raw() != other._sources._i.raw() || _index != other._index; } > > private: > const Sources& _sources; > int _index; > }; > > Sources(const Instruct& i) : > _i(i) > {} > > Iterator > begin() const { return Iterator(*this); } > > Iterator > end() const { return Iterator(*this, size()); } > > uint32_t > countRegisters() const > { > uint32_t count = 0; > for (opnd_t source : *this) { > if (opnd_is_reg(source)) > count++; > } > return count; > } > > atomblock<reg_id_t> > registerSet() const > { > uint32_t count = 0; > for (uint32_t i = 0; i < size(); i++) { > if (opnd_is_reg(at(i))) { > bool skip = false; > for (uint32_t j = 0; j < i; j++) { > if (opnd_get_reg(at(j)) == opnd_get_reg(at(i))) { > skip = true; > break; > } > } > if (!skip) > count++; > } > } > > uint32_t index = 0; > atomblock<reg_id_t> set(count); > for (uint32_t i = 0; i < size(); i++) { > if (opnd_is_reg(at(i))) { > bool skip = false; > for (uint32_t j = 0; j < i; j++) { > if (opnd_get_reg(at(j)) == opnd_get_reg(at(i))) { > skip = true; > break; > } > } > if (!skip) > set.at(index++) = opnd_get_reg(at(i)); > } > } > > return set; > } > > opnd_t > registerMatch(opnd_t op) const > { > ># 157 "../../src/assembly/Instruct.hpp" 3 > ( ># 157 "../../src/assembly/Instruct.hpp" > opnd_is_reg(op) ># 157 "../../src/assembly/Instruct.hpp" 3 > ) || facile::RequireException("../../src/assembly/Instruct.hpp", 157) << ># 157 "../../src/assembly/Instruct.hpp" > std::endl ># 157 "../../src/assembly/Instruct.hpp" 3 > << "⢠Condition [" << ># 157 "../../src/assembly/Instruct.hpp" > "opnd_is_reg(op)" ># 157 "../../src/assembly/Instruct.hpp" 3 > << "] " << ># 157 "../../src/assembly/Instruct.hpp" > std::endl ># 157 "../../src/assembly/Instruct.hpp" 3 > << "⢠" ># 157 "../../src/assembly/Instruct.hpp" > << "Cannot match register on an operand that is not a register" << ># 157 "../../src/assembly/Instruct.hpp" 3 > facile::RequireException::require_sentinel ># 157 "../../src/assembly/Instruct.hpp" > ; > > return registerMatch(opnd_get_reg(op)); > } > > opnd_t > registerMatch(reg_id_t reg) const > { > for (opnd_t source : *this) { > if (opnd_is_reg(source) && (normalize(opnd_get_reg(source)) == normalize(reg))) > return source; > } > return opnd_t(); > } > > uint32_t > size() const { return instr_num_srcs(_i.raw()); } > > inline opnd_t > operator [](int index) const { return at(index); } > > inline opnd_t > at(int index) const { return instr_get_src(_i.raw(), index); } > > bool > isFree(uint32_t operandPosition) const > { > switch (_i.opcode()) > { > case OP_add: > case OP_addss: > case OP_addsd: > case OP_sub: > case OP_subss: > case OP_subsd: > case OP_imul: > case OP_mulss: > case OP_mulsd: > case OP_divss: > case OP_divsd: > case OP_xor: > case OP_pxor: > return operandPosition == 0; > > default: > ; > } > > ># 205 "../../src/assembly/Instruct.hpp" 3 > throw facile::RequireException("../../src/assembly/Instruct.hpp", 205) ># 205 "../../src/assembly/Instruct.hpp" > << "Instruction with opcode " << hex(_i.opcode()) << " has no free operand" << ># 205 "../../src/assembly/Instruct.hpp" 3 > facile::RequireException::require_sentinel ># 205 "../../src/assembly/Instruct.hpp" > ; > } > > bool > isBound(uint32_t operandPosition) const > { > switch (_i.opcode()) > { > case OP_add: > case OP_addss: > case OP_addsd: > case OP_sub: > case OP_subss: > case OP_subsd: > case OP_imul: > case OP_mulss: > case OP_mulsd: > case OP_divss: > case OP_divsd: > case OP_xor: > case OP_pxor: > return operandPosition == 1; > > default: > ; > } > > ># 232 "../../src/assembly/Instruct.hpp" 3 > throw facile::RequireException("../../src/assembly/Instruct.hpp", 232) ># 232 "../../src/assembly/Instruct.hpp" > << "Instruction with opcode " << hex(_i.opcode()) << " has no free operand" << ># 232 "../../src/assembly/Instruct.hpp" 3 > facile::RequireException::require_sentinel ># 232 "../../src/assembly/Instruct.hpp" > ; > } > > OperandsToken<Sources> > token() { return OperandsToken(*this); } > > private: > static inline reg_id_t > normalize(reg_id_t reg) > { > if (reg_is_gpr(reg)) > reg = reg_resize_to_opsz(reg, OPSZ_8); > return reg; > } > > const Instruct& _i; > }; > > class Sinks { > public: > class Iterator { > public: > template<typename S, typename = typename std::enable_if_t<!std::is_rvalue_reference<S>::value>> > Iterator(const S& sinks) : > Iterator(sinks, 0) > {} > > template<typename S, typename = typename std::enable_if_t<!std::is_rvalue_reference<S>::value>> > Iterator(const S& sinks, uint32_t index) : > _sinks(sinks), > _index(index) > {} > > Iterator& > operator ++() { return ++_index, *this; } > > opnd_t > operator *() { return _sinks[_index]; } > > bool > operator !=(Iterator& other) { return _sinks._i.raw() != other._sinks._i.raw() || _index != other._index; } > > private: > const Sinks& _sinks; > int _index; > }; > > Sinks(const Instruct& i) : > _i(i) > {} > > Iterator > begin() const { return Iterator(*this); } > > Iterator > end() const { return Iterator(*this, size()); } > > uint32_t > size() const { return instr_num_dsts(_i.raw()); } > > inline opnd_t > at(int index) const { return instr_get_dst(_i.raw(), index); } > > bool > isHighByte(int index) > { > opnd_t dst = instr_get_dst(_i.raw(), index); > if (opnd_is_reg(dst)) { > switch (opnd_get_reg(dst)) > { > case DR_REG_AH: > case DR_REG_BH: > case DR_REG_CH: > case DR_REG_DH: > return true; > } > } > > return false; > } > > inline opnd_t > operator [](int index) const { return instr_get_dst(_i.raw(), index); } > > OperandsToken<Sinks> > token() { return OperandsToken(*this); } > > private: > const Instruct& _i; > }; > > Instruct(__attribute__((unused)) instantiation_tag *tag) : > _i(instr_create(((void *)-1))) > {} > > template<typename ... A, typename Constructor = std::function<instr_t *(A ...)>> > Instruct(__attribute__((unused)) construction_in_place_tag *tag, Constructor constructor, A&& ... args) : > _i(constructor(((void *)-1), std::forward<A>(args) ...)) > {} > > Instruct(__attribute__((unused)) acquired_allocation_tag *tag, instr_t *i) : > _i(i) > {} > > Instruct(__attribute__((unused)) clone_tag *tag, instr_t *src) : > _i(instr_clone(((void *)-1), src)) > {} > > ~Instruct() { instr_destroy(((void *)-1), raw()); } > > loc_t > instanceId() const { return location(); } > > loc_t > location() const { return instr_get_raw_bits(raw()); } > > inline Sources > sources() const { return Sources(*this); } > > inline Sinks > sinks() const { return Sinks(*this); } > > bool > isSourceOverwrite() const > { > switch (opcode()) > { > case OP_add: > case OP_addss: > case OP_addsd: > case OP_sub: > case OP_subss: > case OP_subsd: > case OP_imul: > case OP_mulss: > case OP_mulsd: > case OP_divss: > case OP_divsd: > case OP_xor: > case OP_pxor: > return true; > > default: > ; > } > > return false; > } > > bool > isRegisterMerge() const > { > > > > for (opnd_t sink : sinks()) { > if (isRegisterMerge(sink)) > return true; > } > > return false; > } > > > bool > isRegisterMerge(opnd_t sink) const > { > if (opnd_is_reg(sink)) { > opnd_size_t size = opnd_get_size(sink); > switch (size) > { > case OPSZ_1: > case OPSZ_2: > return true; > } > } > return false; > } > > bool > isIdentity() const > { > if (opcode() != OP_mov_st) > return false; > > if (instr_num_srcs(raw()) != 2) > return false; > > opnd_t left = instr_get_src(raw(), 0); > opnd_t right = instr_get_src(raw(), 1); > return (opnd_is_reg(left) && opnd_is_reg(right) && opnd_get_reg(left) == opnd_get_reg(right)); > } > > byte * > encode(byte *at) { return instr_encode(((void *)-1), raw(), at); } > > OpcodeTag > opcodeTag() { return OpcodeTag(opcode()); } > > owner<Instruct> > clone() const { return owner<Instruct>::make(hidden_tag<clone_tag>(), raw()); } > > DisassemblyToken > token(loan<ElfMetadata::MemoryMap> axis) { return DisassemblyToken{ *this, axis }; } > >private: > instr_t * > raw() const override { return _i.raw(); } > > star<instr_t> _i; >}; >} ># 60 "../../src/PiiFramework.hpp" 2 ># 1 "../../src/assembly/InflatedBasicBlock.hpp" 1 > > ># 1 "../../src/assembly/BasicBlockMetadata.hpp" 1 > > >namespace pii >{ >struct BasicBlockMetadata { > class Semantics > { > public: > enum class Flags : uint32_t { > BitwiseEnumTag, > none = 0x0, > isPublicEntry = 0x4, > isFunctionPad = 0x8, > isThreadExit = 0x10, > isTailCall = 0x20, > }; > > friend std::ostream& > operator <<(std::ostream& o, const Flags& f) > { > Comma comma; > o << "F{"; > if (testAll(f, Flags::isFunctionPad)) > o << comma << "nop"; > if (testAll(f, Flags::isThreadExit)) > o << comma << "halt"; > return o << "}"; > } > > Semantics() = default; > > inline bool > is(Flags flags) const { return testAll(_flags, flags); } > > inline bool > isAllOf(Flags flags) const { return testAll(_flags, flags); } > > inline bool > isAnyOf(Flags flags) const { return testAny(_flags, flags); } > > inline void > set(Flags flags) { _flags |= flags; } > > inline void > clear(Flags flags) { _flags &= ~flags; } > > private: > Flags _flags; > }; > > class Succession > { > public: > using Arity = GraphSpecification::Arity; > > enum class Flags : uint32_t { > BitwiseEnumTag, > none = 0x0, > isConst = 0x1, > isInjected = 0x2, > isFrameUnwind = 0x10, > isFrameDeparture = 0x20, > isConditionalJump = 0x40, > isUnconditionalJump = 0x80, > isIndirect = 0x100, > isSyscall = 0x200, > isInterrupt = 0x400, > isAbort = 0x800, > }; > > friend std::ostream& > operator <<(std::ostream& o, const Flags& f) > { > Comma comma; > o << "F{"; > if (testAll(f, Flags::isFrameUnwind)) > o << comma << "unwind"; > if (testAll(f, Flags::isFrameDeparture)) > o << comma << "depart"; > if (testAll(f, Flags::isConditionalJump)) > o << comma << "cond"; > if (testAll(f, Flags::isUnconditionalJump)) > o << comma << "uncond"; > if (testAll(f, Flags::isIndirect)) > o << comma << "ind"; > if (testAll(f, Flags::isSyscall)) > o << comma << "sys"; > if (testAll(f, Flags::isInterrupt)) > o << comma << "int"; > if (testAll(f, Flags::isAbort)) > o << comma << "ab"; > return o << "}"; > } > > Succession(Flags flags) : > _flags(flags) > {} > > virtual ~Succession() {} > > Flags > flags() const { return _flags; } > > Arity > arity() const > { > if (testAny(_flags, Flags::isFrameUnwind | Flags::isAbort)) > return Arity::nullary; > > if (testAll(_flags, Flags::isIndirect)) > return Arity::nary; > > if (testAny(_flags, Flags::isFrameDeparture | Flags::isUnconditionalJump | Flags::isSyscall | Flags::isInterrupt)) > return Arity::unary; > > if (testAll(_flags, Flags::isConditionalJump)) > return Arity::binary; > > return Arity::unary; > } > > bool > isInjected() const { return testAll(_flags, Flags::isInjected); } > > inline bool > is(Flags flags) const { return testAll(_flags, flags); } > > inline bool > isAllOf(Flags flags) const { return testAll(_flags, flags); } > > inline bool > isAnyOf(Flags flags) const { return testAny(_flags, flags); } > > > bool > isBranch() const > { > return testAny(_flags, > Flags::isFrameUnwind | Flags::isFrameDeparture | Flags::isConditionalJump | > Flags::isUnconditionalJump | Flags::isIndirect | Flags::isSyscall | Flags::isInterrupt); > } > > bool > isBranchInFrame() const { return testAny(_flags, Flags::isConditionalJump | Flags::isUnconditionalJump); } > > bool > isMultipleBranch() const { return testAll(_flags, Flags::isIndirect); } > > bool > mayFallThrough() const { return !testAny(_flags, Flags::isFrameUnwind | Flags::isUnconditionalJump | Flags::isAbort); } > > bool > isConditionalBranch() const { return testAll(_flags, Flags::isConditionalJump); } > > bool > isUnconditionalJump() const { return testAll(_flags, Flags::isUnconditionalJump); } > > bool > isSingularJump() const > { > return testAny(_flags, Flags::isConditionalJump | Flags::isUnconditionalJump) && !testAll(_flags, Flags::isIndirect); > } > > bool > isCallSite() const { return testAll(_flags, Flags::isFrameDeparture | Flags::isFrameUnwind, Flags::isFrameDeparture); } > > bool > isSyscall() const { return testAll(_flags, Flags::isSyscall); } > > bool > isReturn() const { return testAll(_flags, Flags::isFrameUnwind | Flags::isIndirect); } > > template<typename Exit> > static Flags > defineExitFlags(unit<Exit> exit, bool isConst = false, bool isInjected = false, bool isAbort = false) > { > Flags flags = Flags::none; > > if (isConst) > flags |= Flags::isConst; > if (isInjected) > flags |= Flags::isInjected; > if (isAbort || exit->isUndefined()) { > flags |= (Flags::isAbort | Flags::isFrameDeparture); > return flags; > } > > if (exit->isBranch()) { > if (exit->isReturn()) { > flags |= (Flags::isFrameUnwind | Flags::isFrameDeparture | Flags::isIndirect); > } else if (exit->isConditionalBranch()) { > flags |= Flags::isConditionalJump; > } else { > if (exit->isMultipleBranch()) > flags |= Flags::isIndirect; > > if (exit->isCall()) > flags |= Flags::isFrameDeparture; > else > flags |= Flags::isUnconditionalJump; > } > } else if (exit->isSyscall()) { > flags |= Flags::isSyscall; > > if (exit->isInterrupt()) > flags |= Flags::isInterrupt; > } > > return flags; > } > > protected: > const Flags _flags; > }; > > friend std::ostream& > operator <<(std::ostream& o, const Succession& s) { return o << s.flags(); } > > private: > static constexpr uint64_t SUCCESSOR_ABSENT = ># 220 "../../src/assembly/BasicBlockMetadata.hpp" 3 4 > (18446744073709551615UL) ># 220 "../../src/assembly/BasicBlockMetadata.hpp" > ; >}; >} ># 4 "../../src/assembly/InflatedBasicBlock.hpp" 2 > ># 1 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 1 > > ># 1 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/icd/forest/LoopForestDefinitions.hpp" 1 > ># 5 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 2 > > >namespace icd >{ >template<template<typename> class CycleVertexBase, typename TreeVertex> >struct LoopForestSchema { > using CycleVertex = CycleVertexBase<TreeVertex>; > using OrdinalTree = typename TreeVertex::Types::OrdinalTree; > > struct CrossLoopSlice; > struct CrossLoopSliceGroup; > struct LoopBinding; > > struct SliceGroupLink { > unit<CrossLoopSliceGroup> g; > unit<LoopBinding> p; > unit<LoopBinding> n; > > SliceGroupLink() : > g(nullptr), > p(nullptr), > n(nullptr) > {} > > void > unlink() > { > if (p != nullptr) > p->sgl.n = n; > else > g->members = n; > > if (n != nullptr) > n->sgl.p = p; > > g = nullptr; > } > }; > > struct PotentialCrossLoop { > unit<TreeVertex> head; > > PotentialCrossLoop() : > head(nullptr) > {} > > PotentialCrossLoop(unit<TreeVertex> head) : > head(head) > {} > }; > > struct CrossQueue { > unit<LoopBinding> head; > unit<LoopBinding> tail; > > CrossQueue() : > head(nullptr), > tail(nullptr) > {} > }; > > struct DeltaRebindQueue { > unit<LoopBinding> q; > unit<LoopBinding> tail; > > DeltaRebindQueue() : > q(nullptr), > tail(nullptr) > {} > > void > prepend(unit<LoopBinding> lb) > { > handle<DeltaRebindQueue> drq(lb->drq); > > if (drq->q == nullptr) { > if (q == nullptr) { > q = tail = lb; > } else { > drq->q = q; > q = lb; > } > } else { > if (q == nullptr) { > q = lb; > tail = drq->tail; > } else { > tail->drq.q = lb; > tail = drq->tail; > } > } > } > }; > > using DeltaSlice = point_util::BitStackBase<0>; > > struct LoopBinding { > unit<TreeVertex> v; > > handle<DeltaSlice> ds; > > DeltaRebindQueue drq; > > union { > unit<CrossLoopSlice> xs; > uint64_t isStrongSide; > }; > > unit<PotentialCrossLoop> px; > > unit<CrossLoopSlice> sliceHead; > unit<PotentialCrossLoop> loopHead; > > SliceGroupLink sgl; > unit<LoopBinding> q; > > bool isVisited; > bool isOnLinkPath; > unit<TreeVertex> strongProbeTail; > > LoopBinding(unit<TreeVertex> v) : > v(v), > ds(nullptr), > xs(nullptr), > px(nullptr), > sliceHead(nullptr), > loopHead(nullptr), > q(nullptr), > isVisited(false), > isOnLinkPath(false), > strongProbeTail(nullptr) > {} > }; > > struct CrossLoopSlice { > unit<TreeVertex> head; > unit<CrossLoopSliceGroup> groups; > unit<PotentialCrossLoop> occlusion; > > CrossLoopSlice() : > CrossLoopSlice(nullptr) > {} > > CrossLoopSlice(unit<TreeVertex> head) : > head(head), > groups(nullptr), > occlusion(nullptr) > {} > }; > > struct CrossLoopSliceGroup { > unit<CrossLoopSlice> xs; > unit<PotentialCrossLoop> px; > unit<CrossLoopSliceGroup> next; > unit<LoopBinding> members; > > bool isPending; > > struct PrintToken { > ># 164 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 164 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" > ; > > std::ostream& > print(std::ostream& o) const > { > return o << _g.xs->head->token() << "@" << _g.px->head->token(); > } > > PrintToken(CrossLoopSliceGroup& g) : > _g(g) > {} > > private: > CrossLoopSliceGroup& _g; > }; > > inline PrintToken > token() { return PrintToken(*this); } > > CrossLoopSliceGroup() : > CrossLoopSliceGroup(nullptr, nullptr, nullptr) > {} > > CrossLoopSliceGroup(unit<CrossLoopSlice> xs, unit<PotentialCrossLoop> px, unit<CrossLoopSliceGroup> next) : > xs(xs), > px(px), > next(next), > members(nullptr), > isPending(true) > {} > }; > > template<typename CycleVertexExtension> > class TreeSubpath > { > using Position = uint32_t; > > public: > TreeSubpath() : > _bindCursor(0), > _loopStackCursor(0) > {} > > inline unit<TreeVertex> > base() { return _path.empty() ? nullptr : _path.front(); } > > inline unit<TreeVertex> > extent() { return _path.empty() ? nullptr : _path.back(); } > > inline uint32_t > length() { return _path.size(); } > > inline Position > positionOf(unit<TreeVertex> v) > { > Position baseLevel = base()->level(); > > return (baseLevel - v->level()); > } > > inline unit<TreeVertex> > at(Position position) { return _path.at(position); } > > inline unit<TreeVertex> > atLevel(uint32_t level) > { > uint32_t baseLevel = base()->level(); > > if ((level > baseLevel) || (level < (baseLevel - point_util::lastOfQuantity(_path.size())))) > return nullptr; > else > return _path.at(baseLevel - level); > } > > inline unit<TreeVertex> > siblingOf(unit<TreeVertex> v) { return at(base()->level() - v->level()); } > > bool > contains(unit<TreeVertex> v) > { > if (isBeyondExtent(v)) > return false; > > unit<TreeVertex> vc = v->clockProxy(), tse = _path.back(); > > if (OrdinalTree::isOrdinalRelation(v, tse)) > return true; > > if (tse->mode() == TreeVertex::Mode::ordinal) > return false; > > if ((v->mode() == TreeVertex::Mode::ordinal) && (vc == tse)) > return true; > > return (vc->timespan().in > tse->timespan().in && vc->timespan().out < tse->timespan().out); > } > > inline bool > isBeyondExtent(unit<TreeVertex> v) > { > Position baseLevel = base()->level(); > > return ((v->level() <= baseLevel) && (positionOf(v) >= _path.size())); > } > > bool > isStrongSide(unit<OrdinalTree> ot) > { > unit<TreeVertex> sliceSibling = _path.at(base()->level() - ot->root()->level()); > return sliceSibling->treePosition() > ot->root()->treePosition(); > } > > bool > isBindClosed() { return _bindCursor >= _path.size(); } > > unit<LoopBinding> > peekBind() { return _path.at(_bindCursor)->template extension<CycleVertexExtension>()->loopBinding(); } > > Position > bindPosition() { return _bindCursor; } > > void > bindAdvance() { _bindCursor++; } > > bool > isLoopStackClosed(Position ceiling) { return _loopStackCursor > ceiling; } > > unit<TreeVertex> > loopStackPeek() { return _path.at(_loopStackCursor); } > > unit<TreeVertex> > loopStackPeekPrevious() { return _path.at(point_util::lastOfQuantity(_loopStackCursor)); } > > void > loopStackAdvance() { _loopStackCursor++; } > > void > begin(unit<TreeVertex> v) > { > _path.clear(); > _path.push_back(v); > > _bindCursor = 0; > _loopStackCursor = 1; > } > > unit<TreeVertex> > step() > { > unit<TreeVertex> top = _path.back(); > > ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 3 > ( ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" > top->tree() != nullptr ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp", 315) << ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" > std::endl ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 3 > << "⢠Condition [" << ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" > "top->tree() != nullptr" ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 3 > << "] " << ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" > std::endl ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 3 > << "⢠" ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" > << "Cannot step a TreeSubpath beyond the root" << ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" 3 > facile::RequireException::require_sentinel ># 315 "../../subprojects/edfst/src/icd/forest/LoopForestSchema.hpp" > ; > > _path.push_back(top = top->tree()); > return top; > } > > void > clear() > { > _path.clear(); > > _bindCursor = 0; > _loopStackCursor = 0; > } > > private: > Position _bindCursor; > Position _loopStackCursor; > > std::vector<unit<TreeVertex>> _path; > }; >}; >} ># 4 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 2 > >namespace icd >{ > >template<typename TreeVertex> >class CycleVertexBase >{ >using CycleVertex = CycleVertexBase<TreeVertex>; >using Schema = LoopForestSchema<CycleVertexBase, TreeVertex>; >using LoopBinding = typename Schema::LoopBinding; > >struct PrintToken { > ># 16 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > static constexpr int FacileStreamTokenTag = 0 ># 16 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > ; > > std::ostream& > print(std::ostream& o) const > { > o << "@"; > if (_c->_head == nullptr) > o << "-"; > else > o << _c->_head->token(); > > return o; > } > > PrintToken(unit<CycleVertex> c) : > _c(c) > {} > > protected: > unit<CycleVertex> _c; >}; > >public: > struct LevelCondition { > uint32_t level; > > bool > operator ()(unit<TreeVertex> v) const { return v->level() <= level; } > }; > > struct TimespanCondition { > const WalkTimespan& t; > > bool > operator ()(unit<TreeVertex> v) const { return (v->mode() == TreeVertex::Mode::clock) && v->timespan().contains(t); } > }; > > struct LoopColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, unit<TreeVertex> v) > { > unit<CycleVertex> c = v->template extension<CycleVertex>(); > if ((c != nullptr) && (c->_head != nullptr)) > s << "@ " << c->_head->token(); > } > }; > > using TreeTableColumns = std::tuple<LoopColumn>; > > CycleVertexBase() : > _head(nullptr), > _updateEpoch(0), > _lb(nullptr) > {} > > unit<TreeVertex> > head() const { return _head; } > > inline void > setHead(unit<CycleVertex> head) { setHead(head->_lb->v); } > > void > setHead(unit<TreeVertex> head) > { > ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > ( ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > _lb != nullptr && _lb->v != head ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/CycleVertex.hpp", 81) << ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > std::endl ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > << "⢠Condition [" << ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > "_lb != nullptr && _lb->v != head" ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > << "] " << ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > std::endl ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > << "⢠" ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > << "Cannot assign loop head " << head->token() << " to " << head->token() << ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > facile::RequireException::require_sentinel ># 81 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > ; > ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > ( ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > head->template extension<CycleVertex>() != nullptr && head->template extension<CycleVertex>()->_updateEpoch == _updateEpoch ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/CycleVertex.hpp", 82) << ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > std::endl ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > << "⢠Condition [" << ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > "head->template extension<CycleVertex>() != nullptr && head->template extension<CycleVertex>()->_updateEpoch == _updateEpoch" ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > << "] " << ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > std::endl ># 82 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > << "⢠" > ># 83 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > << "Cannot assign loop head " << head->token() << " outside update epoch " << _updateEpoch << ># 83 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" 3 > facile::RequireException::require_sentinel ># 83 "../../subprojects/edfst/src/icd/forest/CycleVertex.hpp" > ; > > if (head == nullptr) { > if (_head != nullptr) > facile::StreamLog::log(__PRETTY_FUNCTION__, 87, facile::StreamLogLevel::Status) << "Untag loop " << _lb->v->token() << "@" << _head->token() << std::endl; > } else { > facile::StreamLog::log(__PRETTY_FUNCTION__, 89, facile::StreamLogLevel::Status) << "Tag loop " << _lb->v->token() << "@" << head->token() << std::endl; > } > > _head = head; > } > > void > unbind() { _head = nullptr; } > > bool > isLive(EpochType epoch) { return _updateEpoch == epoch; } > > template<typename LoopBindingFactory> > bool > ifAdvanceEpoch(EpochType epoch, const LoopBindingFactory& f) > { > if ((_lb == nullptr) || (_updateEpoch < epoch)) { > advanceEpoch(epoch, f); > return true; > } > > return false; > } > > template<typename LoopBindingFactory> > void > advanceEpoch(EpochType epoch, const LoopBindingFactory& f) > { > _updateEpoch = epoch; > > _lb = f(); > } > > bool > isLoopMemberOf(unit<TreeVertex> head) const > { > if (_head == head) > return true; > if (_head == nullptr) > return false; > > unit<TreeVertex> walk = _head; > do { > if (walk->level() <= head->level()) > return false; > > unit<CycleVertex> c = walk->template extension<CycleVertex>(); > if (c == nullptr) > return false; > > walk = c->head(); > if (walk == head) > return true; > } while (walk != nullptr); > > return false; > } > > template<typename Condition> > unit<TreeVertex> > crossLoop(const Condition& condition) const > { > unit<TreeVertex> loop = _head; > while (loop != nullptr) { > if (condition(loop)) > return loop; > > unit<CycleVertex> c = loop->template extension<CycleVertex>(); > if (c == nullptr) > return nullptr; > > loop = c->_head; > } > return nullptr; > } > > unit<LoopBinding> > loopBinding() const { return _lb; } > > inline PrintToken > token() { return PrintToken(unit<CycleVertex>::wrap(this)); } > >private: > unit<TreeVertex> _head; > EpochType _updateEpoch; > > unit<LoopBinding> _lb; >}; >} ># 6 "../../src/assembly/InflatedBasicBlock.hpp" 2 > >namespace pii >{ >template<typename VertexType, typename VertexAspect, template<typename> class FunctionAspectTemplate> >class InflatedBasicBlockBase : > public ArityNodeBase<InflatedBasicBlockBase<VertexType, VertexAspect, FunctionAspectTemplate>, Offset> >{ >using InflatedBasicBlock = InflatedBasicBlockBase<VertexType, VertexAspect, FunctionAspectTemplate>; >using FunctionAspect = FunctionAspectTemplate<InflatedBasicBlock>; >using super = ArityNodeBase<InflatedBasicBlock, Offset>; > >public: > using Arity = GraphSpecification::Arity; > using Function = typename FunctionAspect::Type; > > > using TreeVertex = typename VertexAspect::Type; > using TreeEdge = typename TreeVertex::Types::LinkSet::EdgeType; > using TreeReference = typename TreeVertex::Types::LinkSet::ReferenceType; > using CycleVertex = CycleVertexBase<TreeVertex>; > > enum class Context { > branch, > tail, > call > }; > > struct TokenColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, unit<TreeVertex> v) > { > unit<InflatedBasicBlock> b = v->template extension<InflatedBasicBlock>(); > if (b == nullptr) > s << "-"; > else > s << b->token(); > } > }; > > struct EdgeCountColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, unit<TreeVertex> v) > { > switch (v->links->edgeCount()) > { > case 0: > s << "|"; > break; > > case 1: > s << "-"; > break; > > case 2: > s << "<"; > break; > > default: > s << "⪠" << v->links->edgeCount(); > } > } > }; > > struct CycleColumn { > template<typename Stream> > static void > print(Stream& s, __attribute__((unused)) uint32_t width, unit<TreeVertex> v) > { > unit<CycleVertex> c = v->template extension<CycleVertex>(); > if ((c != nullptr) && (c->head() != nullptr)) > s << "@" << c->head()->token(); > } > }; > > using TreeTableColumns = std::tuple<TokenColumn, EdgeCountColumn, CycleColumn>; > using Sequence = std::vector<unit<Instruct>>; > using SequenceIterator = typename Sequence::const_iterator; > using SequenceReverseIterator = typename Sequence::const_reverse_iterator; > using SequenceEntry = Instruct; > using HashSchema = HashSchemaBase<InflatedBasicBlock>; > > struct OffsetToken { > const InflatedBasicBlock& block; > > friend std::ostream& > operator <<(std::ostream& o, const OffsetToken& t) { return o << hex(t.block.offset()); } > }; > > struct PrintToken { > const InflatedBasicBlock& block; > > struct OffsetToken { > unit<InflatedBasicBlock> block; > > friend std::ostream& > operator <<(std::ostream& o, const OffsetToken& t) > { > if (t.block == nullptr) > return o << hex(nullptr); > else > return o << hex(t.block->offset()); > } > }; > > friend std::ostream& > operator <<(std::ostream& o, const PrintToken& t) > { > using Arity = GraphSpecification::Arity; > > > Comma comma; > o << tagArity(t.block.succession().arity()) << " " << hex(t.block.offset()) > << " " << t.block.succession() << " (" << t.block.sequenceLength() << "/" << hex(t.block.byteLength()) << ") ⪪ {"; > switch (t.block.arity()) > { > case Arity::unary: > o << comma << OffsetToken{ t.block.successor() }; > break; > > case Arity::binary: > o << comma << OffsetToken{ t.block.successorAt(super::BinarySuccessor::left) }; > o << comma << OffsetToken{ t.block.successorAt(super::BinarySuccessor::right) }; > break; > > case Arity::nary: > break; > > default: > break; > } > > return o << "}"; > } > }; > > struct DisassemblyToken { > const InflatedBasicBlock& block; > > friend std::ostream& > operator <<(std::ostream& o, const DisassemblyToken& t) > { > o << hex(t.block.offset()) << ":" << std::endl; > > for (unit<SequenceEntry> i : t.block) > o << "⢠" << i->token(t.block.axis()) << std::endl; > > return o; > } > }; > > struct EdgeToken { > const std::string prefix; > unit<TreeVertex> v; > > friend std::ostream& > operator <<(std::ostream& o, const EdgeToken& t) > { > if (t.v == nullptr) > return o << "<void-block-vertex>" << std::endl; > > if (t.v->links->edgeCount() == 0) > return o << t.prefix << "<empty>" << std::endl; > > for (TreeEdge e : t.v->links->iterateEdges()) > o << t.prefix << e.endpoint()->template extension<InflatedBasicBlock>()->token() << std::endl; > > return o; > } > }; > > struct LoopToken { > const InflatedBasicBlock& block; > > friend std::ostream& > operator <<(std::ostream& o, const LoopToken& t) > { > unit<TreeVertex> v = t.block.v(); > if (v == nullptr) > return o << "<vertex-undefined>"; > > o << hex(t.block.offset()) << " @ "; > > unit<TreeVertex> head = nullptr; > unit<CycleVertex> c = v->template extension<CycleVertex>(); > if (c != nullptr) > head = c->head(); > > if (head == nullptr) > return o << "-"; > else > return o << hex(head->template extension<InflatedBasicBlock>()->offset()); > } > }; > > InflatedBasicBlockBase(loan<ElfMetadata::MemoryMap> axis, Offset offset, Sequence sequence, FunctionAspect fa) : > InflatedBasicBlockBase(axis, offset, sequence, calculateSpan(sequence), VertexAspect(), fa) > {} > > template<typename FunctionBinder> > InflatedBasicBlockBase(loan<ElfMetadata::MemoryMap> axis, Offset offset, Sequence sequence, FunctionBinder fb) : > InflatedBasicBlockBase(axis, offset, sequence, fb, BasicBlockMetadata::Succession::defineExitFlags(sequence.back())) > > > {} > > template<typename FunctionBinder> > InflatedBasicBlockBase(loan<ElfMetadata::MemoryMap> axis, Offset offset, Sequence sequence, FunctionBinder fb, BasicBlockMetadata::Succession succession) : > super(offset, succession.arity()), > _axis(axis), > _offset(offset), > _byteLength(calculateSpan(sequence)), > _sequence(sequence), > _va(VertexAspect()), > _fa(fb(unit<InflatedBasicBlock>::wrap(this))), > _succession(succession), > _semantics(BasicBlockMetadata::Semantics()) > {} > > loan<ElfMetadata::MemoryMap> > axis() const { return _axis; } > > handle<BasicBlockMetadata::Semantics> > semantics() { return _semantics; } > > inline bool > isFunctionEntry() const { return function()->offset() == _offset && !function()->isFunclet(); } > > inline bool > isFuncletEntry() const { return function()->offset() == _offset && function()->isFunclet(); } > > loc_t > start() const { return _sequence.empty() ? nullptr : _sequence.front()->location(); } > > inline Offset > offset() const { return _offset; } > > inline Offset > exitOffset() const { return _offset + (_byteLength - exit()->length()); } > > inline Offset > sentinel() const { return _offset + _byteLength; } > > inline uint32_t > byteLength() const { return _byteLength; } > > inline bool > contains(Offset offset) const { return (offset >= _offset && offset < (_offset + _byteLength)); } > > unit<Instruct> > find(Offset offset) > { > Offset walk = _offset; > for (unit<Instruct> i : iterate()) { > if (walk == offset) > return i; > else > walk += i->length(); > } > return nullptr; > } > > inline bool > isFallThrough(Offset offset) const { return offset == sentinel(); } > > inline bool > isBranchTarget(Offset offset) const { return exit()->isBranch() && _axis->resolveTarget(exit()->branchTarget()) == offset; } > > inline unit<VertexType> > v() const { return _va.v(); } > > inline handle<VertexAspect> > vertexAspect() { return _va; } > > inline unit<Function> > function() const { return _fa.f(); } > > inline handle<FunctionAspect> > functionAspect() { return _fa; } > > unit<InflatedBasicBlock> > loop() const > { > unit<TreeVertex> v = _va.v(); > if (v == nullptr) > return nullptr; > > unit<CycleVertex> c = v->template extension<CycleVertex>(); > if (c == nullptr) > return nullptr; > > unit<TreeVertex> head = c->head(); > if (head == nullptr) > return nullptr; > else > return head->template extension<InflatedBasicBlock>(); > } > > bool > isLoopBound(unit<InflatedBasicBlock> head) const > { > for (unit<InflatedBasicBlock> walk = loop(); walk != nullptr; walk = walk->loop()) { > if (walk == head) > return true; > } > return false; > } > > uint32_t > sequenceLength() const { return _sequence.size(); } > > unit<Instruct> > first() const { return _sequence.front(); } > > unit<Instruct> > exit() const { return _sequence.back(); } > > inline BasicBlockMetadata::Succession > succession() const { return _succession; } > > void > emplaceSuccessor(unit<InflatedBasicBlock> s) > { > switch (_succession.arity()) > { > case Arity::unary: > if (exit()->isBranch() && (_axis->resolveTarget(exit()->branchTarget()) == s->offset())) { > super::setContinuation(s); > } else if (s->offset() == sentinel()) { > super::setContinuation(s); > } else { > ># 338 "../../src/assembly/InflatedBasicBlock.hpp" 3 > ( ># 338 "../../src/assembly/InflatedBasicBlock.hpp" > super::continuation() != nullptr ># 338 "../../src/assembly/InflatedBasicBlock.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedBasicBlock.hpp", 338) << ># 338 "../../src/assembly/InflatedBasicBlock.hpp" > std::endl ># 338 "../../src/assembly/InflatedBasicBlock.hpp" 3 > << "⢠Condition [" << ># 338 "../../src/assembly/InflatedBasicBlock.hpp" > "super::continuation() != nullptr" ># 338 "../../src/assembly/InflatedBasicBlock.hpp" 3 > << "] " << ># 338 "../../src/assembly/InflatedBasicBlock.hpp" > std::endl ># 338 "../../src/assembly/InflatedBasicBlock.hpp" 3 > << "⢠" > ># 339 "../../src/assembly/InflatedBasicBlock.hpp" > << "Invalid control flow edge [" << hex(_offset) << "-" << hex(sentinel()) << "] -> " << hex(s->offset()) << ># 339 "../../src/assembly/InflatedBasicBlock.hpp" 3 > facile::RequireException::require_sentinel ># 339 "../../src/assembly/InflatedBasicBlock.hpp" > ; > > super::continuation()->emplaceSuccessor(s); > } > break; > > case Arity::binary: > if (isBranchTarget(s->offset())) { > super::setSuccessorAt(s, super::BinarySuccessor::right); > } else if (s->offset() == (offset() + byteLength())) { > super::setSuccessorAt(s, super::BinarySuccessor::left); > } else { > ># 351 "../../src/assembly/InflatedBasicBlock.hpp" 3 > throw facile::RequireException("../../src/assembly/InflatedBasicBlock.hpp", 351) ># 351 "../../src/assembly/InflatedBasicBlock.hpp" > << "Invalid control flow edge " << hex(_offset) << " -> " << hex(s->offset()) << ># 351 "../../src/assembly/InflatedBasicBlock.hpp" 3 > facile::RequireException::require_sentinel ># 351 "../../src/assembly/InflatedBasicBlock.hpp" > ; > } > break; > > case Arity::nary: > if (s->offset() == (offset() + byteLength())) > super::setContinuation(s); > else > super::addSuccessor(s); > break; > > default: > break; > } > } > > Context > context() const > { > Context c = Context::tail; > for (TreeReference r : v()->links->concreteReferences()) { > unit<InflatedBasicBlock> predecessor = r.endpoint()->template extension<InflatedBasicBlock>(); > if (predecessor->succession().isSingularJump() && predecessor->isBranchTarget(_offset)) > continue; > if (predecessor->exit()->isCall()) > c = Context::call; > else > return Context::branch; > } > return c; > } > > SequenceIterator > begin() const { return _sequence.begin(); } > > SequenceIterator > end() const { return _sequence.end(); } > > iterable<SequenceIterator> > iterate() const { return iterable<SequenceIterator>(_sequence); } > > iterable<SequenceReverseIterator> > reviterate() const { return iterable<SequenceReverseIterator>(_sequence.crbegin(), _sequence.crend()); } > > void > truncateAt(loc_t sentinel) > { > ># 398 "../../src/assembly/InflatedBasicBlock.hpp" 3 > ( ># 398 "../../src/assembly/InflatedBasicBlock.hpp" > sentinel > start() && sentinel < (start() + _byteLength) ># 398 "../../src/assembly/InflatedBasicBlock.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedBasicBlock.hpp", 398) << ># 398 "../../src/assembly/InflatedBasicBlock.hpp" > std::endl ># 398 "../../src/assembly/InflatedBasicBlock.hpp" 3 > << "⢠Condition [" << ># 398 "../../src/assembly/InflatedBasicBlock.hpp" > "sentinel > start() && sentinel < (start() + _byteLength)" ># 398 "../../src/assembly/InflatedBasicBlock.hpp" 3 > << "] " << ># 398 "../../src/assembly/InflatedBasicBlock.hpp" > std::endl ># 398 "../../src/assembly/InflatedBasicBlock.hpp" 3 > << "⢠" > ># 399 "../../src/assembly/InflatedBasicBlock.hpp" > << "Cannot truncate block " << token() << " at " << hex(sentinel) << ># 399 "../../src/assembly/InflatedBasicBlock.hpp" 3 > facile::RequireException::require_sentinel ># 399 "../../src/assembly/InflatedBasicBlock.hpp" > ; > > uint32_t byteLength = 0; > SequenceIterator end = _sequence.begin(); > do { > byteLength += (*end)->length(); > } while ((*(++end))->location() < sentinel); > > > Sequence truncated(_sequence.begin(), end); > BasicBlockMetadata::Succession fallThrough = BasicBlockMetadata::Succession::defineExitFlags(truncated.back()); > new (this) InflatedBasicBlock(_axis, _offset, truncated, byteLength, fallThrough, _va, _fa, _semantics); > } ># 421 "../../src/assembly/InflatedBasicBlock.hpp" > template<typename ColumnConfiguration> > static void > configureColumns(ColumnConfiguration& c) > { > c.addColumn(owner<EdgeCountColumn>::make()); > c.addColumn(owner<CycleColumn>::make()); > c.addColumn(owner<TokenColumn>::make()); > } > > PrintToken > token() const { return PrintToken{ *this }; } > > OffsetToken > offsetToken() const { return OffsetToken{ *this }; } > > DisassemblyToken > disassemble() const { return DisassemblyToken{ *this }; } > > EdgeToken > edgeToken(const std::string& prefix = "") const { return EdgeToken{ prefix, _va.v() }; } > > LoopToken > loopToken() const { return LoopToken{ *this }; } > > struct TreePathVertexToken { > using Path = decltype(TreeVertex::template voidTreePathToken<TreePathVertexToken>()); > > unit<TreeVertex> v; > > friend std::ostream& > operator <<(std::ostream& o, const TreePathVertexToken& p) > { > unit<InflatedBasicBlock> b = p.v->template extension<InflatedBasicBlock>(); > > return o << hex(b->offset()); > } > > static TreePathVertexToken > token(unit<TreeVertex> v, __attribute__((unused)) bool showPosition = false) > { > return TreePathVertexToken{ v }; > } > }; > > > typename TreePathVertexToken::Path > loopTreePathToken() const > { > unit<CycleVertex> c = v()->template extension<CycleVertex>(); > if (c == nullptr) > return TreeVertex::template voidTreePathToken<TreePathVertexToken>(); > > unit<TreeVertex> head = c->head(); > if (head == nullptr) > return TreeVertex::template voidTreePathToken<TreePathVertexToken>(); > else > return v()->template treePathToken<TreePathVertexToken>(head->level()); > } ># 488 "../../src/assembly/InflatedBasicBlock.hpp" >private: > InflatedBasicBlockBase(loan<ElfMetadata::MemoryMap> axis, Offset offset, Sequence sequence, > uint32_t span, VertexAspect va, FunctionAspect fa) : > InflatedBasicBlockBase(axis, offset, sequence, span, BasicBlockMetadata::Succession::defineExitFlags(sequence.back()), va, fa) > {} > > InflatedBasicBlockBase(loan<ElfMetadata::MemoryMap> axis, Offset offset, Sequence sequence, uint32_t span, > BasicBlockMetadata::Succession succession, VertexAspect va, FunctionAspect fa, > BasicBlockMetadata::Semantics semantics = BasicBlockMetadata::Semantics()) : > super(offset, succession.arity()), > _axis(axis), > _offset(offset), > _byteLength(span), > _sequence(sequence), > _va(va), > _fa(fa), > _succession(succession), > _semantics(semantics) > {} > > static uint32_t > calculateSpan(Sequence& sequence) > { > if (sequence.empty()) > return 0; > > return (sequence.back()->location().distanceFrom(sequence.front()->location()) + sequence.back()->length()); > } > > loan<ElfMetadata::MemoryMap> _axis; > > const Offset _offset; > const uint32_t _byteLength; > const Sequence _sequence; > > VertexAspect _va; > FunctionAspect _fa; > const BasicBlockMetadata::Succession _succession; > BasicBlockMetadata::Semantics _semantics; >}; >} ># 61 "../../src/PiiFramework.hpp" 2 > ># 1 "../../src/assembly/ModuleTables.hpp" 1 > > > > > ># 1 "../../src/assembly/InflationComponents.hpp" 1 > > > ># 1 "../../src/assembly/InflatedModule.hpp" 1 > > > ># 1 "../../src/model/ExcavationModel.hpp" 1 > > ># 1 "../../src/assembly/InflationModel.hpp" 1 > > ># 1 "../../src/assembly/ModuleGraph.hpp" 1 > > > > ># 1 "../../src/assembly/ModuleGraphComposition.hpp" 1 > > > ># 1 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 1 > > > > > >namespace icd >{ >template<typename TreeIntegrationType, typename LoopForestTest = EmptyTreePluginTest<typename TreeIntegrationType::Types::TreeVertex>> >class IncrementalCycleDecompositionBase >{ >using Plugin = IncrementalCycleDecompositionBase<TreeIntegrationType, LoopForestTest>; >using TreeVertex = typename TreeIntegrationType::Types::TreeVertex; >using VertexMode = typename TreeVertex::Mode; >using TreeEdge = typename TreeIntegrationType::Types::TreeEdge; >using TreeReference = typename TreeIntegrationType::Types::TreeReference; >using OrdinalTree = typename TreeIntegrationType::Types::OrdinalTree; >using EdgeEvent = typename TreeIntegrationType::EdgeEvent; >using CycleVertex = CycleVertexBase<TreeVertex>; > >using PotentialCrossLoop = typename LoopForestSchema<CycleVertexBase, TreeVertex>::PotentialCrossLoop; >using DeltaSlice = typename LoopForestSchema<CycleVertexBase, TreeVertex>::DeltaSlice; >using LoopBinding = typename LoopForestSchema<CycleVertexBase, TreeVertex>::LoopBinding; >using CrossQueue = typename LoopForestSchema<CycleVertexBase, TreeVertex>::CrossQueue; >using DeltaRebindQueue = typename LoopForestSchema<CycleVertexBase, TreeVertex>::DeltaRebindQueue; >using CrossLoopSlice = typename LoopForestSchema<CycleVertexBase, TreeVertex>::CrossLoopSlice; >using CrossLoopSliceGroup = typename LoopForestSchema<CycleVertexBase, TreeVertex>::CrossLoopSliceGroup; >using TreeSubpath = typename LoopForestSchema<CycleVertexBase, TreeVertex>::TreeSubpath<CycleVertex>; > >public: > IncrementalCycleDecompositionBase() : > _x(nullptr), > _crossDeterminantLowerBound(_crossDeterminantUnbounded), > _test(nullptr) > {} > > IncrementalCycleDecompositionBase(loan<TreeIntegrationType> x) : > _x(x), > _crossDeterminantLowerBound(_crossDeterminantUnbounded), > _test(owner<LoopForestTest>::make()) > {} ># 103 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > void > elasticTreeAddEventEdge() > { > loan<EdgeEvent> event = _x->episode.update.event; > if (event->isReflexive()) > return; > > facile::StreamLog::log(__PRETTY_FUNCTION__, 110, facile::StreamLogLevel::Status) << "# icd: New " << (_x->episode.rebind.isInProgress ? "retrograde" : "congruent") << " edge: " > << event->tail->id() << " -> " << event->head->id() << ", a " << label(event->relation) > << " edge in " << TreeVertex::label(event->mode) << " mode" << std::endl; > > if (_x->episode.rebind.isInProgress) { > ifAdvanceEpoch(event->head); > > unit<TreeVertex> loop = cv(event->head)->head(); > if (loop != nullptr) { > if (isDeltaPathChange(loop)) > cv(event->head)->unbind(); > else > tagRebindSubpath(event->tail, establishPotentialCrossLoop(loop)); > } > } else { > switch (_x->episode.update.integration.relation) > { > case TreeRelation::loopback: > if (_x->episode.expansion.isInProgress && !_x->episode.expansion.isGate) { > ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > event->head != _x->episode.expansion.origin ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 129) << ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "event->head != _x->episode.expansion.origin" ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Reflexive expansion edge must be a composite" << ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 129 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > unit<CycleVertex> ct = cv(event->tail); > if ((ct != nullptr) && ct->isLoopMemberOf(_x->episode.expansion.origin)) > tag(event->head, _x->episode.expansion.origin); > } > tagUpdateSubpath(event->head, event->tail); > break; > > case TreeRelation::cross: > if (ifCycle(event->head) && (cv(event->head)->head() != nullptr)) { > unit<TreeVertex> loop = probeCrossLoop(event->tail, event->head, _x->episode.update.integration.pathBranchLevel); > if (loop != nullptr) > tagUpdateSubpath(loop, event->tail); > } > break; > > default: > break; > } > } > } > > void > elasticTreeDeltaEdge(unit<TreeVertex> tail, cell<TreeEdge> edge, TreeRelation relation, VertexMode mode, > uint32_t crossDeterminantLowerBound = 0) > { > unit<TreeVertex> head = edge->endpoint(), loop = (ifCycle(head) ? cv(head)->head() : nullptr), cursorLoop = nullptr; > ifAdvanceEpoch(head); > > facile::StreamLog::log(__PRETTY_FUNCTION__, 159, facile::StreamLogLevel::Status) << "# icd: Edge delta: " << tail->id() << " -> " << head->id() << ", a " << label(relation) > << " edge in " << TreeVertex::label(mode) << " mode" << std::endl; > > switch (relation) > { > case TreeRelation::tree: > if ((loop != nullptr) && isDeltaPathChange(loop)) > cv(head)->unbind(); > break; > > case TreeRelation::loopback: > cursorLoop = head; > break; > > case TreeRelation::cross: > if (loop != nullptr) > cursorLoop = probeCrossLoop(tail, head, edge->pathBranchLevel()); > break; > > default: > break; > } > > if (cursorLoop != nullptr) { > _crossDeterminantLowerBound = crossDeterminantLowerBound; > tagRebindSubpath(tail, establishPotentialCrossLoop(cursorLoop)); > _crossDeterminantLowerBound = _crossDeterminantUnbounded; > } > } > > void > elasticTreeVertexCommit(unit<TreeVertex> v) > { > bool isInDelta = false; > > facile::StreamLog::log(__PRETTY_FUNCTION__, 194, facile::StreamLogLevel::Status) << "# icd: Vertex commit: " << v->token() << std::endl; > > if (isInUpdate(v)) { > if ((isInDelta = isRoleDelta(v))) { > if (peekDeltaSliceTail(v) == v) > lb(v)->ds->pop(); > } > > unit<PotentialCrossLoop> px = lb(v)->px; > if (isRoleDelta(v) && (lb(v)->ds != nullptr) && !lb(v)->ds->empty()) { > unit<TreeVertex> dsTail = peekDeltaSliceTail(v); > if ((cv(v)->head() == nullptr) || (dsTail->level() > cv(v)->head()->level())) > tag(cv(v), dsTail); > } else if (px != nullptr) { > ifPotentialLoopCommit(v); > } > > unit<TreeVertex> pick = pickLoop(v); > if (pick != nullptr) { > ifAdvanceEpoch(pick); > > lb(pick)->drq.prepend(lb(v)); > > unit<TreeVertex> peek = peekLoop(v); > if (peek->level() <= _x->episode.update.event->tail->level()) { > unit<PotentialCrossLoop> px = establishPotentialCrossLoop(peek); > if (v->tree() != peek) { > if (v->tree() == _x->episode.update.event->tail) { > if (!ifPotentialLoopAssign(v->tree(), px)) { > unit<CrossLoopSlice> rebindSlice = lb(_x->episode.update.event->tail)->sliceHead; > sliceUpdateOcclusion(rebindSlice, nullptr, px); > } > } else { > ifAdvanceEpoch(v->tree()); > tagRebindSubpath(v->tree(), px); > } > } > } > } > } > > if (isInDelta) { > handle<DeltaSlice> ds = lb(v)->ds, tds = lb(v->tree())->ds; > if (ds != nullptr) { > if (tds == nullptr) { > lb(v->tree())->ds = ds; > } else { > if (!ds->empty()) > tds |= ds; > _bindingFactory.ds.put(ds); > } > > ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > lb(v->tree())->ds->length() <= deltaPathPosition(v->tree()) ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 246) << ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "lb(v->tree())->ds->length() <= deltaPathPosition(v->tree())" ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 246 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" > ># 247 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "DeltaSlice of " << v->tree()->token() << " exceeds its delta path position " << deltaPathPosition(v->tree()) << ># 247 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 247 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > } > } > } > > void > elasticTreeExpandVertex(__attribute__((unused)) unit<TreeVertex> initiator, unit<TreeVertex> origin, unit<TreeVertex> expansion) > { > if (!_x->episode.update.event->isRetrograde) { > > if (expansion->mode() == TreeVertex::Mode::ordinal) { > for (const TreeEdge& e : expansion->links->out.ordinal().index().iterateLinks(OrdinalEdgePartition::loopback)) { > if (e.endpoint() == origin) { > tag(expansion, origin); > return; > } > } > } else { > for (const TreeEdge& e : expansion->links->iterateFreeEdges()) { > if (e.endpoint() == origin) { > tag(expansion, origin); > return; > } > } > } > unit<CycleVertex> c; > > > for (const TreeEdge& e : expansion->links->iterateTreeEdges()) { > c = cv(e.endpoint()); > if ((c != nullptr) && (c->head() == origin)) { > tag(expansion, origin); > return; > } > } > > > c = cv(origin); > if (c != nullptr) { > unit<TreeVertex> loop = c->head(); > if (loop != nullptr) > tag(expansion, loop); > } > } > } > > void > elasticTreeGateVertex(unit<TreeVertex> proxy) > { > unit<TreeVertex> gated = _x->episode.update.event->head, graft = _x->episode.update.event->tail; > > if (graft == gated->tree()) { > bool isLoopGate = false; > if (proxy->mode() == TreeVertex::Mode::ordinal) { > isLoopGate = (proxy->links->in.ordinal().index().size(OrdinalReferencePartition::loopback) > 0); > } else { > for (const TreeReference& r : proxy->links->concreteReferences()) { > if (r.endpoint()->isPositionalSubtreeOf(proxy)) { > isLoopGate = true; > break; > } > } > } > > unit<CycleVertex> c = cv(gated); > if ((c != nullptr) && (c->head() != nullptr)) > tag(GateStem{ graft, proxy }, c->head()); > if (isLoopGate) > tag(GateStem{ gated, proxy->links->edgeAt(0)->endpoint() }, proxy); > > liftGatedLoopbacks(proxy, gated); > } else if (proxy->isSubtreeOf(gated)) { > tag(GateStem{ graft, proxy }, gated); > } else { > unit<CycleVertex> c = cv(gated); > if (c != nullptr) { > if (c->isLoopMemberOf(proxy->tree())) { > tag(GateStem{ graft, proxy }, proxy->tree()); > } else { > unit<TreeVertex> x = nullptr; > uint32_t graftBranchLevel = graft->links->edgeAt(0)->pathBranchLevel(); > if (OrdinalTree::isOrdinalRelation(proxy, gated)) > x = c->crossLoop(typename CycleVertex::LevelCondition{ proxy->ordinalRoot()->level() + graftBranchLevel }); > else > x = c->crossLoop(typename CycleVertex::TimespanCondition{ proxy->clockProxy()->timespan() }); > if (x != nullptr) > tag(GateStem{ graft, proxy }, x); > } > } > } > } > > > void > elasticTreeReposition(unit<TreeVertex> v) > { > if (!_x->episode.expansion.isGate) > return; > > unit<TreeVertex> proxy = _x->episode.expansion.origin, gated = _x->episode.update.event->head; > if ((v == proxy) || (v == gated)) > return; > > unit<CycleVertex> c = cv(v); > if ((c != nullptr) && (c->head() == gated)) > tag(cv(inEpoch(v)), proxy); > } > > void > elasticTreeBeginUpdate() > { > _bindingFactory.reset(); > _q.tail = _q.head = nullptr; > _link.clear(); > _probe.clear(); > > if (_x->episode.rebind.isInProgress) { > advanceEpoch(_x->episode.rebind.tail); > establishSlice(_x->episode.rebind.tail); > _slices.begin(_x->episode.rebind.tail); > } > } > > void > elasticTreeCommitRebind() { crossQueueBind(); } > > void > elasticTreeInitialize() { } > > inline loan<LoopForestTest> > test() { return _test; } > >private: > static constexpr uint64_t _deltaStrong = 1ULL; > > struct GateStem { > unit<TreeVertex> first; > unit<TreeVertex> last; > }; > > static inline unit<CycleVertex> > cv(unit<TreeVertex> v) { return v->template extension<CycleVertex>(); } > > static inline bool > ifCycle(unit<TreeVertex> v) { return cv(v) != nullptr; } > > static inline unit<LoopBinding> > lb(unit<TreeVertex> v) { return cv(v)->loopBinding(); } > > inline handle<DeltaSlice> > establishDeltaSlice(unit<TreeVertex> v) > { > unit<LoopBinding> vlb = lb(v); > if (vlb->ds == nullptr) > vlb->ds = _bindingFactory.ds.acquire(); > return vlb->ds; > } > > unit<CycleVertex> > establishCycleVertex(unit<TreeVertex> v) > { > static ObjectBlock<CycleVertexBase<TreeVertex>> cycleFactory(6); > > unit<CycleVertex> c = cv(v); > if (c == nullptr) > v->template setExtension(c = cycleFactory.makeUnit()); > return c; > } > > void > advanceEpoch(unit<TreeVertex> v) > { > LoopBindingFactoryRelay f(*this, v); > > establishCycleVertex(v)->advanceEpoch(_x->episode.update.epoch, f); > } > > bool > ifAdvanceEpoch(unit<TreeVertex> v) > { > LoopBindingFactoryRelay f(*this, v); > > return establishCycleVertex(v)->ifAdvanceEpoch(_x->episode.update.epoch, f); > } ># 443 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > unit<TreeVertex> > inEpoch(unit<TreeVertex> v) > { > ifAdvanceEpoch(v); > return v; > } > > void > tag(unit<CycleVertex> member, unit<TreeVertex> head) > { > ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > member->isLive(_x->episode.update.epoch) ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 453) << ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "member->isLive(_x->episode.update.epoch)" ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Cannot tag CycleVertex member " << member->token() << " out of epoch" << ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 453 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > member->setHead(inEpoch(head)); > } > > void > tag(unit<TreeVertex> member, unit<TreeVertex> head) { tag(cv(inEpoch(member)), head); } > > void > tag(GateStem stem, unit<TreeVertex> head) > { > inEpoch(head); > > unit<TreeVertex> v = stem.first; > while (true) { > cv(inEpoch(v))->setHead(head); > if (v == stem.last) > break; > v = v->tree(); > } > } > > bool > isInUpdate(unit<TreeVertex> v) > { > return (ifCycle(v) && (lb(v) != nullptr) && cv(v)->isLive(_x->episode.update.epoch)); > } > > bool > isRoleDelta(unit<TreeVertex> v) > { > return (_x->episode.rebind.isInProgress && v->isLive(_x->episode.rebind.epoch) && (v->getRole(TreeVertex::Role::delta) > 0)); > } > > bool > isStrongSide(unit<TreeVertex> v) > { > return (isInUpdate(v) && lb(v)->isStrongSide == _deltaStrong); > } > > bool > isSliceMember(unit<TreeVertex> v) > { > return (lb(v)->xs != nullptr && lb(v)->isStrongSide != _deltaStrong && lb(v)->sliceHead == nullptr); > } > > bool > isSliceHead(unit<TreeVertex> v) > { > return (isInUpdate(v) && (lb(v)->sliceHead != nullptr)); > } > > bool > isSliceHeadActive(unit<TreeVertex> v) > { > return (lb(v)->xs != nullptr) && !isStrongSide(v) && (lb(v)->xs->head == v) && (lb(v)->xs->groups != nullptr); > } > > bool > isCross(unit<TreeVertex> head, TreeReference& r) > { > unit<TreeVertex> tail = r.endpoint(), hc = head->clockProxy(), tc = tail->clockProxy(); > WalkTimespan ht = hc->timespan(), tt = tc->timespan(); > > if (_x->episode.rebind.isInProgress) { > unit<TreeVertex> rc = _x->episode.rebind.root->clockProxy(); > if ((rc->timespan().out > 0) && !isRoleDelta(tail) && (tt.in > rc->timespan().out)) > return true; > > if (tc->isOnDeltaStack() || (tt.in < ht.in)) > return (tail->mode() == TreeVertex::Mode::ordinal); > > if ((head->mode() == TreeVertex::Mode::ordinal) && (tail->mode() == TreeVertex::Mode::ordinal)) > return true; > > if (hc == tc) > return false; > > if (isRoleDelta(head)) { > if (isRoleDelta(tail)) > return false; > else > return true; > } > } else { > if (head->mode() == TreeVertex::Mode::ordinal) { > if (tail->mode() == TreeVertex::Mode::ordinal) > return true; > > return (ht.in < tt.in || ht.out > tt.out); > } else if (tail->mode() == TreeVertex::Mode::ordinal) { > return (tt.in < ht.in || tt.out > ht.out); > } > } > > if ((tc == hc) && ((head->mode() == TreeVertex::Mode::clock) || (tail->mode() == TreeVertex::Mode::clock))) > return false; > > if ((tt.in < ht.in) && (tt.out > ht.out) && (tail->mode() != TreeVertex::Mode::ordinal)) > return false; > > if ((tt.in > ht.in) && (tt.out < ht.out) && (tail->mode() != TreeVertex::Mode::ordinal)) > return false; > > return true; > } > > OrdinalReferencePartition > probe(unit<TreeVertex> head, TreeReference& r) > { > unit<TreeVertex> tail = r.endpoint(), hc = head->clockProxy(), tc = tail->clockProxy(); > if (tail->mode() == TreeVertex::Mode::ordinal) { > if (head->mode() == TreeVertex::Mode::ordinal) > return OrdinalReferencePartition::cross; > > if (head == tc) > return OrdinalReferencePartition::loopback; > } else if ((head->mode() == TreeVertex::Mode::ordinal) && (tail == hc)) { > return OrdinalReferencePartition::forward; > } > > if (tc->timespan().in > hc->timespan().in) { > if ((tc->timespan().in > hc->timespan().out) || (head->mode() == TreeVertex::Mode::ordinal)) > return OrdinalReferencePartition::cross; > else > return OrdinalReferencePartition::loopback; > } else if (tail->mode() == TreeVertex::Mode::ordinal) { > return OrdinalReferencePartition::cross; > } else { > return OrdinalReferencePartition::forward; > } > } > > bool > probeStrongSide(unit<TreeVertex> v) > { > if (_x->episode.rebind.isInProgress) > return probeSliceStrongSide(v); > else > return probeLinkStrongSide(v); > } > > bool > probeSliceStrongSide(unit<TreeVertex> v) > { > unit<TreeVertex> pivot; > if (_x->episode.rebind.isInProgress) { > if (isRoleDelta(v)) > return false; > > pivot = _x->episode.update.event->tail; > } else { > pivot = _slices.base(); > } > > unit<TreeVertex> pc = pivot->clockProxy(), vc = v->clockProxy(); > > if (pivot->mode() == TreeVertex::Mode::ordinal) { > if (OrdinalTree::isOrdinalRelation(pivot, v) || > ((vc->timespan().in >= pc->timespan().in) && (vc->timespan().out <= pc->timespan().out))) > { > unit<TreeVertex> sliceDeterminant, walk = v; > > while (!isSliceHead(walk->tree())) > walk = walk->tree(); > > uint32_t meetPosition = _slices.positionOf(walk->tree()); > if (meetPosition == 0) > sliceDeterminant = _x->episode.update.event->head; > else > sliceDeterminant = _slices.at(meetPosition - 1); > > if (OrdinalTree::isOrdinalRelation(pivot, v)) > return walk->ordinal() < sliceDeterminant->ordinal(); > else > return walk->treePosition() < sliceDeterminant->treePosition(); > } else { > if ((v->mode() == TreeVertex::Mode::ordinal) && isSliceHead(vc)) > return _slices.isStrongSide(v->ordinalTree()); > else > return (vc->timespan().out < pc->timespan().in); > } > } else { > unit<TreeVertex> uh = _x->episode.update.event->head; > if (_x->episode.rebind.isInProgress) { > if ((v->mode() == TreeVertex::Mode::ordinal) && (vc == pivot)) > return v->ordinalRoot()->treePosition() < uh->treePosition(); > > if (uh->mode() == TreeVertex::Mode::clock) { > if ((v->mode() == TreeVertex::Mode::clock) || (vc != uh)) > return vc->timespan().out < uh->timespan().in; > } > } > > if ((v->mode() == TreeVertex::Mode::ordinal) && (vc->timespan().in < pc->timespan().in) && (vc->timespan().out > pc->timespan().out)) > return _slices.isStrongSide(v->ordinalTree()); > > if (vc->timespan().out < pc->timespan().in) > return true; > > if (vc->timespan().in > pc->timespan().out) > return false; > > unit<TreeVertex> walk = ((v->mode() == TreeVertex::Mode::ordinal) ? v->ordinalRoot() : vc); > while (walk->tree() != pivot) > walk = walk->tree(); > > return walk->treePosition() < uh->treePosition(); > } > } > > bool > probeLinkStrongSide(unit<TreeVertex> v) > { > ifAdvanceEpoch(v); > > if (lb(v)->isOnLinkPath) > return true; > > unit<TreeVertex> pivot = _slices.base(); > > if (pivot->mode() == TreeVertex::Mode::clock) { > unit<TreeVertex> vc = v->clockProxy(); > WalkTimespan vct = vc->timespan(), pt = pivot->timespan(); > > if ((v->mode() == TreeVertex::Mode::ordinal) && (vc == pivot)) { > unit<TreeVertex> linkTail = _link.base(), ltc = linkTail->clockProxy(), vr = v->ordinalRoot(); > > if (!OrdinalTree::isOrdinalRelation(v, linkTail)) { > if (vr->treePosition() == 0) > return true; > > if ((linkTail->mode() == TreeVertex::Mode::ordinal) && (ltc == pivot)) > return vr->treePosition() < linkTail->ordinalRoot()->treePosition(); > > unit<TreeVertex> sibling = vr->links->findLeftClockSibling(); > if (sibling == nullptr) > return true; > else > return sibling->timespan().out < ltc->timespan().in; > } > } else { > if (vct.out < pt.in) > return true; > > if (vct.in > pt.out) > return false; > } > } else if (!OrdinalTree::isOrdinalRelation(v, pivot)) { > return probeSliceStrongSide(v); > } > > unit<TreeVertex> linkTail = _link.base(), ltc = linkTail->clockProxy(); > > if (v->mode() == TreeVertex::Mode::clock) { > if (linkTail->mode() == TreeVertex::Mode::clock) > return v->timespan().in < ltc->timespan().out; > else if (v->timespan().out < ltc->timespan().in) > return true; > } > > _probe.begin(v); > > unit<TreeVertex> walk = v; > while (true) { > lb(walk)->strongProbeTail = v; > > if (!ifAdvanceEpoch(walk->tree())) { > if (walk->tree() == pivot) { > lb(pivot)->strongProbeTail = v; > unit<TreeVertex> linkSibling = extendToMeet(_link, v); > if (linkSibling == nullptr) > return true; > > unit<TreeVertex> probeSibling = _probe.siblingOf(linkSibling); > if (OrdinalTree::isOrdinalRelation(probeSibling, linkSibling)) > return probeSibling->ordinal() < linkSibling->ordinal(); > else > return probeSibling->treePosition() < linkSibling->treePosition(); > } > > if (isSliceHead(walk->tree())) { > unit<TreeVertex> sliceSibling = _slices.siblingOf(walk); > > if (OrdinalTree::isOrdinalRelation(walk, sliceSibling)) > return walk->ordinal() < sliceSibling->ordinal(); > else > return walk->treePosition() < sliceSibling->treePosition(); > } > if (lb(walk->tree())->isOnLinkPath) { > uint32_t linkMeetIndex = _link.positionOf(walk->tree()); > if (linkMeetIndex == 0) > return true; > > unit<TreeVertex> linkSibling = _link.at(linkMeetIndex - 1); > if (OrdinalTree::isOrdinalRelation(walk, linkSibling)) > return walk->ordinal() < linkSibling->ordinal(); > else > return walk->treePosition() < linkSibling->treePosition(); > } > } > > walk = _probe.step(); > } > > ># 758 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 758) ># 758 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "unreachable" << ># 758 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 758 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > } > > unit<TreeVertex> > extendToMeet(TreeSubpath& s, unit<TreeVertex> meet) > { > unit<TreeVertex> top = s.extent(); > ifAdvanceEpoch(top); > while (true) { > lb(top)->isOnLinkPath = true; > if (!ifAdvanceEpoch(top->tree())) { > if (lb(top->tree())->strongProbeTail == meet) > return (top->tree() == meet) ? nullptr : top; > } > > top = s.step(); > } > > ># 776 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 776) ># 776 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "unreachable" << ># 776 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 776 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > } > > void > setStrongSide(unit<TreeVertex> v) > { > lb(inEpoch(v))->isStrongSide = _deltaStrong; > } > > unit<TreeVertex> > probeCrossLoop(unit<TreeVertex> tail, unit<TreeVertex> head, uint32_t ordinalPathBranchLevel) > { > for (unit<TreeVertex> loop = cv(head)->head(); loop != nullptr; loop = cv(loop)->head()) { > if (loop->mode() == TreeVertex::Mode::clock) { > WalkTimespan lt = loop->timespan(), tct = tail->clockProxy()->timespan(); > > if (_x->episode.rebind.isInProgress) { > if (loop->isOnDeltaStack()) > return loop; > > if (lt.in <= tct.in) { > > unit<TreeVertex> rt = _x->episode.rebind.tail; > bool isEscalated = (_x->episode.rebind.mode == TreeVertex::Mode::clock) && _x->episode.clock.escalation.isActive; > if (isEscalated && isRoleDelta(tail) && (loop->level() < rt->level())) > tct = rt->timespan(); > > if (lt.out >= tct.in) > return loop; > } > } else if (lt.out >= tct.out) { > return loop; > } > } else if (OrdinalTree::isOrdinalRelation(loop, tail)) { > if (ordinalPathBranchLevel >= (loop->level() - loop->ordinalRoot()->level())) > return loop; > } > } > > return nullptr; > } > > unit<TreeVertex> > peekDeltaSliceTail(unit<TreeVertex> v) > { > if ((lb(v)->ds == nullptr) || lb(v)->ds->empty()) > return nullptr; > > uint32_t dsTailLevel = (_x->episode.update.event->tail->level() + lb(v)->ds->length()); > return _x->stackPeek(dsTailLevel); > } > > unit<TreeVertex> > peekLoop(unit<TreeVertex> v) > { > if (!isInUpdate(v) || (lb(v)->px == nullptr)) > return cv(v)->head(); > > return lb(v)->px->head; > } > > unit<TreeVertex> > getEffectiveSliceLoop(unit<TreeVertex> v) > { > unit<TreeVertex> head = cv(v)->head(), px = nullptr, occlusion = nullptr; > > if (!isInUpdate(v)) > return head; > > if (lb(v)->px != nullptr) > px = lb(v)->px->head; > > unit<CrossLoopSlice> xs = lb(v)->sliceHead; > if ((xs != nullptr) && (xs->occlusion != nullptr)) > occlusion = xs->occlusion->head; > > return _radar.triple(occlusion, px, head); > } > > unit<TreeVertex> > pickLoop(unit<TreeVertex> v) > { > if (!isInUpdate(v) || (lb(v)->px == nullptr)) > return cv(v)->head(); > else > return _radar.dual(cv(v)->head(), lb(v)->px->head); > } > > bool > ifPotentialLoopCommit(unit<TreeVertex> v) > { > unit<PotentialCrossLoop> px = lb(v)->px; > > if (px == nullptr) > return false; > > if ((cv(v)->head() == nullptr) || (px->head->level() > cv(v)->head()->level())) { > tag(cv(v), px->head); > return true; > } > > return false; > } > > void > potentialLoopAssign(unit<TreeVertex> v, unit<PotentialCrossLoop> px) > { > ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > v->isSubtreeOf(px->head) ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 883) << ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "v->isSubtreeOf(px->head)" ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 883 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Cannot assign px " << px->head->token() << " to " << v->token() > << " because it is not a subtree" << ># 884 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 884 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > lb(v)->px = px; > } > > bool > ifPotentialLoopAssign(unit<TreeVertex> v, unit<PotentialCrossLoop> px) > { > ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > v != px->head ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 892) << ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "v != px->head" ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 892 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > if (ifCycle(v) && (cv(v)->head() != nullptr) && (cv(v)->head()->level() >= px->head->level())) > return false; > > if (ifAdvanceEpoch(v) || (lb(v)->px == nullptr) || (lb(v)->px->head->level() < px->head->level())) { > potentialLoopAssign(v, px); > > if (isSliceMember(v)) > sliceGroupUpdate(v); > > return true; > } > > return false; > } > > void > crossQueueBind() > { > ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > _q.tail == nullptr ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 912) << ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "_q.tail == nullptr" ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Cross queue must be empty to start binding" << ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 912 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > while (!_slices.isBindClosed()) { > unit<CrossLoopSlice> slice = _slices.peekBind()->sliceHead; > > sliceUpdate(_slices.bindPosition()); > > if (lb(slice->head)->drq.q != nullptr) { > unit<PotentialCrossLoop> vpx = establishPotentialCrossLoop(slice->head); > unit<CrossLoopSliceGroup> vxg = establishSliceGroup(slice, vpx); > for (unit<LoopBinding> dr = lb(slice->head)->drq.q; dr != nullptr; dr = dr->drq.q) > sliceBindRetrogrades(vxg, dr->v, true); > } > > if (_x->episode.rebind.isInProgress) { > unit<TreeVertex> sliceLoop = peekLoop(slice->head); > unit<CrossLoopSliceGroup> xg = slice->groups; > if ((xg != nullptr) || (sliceLoop != nullptr)) { > if ((xg == nullptr) || ((sliceLoop != nullptr) && (sliceLoop->level() > xg->px->head->level()))) { > unit<PotentialCrossLoop> px = lb(slice->head)->px; > if (px == nullptr) > px = establishPotentialCrossLoop(sliceLoop); > xg = establishSliceGroup(slice, px); > } > > sliceBindRetrogrades(xg, slice->head, true); > } > } > > for (unit<CrossLoopSliceGroup> g = slice->groups; g != nullptr; g = g->next) { > for (unit<LoopBinding> lb = g->members; lb != nullptr; lb = lb->sgl.n) > crossQueuePush(lb->v); > > sliceBindGroup(g); > } > > _slices.bindAdvance(); > } > } > > bool > sliceBindRetrogrades(unit<CrossLoopSliceGroup> g, unit<TreeVertex> v, bool isPrincipalPass) > { > if (!ifAdvanceEpoch(v) && (lb(v)->xs != nullptr) && !isPrincipalPass) > return false; > > bool isInDelta = isRoleDelta(v); > if (v->mode() == TreeVertex::Mode::clock) { > for (TreeReference& r : v->links->concreteReferences()) > sliceBindMember(g, v, r, isInDelta); > } else { > for (TreeReference& r : v->links->in.ordinal().index().iterateLinks(OrdinalReferencePartition::cross)) { > if (!isRoleDelta(r.endpoint())) > sliceBindCross(g, v, r); > } > > if (!isInDelta) { > for (TreeReference& r : v->links->in.ordinal().index().iterateLinks(OrdinalReferencePartition::loopback)) { > if (!isRoleDelta(r.endpoint())) > sliceBindLoopback(g, v, r); > } > } > > for (TreeReference& r : v->links->in.ordinal().index().iterateLinks(OrdinalReferencePartition::clock)) > sliceBindMember(g, v, r, isInDelta); > } > > return true; > } > > void > sliceBindCross(unit<CrossLoopSliceGroup> g, unit<TreeVertex> head, TreeReference& r) > { > unit<TreeVertex> tail = r.endpoint(); > > if ((tail->mode() == TreeVertex::Mode::ordinal) && isRoleDelta(tail->ordinalRoot())) > return; > > if (!_x->episode.rebind.isInProgress && (tail == _link.base())) > return; > > unit<CrossLoopSlice> xxs = establishCrossLoopSlice(g, head, r); > if (xxs == nullptr) > return; > > if (isSliceHead(tail)) > return; > > if (_slices.isBeyondExtent(tail)) > return; > > if (probeStrongSide(tail)) { > for (unit<TreeVertex> walk = tail; !isSliceHead(walk); walk = walk->tree()) { > if (sliceBindRetrogrades(g, walk, false)) > setStrongSide(walk); > else > break; > } > > return; > } > > > > > > > unit<PotentialCrossLoop> xpx = g->px; > > while (xpx->head->level() > xxs->head->level()) { > if (lb(xpx->head)->sliceHead != nullptr) > sliceUpdate(_slices.positionOf(xpx->head)); > > unit<TreeVertex> nextLoop = getEffectiveSliceLoop(xpx->head); > if (nextLoop == nullptr) > return; > > xpx = establishPotentialCrossLoop(nextLoop); > } > > if (xxs->head->level() > g->xs->head->level()) > xxs = g->xs; > > if (ifAdvanceEpoch(tail) || (lb(tail)->xs == nullptr)) { > if (sliceJoin(tail, xxs, xpx)) { > if ((xxs == g->xs) && (xpx == g->px)) > crossQueuePush(tail); > } > } else { > if (ifPotentialLoopAssign(tail, xpx)) { > if ((xxs == lb(tail)->xs) && (xpx == g->px)) > crossQueuePush(tail); > } > } > } > > void > sliceBindLoopback(__attribute__((unused)) unit<CrossLoopSliceGroup> g, __attribute__((unused)) unit<TreeVertex> head, __attribute__((unused)) TreeReference& b) > { > unit<TreeVertex> tail = b.endpoint(); > > if (isSliceHead(tail)) > return; > > if (!_slices.contains(head)) > return; > > if (!_x->episode.rebind.isInProgress && (tail == _link.base())) > return; > > if (isStrongSide(head) || probeStrongSide(tail)) { > for (unit<TreeVertex> walk = tail; walk != head; walk = walk->tree()) { > if (sliceBindRetrogrades(g, walk, false)) > setStrongSide(walk); > else > break; > } > return; > } > > if (ifAdvanceEpoch(tail) || (lb(tail)->xs == nullptr)) { > unit<TreeVertex> walk = tail; > while (walk != head && (ifAdvanceEpoch(walk) || (lb(walk)->sliceHead == nullptr))) > walk = walk->tree(); > > unit<CrossLoopSlice> bxs; > if (walk->level() > g->xs->head->level()) { > do { > walk = walk->tree(); > } while (!isInUpdate(walk) || lb(walk)->sliceHead == nullptr); > bxs = lb(walk)->sliceHead; > > if (!isStrongSide(head) && (bxs->head->level() > g->xs->head->level())) > bxs = g->xs; > } else { > bxs = meetSlice(walk); ># 1096 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > } > > if ((lb(head)->xs != nullptr) && (lb(head)->xs->head->level() < bxs->head->level())) { > bxs = lb(head)->xs; > } > > if (sliceJoin(tail, bxs, g->px)) > crossQueuePush(tail); > } > } > > void > sliceBindMember(unit<CrossLoopSliceGroup> g, unit<TreeVertex> v, TreeReference& r, bool isInDelta) > { > if (isRoleDelta(r.endpoint())) > return; > > if (!_x->episode.rebind.isInProgress && (r.endpoint() == _link.base())) > return; > > if (isInDelta) { > if (isCross(v, r)) > sliceBindCross(g, v, r); > } else { > switch (probe(v, r)) > { > case OrdinalReferencePartition::cross: > sliceBindCross(g, v, r); > break; > > case OrdinalReferencePartition::loopback: > sliceBindLoopback(g, v, r); > break; > > default: > ; > } > } > } > > void > sliceBindGroup(unit<CrossLoopSliceGroup> g) > { > while (true) { > unit<TreeVertex> v = crossQueuePop(); > if (v == nullptr) > break; > > unit<PotentialCrossLoop> px = lb(v)->px; > if ((cv(v)->head() == nullptr) || (cv(v)->head()->level() < lb(v)->px->head->level())) > tag(cv(v), px->head); > > unit<TreeVertex> walk = v->tree(); > while (true) { > if (walk->level() == px->head->level()) { > if (isInUpdate(walk) && (peekLoop(walk) != nullptr) && !isSliceHeadActive(walk)) > sliceBindRetrogrades(g, walk, false); > > break; > } > > > if (ifAdvanceEpoch(walk)) { > potentialLoopAssign(walk, px); > sliceAssign(walk, g->xs); > } else { > if (isSliceHead(walk)) > break; > > if (!ifPotentialLoopAssign(walk, px)) { > unit<TreeVertex> walkLoop = pickLoop(walk); > > while (walk != walkLoop) { > if (isInUpdate(walk) && (peekLoop(walk) != nullptr) && !isSliceHeadActive(walk)) > sliceBindRetrogrades(g, walk, false); > walk = walk->tree(); > } > > walk = walkLoop; > continue; > } > } > > crossQueuePush(walk); > break; > } > > sliceBindRetrogrades(g, v, true); > } > > g->isPending = false; > } > > inline void > sliceAssign(unit<TreeVertex> v, unit<CrossLoopSlice> slice) > { > ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > !isStrongSide(v) ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1192) << ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "!isStrongSide(v)" ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Cannot assign [ " << v->token() << " â ÎË¢ ] to slice " << slice->head->token() << ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1192 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > lb(v)->xs = slice; > } > > bool > sliceJoin(unit<TreeVertex> v, unit<CrossLoopSlice> slice, unit<PotentialCrossLoop> px) > { > ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > lb(v)->sliceHead == nullptr ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1200) << ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "lb(v)->sliceHead == nullptr" ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1200 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << v->token() << " cannot join slice " << slice->head->token() > << " because it is a slice head" << ># 1201 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1201 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > (lb(v)->xs == nullptr) || (lb(v)->xs == slice) ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1202) << ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "(lb(v)->xs == nullptr) || (lb(v)->xs == slice)" ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << v->token() << " cannot change to slice " << slice->head->token() << ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1202 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > v->isSubtreeOf(slice->head) ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1203) << ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "v->isSubtreeOf(slice->head)" ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1203 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << v->token() << " cannot join slice " << slice->head->token() > << " because it is in a disjoint subtree." << ># 1204 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1204 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > v->isSubtreeOf(px->head) ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1205) << ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "v->isSubtreeOf(px->head)" ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1205 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << v->token() << " cannot have potential loop head " << px->head->token() << " of slice " > << slice->head->token() << " because it is in a disjoint subtree." << ># 1206 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1206 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > potentialLoopAssign(v, px); > sliceAssign(v, slice); > return sliceGroupJoin(v); > } > > void > sliceUpdate(uint32_t position) > { > if (position == 0) { > ifPotentialLoopCommit(_slices.base()); > return; > } > > while (!_slices.isLoopStackClosed(position)) { > unit<CrossLoopSlice> slice = lb(_slices.loopStackPeek())->sliceHead; > > if (slice->occlusion != nullptr) { > if (!ifPotentialLoopAssign(slice->head, slice->occlusion)) { > unit<TreeVertex> loop = peekLoop(slice->head); > unit<CrossLoopSlice> lxs = lb(loop)->sliceHead; > if (isInUpdate(loop) && (lxs != nullptr) && (slice->occlusion->head->level() < loop->level())) { > if ((lxs->occlusion == nullptr) || (lxs->occlusion->head->level() < slice->occlusion->head->level())) > lxs->occlusion = slice->occlusion; > } > } > } else { > unit<TreeVertex> priorSlice = _slices.loopStackPeekPrevious(); > if ((cv(priorSlice)->head() != nullptr) && (cv(priorSlice)->head() != slice->head)) { > unit<PotentialCrossLoop> ppx = establishPotentialCrossLoop(cv(priorSlice)->head()); > if (!ifPotentialLoopAssign(slice->head, ppx)) > sliceUpdateOcclusion(slice, priorSlice, ppx); > } > } > > ifPotentialLoopCommit(slice->head); > _slices.loopStackAdvance(); > } > } > > void > sliceUpdateOcclusion(unit<CrossLoopSlice> slice, __attribute__((unused)) unit<TreeVertex> priorSlice, unit<PotentialCrossLoop> abandoned) > { > unit<TreeVertex> loop = pickLoop(slice->head); > > if ((abandoned->head == loop) || !isInUpdate(loop) || (lb(loop)->sliceHead == nullptr)) > return; > > unit<CrossLoopSlice> lxs = lb(loop)->sliceHead; > if (lxs->occlusion == nullptr) { > lxs->occlusion = abandoned; > } else if (lxs->occlusion != abandoned) { > unit<PotentialCrossLoop> inner = lxs->occlusion, outer = abandoned; > bool isAbandonedInner = (abandoned->head->level() > lxs->occlusion->head->level()); > if (isAbandonedInner) > inner = abandoned, outer = lxs->occlusion; > > if (inner->head->level() < _slices.extent()->level()) > return; > > unit<CrossLoopSlice> ixs = lb(inner->head)->sliceHead; > if ((inner->head == ixs->head) && (ixs->occlusion == nullptr)) { > ixs->occlusion = outer; > > if (isAbandonedInner) { > if (lxs->occlusion->head->level() < abandoned->head->level()) { > unit<PotentialCrossLoop> swap = lxs->occlusion; > lxs->occlusion = abandoned; > lb(abandoned->head)->sliceHead->occlusion = swap; > } else { > lb(lxs->occlusion->head)->sliceHead->occlusion = abandoned; > } > } > } else { > ># 1281 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1281) ># 1281 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Abandoning occlusion " << lxs->head->token() << "@" << outer->head->token() > << " in favor of existing occlusion " << lxs->head->token() << "@" << inner->head->token() > << ", which itself has occlusion " << ixs->head->token() << "@" << ixs->occlusion->head->token() << ># 1283 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1283 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > } > } > } > > bool > sliceGroupJoin(unit<TreeVertex> v) > { > if ((lb(v)->sgl.g != nullptr) && (lb(v)->sgl.g->px == lb(v)->px)) > return false; > > unit<CrossLoopSliceGroup> xg = establishSliceGroup(lb(v)->xs, lb(v)->px); > > ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > !isSliceHead(v) ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1296) << ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "!isSliceHead(v)" ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << v->token() << " cannot join slice group " << xg->token() << " because it is a slice head." << ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1296 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > if (!xg->isPending) > return false; > > > > sliceGroupQuit(v); > > lb(v)->sgl.g = xg; > lb(v)->sgl.p = nullptr; > lb(v)->sgl.n = xg->members; > if (lb(v)->sgl.g->members != nullptr) > lb(v)->sgl.g->members->sgl.p = lb(v); > xg->members = lb(v); > > return true; > } > > void > sliceGroupQuit(unit<TreeVertex> v) > { > if (lb(v)->sgl.g == nullptr) > return; > > lb(v)->sgl.unlink(); > } > > void > sliceGroupUpdate(__attribute__((unused)) unit<TreeVertex> v) > { > if (isRoleDelta(v)) { > if (lb(v)->sgl.g != nullptr) > sliceGroupQuit(v); > lb(v)->xs = nullptr; > } else if (!sliceGroupJoin(v)) { > ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > lb(v)->sgl.g != nullptr ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1332) << ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "lb(v)->sgl.g != nullptr" ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Failed to establish a slice group on " << v->token() << ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1332 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > cv(v)->head() != nullptr && (cv(v)->head()->level() >= lb(v)->px->head->level()) ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1333) << ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "cv(v)->head() != nullptr && (cv(v)->head()->level() >= lb(v)->px->head->level())" ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1333 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" > ># 1334 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Failed to set px " << lb(v)->px->head->token() << " on " << v->token() << cv(v)->token() << " because slice group " > << lb(v)->sgl.g->token() << " is already bound." << ># 1335 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1335 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > } > } > > void > crossQueuePush(__attribute__((unused)) unit<TreeVertex> v) > { > if (lb(v)->q != nullptr) > return; > > ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > lb(v)->px != nullptr ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1345) << ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "lb(v)->px != nullptr" ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Cannot push " << v->token() << " to the cross queue with no potential cross loop" << ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1345 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > > lb(v)->q = lb(v); > if (_q.head == nullptr) > _q.tail = lb(v); > else > _q.head->q = lb(v); > _q.head = lb(v); > } > > unit<TreeVertex> > crossQueuePop() > { > unit<LoopBinding> t = _q.tail; > > if (t == nullptr) > return nullptr; > > if (t->q == t) > _q.tail = _q.head = nullptr; > else > _q.tail = t->q; > > t->q = nullptr; > return t->v; > } > > void > extendSlicePath(uint32_t extentLevel) > { > unit<TreeVertex> walk = _slices.extent(); > while (walk->level() > extentLevel) { > walk = _slices.step(); > ifAdvanceEpoch(walk); > establishSlice(walk); > } > } > > unit<CrossLoopSlice> > meetSlice(unit<TreeVertex> walk) > { > if (lb(walk)->sliceHead != nullptr) > return lb(walk)->sliceHead; > > if (lb(walk)->xs != nullptr) > return lb(walk)->xs; > > extendSlicePath(walk->level()); > > if (lb(walk)->sliceHead != nullptr) > return lb(walk)->sliceHead; > > while (true) { > walk = walk->tree(); > if (lb(walk)->sliceHead != nullptr) > return lb(walk)->sliceHead; > > if (lb(walk)->xs != nullptr) > return lb(walk)->xs; > > if (_slices.extent()->level() > walk->level()) { > _slices.step(); > > if (lb(walk)->sliceHead != nullptr) > return lb(walk)->sliceHead; > } > } > > ># 1413 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1413) ># 1413 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "unreachable" << ># 1413 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1413 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > } > > unit<PotentialCrossLoop> > establishPotentialCrossLoop(unit<TreeVertex> v) > { > unit<PotentialCrossLoop> px; > > if (ifAdvanceEpoch(v) || (lb(v)->loopHead == nullptr)) { > px = _bindingFactory.px.makeUnit(v); > px->head = v; > lb(v)->loopHead = px; > } else { > px = lb(v)->loopHead; > } > > return px; > } > > unit<CrossLoopSlice> > establishSlice(unit<TreeVertex> v) > { > if (lb(v)->sliceHead == nullptr) > lb(v)->sliceHead = _bindingFactory.xs.makeUnit(v); > > return lb(v)->sliceHead; > } > > unit<CrossLoopSlice> > establishCrossLoopSlice(__attribute__((unused)) unit<CrossLoopSliceGroup> g, __attribute__((unused)) unit<TreeVertex> head, TreeReference& r) > { > unit<TreeVertex> tail = r.endpoint(), spb = _slices.base(), spe = _slices.extent(); > unit<CrossLoopSlice> slice = nullptr; > > if (OrdinalTree::isOrdinalRelation(tail, spb)) { > uint32_t sliceLevel = tail->links->getDual(r)->pathBranchLevel() + tail->ordinalRoot()->level(); > if (sliceLevel > _crossDeterminantLowerBound) > sliceLevel = _crossDeterminantLowerBound; > if (sliceLevel < spe->level()) { > extendSlicePath(sliceLevel); > slice = lb(_slices.extent())->sliceHead; > } else { > unit<TreeVertex> sliceHead = ((sliceLevel > spb->level()) ? spb : _slices.atLevel(sliceLevel)); > if (!isRoleDelta(head) && (lb(head)->sliceHead == nullptr)) { > sliceHead = sliceHead->meet(head); > if (sliceHead->level() < spe->level()) > extendSlicePath(sliceHead->level()); > } > slice = lb(sliceHead)->sliceHead; > } > } else { > WalkTimespan spep = spe->clockProxy()->timespan(), tt = tail->clockProxy()->timespan(); > > if ((spe->mode() == TreeVertex::Mode::ordinal) || (tt.in <= spep.in) || (tt.in > spep.out)) { > unit<TreeVertex> meet = spe->meet(tt.out); > if (meet != spe) > extendSlicePath(meet->level()); > slice = lb(meet)->sliceHead; > } else { > if (spb->mode() == TreeVertex::Mode::clock) { > if ((tt.in > spb->timespan().in) && (tt.in < spb->timespan().out)) > slice = lb(spb)->sliceHead; > } > > if (slice == nullptr) { > unit<TreeVertex> walk = spb; > while (true) { > if ((walk->mode() == TreeVertex::Mode::clock) && (tt.in >= walk->timespan().in) && (tt.in <= walk->timespan().out)) { > ifAdvanceEpoch(walk); > slice = establishSlice(walk); > break; > } > if (walk == spe) > break; > walk = walk->tree(); > } > } > } > } > > return slice; > } > > unit<CrossLoopSliceGroup> > establishSliceGroup(unit<CrossLoopSlice> slice, unit<PotentialCrossLoop> px) > { > unit<CrossLoopSliceGroup> xg; > if ((slice->groups == nullptr) || (slice->groups->px->head->level() < px->head->level())) { > return ((slice->groups = _bindingFactory.xg.makeUnit(slice, px, slice->groups))); > } else { > unit<CrossLoopSliceGroup> g = slice->groups; > while (true) { > if (g->px == px) > return g; > > if ((g->next == nullptr) || (g->next->px->head->level() < px->head->level())) > break; > > g = g->next; > } > > return ((g->next = _bindingFactory.xg.makeUnit(slice, px, g->next))); > } > } > > bool > isDeltaPathChange(__attribute__((unused)) unit<TreeVertex> loop) { return (loop->level() > _x->episode.update.event->root->level()); } > > void > tagUpdateSubpath(__attribute__((unused)) unit<TreeVertex> loop, __attribute__((unused)) unit<TreeVertex> tail) > { > advanceEpoch(loop); > > unit<PotentialCrossLoop> px = establishPotentialCrossLoop(loop); > > _slices.begin(loop); > unit<CrossLoopSlice> slice = establishSlice(loop); > > advanceEpoch(tail); > potentialLoopAssign(tail, px); > sliceAssign(tail, slice); > sliceGroupJoin(tail); > _link.begin(tail); > > crossQueueBind(); > } > > uint32_t > deltaPathPosition(unit<TreeVertex> v) { return (v->level() - _x->episode.update.event->tail->level()); } > > void > tagRebindSubpath(__attribute__((unused)) unit<TreeVertex> tail, __attribute__((unused)) unit<PotentialCrossLoop> px) > { > unit<TreeVertex> set = tail, loop; > unit<PotentialCrossLoop> mark = px; > unit<CrossLoopSlice> rebindSlice = lb(_x->episode.update.event->tail)->sliceHead; > > while (true) { > loop = peekLoop(set); > if (loop != nullptr) > ifAdvanceEpoch(loop); > > bool isMarkInner = (loop == nullptr) || (loop->level() < mark->head->level()); > if (isMarkInner || (loop == mark->head)) { > bool setMark = true; > unit<PotentialCrossLoop> occluded = (loop == nullptr) ? nullptr : establishPotentialCrossLoop(loop); > > if (mark->head->level() <= _x->episode.update.event->tail->level()) { > if (set->level() > rebindSlice->head->level()) > sliceAssign(set, rebindSlice); > } else { > establishDeltaSlice(set)->mark(deltaPathPosition(mark->head)); > setMark = isMarkInner; > > ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > mark->head->level() < set->level() ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1567) << ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "mark->head->level() < set->level()" ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" ># 1567 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "Cannot mark a loop position " << mark->head->level() > << " below the subpath cursor position " << set->level() << ># 1568 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1568 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ( ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > lb(set)->ds->length() <= deltaPathPosition(set) ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > ) || facile::RequireException("../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp", 1569) << ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠Condition [" << ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > "lb(set)->ds->length() <= deltaPathPosition(set)" ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "] " << ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > std::endl ># 1569 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > << "⢠" > ># 1570 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > << "DeltaSlice of " << set->token() << " exceeds its delta path position " << deltaPathPosition(set) << ># 1570 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" 3 > facile::RequireException::require_sentinel ># 1570 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > ; > } > > if (setMark) { > if (ifPotentialLoopAssign(set, mark) && _slices.isBeyondExtent(mark->head)) > extendSlicePath(mark->head->level()); > } > > if ((occluded == nullptr) || (set->tree() == occluded->head)) > break; ># 1592 "../../subprojects/edfst/src/icd/forest/IncrementalCycleDecomposition.hpp" > if (mark == occluded) { > set = set->tree(); > ifAdvanceEpoch(set); > } else { > set = mark->head; > mark = occluded; > } > } else { > set = loop; > } > } > } > > void > liftGatedLoopbacks(unit<TreeVertex> proxy, unit<TreeVertex> gated) > { > std::vector<unit<TreeVertex>> q; > q.push_back(gated); > while (!q.empty()) { > unit<TreeVertex> top = q.back(); > q.pop_back(); > > for (const TreeReference& r : top->links->concreteReferences()) { > unit<TreeVertex> tail = r.endpoint(); > if (tail == gated) > continue; > if (!tail->isPositionalSubtreeOf(gated)) > continue; > > unit<CycleVertex> c = cv(tail); > if ((c == nullptr) || (c->head() == nullptr) || (c->head() == gated)) > continue; > > c->ifAdvanceEpoch(_x->episode.update.epoch, LoopBindingFactoryRelay(*this, tail)); > if (c->head() == proxy) { > tag(c, gated); > } else { > unit<LoopBinding> clb = lb(tail); > if (clb->isVisited) > continue; > > clb->isVisited = true; > } > q.push_back(tail); > } > } > } > > class LoopBindingFactoryRelay > { > public: > LoopBindingFactoryRelay(Plugin& plugin, unit<TreeVertex> v) : > _plugin(plugin), > _v(v) > {} > > unit<LoopBinding> operator ()() const { return _plugin._bindingFactory.lb.makeUnit(_v); } > > private: > Plugin& _plugin; > unit<TreeVertex> _v; > }; > > struct LoopHeadRadar { > unit<TreeVertex> > dual(unit<TreeVertex> a, unit<TreeVertex> b) > { > if (a == nullptr) > return b; > else if (b == nullptr) > return a; > > if (a->level() > b->level()) > return a; > else > return b; > } > > unit<TreeVertex> > triple(unit<TreeVertex> a, unit<TreeVertex> b, unit<TreeVertex> c) > { > return dual(dual(a, b), c); > } > } > _radar; > > const loan<TreeIntegrationType> _x; > > CrossQueue _q; > TreeSubpath _slices; > TreeSubpath _link; > TreeSubpath _probe; > > struct LoopBindingFactory { > ObjectBlock<PotentialCrossLoop> px; > ObjectBlock<CrossLoopSlice> xs; > ObjectBlock<CrossLoopSliceGroup> xg; > ObjectBlock<LoopBinding> lb; > FactoryPool<DeltaSlice> ds; > > LoopBindingFactory() : > px(6), > xs(6), > xg(6), > lb(6), > ds(6) > {} > > ~LoopBindingFactory() > { > px.releaseAll(); > xs.releaseAll(); > xg.releaseAll(); > lb.releaseAll(); > ds.clear(); > } > > void > reset() > { > px.reset(); > xs.reset(); > xg.reset(); > lb.reset(); > ds.reset(); > } > } > _bindingFactory; > > static constexpr uint32_t _crossDeterminantUnbounded = 0xffffffffUL; > uint32_t _crossDeterminantLowerBound; > > owner<LoopForestTest> _test; >}; >} ># 5 "../../src/assembly/ModuleGraphComposition.hpp" 2 > ># 1 "../../src/assembly/ModuleGraphPlugin.hpp" 1 > > > > >namespace pii >{ >template<typename TreeIntegrationType, typename BlockType, typename Observer> >class ModuleGraphPluginBase : > public plugin::ElasticTreePluginInterface<typename TreeIntegrationType::Types::TreeVertex> { >using TreeVertex = typename TreeIntegrationType::Types::TreeVertex; >using TreeEdge = typename TreeIntegrationType::Types::TreeEdge; >using VertexMode = typename TreeVertex::Mode; >using EdgeEvent = typename TreeIntegrationType::Types::EdgeEvent; > >public: > using ObserverType = Observer; > > ModuleGraphPluginBase(loan<TreeIntegrationType> x, loan<ElfMetadata::MemoryMap> axis, handle<Observer> observer) : > _x(x), > _axis(axis), > _observer(observer) > {} > > void > elasticTreeAddVertex(__attribute__((unused)) unit<TreeVertex> v, __attribute__((unused)) unit<TreeVertex> expanded = 0) {} > > void > elasticTreeAddEventEdge() > { > loan<EdgeEvent> event = _x->episode.update.event; > if (event->tail->id() == TreeVertex::rootId) > return; > unit<BlockType> tb = event->tail->template extension<BlockType>(), hb = event->head->template extension<BlockType>(); > > facile::StreamLog::log(__PRETTY_FUNCTION__, 35, facile::StreamLogLevel::Detail) << "AddEventEdge(" << hex(tb->offset()) << " -> " << hex(hb->offset()) << ")" << std::endl; > > tb->emplaceSuccessor(hb); > > unit<BlockType> rb = event->root->template extension<BlockType>(); > _observer->edge(event->relation, rb, tb, hb); > > } > > void > elasticTreeDeltaEdge(__attribute__((unused)) unit<TreeVertex> tail, __attribute__((unused)) cell<TreeEdge> edge, __attribute__((unused)) TreeRelation relation, __attribute__((unused)) VertexMode mode, > __attribute__((unused)) uint32_t crossDeterminantLowerBound = 0) > {} > > void > elasticTreeVertexCommit(__attribute__((unused)) unit<TreeVertex> v) { _observer->commit(v->template extension<BlockType>()); } > > void > elasticTreeExpandVertex(__attribute__((unused)) unit<TreeVertex> initiator, unit<TreeVertex> origin, unit<TreeVertex> expansion) > { > unit<BlockType> ob = origin->template extension<BlockType>(), eb = expansion->template extension<BlockType>(); > ob->emplaceSuccessor(eb); > } > > void > elasticTreeGateVertex(__attribute__((unused)) unit<TreeVertex> proxy) > { > > } > > void > elasticTreeReposition(__attribute__((unused)) unit<TreeVertex> v) {} > > void > elasticTreeBeginUpdate() {} > > void > elasticTreeCommitRebind() {} > > void > elasticTreeInitialize() {} > >private: > loan<TreeIntegrationType> _x; > loan<ElfMetadata::MemoryMap> _axis; > handle<Observer> _observer; >}; >} ># 7 "../../src/assembly/ModuleGraphComposition.hpp" 2 ># 1 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 1 > > > > > > > > >namespace elastic_test >{ >using ConfigurationSchema::DefineFieldSet; > >enum class TreeTablePrintMode { > none, > error, > episode, > conclusion >}; > >inline TreeTablePrintMode >parseTreePrintMode(const std::string& s) >{ > if ((s == "none") || s.empty()) > return TreeTablePrintMode::none; > else if (s == "error") > return TreeTablePrintMode::error; > else if (s == "episode") > return TreeTablePrintMode::episode; > else if (s == "conclusion") > return TreeTablePrintMode::conclusion; > > ># 32 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 3 > throw facile::RequireException("../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp", 32) ># 32 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" > << "Cannot parse 'tree-table-mode' value '" << s << "' as a TreeTablePrintMode { none, error, episode, conclusion }" << ># 32 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 3 > facile::RequireException::require_sentinel ># 32 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" > ; >} > >template<typename TreeComposition> >class TreeLogConfigurationBase >{ >using TreeTableLog = edfst::log::TreeTableLogBase<TreeTablePrinterBase<TreeComposition>>; > >public: > struct Configurable { > bool overwrite; > std::string logDirectory; > std::string treeTableMode; > > using Fields = typename decltype(DefineFieldSet(overwrite, treeTableMode))::Type; > Fields fields; > > Configurable() : > fields( ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 3 > facile::NamedVariable( ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" > "overwrite" ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 3 > , ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" > overwrite ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 3 > ) ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" > , ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 3 > facile::NamedVariable( ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" > "treeTableMode" ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 3 > , ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" > treeTableMode ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" 3 > ) ># 50 "../../subprojects/edfst/test/sim/tree/TreeLogConfiguration.hpp" > ) > {} > }; > > TreeLogConfigurationBase() : > _treeTableFilenameTag("tree"), > _treeTableMode(TreeTablePrintMode::none), > _treeTableLog(owner<TreeTableLog>::make()) > {} > > void > parse(json& j) > { > ConfigurationSchema::Parser parser; > parser.parse(_configurable, j); > > _treeTableMode = parseTreePrintMode(_configurable.treeTableMode); > > if (j.contains("transcript")) { > owner<json> scope = owner<json>::make(j.at("scope")); > owner<json> transcript = owner<json>::make(j.at("transcript")); > _transcriptScope = owner<edfst::log::TranscriptScope<TreeComposition>>::make(std::move(scope), std::move(transcript)); > } > } > > > > > > > > template<typename LogContext> > void > activate(handle<LogContext> context) > { > if (_outputDir == nullptr) > _outputDir = context->outputDir(); > _treeTableLogFilename = context->logFileBasename() + "." + _treeTableFilenameTag + ".log"; > > if (_transcriptScope != nullptr) > _transcriptScope->parse(); > > activateTreePrintMode(); > } > > void > restart() > { > if (_treeTableLog->isActive()) > _treeTableLog->reset(); > } > > handle<Configurable> > configurable() { return handle(_configurable); } > > void > setTreeTableFilenameTag(const std::string& tag) > { > _treeTableFilenameTag = tag; > } > > TreeTablePrintMode > treeTablePrintMode() { return _treeTableMode; } > > void > setTreeTablePrintMode(TreeTablePrintMode treePrintMode) > { > _treeTableMode = treePrintMode; > activateTreePrintMode(); > } > > loan<TreeTableLog> > treeTableLog() { return _treeTableLog; } > > bool > isTranscription() const { return _transcriptScope != nullptr; } > > loan<edfst::log::TranscriptScope<TreeComposition>> > transcriptScope() { return _transcriptScope; } > >private: > void > activateTreePrintMode() > { > if (_treeTableMode == TreeTablePrintMode::none) { > if (_treeTableLog->isActive()) > _treeTableLog->close(); > } else if (!_treeTableLog->isActive()) { > _treeTableLog->activate(_outputDir->openFile(_treeTableLogFilename)); > } > } > > Configurable _configurable; > > owner<edfst::log::TranscriptScope<TreeComposition>> _transcriptScope; > > std::string _treeTableFilenameTag; > TreeTablePrintMode _treeTableMode; > > loan<StreamLogDirectory> _outputDir; > std::string _treeTableLogFilename; > owner<TreeTableLog> _treeTableLog; >}; >} ># 8 "../../src/assembly/ModuleGraphComposition.hpp" 2 > >namespace pii >{ >template<template<typename, typename> class PluginBase, template<typename, typename> class NodeBase> >struct ModuleGraphComposition { > struct vertex_aspect_tag {}; > > template<typename VertexType> > class VertexAspectBase { > using VertexAspect = VertexAspectBase<VertexType>; > public: > using Type = VertexType; > > VertexAspectBase() : > _v(nullptr) > {} > > VertexAspectBase(VertexAspect& src) : > _v(src._v) > {} > > unit<VertexType> > v() const { return _v; } > > void > bind(__attribute__((unused)) vertex_aspect_tag *required, unit<VertexType> v) { _v = v; } > > private: > unit<VertexType> _v; > }; > > template<typename VertexType> > using NodeType = NodeBase<VertexType, VertexAspectBase<VertexType>>; > > template<typename VertexType> > using StreamEndpoint = EdgeStream::EdgeEndpointBase<NodeType<VertexType>>; > > template<typename VertexType> > class TerrainTemplate : > public IExtensionFactory<VertexType, StreamEndpoint<VertexType>> { > public: > using NodeType = NodeBase<VertexType, VertexAspectBase<VertexType>>; > > void > initialize(unit<VertexType> v, StreamEndpoint<VertexType> e) override > { > v->template setExtension(e.point()); > if (e.point() != nullptr) > e.point()->vertexAspect()->bind(hidden_tag<vertex_aspect_tag>(), v); > > > } > }; > > struct OffsetPrinter { > template<typename VertexType> > struct OffsetIdentity { > unit<VertexType> v; > > friend std::ostream& > operator <<(std::ostream& o, const OffsetIdentity& id) { return o << hex(id.v->id().index()); } > }; > > template<typename VertexType> > static OffsetIdentity<VertexType> > id(unit<VertexType> v) { return OffsetIdentity<VertexType>{ v }; } > }; > > template<typename VertexType> > struct ModuleGraphExtensionSet : > public TemplateCompositionBase<VertexType, ObjectBlockInterface, CycleVertexBase, NodeType> { > using super = TemplateCompositionBase<VertexType, ObjectBlockInterface, CycleVertexBase, NodeType>; > using Factory = TerrainTemplate<VertexType>; > using EdgeStreamEndpoint = StreamEndpoint<VertexType>; > > template<typename BindVertexTypeLater> > using TreeTableColumns = typename TerrainTemplate<BindVertexTypeLater>::NodeType::TreeTableColumns; > > using VertexPrinter = OffsetPrinter; > }; > > using ModuleGraphExtensionComposition = ElasticTreeComposition<ModuleGraphExtensionSet>; > using TreeVertex = typename ModuleGraphExtensionComposition::Vertex; > using VertexMode = typename TreeVertex::Mode; > using TreeEdge = typename ModuleGraphExtensionComposition::Edge; > using TreeReference = typename ModuleGraphExtensionComposition::Reference; > using EdgeStreamEndpoint = StreamEndpoint<TreeVertex>; > using ExtensionFactory = typename ModuleGraphExtensionComposition::ExtensionFactory; > using BlockType = NodeBase<TreeVertex, VertexAspectBase<TreeVertex>>; > > > > template<typename TreeIntegrationType> > struct IncrementalCycleDecompositionEnvironment { > using TreeVertex = typename TreeIntegrationType::Types::TreeVertex; > using LoopForestTest = EmptyTreePluginTest<TreeVertex>; > using IncrementalCycleDecomposition = icd::IncrementalCycleDecompositionBase<TreeIntegrationType, LoopForestTest>; > }; > > template<typename TreeIntegrationType> > using IncrementalCycleDecomposition = typename IncrementalCycleDecompositionEnvironment<TreeIntegrationType>::IncrementalCycleDecomposition; > > > > template<typename TreeIntegrationType> > using ModuleGraphPluginBase = PluginBase<TreeIntegrationType, BlockType>; > > template<typename TreeIntegrationType> > struct ModuleGraphPluginSet : > public TemplateCompositionBase<TreeIntegrationType, OwnerInterface, IncrementalCycleDecomposition, ModuleGraphPluginBase> { > using super = TemplateCompositionBase<TreeIntegrationType, OwnerInterface, IncrementalCycleDecomposition, ModuleGraphPluginBase>; > > using CycleDecompositionType = IncrementalCycleDecomposition<TreeIntegrationType>; > using ModuleGraphPlugin = ModuleGraphPluginBase<TreeIntegrationType>; > using Observer = typename ModuleGraphPlugin::ObserverType; > > ModuleGraphPluginSet(loan<ElfMetadata::MemoryMap> axis, handle<Observer> observer) : > _axis(axis), > _observer(observer) > {} > > void > initialize(loan<TreeIntegrationType> x) > { > x->template setPlugin(owner<CycleDecompositionType>::make(x)); > > owner<ModuleGraphPlugin> plugin = owner<ModuleGraphPlugin>::make(x, _axis, _observer); > _plugin = plugin; > x->template setPlugin(std::move(plugin)); > } > > loan<ModuleGraphPlugin> > plugin() { return _plugin; } > > private: > loan<ElfMetadata::MemoryMap> _axis; > handle<Observer> _observer; > > loan<ModuleGraphPlugin> _plugin; > }; > > using IncrementalTree = IncrementalTreeBase<ModuleGraphExtensionComposition, ModuleGraphPluginSet>; > > using PluginSetType = typename IncrementalTree::PluginSetType; > using ModuleGraphPlugin = typename IncrementalTree::PluginSetType::ComponentTypeAt<1>; > > using ElementFactories = typename ModuleGraphExtensionComposition::ElementFactories; > using Terrain = TerrainTemplate<TreeVertex>; > > using TreeLogConfiguration = elastic_test::TreeLogConfigurationBase<ModuleGraphExtensionComposition>; > using TreeTableLog = edfst::log::TreeTableLogBase<TreeTablePrinterBase<ModuleGraphExtensionComposition>>; >}; >} ># 6 "../../src/assembly/ModuleGraph.hpp" 2 > >namespace pii >{ >template<typename Model> >class ModuleGraphBase >{ >using Observer = typename Model::Observer; >using TreeComposition = typename Model::TreeComposition; >using BlockType = typename TreeComposition::BlockType; > >public: > using Tree = typename TreeComposition::IncrementalTree; > using ExtensionFactory = typename TreeComposition::ExtensionFactory; > using ElementFactories = typename TreeComposition::ElementFactories; > using PluginSet = typename TreeComposition::PluginSetType; > > using Endpoint = typename TreeComposition::EdgeStreamEndpoint; > using BlockStreamEdge = EdgeStream::StreamEdgeBase<Endpoint>; > using BlockStreamExpansion = EdgeStream::VertexExpansionBase<Endpoint>; > > using TreeLogConfiguration = typename TreeComposition::TreeLogConfiguration; > using TreeTableLog = typename TreeComposition::TreeTableLog; > using TreeTablePrintMode = elastic_test::TreeTablePrintMode; > > template<typename ModuleTables> > ModuleGraphBase(loan<ModuleTables> moduleTables) : > _moduleTerrain(owner<ExtensionFactory>::make()), > _elementFactories(_moduleTerrain), > _observer(moduleTables->surveyor()), > _pluginSet(moduleTables->axis(), _observer), > _tree(_elementFactories, _pluginSet), > _treeTablePrintMode(TreeTablePrintMode::none) > {} > > handle<const Tree> > tree() const { return _tree; } > > handle<Observer> > observer() { return _observer; } > > void > configure(handle<TreeLogConfiguration> treeLog) > { > if ((_treeTablePrintMode = treeLog->treeTablePrintMode()) != TreeTablePrintMode::none) { > _treeTableLog = treeLog->treeTableLog(); > _treeTableLog->bind(_tree.peekRoot()); > } > > if (treeLog->transcriptScope() != nullptr) > _tree.configure(treeLog->transcriptScope()); > } > > void > bind(Endpoint e) { _tree.emplaceVertex(e); } > > void > addEdge(Endpoint tail, Endpoint head) > { > BlockStreamEdge edge(tail, head); > _tree.addEdge(edge); > > if (_treeTablePrintMode == TreeTablePrintMode::episode) { > _treeTableLog->stream() << std::endl << "mGraph: Episode " << _tree.rebindEpoch() << ", Update " << _tree.updateEpoch() > << " " << edge << std::endl << _treeTableLog->token(); > } > } > > void > expandVertex(Endpoint initiator, Endpoint origin, Endpoint expansion) > { > BlockStreamExpansion x(initiator, origin, expansion); > _tree.expandVertex(x); > > if (_treeTablePrintMode == TreeTablePrintMode::episode) { > _treeTableLog->stream() << std::endl << "mGraph: Episode " << _tree.rebindEpoch() << ", Update " << _tree.updateEpoch() > << " " << x << std::endl << _treeTableLog->token(); > } > } > > void > conclude() > { > if ((_treeTablePrintMode == TreeTablePrintMode::episode) || (_treeTablePrintMode == TreeTablePrintMode::conclusion)) > _treeTableLog->stream() << std::endl << "mGraph conclusion:" << std::endl << _treeTableLog->token(); > } > >private: > owner<ExtensionFactory> _moduleTerrain; > ElementFactories _elementFactories; > Observer _observer; > PluginSet _pluginSet; > Tree _tree; > > TreeTablePrintMode _treeTablePrintMode; > loan<TreeTableLog> _treeTableLog; >}; >} ># 4 "../../src/assembly/InflationModel.hpp" 2 > ># 1 "../../src/assembly/InflatedFunction.hpp" 1 > > > > > >namespace pii >{ >struct FunctionPosition { > Offset offset; > Offset anchor; >}; > >template<typename BlockType> >class InflatedFunctionBase >{ >using InflatedFunction = InflatedFunctionBase<BlockType>; >using EdgeType = typename BlockType::TreeEdge; >using ReferenceType = typename BlockType::TreeReference; > >public: > enum class Flags { > BitwiseEnumTag, > none = 0, > isReturnPossible = 1, > }; > > using HashSchema = HashSchemaBase<InflatedFunction>; > > struct Token { > const InflatedFunction& f; > > friend std::ostream& > operator <<(std::ostream& o, const Token& t) > { > if (t.f.isFunclet()) > return o << "fâ(" << t.f.entryPoint()->offsetToken() << ") â " << t.f.anchor()->token(); > else > return o << "F(" << t.f.entryPoint()->offsetToken() << ")"; > } > }; > > InflatedFunctionBase(unit<BlockType> entryPoint, unit<InflatedFunction> anchor = nullptr) : > _entryPoint(entryPoint), > _anchor(anchor), > _flags(Flags::none), > _sentinel(entryPoint->sentinel()), > _profile{0} > {} > > void > remake() { new (this) InflatedFunction(_entryPoint, _flags, _sentinel); } > > Offset > instanceId() const { return offset(); } > > unit<BlockType> > entryPoint() const { return _entryPoint; } > > unit<InflatedFunction> > anchor() const { return _anchor; } > > Offset > offset() const { return _entryPoint->offset(); } > > bool > isFunclet() const { return _anchor != nullptr; } > > bool > isPeer(unit<InflatedFunction> f) const > { > if (_anchor == nullptr) { > if (f->_anchor == nullptr) > return f == self(); > else > return f->_anchor == self(); > } else { > if (f->_anchor == nullptr) > return f == _anchor; > else > return f->_anchor == _anchor; > } > } > > bool > isPeer(FunctionPosition p) const > { > if (_anchor == nullptr) > return p.offset == offset() || p.anchor == offset(); > else > return p.offset == _anchor->offset() || p.anchor == _anchor->offset(); > } > > bool > is(Flags flag) const { return testAll(_flags, flag); } > > bool > set(Flags flag) > { > if (is(flag)) > return false; > else > return _flags |= flag, true; > } > > Flags > flags() const { return _flags; } > > bool > contains(Offset offset) const { return (offset >= _entryPoint->offset() && offset < _sentinel); } > > void > cover(unit<BlockType> b, __attribute__((unused)) uint32_t pendingSuccessors) > { > ># 114 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 114 "../../src/assembly/InflatedFunction.hpp" > b->function() == _entryPoint->function() ># 114 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 114) << ># 114 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 114 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 114 "../../src/assembly/InflatedFunction.hpp" > "b->function() == _entryPoint->function()" ># 114 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 114 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 114 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" > ># 115 "../../src/assembly/InflatedFunction.hpp" > << "Function " << token() << " cannot cover external block " << b->token() << " in " << b->function()->token() << ># 115 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 115 "../../src/assembly/InflatedFunction.hpp" > ; > > > > > > > > if (b->sentinel() > _sentinel) > _sentinel = b->sentinel(); > } > > > template<typename Surveyor> > void > merge(handle<Surveyor> surveyor, unit<InflatedFunction> join = nullptr, unit<BlockType> junction = nullptr ) > { > static struct { > std::vector<unit<InflatedFunction>> q; > typename HashSchema::Set cover; > > void > start(unit<InflatedFunction> f) > { > if (f != nullptr) { > clear(); > push(f); > } > } > > void > push(unit<InflatedFunction> f) > { > if (cover.emplace(f).second) > q.push_back(f); > } > > void > clear() > { > q.clear(); > cover.clear(); > } > } > _merge; > > > > > ># 164 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 164 "../../src/assembly/InflatedFunction.hpp" > join == nullptr || (join->isFunclet() && join->entryPoint() != _entryPoint && isPeer(join)) ># 164 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 164) << ># 164 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 164 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 164 "../../src/assembly/InflatedFunction.hpp" > "join == nullptr || (join->isFunclet() && join->entryPoint() != _entryPoint && isPeer(join))" ># 164 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 164 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 164 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" > ># 165 "../../src/assembly/InflatedFunction.hpp" > << "Incoherent merge: " << join->token() << " -> " << token() << ># 165 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 165 "../../src/assembly/InflatedFunction.hpp" > ; > > > > > _merge.start(join); > while (!_merge.q.empty()) { > unit<InflatedFunction> m = _merge.q.back(); > _merge.q.pop_back(); > > facile::StreamLog::log(__PRETTY_FUNCTION__, 175, facile::StreamLogLevel::Detail) << "Merge " << m->token() << " into " << token() << std::endl; > > > > > > > std::vector<unit<BlockType>> bq; > bq.push_back(m->entryPoint()); > while (!bq.empty()) { > unit<BlockType> top = bq.back(); > bq.pop_back(); > > surveyor->join(top, self()); > for (const EdgeType& e : top->v()->links->iterateEdges()) { > unit<BlockType> b = e.endpoint()->template extension<BlockType>(); > if (b->function() != m) > continue; > if (b->succession().isSingularJump()) { > unit<BlockType> s = b->leap(); > > if (s != nullptr) { > if ((s->function() != m) && (s->function() != self()) && !s->isFunctionEntry()) { > if (s->isFuncletEntry()) { > ># 199 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 199 "../../src/assembly/InflatedFunction.hpp" > s->function()->isPeer(m) ># 199 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 199) << ># 199 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 199 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 199 "../../src/assembly/InflatedFunction.hpp" > "s->function()->isPeer(m)" ># 199 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 199 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 199 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" > ># 200 "../../src/assembly/InflatedFunction.hpp" > << "In merge of " << m->token() << " into " << token() << ": incoherent edge (" > << b->offsetToken() << " -> " << s->offsetToken() << ") from " > << b->function()->token() << " to " << s->function()->token() << ># 202 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 202 "../../src/assembly/InflatedFunction.hpp" > ; > } else { > ># 204 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 204 "../../src/assembly/InflatedFunction.hpp" > !isFunclet() || s == junction ># 204 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 204) << ># 204 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 204 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 204 "../../src/assembly/InflatedFunction.hpp" > "!isFunclet() || s == junction" ># 204 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 204 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 204 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" > ># 205 "../../src/assembly/InflatedFunction.hpp" > << "In merge of " << m->token() << " into " << token() << ": incoherent edge (" > << b->offsetToken() << " -> " << s->offsetToken() << ") from " > << b->function()->token() << " to " << s->function()->token() << ># 207 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 207 "../../src/assembly/InflatedFunction.hpp" > ; > > _merge.push(s->function()); > } > } > } > } > bq.push_back(b); > } > } > > for (const ReferenceType& r : m->_entryPoint->v()->links->concreteReferences()) { > unit<BlockType> b = r.endpoint()->template extension<BlockType>(); > > if (isFunclet() && (b->function() == _anchor)) { > _merge.q.push_back(self()); > _anchor->merge(surveyor); > return; > } > if (b->function()->isFunclet() && (b->function() != self())) > _merge.push(b->function()); > } > } > } > > template<typename Surveyor, typename Worklist> > void > promote(handle<Surveyor> surveyor, handle<Worklist> worklist, FunctionPosition original) > { > using FuncletSet = std::vector<unit<InflatedFunction>>; > using FuncletGraph = typename HashSchema::ValueMap<FuncletSet>; > > facile::StreamLog::log(__PRETTY_FUNCTION__, 239, facile::StreamLogLevel::Detail) << "Promote " << token() << std::endl; > > Offsets cover; > FuncletGraph fg; > FuncletSet& immediate = fg.emplace(self(), FuncletSet()).first->second; > > std::vector<unit<BlockType>> q; > q.push_back(_entryPoint); > cover.emplace(_entryPoint->offset()); > bool isFromFunclet = (_entryPoint->offset() == original.offset); > while (!q.empty()) { > unit<BlockType> top = q.back(); > q.pop_back(); > > surveyor->join(top, self()); > if (!isFromFunclet && top->succession().isReturn()) > set(Flags::isReturnPossible); > for (const EdgeType& e : top->v()->links->iterateEdges()) { > unit<BlockType> b = e.endpoint()->template extension<BlockType>(); > if (cover.emplace(b->offset()).second) { > if (b->function()->offset() != original.offset) { > if (b->isFuncletEntry()) { > ># 261 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 261 "../../src/assembly/InflatedFunction.hpp" > isPeer(b->function()) || b->function()->isPeer(original) || worklist->isCovered(b->function()) || worklist->isCovered(b->function()->_anchor) ># 261 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 261) << ># 261 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 261 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 261 "../../src/assembly/InflatedFunction.hpp" > "isPeer(b->function()) || b->function()->isPeer(original) || worklist->isCovered(b->function()) || worklist->isCovered(b->function()->_anchor)" ># 261 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 261 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 261 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" > > ># 263 "../../src/assembly/InflatedFunction.hpp" > << "Incoherent funclet entry to " << b->offsetToken() << " of " << b->function()->token() > << " in promotion of " << token() << ># 264 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 264 "../../src/assembly/InflatedFunction.hpp" > ; > > immediate.push_back(b->function()); > fg.emplace(b->function(), FuncletSet()); > > > } > continue; > } > if (b->succession().isSingularJump()) { > unit<BlockType> s = b->leap(); > if (s != nullptr) { > if (s->isFunctionEntry()) { > if (b->arity() == GraphSpecification::Arity::binary) { > unit<BlockType> fallThrough = b->left(); > if (fallThrough != nullptr) > q.push_back(b->left()); > } > continue; > } > > ># 285 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 285 "../../src/assembly/InflatedFunction.hpp" > s->function()->isPeer(original) ># 285 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 285) << ># 285 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 285 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 285 "../../src/assembly/InflatedFunction.hpp" > "s->function()->isPeer(original)" ># 285 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 285 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 285 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" > ># 286 "../../src/assembly/InflatedFunction.hpp" > << "Incoherent edge in promotion of " << token() << ": (" << b->offsetToken() << " -> " << s->offsetToken() > << ") into the interior of " << s->function()->token() << ># 287 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 287 "../../src/assembly/InflatedFunction.hpp" > ; > } > } > q.push_back(b); > } > } > } > > FuncletSet fq(immediate); > while (!fq.empty()) { > unit<InflatedFunction> f = fq.back(); > fq.pop_back(); > > if (f->is(Flags::isReturnPossible)) > set(Flags::isReturnPossible); > > q.push_back(f->_entryPoint); > while (!q.empty()) { > unit<BlockType> top = q.back(); > q.pop_back(); > > for (const EdgeType& e : top->v()->links->iterateEdges()) { > unit<BlockType> b = e.endpoint()->template extension<BlockType>(); > if (b->function()->offset() != f->offset()) { > if (b->isFuncletEntry()) { > ># 312 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 312 "../../src/assembly/InflatedFunction.hpp" > isPeer(b->function()) || b->function()->isPeer(original) || worklist->isCovered(b->function()) || worklist->isCovered(b->function()->_anchor) ># 312 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 312) << ># 312 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 312 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 312 "../../src/assembly/InflatedFunction.hpp" > "isPeer(b->function()) || b->function()->isPeer(original) || worklist->isCovered(b->function()) || worklist->isCovered(b->function()->_anchor)" ># 312 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 312 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 312 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" > > ># 314 "../../src/assembly/InflatedFunction.hpp" > << "Incoherent funclet entry to " << b->offsetToken() << " of " << b->function()->token() > << " in promotion of " << token() << ># 315 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 315 "../../src/assembly/InflatedFunction.hpp" > ; > > fg.at(f).push_back(b->function()); > if (cover.emplace(b->offset()).second) { > fg.emplace(b->function(), FuncletSet()); > fq.push_back(b->function()); > > } > } > } else if (cover.emplace(b->offset()).second) { > q.push_back(b); > } > } > } > } > > fq.assign(immediate.begin(), immediate.end()); > immediate.clear(); > while (!fq.empty()) { > unit<InflatedFunction> f = fq.back(); > fq.pop_back(); > > FuncletSet& reachable = fg.at(f); > fq.insert(fq.end(), reachable.begin(), reachable.end()); > reachable.clear(); > > bool promote = false; > for (const ReferenceType& r : f->_entryPoint->v()->links->concreteReferences()) { > unit<BlockType> b = r.endpoint()->template extension<BlockType>(); > > > > > if (b->function()->isFunclet() && (fg.find(b->function()) == fg.end())) { > > > > > facile::StreamLog::log(__PRETTY_FUNCTION__, 353, facile::StreamLogLevel::Detail) << "⢠promote " << f->token() << " and caller " << b->offsetToken() << " of " << b->function()->token() << std::endl; > > worklist->enqueue(f); > worklist->enqueue(b->function()); > promote = true; > break; > } > } > if (!promote) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 362, facile::StreamLogLevel::Nit) << "⢠join " << f->token() << " to " << token() << std::endl; > > f->_anchor = self(); > } > } > > > > } > > Token > token() const { return Token { *this }; } > >private: > struct Profile { > uint32_t pendingDecodeEdges; > }; > > InflatedFunctionBase(unit<BlockType> entryPoint, Flags flags, Offset sentinel) : > _entryPoint(entryPoint), > _anchor(nullptr), > _flags(flags), > _sentinel(sentinel) > {} > > unit<InflatedFunction> > self() { return unit<InflatedFunction>::wrap(this); } > > unit<const InflatedFunction> > self() const { return unit<const InflatedFunction>::wrap(this); } > > const unit<BlockType> _entryPoint; > unit<InflatedFunction> _anchor; > Flags _flags; > Offset _sentinel; > Profile _profile; >}; > >template<typename BlockType> >struct ModuleFunctionComposition { > using FunctionType = InflatedFunctionBase<BlockType>; > > struct aspect_tag {}; > > class FunctionAspect { > public: > using Type = FunctionType; > > FunctionAspect(__attribute__((unused)) aspect_tag *required, unit<FunctionType> f) : > _f(f) > {} > > FunctionAspect(const FunctionAspect& src) : > _f(src._f) > {} > > unit<FunctionType> > f() const { return _f; } > > void > join(__attribute__((unused)) aspect_tag *required, unit<FunctionType> f) { _f = f; } > > > > > > private: > unit<FunctionType> _f; > }; > > class BlockFactory > { > using BlockEntrySequence = typename BlockType::Sequence; > > public: > BlockFactory() : > _t(8) > {} > > unit<BlockType> > get(Offset offset) const { return _t.get(offset); } > > unit<BlockType> > find(Offset offset) const { return _t.find(offset); } > > unit<BlockType> > emplaceBlock(loan<ElfMetadata::MemoryMap> axis, Offset offset, BlockEntrySequence sequence, unit<FunctionType> f) > { > facile::StreamLog::log(__PRETTY_FUNCTION__, 450, facile::StreamLogLevel::Nit) << "⢠append " << hex(offset) << " to function " << f->token() << std::endl; > > return _t.emplace(axis, offset, sequence, FunctionAspect(hidden_tag<aspect_tag>(), f)); > } > > template<typename FunctionBinder> > unit<BlockType> > emplaceBlock(__attribute__((unused)) aspect_tag *required, loan<ElfMetadata::MemoryMap> axis, Offset offset, BlockEntrySequence sequence, > FunctionBinder fb) > { > unit<BlockType> b = _t.emplace(axis, offset, sequence, fb); > > return facile::StreamLog::log(__PRETTY_FUNCTION__, 462, facile::StreamLogLevel::Nit) << "⢠append " << hex(offset) << " to function " << b->function()->token() << std::endl, b; > } > > private: > using Table = FactoryMap::Hash<BlockType, Offset>; > > Table _t; > }; > > class ReturnabilityFrontier > { > public: > struct Continuation { > using Queue = std::vector<unit<FunctionType>>; > using Reader = typename Queue::const_iterator; > > > > }; > > using Table = std::unordered_multimap<Offset, unit<BlockType>>; > using Entry = std::pair<const Offset, unit<BlockType>>; > using Reader = typename Table::const_iterator; > using Writer = typename Table::iterator; > using Set = iterable<Reader>; > > ReturnabilityFrontier(handle<const Offsets> terminatingFucntions) : > _terminatingFucntions(terminatingFucntions) > {} > > uint32_t > popCount() const { return _pop.size(); } > > void > pendPop(Offset callee, unit<BlockType> callSite) { _pop.emplace(callee, callSite); } > > scan<Reader> > walk() const { return _pop; } > > Set > pop() const { return iterable<Reader>(_pop); } > > > Set > pop(unit<FunctionType> callee) const { return iterable<Reader>(_pop.equal_range(callee->offset())); } > > void > popped(Set s) { _pop.erase(s.begin(), s.end()); } > > void > popped(Reader r) { _pop.erase(r); } > > bool > isTerminating(Offset callee) const { return _terminatingFucntions->count(callee); } ># 529 "../../src/assembly/InflatedFunction.hpp" > private: > Table _pop; > > handle<const Offsets> _terminatingFucntions; > }; > > class Surveyor > { > using BlockEntrySequence = typename BlockType::Sequence; > > public: > using FunctionFactory = FactoryMap::Hash<FunctionType, Offset>; > using RenameBlockType = BlockType; > > Surveyor(handle<BlockFactory> bb, handle<FunctionFactory> f, handle<const Offsets> terminatingFucntions) : > _bb(bb), > _f(f), > _r(terminatingFucntions) > {} > > handle<DecodeFrontier::PendingSuccessors> > pendingSuccessors() { return _pendingSuccessors; } > > handle<ReturnabilityFrontier> > returnability() { return _r; } > > unit<BlockType> > emplaceEntryPoint(loan<ElfMetadata::MemoryMap> axis, Offset offset, BlockEntrySequence sequence, unit<FunctionType> anchor = nullptr) > { > unit<BlockType> entryPoint; > unit<FunctionType> f = _f->find(offset); > if (f == nullptr) > entryPoint = _bb->emplaceBlock(hidden_tag<aspect_tag>(), axis, offset, sequence, FunctionBinder{ _f, anchor }); > else > entryPoint = _bb->emplaceBlock(axis, offset, sequence, f); > return facile::StreamLog::log(__PRETTY_FUNCTION__, 564, facile::StreamLogLevel::Detail) << "Emplace " << entryPoint->function()->token() << std::endl, entryPoint; > } > > void > join(unit<BlockType> b, unit<FunctionType> f) > { > facile::StreamLog::log(__PRETTY_FUNCTION__, 570, facile::StreamLogLevel::Nit) << "⢠join " << b->offsetToken() << " to function " << f->token() << std::endl; > > b->functionAspect()->join(hidden_tag<aspect_tag>(), f); > f->cover(b, _pendingSuccessors.query(b->offset())); > } > > void > promote(unit<BlockType> b) > { > static PromotionQueue q; > > > FunctionPosition original{ b->function()->offset(), b->function()->isFunclet() ? b->function()->anchor()->offset() : 0 }; > unit<FunctionType> promoted; > if (b == b->function()->entryPoint()) > promoted = _f->remake(b->function()); > else > promoted = _f->emplace(b); > > q.start(b->offset()); > while (true) { > b->functionAspect()->join(hidden_tag<aspect_tag>(), promoted); > promoted->promote(handle(*this), handle(q), original); > > > > > if (q.p.empty()) > break; > b = q.p.back()->entryPoint(); > promoted = _f->remake(q.p.back()); > q.p.pop_back(); > > > > > > > > } > } > > bool > isThreadExit(Offset callee) const { return (_r.isTerminating(callee) > 0); } > > private: > struct FunctionBinder { > handle<FunctionFactory> f; > unit<FunctionType> anchor; > > FunctionAspect > operator ()(unit<BlockType> entryPoint) > { > ># 623 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 623 "../../src/assembly/InflatedFunction.hpp" > anchor == nullptr || anchor->entryPoint() != entryPoint ># 623 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 623) << ># 623 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 623 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 623 "../../src/assembly/InflatedFunction.hpp" > "anchor == nullptr || anchor->entryPoint() != entryPoint" ># 623 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 623 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 623 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" ># 623 "../../src/assembly/InflatedFunction.hpp" > << "Reflexive function anchor" << ># 623 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 623 "../../src/assembly/InflatedFunction.hpp" > ; > > return FunctionAspect(hidden_tag<aspect_tag>(), f->emplace(entryPoint, anchor)); > } > }; > > struct PromotionQueue { > std::vector<unit<FunctionType>> p; > > void > enqueue(unit<FunctionType> f) > { > ># 635 "../../src/assembly/InflatedFunction.hpp" 3 > ( ># 635 "../../src/assembly/InflatedFunction.hpp" > f->isFunclet() ># 635 "../../src/assembly/InflatedFunction.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflatedFunction.hpp", 635) << ># 635 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 635 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠Condition [" << ># 635 "../../src/assembly/InflatedFunction.hpp" > "f->isFunclet()" ># 635 "../../src/assembly/InflatedFunction.hpp" 3 > << "] " << ># 635 "../../src/assembly/InflatedFunction.hpp" > std::endl ># 635 "../../src/assembly/InflatedFunction.hpp" 3 > << "⢠" ># 635 "../../src/assembly/InflatedFunction.hpp" > << "Cannot make a secondary promotion of function " << f->token() << ># 635 "../../src/assembly/InflatedFunction.hpp" 3 > facile::RequireException::require_sentinel ># 635 "../../src/assembly/InflatedFunction.hpp" > ; > > if (_cover.emplace(f->offset()).second) > p.push_back(f); > } > > bool > isCovered(unit<FunctionType> f) const { return _cover.count(f->offset()) > 0; } > > void > start(Offset root) > { > p.clear(); > _cover.clear(); > > _cover.emplace(root); > } > > private: > Offsets _cover; > }; > > handle<BlockFactory> _bb; > handle<FunctionFactory> _f; > ReturnabilityFrontier _r; > DecodeFrontier::PendingSuccessors _pendingSuccessors; > }; >}; >} ># 6 "../../src/assembly/InflationModel.hpp" 2 > >namespace pii >{ > > > >template<typename Surveyor> >class IModuleGraphObserver { >public: > using IModuleGraphObserverTag = IModuleGraphObserver<Surveyor>; > using BlockType = typename Surveyor::RenameBlockType; > using InflatedFunction = InflatedFunctionBase<BlockType>; > > virtual ~IModuleGraphObserver() {} > > IModuleGraphObserver(handle<Surveyor> surveyor) : > _surveyor(surveyor) > {} > > virtual void > edge(TreeRelation relation, unit<BlockType> root, unit<BlockType> tail, unit<BlockType> head) > { > if (tail->succession().mayFallThrough() && tail->isFallThrough(head->offset())) { > bindInternal(relation, root, tail, head); > } else if (tail->exit()->isCall()) { > if (head->isFuncletEntry()) { > _surveyor->promote(head); > } else { > ># 34 "../../src/assembly/InflationModel.hpp" 3 > ( ># 34 "../../src/assembly/InflationModel.hpp" > head->isFunctionEntry() ># 34 "../../src/assembly/InflationModel.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationModel.hpp", 34) << ># 34 "../../src/assembly/InflationModel.hpp" > std::endl ># 34 "../../src/assembly/InflationModel.hpp" 3 > << "⢠Condition [" << ># 34 "../../src/assembly/InflationModel.hpp" > "head->isFunctionEntry()" ># 34 "../../src/assembly/InflationModel.hpp" 3 > << "] " << ># 34 "../../src/assembly/InflationModel.hpp" > std::endl ># 34 "../../src/assembly/InflationModel.hpp" 3 > << "⢠" ># 34 "../../src/assembly/InflationModel.hpp" > << "Call site " << tail->offsetToken() << " targets " << head->token() > << " which is neither a function nor a funclet" << ># 35 "../../src/assembly/InflationModel.hpp" 3 > facile::RequireException::require_sentinel ># 35 "../../src/assembly/InflationModel.hpp" > ; > } > } else if (tail->exit()->isBranch() && !tail->exit()->isMultipleBranch()) { > ># 38 "../../src/assembly/InflationModel.hpp" 3 > ( ># 38 "../../src/assembly/InflationModel.hpp" > tail->isBranchTarget(head->offset()) ># 38 "../../src/assembly/InflationModel.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationModel.hpp", 38) << ># 38 "../../src/assembly/InflationModel.hpp" > std::endl ># 38 "../../src/assembly/InflationModel.hpp" 3 > << "⢠Condition [" << ># 38 "../../src/assembly/InflationModel.hpp" > "tail->isBranchTarget(head->offset())" ># 38 "../../src/assembly/InflationModel.hpp" 3 > << "] " << ># 38 "../../src/assembly/InflationModel.hpp" > std::endl ># 38 "../../src/assembly/InflationModel.hpp" 3 > << "⢠" > ># 39 "../../src/assembly/InflationModel.hpp" > << "Incoherent edge (" << hex(tail->offset()) << " -> " << hex(head->offset()) << ")" << ># 39 "../../src/assembly/InflationModel.hpp" 3 > facile::RequireException::require_sentinel ># 39 "../../src/assembly/InflationModel.hpp" > ; > > if (tail->succession().isSingularJump() && head->isFuncletEntry()) { > if (head->function()->isPeer(tail->function())) { > > } else { > _surveyor->promote(head); > } > } else if (tail->succession().isSingularJump() && head->isFunctionEntry()) { > > } else { > bindInternal(relation, root, tail, head); > } > } > } > > virtual void > commit(unit<BlockType> b) = 0; > >private: > void > bindInternal(TreeRelation relation, unit<BlockType> root, unit<BlockType> tail, unit<BlockType> head) > { > if (tail->function() != head->function()) { > if (head->function()->isFunclet()) { > if (tail->function()->isFunclet()) { > switch (relation) > { > case TreeRelation::tree: > case TreeRelation::forward: > tail->function()->merge(_surveyor, head->function()); > break; > case TreeRelation::loopback: > head->function()->merge(_surveyor, tail->function()); > break; > case TreeRelation::cross: > if (tail->function() != root->function()) > root->function()->merge(_surveyor, tail->function(), head); > if (head->function() != root->function()) > root->function()->merge(_surveyor, head->function()); > break; > } > } else { > if (head->function()->anchor() == tail->function()) { > tail->function()->merge(_surveyor, head->function()); > } else { > _surveyor->promote(head); > > > } > } > } else { > if (!tail->function()->isPeer(head->function())) { > ># 92 "../../src/assembly/InflationModel.hpp" 3 > ( ># 92 "../../src/assembly/InflationModel.hpp" > head->context() == BlockType::Context::tail ># 92 "../../src/assembly/InflationModel.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationModel.hpp", 92) << ># 92 "../../src/assembly/InflationModel.hpp" > std::endl ># 92 "../../src/assembly/InflationModel.hpp" 3 > << "⢠Condition [" << ># 92 "../../src/assembly/InflationModel.hpp" > "head->context() == BlockType::Context::tail" ># 92 "../../src/assembly/InflationModel.hpp" 3 > << "] " << ># 92 "../../src/assembly/InflationModel.hpp" > std::endl ># 92 "../../src/assembly/InflationModel.hpp" 3 > << "⢠" > ># 93 "../../src/assembly/InflationModel.hpp" > << "Incoherent internal edge (" << tail->token() << " -> " << head->token() << ") " > << " from " << tail->function()->token() << " to " << head->function()->token() << ># 94 "../../src/assembly/InflationModel.hpp" 3 > facile::RequireException::require_sentinel ># 94 "../../src/assembly/InflationModel.hpp" > ; > > _surveyor->promote(head); > } else if (tail->function()->isFunclet()) { > head->function()->merge(_surveyor, tail->function()); > } > } > } > } > > handle<Surveyor> _surveyor; >}; > >template<template<typename> class ObserverTemplate> >struct InflationModelBase { > using InflationModel = InflationModelBase<ObserverTemplate>; > > template<typename TreeIntegrationType, typename BlockType, typename FunctionComposition = ModuleFunctionComposition<BlockType>> > using ObservedModuleGraphPlugin = ModuleGraphPluginBase<TreeIntegrationType, BlockType, ObserverTemplate<typename FunctionComposition::Surveyor>>; > > template<typename BlockType> > using FunctionAspectTemplate = typename ModuleFunctionComposition<BlockType>::FunctionAspect; > > template<typename VertexType, typename VertexAspect> > using BlockBase = InflatedBasicBlockBase<VertexType, VertexAspect, FunctionAspectTemplate>; > > using TreeComposition = ModuleGraphComposition<ObservedModuleGraphPlugin, BlockBase>; > using BlockType = typename TreeComposition::BlockType; > using BlockEntry = typename BlockType::SequenceEntry; > using FunctionType = typename BlockType::Function; > > using FunctionComposition = ModuleFunctionComposition<BlockType>; > using BlockFactory = typename FunctionComposition::BlockFactory; > using BlockEntryFactory = FactoryMap::Hash<BlockEntry, loc_t, hash_loc_t>; > using FunctionFactory = typename FunctionComposition::Surveyor::FunctionFactory; > > using Surveyor = typename FunctionComposition::Surveyor; > using ReturnabilityFrontier = typename FunctionComposition::ReturnabilityFrontier; > > using BlockTable = std::map<Offset, unit<BlockType>>; > using BlockTableReader = typename BlockTable::const_iterator; > using BlockTableEntry = typename extract_parameter<1, BlockTableReader>::type; > > using Observer = ObserverTemplate<Surveyor>; > using Graph = ModuleGraphBase<InflationModel>; > using Vertex = typename TreeComposition::TreeVertex; > using Edge = typename TreeComposition::TreeEdge; > using Reference = typename TreeComposition::TreeReference; > > using VertexList = std::vector<unit<typename InflationModel::Vertex>>; > > > >}; > >template<typename Surveyor> >struct NullGraphObserver : > InflationModelBase<NullGraphObserver>, > IModuleGraphObserver<Surveyor> { > using super = IModuleGraphObserver<Surveyor>; > using BlockType = typename Surveyor::RenameBlockType; > > NullGraphObserver(handle<Surveyor> bb) : > super(bb) > {} > > void > commit(__attribute__((unused)) unit<BlockType> b) override {} >}; >} ># 4 "../../src/model/ExcavationModel.hpp" 2 > >namespace pii >{ >template<typename ModuleTables> >struct ExcavationRebaseCover : > InflationModelBase<ExcavationRebaseCover>, > IModuleGraphObserver<ModuleTables> { > using super = IModuleGraphObserver<ModuleTables>; > public: > using BlockType = typename ModuleTables::RenameBlockType; > > enum class Mode { > discard, > collect > }; > > friend std::ostream& > operator <<(std::ostream& o, const Mode& mode) > { > switch (mode) > { > case Mode::discard: return o << "<discard>"; > case Mode::collect: return o << "<collect>"; > } > ># 28 "../../src/model/ExcavationModel.hpp" 3 > throw facile::RequireException("../../src/model/ExcavationModel.hpp", 28) ># 28 "../../src/model/ExcavationModel.hpp" > << "unreachable" << ># 28 "../../src/model/ExcavationModel.hpp" 3 > facile::RequireException::require_sentinel ># 28 "../../src/model/ExcavationModel.hpp" > ; > } > > using Cover = typename BlockType::HashSchema::Set; > using CoverReader = typename Cover::const_iterator; > > ExcavationRebaseCover(handle<ModuleTables> moduleTables) : > super(moduleTables), > _mode(Mode::discard) > {} > > void > edge(TreeRelation relation, unit<BlockType> root, unit<BlockType> tail, unit<BlockType> head) { super::edge(relation, root, tail, head); } > > void > commit(unit<BlockType> b) override > { > if (_mode == Mode::collect) > _cover.emplace(b); > } > > void > phase(Mode mode) > { > PiiLog::log()->prefix() << "⢠ExcavationRebaseCover phase " << mode << std::endl; > > _mode = mode; > _cover.clear(); > } > > iterable<CoverReader> > iterate() const { return _cover; } > > private: > Mode _mode; > Cover _cover; >}; > >class ExcavationModel : > public InflationModelBase<ExcavationRebaseCover> >{ >using super = InflationModelBase<ExcavationRebaseCover>; > >public: > using RebaseCover = super::Observer; >}; >} ># 5 "../../src/assembly/InflatedModule.hpp" 2 > > > >namespace pii >{ >class InflatedModule : > ExcavationModel >{ >public: > > using ExcavationModel::BlockType; > using ExcavationModel::BlockFactory; > using ExcavationModel::BlockTable; > using ExcavationModel::BlockTableReader; > using ExcavationModel::BlockTableEntry; > using ExcavationModel::Graph; > using ExcavationModel::TreeComposition; > > using EdgeIterable = typename Graph::Tree::Composition::LinkSet::EdgeIterable; > > struct PrintToken { > const InflatedModule& m; > > friend std::ostream& > operator <<(std::ostream& o, const PrintToken& t) > { > > for (BlockTableEntry e : t.m.iterate()) > o << e.second->token() << std::endl; > > return o; > } > }; > > struct DisassemblyToken { > const InflatedModule& m; > > friend std::ostream& > operator <<(std::ostream& o, const DisassemblyToken& t) > { > for (BlockTableEntry e : t.m.iterate()) > o << e.second->disassemble() << std::endl; > > return o; > } > }; > > template<typename ModuleTables> > InflatedModule(loan<ModuleTables> moduleTables) : > _graph(moduleTables), > _unmarshal(moduleTables->makeMeta()) > {} > > handle<Graph> > graph() { return _graph; } > > unit<Instruct> > unmarshal() const { return _unmarshal; } > > void > configureTreeLog(handle<typename TreeComposition::TreeLogConfiguration> c) { _graph.configure(c); } > > void > add(unit<BlockType> block) { _blocks.emplace(block->offset(), block); } > > void > stub(unit<BlockType> block) { _graph.bind(block); } > > void > addEdge(unit<BlockType> tail, unit<BlockType> head) { _graph.addEdge(tail, head); } > > void > expandVertex(unit<BlockType> initiator, unit<BlockType> origin, unit<BlockType> expansion) > { > _graph.expandVertex(initiator, origin, expansion); > } > > unit<BlockType> > get(Offset offset) const { return _blocks.at(offset); } > > unit<BlockType> > find(Offset offset) const > { > BlockTableReader i = _blocks.find(offset); > if (i == _blocks.end()) > return nullptr; > else > return i->second; > } > > unit<BlockType> > contain(Offset offset) const > { > if (_blocks.empty()) > return nullptr; > > BlockTableReader p = _blocks.lower_bound(offset); > > if (p != _blocks.end()) { > if (p->first == offset) > return p->second; > > if (p == _blocks.begin()) > return nullptr; > } > > --p; > > if (((p->second->offset() + p->second->byteLength()) <= offset)) > return nullptr; > else > return p->second; > } > > Offset > findSubsequentEntry(Offset cursor, Offset limit) const > { > if (_blocks.empty()) > return limit; > > BlockTableReader p = _blocks.lower_bound(cursor); > > if (p == _blocks.end()) > return limit; > else > return p->first; > } > > Offset > start() const { return _blocks.empty() ? 0 : _blocks.begin()->first; } > > size_t > size() const { return _blocks.size(); } > > unit<BlockType> > first() const { return _blocks.empty() ? nullptr : _blocks.begin()->second; } > > BlockTableReader > begin() const { return _blocks.begin(); } > > BlockTableReader > end() const { return _blocks.end(); } > > iterable<BlockTableReader> > iterate() const { return iterable<BlockTableReader>(_blocks); } > > EdgeIterable > iterateEntryPoints() const { return _graph.tree()->peekRoot()->links->iterateTreeEdges(); } > > void > conclude() { _graph.conclude(); } > > PrintToken > token() const { return PrintToken{ *this }; } > > DisassemblyToken > disassemble() const { return DisassemblyToken{ *this }; } > >private: > BlockTable _blocks; > > > > > Graph _graph; > > unit<Instruct> _unmarshal; >}; >} ># 5 "../../src/assembly/InflationComponents.hpp" 2 ># 1 "../../src/assembly/InflatedCodelet.hpp" 1 > > > > > > > >namespace pii >{ >using InflationModel = InflationModelBase<NullGraphObserver>; > >class InflatedCodelet : > InflationModel >{ >public: > > using InflationModel::BlockType; > using InflationModel::BlockTable; > using InflationModel::BlockTableReader; > using InflationModel::BlockTableEntry; > > struct PrintToken { > const InflatedCodelet& c; > > friend std::ostream& > operator <<(std::ostream& o, const PrintToken& t) > { > for (BlockTableEntry e : t.c.iterate()) > o << e.second->token() << std::endl; > > return o; > } > }; > > struct DisassemblyToken { > const InflatedCodelet& c; > > friend std::ostream& > operator <<(std::ostream& o, const DisassemblyToken& t) > { > for (BlockTableEntry e : t.c.iterate()) > o << e.second->disassemble() << std::endl; > > return o; > } > }; > > InflatedCodelet(unit<Instruct> unmarshal) : > _unmarshal(unmarshal) > {} > > void > add(unit<BlockType> block) { _blocks.emplace(block->offset(), block); } > > unit<Instruct> > unmarshal() const { return _unmarshal; } > > unit<BlockType> > blockAt(Offset offset) const > { > if (_blocks.empty()) > return nullptr; > > BlockTableReader p = _blocks.lower_bound(offset); > > if (p != _blocks.end()) { > if (p->first == offset) > return p->second; > > if (p == _blocks.begin()) > return nullptr; > } > > --p; > > if (((p->second->offset() + p->second->byteLength()) <= offset)) > return nullptr; > > return p->second; > } > > Offset > findSubsequentEntry(Offset cursor, Offset limit) const > { > if (_blocks.empty()) > return limit; > > BlockTableReader p = _blocks.lower_bound(cursor); > > if (p == _blocks.end()) > return limit; > else > return p->first; > } > > Offset > start() const { return _blocks.empty() ? 0 : _blocks.begin()->first; } > > unit<BlockType> > first() const { return _blocks.empty() ? nullptr : _blocks.begin()->second; } > > BlockTableReader > begin() const { return _blocks.begin(); } > > BlockTableReader > end() const { return _blocks.end(); } > > iterable<BlockTableReader> > iterate() const { return iterable<BlockTableReader>(_blocks); } > > PrintToken > token() const { return PrintToken{ *this }; } > > DisassemblyToken > disassemble() const { return DisassemblyToken{ *this }; } > >private: > const unit<Instruct> _unmarshal; > > BlockTable _blocks; >}; >} ># 6 "../../src/assembly/InflationComponents.hpp" 2 > >namespace pii >{ >template<typename Model> >struct InflationComponentsBase : > Model { > class Factories { > public: > Factories() : > modulet(4), > codelet(4) > {} > > static handle<Factories> > get() > { > static Factories factories; > return factories; > } > > ObjectBlock<InflatedModule> modulet; > ObjectBlock<InflatedCodelet> codelet; > }; >}; >} ># 7 "../../src/assembly/ModuleTables.hpp" 2 > >namespace pii >{ >template<typename Model> >class ModuleTablesBase : > Model >{ >using typename Model::BlockType; >using typename Model::BlockEntry; >using typename Model::FunctionType; > >using BlockEntrySequence = typename BlockType::Sequence; > >using typename Model::BlockFactory; >using typename Model::BlockEntryFactory; >using typename Model::FunctionFactory; >using typename Model::Surveyor; > >using InflationComponents = InflationComponentsBase<Model>; ># 35 "../../src/assembly/ModuleTables.hpp" >public: > struct FrontierEdge { > Offset block; > Offset exit; > unit<BlockType> predecessor; > > FrontierEdge(Offset block, unit<BlockType> predecessor = nullptr) : > block(block), > exit(predecessor == nullptr ? 0 : predecessor->exitOffset()), > predecessor(predecessor) > { > ># 46 "../../src/assembly/ModuleTables.hpp" 3 > ( ># 46 "../../src/assembly/ModuleTables.hpp" > block > 0 ># 46 "../../src/assembly/ModuleTables.hpp" 3 > ) || facile::RequireException("../../src/assembly/ModuleTables.hpp", 46) << ># 46 "../../src/assembly/ModuleTables.hpp" > std::endl ># 46 "../../src/assembly/ModuleTables.hpp" 3 > << "⢠Condition [" << ># 46 "../../src/assembly/ModuleTables.hpp" > "block > 0" ># 46 "../../src/assembly/ModuleTables.hpp" 3 > << "] " << ># 46 "../../src/assembly/ModuleTables.hpp" > std::endl ># 46 "../../src/assembly/ModuleTables.hpp" 3 > << "⢠" ># 46 "../../src/assembly/ModuleTables.hpp" > << "Cannot decode null!" << ># 46 "../../src/assembly/ModuleTables.hpp" 3 > facile::RequireException::require_sentinel ># 46 "../../src/assembly/ModuleTables.hpp" > ; > > facile::StreamLog::log(__PRETTY_FUNCTION__, 48, facile::StreamLogLevel::Detail) << "Decode frontier ("; > if (predecessor == nullptr) > facile::StreamLog::getLogStream(facile::StreamLogLevel::Detail) << "â¢"; > else > facile::StreamLog::getLogStream(facile::StreamLogLevel::Detail) << hex(predecessor->start()) << " <" << hex(exit) << ">"; > facile::StreamLog::getLogStream(facile::StreamLogLevel::Detail) << " -> " << hex(block) << ")" << std::endl; > } > > bool > isTruncated() const { return predecessor != nullptr && !predecessor->contains(exit); } > }; > > using RenameBlockType = BlockType; > using FrontierPool = ObjectPool<FrontierEdge>; > > ModuleTablesBase(owner<ElfMetadata::MemoryMap> axis, handle<const Offsets> globalEntryPoints, handle<const Offsets> terminatingFucntions) : > _axis(std::move(axis)), > _iTable(9), > _fTable(6), > _frontier(8), > _globalEntryPoints(globalEntryPoints), > _surveyor(_bTable, _fTable, terminatingFucntions), > _iMeta(makeMeta()) > {} > > inline loan<ElfMetadata::MemoryMap> > axis() const { return _axis; } > > handle<FrontierPool> > frontier() { return _frontier; } > > inline handle<Surveyor> > surveyor() { return _surveyor; } > > inline handle<DecodeFrontier::PendingSuccessors> > pendingSuccessors() { return _surveyor.pendingSuccessors(); } > > unit<BlockEntry> > findInstruction(loc_t location) { return _iTable.find(location); } > > unit<BlockEntry> > inflateInstruction( loc_t& cursor) > { > instr_t *raw = instr_create(((void *)-1)); > cursor = decode(((void *)-1), cursor, raw); > return _iTable.emplace(hidden_tag<acquired_allocation_tag>(), raw); > } > > unit<BlockEntry> > establishInstruction( loc_t& cursor) > { > unit<BlockEntry> i = findInstruction(cursor); > if (i == nullptr) > return inflateInstruction(cursor); > else > return cursor += i->length(), i; > } > > unit<BlockEntry> > makeMeta() { return _iTable.emplace(hidden_tag<acquired_allocation_tag>(), instr_create_0dst_0src((((void *)-1)), OP_LABEL)); } > > unit<FunctionType> > functionAt(Offset entryPoint) { return _fTable.get(entryPoint); } > > unit<FunctionType> > findFunction(Offset entryPoint) { return _fTable.find(entryPoint); } > > Offset > establishBranchTarget(loc_t l) > { > Offset offset = _axis->offsetAt(l); > handle<const ElfMetadata::Section> s = _axis->sectionAtFileOffset(offset); > if ((s != nullptr) && s->isProcedure()) { > unit<BlockEntry> i; > do { > i = establishInstruction(l); > } while (!i->isBranch()); > Offset procedure = _axis->findExport(i->relativeTarget()); > if (procedure > 0) > _axis->linkExport(offset, procedure); > } > return 0; > } > > unit<BlockEntry> > meta() const { return _iMeta; } > > unit<BlockType> > blockAt(Offset offset) const { return _bTable.get(offset); } > > unit<BlockType> > findBlock(Offset offset) const { return _bTable.find(offset); } > > unit<BlockType> > establishEntryPoint(Offset offset, BlockEntrySequence sequence, unit<FunctionType> peer = nullptr) > { > unit<BlockType> b = findBlock(offset); > if (b == nullptr) > return _surveyor.emplaceEntryPoint(_axis, offset, sequence, peer == nullptr ? nullptr : (peer->isFunclet() ? peer->anchor() : peer)); > else > return b; > } > > unit<BlockType> > establishBlock(Offset offset, BlockEntrySequence sequence, unit<FunctionType> f) > { > unit<BlockType> b = findBlock(offset); > if (b == nullptr) > return _bTable.emplaceBlock(_axis, offset, sequence, f); > else > return b; > } > > bool > isGlobalEntryPoint(Offset callee) const { return (_globalEntryPoints->count(callee) > 0); } > > bool > isThreadExit(Offset callee) const { return _surveyor.isThreadExit(callee); } > >private: > owner<ElfMetadata::MemoryMap> _axis; > BlockEntryFactory _iTable; > BlockFactory _bTable; > FunctionFactory _fTable; > FrontierPool _frontier; > handle<const Offsets> _globalEntryPoints; > Surveyor _surveyor; > > unit<BlockEntry> _iMeta; >}; >} ># 63 "../../src/PiiFramework.hpp" 2 > >namespace pii >{ ># 103 "../../src/PiiFramework.hpp" >} > > > >using namespace dual_graph; ># 7 "../../test/PiiTestFramework.hpp" 2 > > > ># 1 "../../test/assembly/CodeletExamples.hpp" 1 > > ># 1 "../../subprojects/edfst/subprojects/facile/src/FacileExampleFramework.hpp" 1 > ># 4 "../../test/assembly/CodeletExamples.hpp" 2 > >namespace pii_test >{ >struct CodeletExamples { > static uint32_t __attribute__((noinline)) > trivialLoop(uint32_t iterations, uint32_t order); > > static void > spinTrivialLoop(); > > static uint32_t __attribute__((noinline)) > branchLoop(uint32_t iterations, uint32_t order); > > static void > spinBranchLoop(); > > static uint32_t > trivialArray(uint32_t iterations, uint32_t order); > > static void > spinTrivialArray(); > > static uint32_t > indexArithmeticArray(uint32_t iterations, uint32_t order); > > static void > spinIndexArithmeticArray(); > > static bool __attribute__((noinline)) > sumAverageCode(float f, const std::string& s, uint32_t& i); > > static void > spinSumAverageCode(); > > template<typename T, template<typename> class List> > static T __attribute__((noinline)) > periodicProductSumT(List<T>& list, uint32_t period) > { > uint32_t i = 0; > T sum = 0, product = 1; > for (T item : list) { > product *= item; > > if (++i == period) { > i = 0; > sum += product; > product = 1; > } > } > if (i > 0) > sum += product; > > return sum; > } > > static uint32_t __attribute__((noinline)) > periodicProductSum(std::vector<uint32_t>& list, uint32_t period); > > static void > spinPeriodicProductSum(uint32_t length); > > static uint32_t > refactor(uint32_t a, uint32_t b, uint32_t *table); > > static void > spinRefactor(uint32_t a, uint32_t b); > > static void > arithmetic(); >}; >} ># 11 "../../test/PiiTestFramework.hpp" 2 > >using namespace pii; >using namespace pii_test; >using namespace facile_test; > >template<typename Model> >struct LiveModuleMetadataBase { > using LiveModuleMetadata = LiveModuleMetadataBase<Model>; > using InflationComponents = InflationComponentsBase<Model>; > using ModuleTables = ModuleTablesBase<Model>; > > std::string path; > > const owner<ElfMetadata> metadata; > const owner<ModuleTables> moduleTables; > const owner<LiveMemoryMap> memoryMap; > > LiveModuleMetadataBase(const std::string& path, owner<ElfMetadata> metadata, owner<ModuleTables> moduleTables, owner<LiveMemoryMap> self) : > path(path), > metadata(std::move(metadata)), > moduleTables(std::move(moduleTables)), > memoryMap{std::move(self)} > {} > > static owner<LiveModuleMetadata> > load(const std::string& path) > { > owner<LiveMemoryMap> liveMap = LiveMemoryMap::self(path); > owner<ElfMetadata> metadata = ElfMetadata::load(path); > owner<LiveImage> self = LiveImage::bind(path, liveMap->start(), liveMap->size()); > owner<ModuleTables> moduleTables; > moduleTables = owner<ModuleTables>::make(metadata->memoryMap(std::move(self)), > metadata->globalEntryPoints(), > metadata->terminatingFucntions()); > > return owner<LiveModuleMetadata>::make(path, std::move(metadata), std::move(moduleTables), std::move(liveMap)); > } >}; ># 2 "../../test/assembly/CodeletScribeTest.cpp" 2 ># 1 "../../src/assembly/CodeletScribe.hpp" 1 > > > > > ># 1 "../../src/assembly/InflationPapyrus.hpp" 1 > > > > >namespace pii >{ >template<typename BlockType> >struct NullTee { > void > inscribe(__attribute__((unused)) unit<Instruct> i) {} > > void > emplace(__attribute__((unused)) unit<BlockType> b) {} > > void > link(__attribute__((unused)) unit<BlockType> tail, __attribute__((unused)) unit<BlockType> head, __attribute__((unused)) bool isReturnable) {} > > void > split(__attribute__((unused)) unit<BlockType> head, __attribute__((unused)) unit<BlockType> tail) {} >}; > >template<typename Scribe> >class InflationPapyrus { >using BlockType = typename Scribe::BlockType; >using Function = typename BlockType::Function; >using Semantics = BasicBlockMetadata::Semantics::Flags; >using InflationComponents = typename Scribe::InflationComponents; > >public: > InflationPapyrus(handle<Scribe> scribe) : > _scribe(scribe) > {} > > unit<BlockType> > inflateBlock(loc_t& cursor, unit<BlockType> tail) > { > ># 37 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 37 "../../src/assembly/InflationPapyrus.hpp" > axis()->isCode(cursor) ># 37 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 37) << ># 37 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 37 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 37 "../../src/assembly/InflationPapyrus.hpp" > "axis()->isCode(cursor)" ># 37 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 37 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 37 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" ># 37 "../../src/assembly/InflationPapyrus.hpp" > << "Cannot inflate block " << hex(axis()->offsetAt(cursor)) << " in a non-code section" << ># 37 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 37 "../../src/assembly/InflationPapyrus.hpp" > ; > ># 38 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 38 "../../src/assembly/InflationPapyrus.hpp" > (tail == nullptr) || !tail->exit()->isReturn() ># 38 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 38) << ># 38 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 38 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 38 "../../src/assembly/InflationPapyrus.hpp" > "(tail == nullptr) || !tail->exit()->isReturn()" ># 38 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 38 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 38 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" ># 38 "../../src/assembly/InflationPapyrus.hpp" > << "Return block " << tail->token() << " can have no successor" << ># 38 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 38 "../../src/assembly/InflationPapyrus.hpp" > ; > > Offset offset = axis()->offsetAt(cursor), moduleLimit = axis()->sectionAtFileOffset(offset)->sentinel(); > loc_t limit = axis()->toMap(_scribe->modulet()->findSubsequentEntry(offset, moduleLimit)); > bool isFunctionEntry = ((tail == nullptr) || (tail->semantics()->is(Semantics::isTailCall) && tail->isBranchTarget(offset)) || > (tail->exit()->isDirectCall() && axis()->resolveTarget(tail->exit()->branchTarget()) == offset) || > _scribe->tab()->isGlobalEntryPoint(offset)); > bool isFuncletEntry = (!isFunctionEntry && tail->succession().isUnconditionalJump()); > > ># 47 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 47 "../../src/assembly/InflationPapyrus.hpp" > !isFunctionEntry || !isFuncletEntry ># 47 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 47) << ># 47 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 47 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 47 "../../src/assembly/InflationPapyrus.hpp" > "!isFunctionEntry || !isFuncletEntry" ># 47 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 47 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 47 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" ># 47 "../../src/assembly/InflationPapyrus.hpp" > << "Incoherent entry to " << hex(offset) << " is both function and funclet" << ># 47 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 47 "../../src/assembly/InflationPapyrus.hpp" > ; > > unit<BlockType> block; > if (isFunctionEntry) > block = _scribe->tab()->establishEntryPoint(offset, inflateSequence(cursor, limit)); > else if (isFuncletEntry) > block = _scribe->tab()->establishEntryPoint(offset, inflateSequence(cursor, limit), tail->function()); > else > block = _scribe->tab()->establishBlock(offset, inflateSequence(cursor, limit), tail->function()); > > if (isFunctionEntry) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 58, facile::StreamLogLevel::Nit) << "⢠function entry at " << hex(offset) << std::endl; > } else if (isFuncletEntry) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 60, facile::StreamLogLevel::Nit) << "⢠funclet entry at " << hex(offset) << std::endl; > } else { > block->function()->cover(block, 0); > } > if (_scribe->tab()->isGlobalEntryPoint(offset)) { > ># 65 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 65 "../../src/assembly/InflationPapyrus.hpp" > isFunctionEntry ># 65 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 65) << ># 65 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 65 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 65 "../../src/assembly/InflationPapyrus.hpp" > "isFunctionEntry" ># 65 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 65 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 65 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" ># 65 "../../src/assembly/InflationPapyrus.hpp" > << "Global entry point " << block->token() << " found within function " << hex(block->function()->offset()) << ># 65 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 65 "../../src/assembly/InflationPapyrus.hpp" > ; > > block->semantics()->set(Semantics::isPublicEntry); > } > > _scribe->modulet()->add(block); > _scribe->tee()->emplace(block); > > return block; > } > > > > > > bool > enableBlockEntry(Offset offset, unit<BlockType> predecessor = nullptr, __attribute__((unused)) bool bindFunctionEntry = true) > { > > if ((predecessor != nullptr) && predecessor->isFallThrough(offset) && predecessor->exit()->isCall()) { > if (predecessor->exit()->isMultipleBranch()) > ; > else if (_scribe->tab()->isThreadExit(axis()->offsetAt(predecessor->exit()->branchTarget()))) > return true; > } > > unit<BlockType> hit = _scribe->modulet()->contain(offset); > if (hit == nullptr) > return false; ># 111 "../../src/assembly/InflationPapyrus.hpp" > if (offset > hit->offset()) { > if (predecessor == nullptr) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 113, facile::StreamLogLevel::Detail) << "⢠truncate " << hex(hit->offset()) << " for entry without predecessor at " << hex(offset) << std::endl; > > hit->truncateAt(axis()->toMap(offset)); > return false; > } else { > facile::StreamLog::log(__PRETTY_FUNCTION__, 118, facile::StreamLogLevel::Detail) << "⢠truncate " << hex(hit->offset()) << " at " << hex(offset) << " for entry (" > << hex(predecessor->offset()) << " -> " << hex(offset) << ")" << std::endl; > } > > loc_t entryLocation = axis()->toMap(hit->offset()), cursor = axis()->toMap(offset); > unit<BlockType> expansion = > _scribe->tab()->establishBlock(offset, inflateSequence(cursor, entryLocation + hit->byteLength()), hit->function()); > _scribe->modulet()->add(expansion); > > uint32_t successorDegree = hit->edgeCount(); > expansion->stealSuccessors(hit); > hit->truncateAt(axis()->toMap(offset)); > > facile::StreamLog::log(__PRETTY_FUNCTION__, 131, facile::StreamLogLevel::Detail) << "⢠bind successor (" << hex(predecessor->offset()) << " -> " << hex(offset) << ")" << std::endl; > > cursor = entryLocation; > if (hit->v() == nullptr) { > if (!predecessor->exit()->isCall()) > _scribe->modulet()->addEdge(hit, expansion); > > if (predecessor == hit) { > _scribe->modulet()->addEdge(expansion, expansion); > successorDegree++; > } else { > _scribe->modulet()->addEdge(predecessor, hit); > } > } else { > if (predecessor->exit()->isCall()) { > facile::StreamLog::log(__PRETTY_FUNCTION__, 146, facile::StreamLogLevel::Detail) << "Call (" << hex(predecessor->offset()) << " -> " << hex(offset) << ") splits block [" > << hex(hit->offset()) << " - " << hex(expansion->sentinel()) << "] making inline tail call (" > << hex(hit->offset()) << " -> " << hex(expansion->offset()) << ")" << std::endl; > } > > facile::StreamLog::log(__PRETTY_FUNCTION__, 151, facile::StreamLogLevel::Detail) << "⢠block [" << hex(hit->offset()) << " - " << hex(expansion->sentinel()) << "] expands to (" > << hex(hit->offset()) << " -> " << hex(expansion->offset()) << ") for edge (" > << hex(predecessor->offset()) << " -> " << hex(offset) << ")" << std::endl; > > uint32_t degreeAtEntry = hit->v()->links->edgeDegree(); > _scribe->modulet()->expandVertex(predecessor, hit, expansion); > if (predecessor == hit) { > _scribe->modulet()->addEdge(expansion, expansion); > degreeAtEntry++; > successorDegree++; > } > > ># 163 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 163 "../../src/assembly/InflationPapyrus.hpp" > hit->edgeCount() == 1 && hit->v()->links->edgeCount() == 1 ># 163 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 163) << ># 163 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 163 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 163 "../../src/assembly/InflationPapyrus.hpp" > "hit->edgeCount() == 1 && hit->v()->links->edgeCount() == 1" ># 163 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 163 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 163 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" > ># 164 "../../src/assembly/InflationPapyrus.hpp" > << "Expanded block " << hex(hit->offset()) << " has " << hit->edgeCount() << " successors and " > << hit->v()->links->edgeCount() << " mGraph edges" << ># 165 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 165 "../../src/assembly/InflationPapyrus.hpp" > ; > ># 166 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 166 "../../src/assembly/InflationPapyrus.hpp" > expansion->v()->links->edgeDegree() == degreeAtEntry ># 166 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 166) << ># 166 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 166 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 166 "../../src/assembly/InflationPapyrus.hpp" > "expansion->v()->links->edgeDegree() == degreeAtEntry" ># 166 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 166 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 166 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" > ># 167 "../../src/assembly/InflationPapyrus.hpp" > << "Expanded block " << hit->offsetToken() << " originally had mGraph degree " << degreeAtEntry > << ", but expansion tail " << expansion->token() << " now has mGraph degree " > << expansion->v()->links->edgeDegree() << ># 169 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 169 "../../src/assembly/InflationPapyrus.hpp" > ; > unit<BlockType> successor = hit->v()->links->edgeAt(0)->endpoint()->template extension<BlockType>(); > ># 171 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 171 "../../src/assembly/InflationPapyrus.hpp" > expansion == successor ># 171 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 171) << ># 171 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 171 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 171 "../../src/assembly/InflationPapyrus.hpp" > "expansion == successor" ># 171 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 171 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 171 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" ># 171 "../../src/assembly/InflationPapyrus.hpp" > << "Expanded block " << hex(hit->offset()) << " has mGraph edge to " > << hex(successor->offset()) << ># 172 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 172 "../../src/assembly/InflationPapyrus.hpp" > ; > } > > ># 175 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 175 "../../src/assembly/InflationPapyrus.hpp" > expansion->edgeCount() == successorDegree ># 175 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 175) << ># 175 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 175 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 175 "../../src/assembly/InflationPapyrus.hpp" > "expansion->edgeCount() == successorDegree" ># 175 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 175 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 175 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" > ># 176 "../../src/assembly/InflationPapyrus.hpp" > << "Tail expands " << hit->token() << " having " << successorDegree << " successors but expansion " << expansion->token() > << " has " << expansion->edgeCount() << " successors" << ># 177 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 177 "../../src/assembly/InflationPapyrus.hpp" > ; > ># 178 "../../src/assembly/InflationPapyrus.hpp" 3 > ( ># 178 "../../src/assembly/InflationPapyrus.hpp" > hit->sentinel() == offset ># 178 "../../src/assembly/InflationPapyrus.hpp" 3 > ) || facile::RequireException("../../src/assembly/InflationPapyrus.hpp", 178) << ># 178 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 178 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠Condition [" << ># 178 "../../src/assembly/InflationPapyrus.hpp" > "hit->sentinel() == offset" ># 178 "../../src/assembly/InflationPapyrus.hpp" 3 > << "] " << ># 178 "../../src/assembly/InflationPapyrus.hpp" > std::endl ># 178 "../../src/assembly/InflationPapyrus.hpp" 3 > << "⢠" > ># 179 "../../src/assembly/InflationPapyrus.hpp" > << "Truncation of " << hex(axis()->toMap(hit->offset())) << " should meet split point " > << hex(axis()->toMap(offset)) << " but extends instead to " << hex(cursor) << ># 180 "../../src/assembly/InflationPapyrus.hpp" 3 > facile::RequireException::require_sentinel ># 180 "../../src/assembly/InflationPapyrus.hpp" > ; > > _scribe->tee()->split(hit, expansion); > } else if ((predecessor != nullptr) && (!predecessor->isFallThrough(offset) || !hit->isFunctionEntry())) { > bool isReturnable = hit->function()->is(Function::Flags::isReturnPossible); > _scribe->modulet()->addEdge(predecessor, hit); > > > > > _scribe->tee()->link(predecessor, hit, isReturnable); > } > > return true; > } > > bool > covers(loc_t location) { return _scribe->modulet()->contain(location) != nullptr; } > >private: > > typename BlockType::Sequence > inflateSequence( loc_t& cursor, loc_t limit) > { > unit<Instruct> i; > std::vector<unit<Instruct>> sequence; > do { > i = _scribe->tab()->establishInstruction(cursor); > sequence.push_back(i); > > _scribe->tee()->inscribe(i); > } while (cursor < limit && !i->isBranch() && !i->isUndefined()); > > if (i->isBranch() && !i->isMultipleBranch()) > _scribe->tab()->establishBranchTarget(i->branchTarget()); > > return sequence; > } ># 226 "../../src/assembly/InflationPapyrus.hpp" > inline handle<ElfMetadata::MemoryMap> > axis() { return _scribe->tab()->axis(); } > > handle<Scribe> _scribe; >}; >} ># 7 "../../src/assembly/CodeletScribe.hpp" 2 > >namespace pii >{ >template<typename Bounds> >class CodeletScribeBase : > ExcavationModel >{ >using CodeletScribe = CodeletScribeBase<Bounds>; >using ModuleTables = ModuleTablesBase<ExcavationModel>; > >template<typename Test = Bounds, typename = typename std::enable_if_t<std::is_default_constructible<Test>::value>> >static handle<Test> >singletonBounds() >{ > static Bounds bounds; > return bounds; >} > >template<typename Test = Bounds, typename = typename std::enable_if_t<!std::is_default_constructible<Test>::value>> >static handle<Test> >singletonBounds(bool diff = false) >{ > ># 29 "../../src/assembly/CodeletScribe.hpp" 3 > throw facile::RequireException("../../src/assembly/CodeletScribe.hpp", 29) ># 29 "../../src/assembly/CodeletScribe.hpp" > << "Missing CodeletScribe::Bounds instance" << ># 29 "../../src/assembly/CodeletScribe.hpp" 3 > facile::RequireException::require_sentinel ># 29 "../../src/assembly/CodeletScribe.hpp" > ; >} > >public: > using BlockType = ExcavationModel::BlockType; > using InflationComponents = InflationComponentsBase<ExcavationModel>; > > > CodeletScribeBase(loan<ModuleTables> moduleTables, handle<Bounds> bounds, unit<InflatedModule> modulet) : > _tab(moduleTables), > _modulet(modulet), > _bounds(bounds), > _papyrus(*this) > {} > > handle<ModuleTables> > tab() { return _tab; } > > handle<InflatedModule> > modulet() { return _modulet; } > > handle<NullTee<BlockType>> > tee() { return _tee; } > > template<typename Cover> > void > assemble(Cover& cover) > { > > > struct WorklistDomain { > CodeletScribe& cs; > std::unordered_set<loc_t, hash_loc_t> domain; > > void > push(Offset offset) { push(cs._tab->axis()->toMap(offset)); } > > void > push(loc_t location) > { > if (domain.emplace(location).second) > cs._worklist.push_back(cs._tab->frontier()->block.makeUnit(location)); > } > > WorklistDomain(CodeletScribe cs) : > cs(cs) > {} > } > worklistDomain(*this); > > using Span = typename Cover::Span; > using Exit = typename Cover::Exit; > > for (unit<Span> span : cover.spans()) > worklistDomain.push(span->start()); > > > while (!_worklist.empty()) { > zunit<typename ModuleTables::FrontierEdge> edge = _tab->frontier()->z(_worklist.back()); > loc_t cursor = _tab->axis()->toMap(edge.u->block); > > _worklist.pop_back(); > > unit<BlockType> block = _tab->findBlock(_tab->axis()->offsetAt(cursor)); > if (block != nullptr) { > _modulet->add(block); > > if (block->succession().mayFallThrough() && _bounds->contains(cursor)) > worklistDomain.push(cursor); > if (block->exit()->isBranch() && _bounds->containsBranch(block)) { > Offset targetOffset = _tab->axis()->resolveTarget(block->exit()->branchTarget()); > loc_t branchTarget = _tab->axis()->toMap(targetOffset); > if (_bounds->contains(branchTarget)) > worklistDomain.push(branchTarget); > } > } > > unit<Span> span = cover.find(cursor); > if (span == nullptr) > continue; > > for (Exit& exit : cover.exits(span)) { > unit<Instruct> branch = _tab->findInstruction(_tab->axis()->toMap(exit.first)); > if (branch == nullptr) > continue; > if (_bounds->containsBranch(branch) && cover.contains(_tab->axis()->toMap(exit.second->start()))) > worklistDomain.push(exit.second->start()); > if (branch->mayFallThrough() && _bounds->contains(branch->nextLocation()) && cover.contains(branch->nextLocation())) > worklistDomain.push(branch->nextLocation()); > } > if (span->isFallThrough()) { > if (cover.contains(_tab->axis()->toMap(span->sentinel()))) > worklistDomain.push(span->sentinel()); > } > } > } > > template<typename Cover> > void > enqueue(Cover& cover) > { > using Span = typename Cover::Span; > > for (unit<Span> span : cover.spans()) > _worklist.push_back(_tab->frontier()->block.makeUnit(_tab->axis()->toMap(span->start()))); > } > > void > enqueue(loc_t location) { _worklist.push_back(_tab->frontier()->block.makeUnit(location)); } > > void > enqueue(Offset offset) { _worklist.push_back(_tab->frontier()->block.makeUnit(_tab->axis()->toMap(offset))); } > > > void > inflate() > { > PiiLog::log()->prefix() << "CodeletScribe saturates the CFG from " << hex(_worklist.size()) << " cover points" << std::endl; > > > while (!_worklist.empty()) { > zunit<typename ModuleTables::FrontierEdge> edge = _tab->frontier()->z(_worklist.back()); > loc_t cursor = _tab->axis()->toMap(edge.u->block); > > _worklist.pop_back(); > > if (_papyrus.enableBlockEntry(_tab->axis()->offsetAt(cursor))) > continue; > > unit<BlockType> block = _papyrus.inflateBlock(cursor, edge.u->predecessor); > if (edge.u->predecessor != nullptr) > edge.u->predecessor->emplaceSuccessor(block); > > if (block->succession().mayFallThrough()) { > if (_bounds->contains(cursor) && !_papyrus.enableBlockEntry(_tab->axis()->offsetAt(cursor), block)) > _worklist.push_back(_tab->frontier()->block.makeUnit(cursor, block)); > } > if (block->exit()->isBranch()) { > if (_bounds->containsBranch(block)) { > Offset targetOffset = _tab->axis()->resolveTarget(block->exit()->branchTarget()); > loc_t branchTarget = _tab->axis()->toMap(targetOffset); > > if (_bounds->contains(branchTarget) && !_papyrus.enableBlockEntry(_tab->axis()->offsetAt(branchTarget), block)) > _worklist.push_back(_tab->frontier()->block.makeUnit(branchTarget, block)); > } > } > } > } > > static owner<CodeletScribe> > make(loan<ModuleTables> moduleTables, handle<Bounds> bounds = singletonBounds()) > { > handle<InflationComponents::Factories> factories = InflationComponents::Factories::get(); > unit<InflatedModule> modulet = factories->modulet.makeUnit(moduleTables); > > return owner<CodeletScribe>::make(moduleTables, bounds, modulet); > } > >private: > using Worklist = std::vector<unit<typename ModuleTables::FrontierEdge>>; > using Papyrus = InflationPapyrus<CodeletScribe>; > > loan<ModuleTables> _tab; > unit<InflatedModule> _modulet; > handle<Bounds> _bounds; > NullTee<BlockType> _tee; > > Papyrus _papyrus; > Worklist _worklist; >}; > >struct FrameBounds { > bool > contains(__attribute__((unused)) loc_t location) { return true; } > > bool > containsBranch(unit<ExcavationModel::BlockType> block) { return block->succession().isBranchInFrame(); } > > bool > containsBranch(unit<Instruct> i) { return !(i->isCall() || i->isReturn()); } >}; > >using FrameScribe = CodeletScribeBase<FrameBounds>; >} ># 3 "../../test/assembly/CodeletScribeTest.cpp" 2 > > >using ModuleTables = ModuleTablesBase<ExcavationModel>; > >struct TestInflate { > void > operator ()() > { > std::cout << "====== TestInflate: " << _tag << std::endl << std::endl; > > owner<FrameScribe> fs = FrameScribe::make(_module); > fs->enqueue(_entryPoint); > fs->inflate(); > handle<InflatedModule> c = fs->modulet(); > > std::cout << "⤠CFG: " << std::endl << c->token() << std::endl; > std::cout << "⤠code: " << std::endl << c->disassemble() << std::endl; > } > > TestInflate(loan<ModuleTables> moduleTables, loc_t entryPoint, const std::string& tag) : > _module(moduleTables), > _entryPoint(entryPoint), > _tag(tag) > {} > > private: > loan<ModuleTables> _module; > loc_t _entryPoint; > std::string _tag; >}; > >struct Sentry : > public ExceptionHandler { > bool fail; > > int > notify(TypeId::HashType id, TypeId::NameType name, const std::exception& e) override > { > fail = true; > return ExceptionHandler::notify(id, name, e); > } >}; > >template<typename TestInstance> >class Main { >public: > int > operator ()(__attribute__((unused)) handle<TestInstance> testInstance, __attribute__((unused)) int argc, __attribute__((unused)) char *argv[]) > { > dynamorioGlobalInit(); > > owner<LiveModuleMetadataBase<ExcavationModel>> self = LiveModuleMetadataBase<ExcavationModel>::load(argv[0]); > testInstance->template begin<TestInflate>(self->moduleTables, &CodeletExamples::sumAverageCode, "sumAverageCode"); > testInstance->template begin<TestInflate>(self->moduleTables, &CodeletExamples::arithmetic, "arithmetic"); > > return 0; > } > >private: >}; > >int >main(int argc, char *argv[]) >{ > using TestInstance = FacileTestSentry<Sentry>; > > TestInstance testInstance(argc, argv); > > return testInstance.testMain<Main>(); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2231762
:
1983226
|
1983227
| 1983426